我已经构建了一个Luis模型,我遇到了一个问题,解析了像"this weeked"这样的条目的builtin.datetime.date返回2016-W20-WE(或者类似的东西),它们没有使用DateTime.Parse成功解析.
我发现这篇文章似乎使用了一个名为LUISParse的类,但我在Google上找不到任何引用.
我一直在尝试在LUIS中为api.ai的闲聊模型建模,但它很快就失控了。任何建议如何做到这一点将不胜感激。
你忙吗,你还好吗,你能给你建议,能听见我,能帮忙,能杀人,能动,能说话,能说话,能看见我,能脱衣服,能你挥手回答我的问题,问我一个问题聪明,做我的朋友,保持安静,愚蠢的改变你找男朋友的女朋友。
这些是闲聊的几个例子。
api.ai有一个名为smalltalk的域,可以响应此类对话。我的问题是如何在LUIS中建模。
玩微软的Luis + bot框架,我的"这将成为一个好的类型提供者"的感觉开始刺痛.不幸的是,类型提供者不能输出有区别的联盟.我希望做类似以下的事情,但这是不可能的:
type Luis = LuisProvider<@"LuisId",@"LuisPasskey">
let IntentMatcher Intent =
match intent with
| Luis.Intents.Greeting -> GreetingHandler()
| Luis.Intents.SetAlarm title startDate startTime -> AlarmHandler title startDate startTime
| _ -> CouldNotUnderstand()
Run Code Online (Sandbox Code Playgroud)
Luis意图及其参数都可通过Apis获得,使其成为typeProviderization的理想选择
这里参考的是一个C#bot示例的处理程序(我认为它可以更干净,在F#中更安全类型):
public const string Entity_Alarm_Title = "builtin.alarm.title";
public const string Entity_Alarm_Start_Time = "builtin.alarm.start_time";
public const string Entity_Alarm_Start_Date = "builtin.alarm.start_date";
public const string DefaultAlarmWhat = "default";
[LuisIntent("builtin.intent.alarm.set_alarm")]
public async Task SetAlarm(IDialogContext context, LuisResult result)
{
EntityRecommendation title;
if (!result.TryFindEntity(Entity_Alarm_Title, out title))
{
title = new EntityRecommendation(type: Entity_Alarm_Title) { …Run Code Online (Sandbox Code Playgroud) 我一直试图调用MS Luis.ai 程序化 API(bit.ly/2iev01n),并且每次请求都收到401未经授权的响应.这是一个简单的GET示例:https://api.projectoxford.ai/luis/v1.0/prog/apps/{appId}/entities?subscription-key={subscription_key}.
我从Luis.ai GUI(由API文档指定)提供我的appId,在这里:

我从Azure提供我的订阅密钥(由API文档指定),在这里:

来自上方的应用ID和订阅密钥与我用于成功点击查询API的内容完全相同(请参阅底部的注释).我的帐户是按需付费(不是免费的).
我在这里做错了吗?此API是否已弃用,移动,关闭或与文档不同步?
注意:我可以通过在线GUI操作我的模型,但这种方法对我们的业务需求来说太过手动,我们的模型需要在新业务实体出现时以编程方式更新.
注意:程序化API与具有此请求URL的查询API不同,这对我来说很好:
https://api.projectoxford.ai/luis/v2.0/apps/{appId}?subscription-key={subscription_key}&verbose=true&q={utterance}
注意:似乎没有适用于v2.0的Luis.ai编程API - 这就是查询和编程API的URL具有不同版本的原因.
azure chatbot azure-machine-learning-studio botframework azure-language-understanding
我想使用 Azure DevOps 中的管道执行“调度刷新”,但是我找不到任何执行该过程的参考或文档。我已经有了使用 Azure DevOps 中的管道执行“调度刷新”的想法,来自StackOverflow中这个问题的评论之一。
您的帮助将不胜感激。
azure chatbot node.js azure-devops azure-language-understanding
我正在写一个可以说两种语言的机器人.因此,我需要使用两个单独的LUIS应用程序(每种语言一个).
Bot框架中的LuisDialog像这样初始化(来自Microsoft的例子):
[LuisModel("c413b2ef-382c-45bd-8ff0-f76d60e2a821", "6d0966209c6e4f6b835ce34492f3e6d9")]
[Serializable]
public class SimpleAlarmDialog : LuisDialog<object>
{
Run Code Online (Sandbox Code Playgroud)
但是,我需要使用动态应用程序ID和订阅密钥,具体取决于我确定的用户的语言.
两个LUIS应用程序中的所有方法,意图等都是相同的.
C#中的属性不能是动态的.
我可以将app和订阅密钥动态传递给LuisDialog而不是硬编码的另一种方法是什么?
我已经开始将Luis集成到我的BOT中,LUIS查询在浏览器中运行良好,但似乎在通过代码调用时,从LUIS GetResult返回的内容会抛出错误.
LUIS查询在这里
对话框的源代码:
[LuisModel("2d3e39d8-632a-4e00-bf2f-d98ea4b2ed79&", "subscription Key")]
[Serializable]
public class SupportDialog : LuisDialog<object>
{
[LuisIntent("")]
public async Task None(IDialogContext context, LuisResult result)
{
await context.PostAsync("Sorry, I dont understand what you need");
context.Wait(MessageReceived);
}
[LuisIntent("OrderStatus")]
public async Task OrderStatus(IDialogContext context, LuisResult result)
{
var returnMsg = "You wanted to check the order status";
var orderStatus = "Dispatched";
var deliveryDate = DateTime.Now.AddDays(3);
var entities = new List<EntityRecommendation>(result.Entities);
if(entities.Any((entity)=> entity.Type == "Order"))
{
var orderEntity = entities.Where((entity) => entity.Type == "Order").FirstOrDefault();
var …Run Code Online (Sandbox Code Playgroud) c# azure botframework azure-language-understanding azure-cognitive-services
我想在LUIS中检测一个人的姓名,包括一个有姓名的人(例如:Mary-Anne)
设置:
我训练和发表(在分期)但它从未检测到整个组合名称,而是只返回第一部分作为实体(例如:实体是"marc"而不是"marc-andre").
你知道如何配置LUIS来正确检测我的组合名称实体吗?
在Luis.ai用户界面中,我没有意识到在标记话语时,可以在指定实体时多次单击以选择多个单词.
我正在使用Microsoft bot框架创建一个机器人来询问用户然后理解答案.在bot框架中使用FormFlow API对用户进行询问并检索答案.以下是表单流的代码:
public enum Genders { none, Male, Female, Other};
[Serializable]
public class RegisterPatientForm
{
[Prompt("What is the patient`s name?")]
public string person_name;
[Prompt("What is the patients gender? {||}")]
public Genders gender;
[Prompt("What is the patients phone number?")]
[Pattern(@"(<Undefined control sequence>\d)?\s*\d{3}(-|\s*)\d{4}")]
public string phone_number;
[Prompt("What is the patients Date of birth?")]
public DateTime DOB;
[Prompt("What is the patients CNIC number?")]
public string cnic;
public static IForm<RegisterPatientForm> BuildForm()
{
OnCompletionAsyncDelegate<RegisterPatientForm> processHotelsSearch = async (context, state) =>
{
await context.PostAsync($"Patient {state.person_name} …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 Unity3D 中的 Microsoft Azure 认知服务语音转文本 SDK 构建一个简单的应用程序。我已经按照这个教程学习了,效果很好。本教程的唯一问题是语音转文本是通过按钮激活的。当您按下按钮时,它将在整个句子期间进行转录,并且您必须再次按下该按钮才能再次转录。我的问题是,我希望程序在 Unity 中运行后立即开始转录,而不是每次我想转录句子时都必须按一个按钮。
这是代码。
public async void ButtonClick()
{
// Creates an instance of a speech config with specified subscription key and service region.
// Replace with your own subscription key and service region (e.g., "westus").
var config = SpeechConfig.FromSubscription("[My API Key]", "westus");
// Make sure to dispose the recognizer after use!
using (var recognizer = new SpeechRecognizer(config))
{
lock (threadLocker)
{
waitingForReco = true;
}
// Starts speech recognition, and …Run Code Online (Sandbox Code Playgroud) speech-recognition azure unity-game-engine azure-language-understanding azure-cognitive-services
azure-language-understanding ×10
azure ×5
botframework ×4
c# ×4
chatbot ×2
azure-devops ×1
azure-machine-learning-studio ×1
bots ×1
datetime ×1
dsl ×1
f# ×1
formflow ×1
node.js ×1