Nlp 用于解析意图和实体(如Alexa Custom Skills)的文本的开源库
有没有像Amazon Alexa Custom Skills那样工作的开源库,其中您为它提供了一个要匹配的意图模式和示例语句,并且它将提供一个解析的标记化响应,其中包含在定义中匹配的实体 这里有一个例子 训练和指定如何匹配文本和映射到实体的示例语句:Nlp 用于解析意图和实体(如Alexa Custom Skills)的文本的开源库,nlp,text-parsing,alexa,wit.ai,Nlp,Text Parsing,Alexa,Wit.ai,有没有像Amazon Alexa Custom Skills那样工作的开源库,其中您为它提供了一个要匹配的意图模式和示例语句,并且它将提供一个解析的标记化响应,其中包含在定义中匹配的实体 这里有一个例子 训练和指定如何匹配文本和映射到实体的示例语句: AnswerIntent the answer is {Answer} AnswerIntent my answer is {Answer} AnswerIntent is it {Answer} AnswerIntent {Answer}
AnswerIntent the answer is {Answer}
AnswerIntent my answer is {Answer}
AnswerIntent is it {Answer}
AnswerIntent {Answer} is my answer AnswerOnlyIntent {Answer}
AMAZON.StartOverIntent start game
AMAZON.StartOverIntent new game
AMAZON.StartOverIntent start
AMAZON.StartOverIntent start new game
另一个服务是,它允许您配置表达式和令牌以匹配,是否有任何开源库提供这种级别的灵活性 有很多OSS解析库。事实上,大多数语言都比Alexa的语言模式有更多的灵活性,Alexa的语言模式只是正则表达式 您可以选择专门针对NLP的库,如GATE、Stanford Core NLP、OpenNLP和NLTK。如果您使用的是大型文档集合,那么ApacheLucene(或者Solr,如果您愿意的话)是非常棒的(尽管GATE也支持它们)
对于重量较轻的东西,可以使用通用解析器生成器。要列出的项目太多了(),但像Antlr这样的packrat解析器()性能优异且易于使用。Mycroft AI似乎有一堆很好的项目,它们提供的功能和程序员界面与Amazon Alexa定制技能非常相似,您可以自己托管和修改它,以获得比Alexa语音服务更大的灵活性(但这也有一点不利,因为你必须自己扩展它)
-
- -是一种将自然语言处理、文本到语音、语音到文本和强大的API结合在一起的技术,可创造强大的体验,使用户可以通过语音控制操作智能设备和物联网
- 开放STT-开源语音到文本模型(似乎他们现在正在利用其他API实现这一点,如Google语音到文本、Wit.ai和IBM Watson)
- -将自然语言转换为机器可读的数据结构
- 模拟文本到语音-文本并以高质量的声音大声朗读(目前只是一个提案项目,尚未提供)
my name is John and I am 20 years old
my name's John and I'm 40
my name's Taylor and I'm 55 years old
....
也许,你可以尝试Rasa nlu。它与路易斯女士非常相似。你可以将文本解析为结构化数据,如
{
"entities": [
{
"endIndex": null,
"entity": "hello",
"score": null,
"startIndex": null,
"type": "name"
}
],
"intents": [
{
"intent": "greet",
"score": 0.640747175086514
},
{
"intent": "goodbye",
"score": 0.2696910959582717
},
{
"intent": "FindEmployeeLocation",
"score": 0.05672220244026073
},
{
"intent": "FindEmployee",
"score": 0.032839526514953594
}
],
"query": "hello",
"topScoringIntent": {
"intent": "greet",
"score": 0.640747175086514
}
您也可以使用json或markdown格式来训练您的语言模型。最重要的是,该服务是开源的。这意味着您不必为使用它支付额外的费用。您只需设置自己的nlu服务器,然后使用它。
看看-我不知道它有多强大。
{
"entities": [
{
"endIndex": null,
"entity": "hello",
"score": null,
"startIndex": null,
"type": "name"
}
],
"intents": [
{
"intent": "greet",
"score": 0.640747175086514
},
{
"intent": "goodbye",
"score": 0.2696910959582717
},
{
"intent": "FindEmployeeLocation",
"score": 0.05672220244026073
},
{
"intent": "FindEmployee",
"score": 0.032839526514953594
}
],
"query": "hello",
"topScoringIntent": {
"intent": "greet",
"score": 0.640747175086514
}