微软 luis 费用
Many Chatbot Designs Are Dependent On A Standalone NLU API
许多Chatbot设计依赖于独立的NLU API
Migrating your chatbot/NLU solution from one environment to another is not something which will happen frequently. Should you consider it, the prime reason will most probably be cost, hosting options, customization.
将您的chatbot / NLU解决方案从一种环境迁移到另一种环境并不是一件容易的事。 您应该考虑一下,主要原因可能是成本,托管选项,自定义。
It is not a bad thing, but structures and types are being introduced to entities, which complicates migration. These structures differ considerably between the various platforms. Which means entities cannot merely be transferred. The best fit in the new environment needs to be identified and the structure transposed.
这不是一件坏事,但是结构和类型被引入到实体中,这使迁移变得复杂。 这些结构在各个平台之间存在很大差异。 这意味着实体不能仅仅被转移。 需要确定新环境中最合适的位置,并转换结构。
Rasa… Here are a few reasons why we see developers switching:Faster: Runs locally — no http requests and server round trips required
Rasa… 以下 是我们看到开发人员切换的一些原因:更快 :在本地运行-无需HTTP请求和服务器往返
Customizable: Tune models and get higher accuracy with your data set
可自定义 :调整模型并通过数据集获得更高的准确性
Open source: No risk of vendor lock-in — Rasa is under the Apache 2.0 license and you can use it in commercial projects.
开源 :不存在供应商锁定的风险-Rasa受Apache 2.0许可,您可以在商业项目中使用它。
Although valuable functionality will fall along the wayside, Rasa can be used very conveniently as a NLU Engine and API alone.
尽管有价值的功能会逐渐消失,但是Rasa可以非常方便地单独用作NLU引擎和API。
Intents are defined, with annotated entities. Hence entities are defined by their context.
使用带注释的实体定义了意图。 因此,实体由其上下文定义。
The LUIS Environment created for the migration is a simple travel information NLU configuration. Three of the four available entity types in LUIS were used:
为迁移创建的LUIS环境是一个简单的旅行信息NLU配置。 在LUIS中使用了四种可用的实体类型中的三种:
Machined Learned 机器学习 List 清单 Regex 正则表达式Pattern.any is a very specialized entity type and I thought not to include it.
Pattern.any是一种非常专业的实体类型,我认为不包括它。
Entity types within LUIS LUIS中的实体类型The three entities created are:
创建的三个实体是:
ConfirmationCode: Entity of Type Regex expecting a 5 digit code constituted only by numbers.
ConfirmationCode:正则表达式类型的实体,期望由数字组成的5位数字代码。
Continents: Entity of Type List.
大陆:类型列表实体。
TravelDetail: Made up of a Machine Learned entity type.
TravelDetail:由机器学习的实体类型组成。
Three Entities created covering each of the three types. 创建了三个实体,分别覆盖三种类型。Below is a view of our single intent called Travel with the example utterances. You will see that these utterances are relatively complex with multiple entities per utterance.
下面是带有示例话语的单一意图“ 旅行”的视图。 您将看到这些话语相对复杂,每个话语包含多个实体。
Annotating Utterance Example with Entity Elements 使用实体元素注释话语示例We could break these up into multiple intents to make the intents simpler. However, LUIS allows us to create complex entities, thus simplifying the intents process.
我们可以将它们分解为多个意图,以简化意图。 但是,LUIS允许我们创建复杂的实体,从而简化了意图流程。
We start by defining a single entity named:
我们首先定义一个名为:
Travel Detail
旅行细节
Within this entity, we defined three sub-entities. You can think of this as nested entities or sub-types. The three sub-types defined are:
在这个实体中,我们定义了三个子实体。 您可以将其视为嵌套实体或子类型。 定义的三个子类型是:
Time Frame
大体时间
Mode
模式
City
市
From here, we have a sub-sub-type for City:
在这里,我们有一个City的子子类型:
From City
从城市出发
To City
前往城市
Adding Sub-Entities: ML Entity Composed of Smaller Sub-Entities 添加子实体:由较小的子实体组成的ML实体Here are the intent examples, used to train the model with the entity, sub-types, and sub-sub-types; fully contextualized.
这是意图示例,用于通过实体,子类型和子子类型训练模型; 充分情境化。
Annotated Intent Examples 带注释的意图示例Testing the interface in the test console is demonstrated here…
在此演示了在测试控制台中测试界面的方法…
Testing the NLU Application 测试NLU应用程序Lastly the LUIS NLU Application is exported in a JSON format.
最后,LUIS NLU应用程序以JSON格式导出。
Export the NLU application in JSON format 以JSON格式导出NLU应用程序The Rasa procedure is detailed on this page of the Rasa website:
Rasa网站的此页面上详细介绍了Rasa程序:
During the import process, this error message is displayed multiple times…more about this later.
在导入过程中,此错误消息会多次显示。
UserWarning: Your luis data schema version 7.0.0 is higher than 5.x.x. Training may not be performed correctly.The same three utterances were used after migration to Rasa NLU…
迁移到Rasa NLU后,使用了相同的三种发音…
All intents were detected correctly. 正确检测到所有意图。Regex and List entities were not detected.
未检测到正则表达式和列表实体。
Machine Learned entities where detected very accurately. However, the nested entity types were not detected. But this did not surprise me.
机器学习的实体,可以非常准确地进行检测。 但是,未检测到嵌套实体类型。 但这并不令我惊讶。
Rasa NLU detected all the entities and intent for the machined learned entities. Rasa NLU检测到所有实体以及机器学习的实体的意图。The LUIS environment has changed dramatically over the last few months, Machine Learned Entities were introduced to LUIS in November of 2019. Hence I am not surprised that Rasa is two LUIS schema versions behind.
在过去几个月中, LUIS环境发生了巨大变化,机器学习实体于2019年11月引入LUIS。因此,对于Rasa落后于两个LUIS模式版本,我并不感到惊讶。
Will I use the auto migration tool? It might be a useful starting point.
我会使用自动迁移工具吗? 这可能是一个有用的起点。
However, the approach I will follow is:
但是,我将遵循的方法是:
Export the LUIS NLU Application in JSON format. 以JSON格式导出LUIS NLU应用程序。 Plan & Decide which Rasa entity types best match and represent the LUIS entity types. 计划并确定哪种Rasa实体类型最匹配并代表LUIS实体类型。Create a Rasa nlu.md file based on the LUIS JSON file. This could be manual or programmatic.
基于LUIS JSON文件创建Rasa nlu.md文件。 这可以是手动的或程序的。
I am sure Rasa’s entity structure will also evolve over time; as they are also introducing entity types; currently in Beta. Hence your NLU entity situation will not be static and evolve over time as your NLU environment evolve. Hence continuous and ongoing consideration is necessary to improve the NLU performance and leverage new functionality.
我相信Rasa的实体结构也会随着时间而发展; 因为他们也在引入实体类型; 目前处于Beta版 。 因此,随着您的NLU环境的发展,您的NLU实体状况将不会是静态的,并且会随着时间的推移而发展。 因此,需要持续不断地考虑以提高NLU性能并利用新功能。
翻译自: https://medium.com/@CobusGreyling/migrating-to-rasa-open-source-nlu-from-microsoft-luis-2b9e39092e
微软 luis 费用