开源库解析为目的的文本和实体,如Alexa的自定义技能

问题描述 投票:3回答:4

是否有类似的工作,你为它提供一个意图的模式和样品话语匹配和它将提供与在定义匹配实体解析标记化响应亚马逊的Alexa自定义技能的任何开源库。

这里有一个例子Alexa Custom Skill Intent schema

样品话语培训,并指定如何匹配文本和映射到实体:

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

另一种服务是https://wit.ai/它允许您配置表达式和令牌匹配,是否有任何开源库,提供这种程度的灵活性。

nlp text-parsing alexa wit.ai
4个回答
2
投票

迈克罗夫特AI似乎有能够提供的功能和编程界面非常类似亚马逊的Alexa自定义技能项目一个不错的堆栈,可以托管并亲自对其进行修改,以获得比Alexa的语音服务更灵活(但也有点不利的一面,因为你必须自己缩放)。

  • https://docs.mycroft.ai/skill.creation
  • https://mycroft.ai/projects/ Mycroft Core - 则是结合该技术的自然语言处理,文本到语音,语音到文本,和强大的API,共同打造一个强大的体验,使用户能够操纵他们的智能设备和物联网通过语音控制互联网。 打开STT - 开源语音到文本模式(好像他们是利用其他API的这个,现在像谷歌语音到文本,Wit.ai和IBM沃森) Adapt Intent Parser - 转换自然语言成机器可读的数据结构 模仿文本到语音 - 文本和高质量的语音读它大声地(只是目前,没有可用的方案项目还)

0
投票

如果我有你的权利,你要提供一个模式,以配合可能的值和图书馆有可能产生话语名单。如果是这样,有一个alexa-app项目,它可以让你从其他功能做到这一边。这是麻省理工学院下,因此它可以从那里借用所需的代码。例:

app.intent('sampleIntent',
    {
        "slots":{"NAME":"LITERAL","AGE":"NUMBER"}, 
        "utterances":[ "my {name is|name's} {names|NAME} and {I am|I'm} {1-100|AGE}{ years old|}" ]
    },
    function(request,response) { ... }
);

可能的话语:

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
....

0
投票

也许,你可以尝试拉沙 - NLU。这是很相似的MS路易斯。您可以将文本解析像结构化数据

{
"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或降价格式的语言模型为好。最重要的是,服务是开源的。这意味着你不必支付额外的钱使用。您只需设置自己的NLU服务器,然后使用它。 https://github.com/RasaHQ/rasa_nlu


-1
投票

有许多OSS解析库。大多数实际上有比Alexa的话语模式这只是正则表达式更大的灵活性。

您可以从目标NLP特别喜欢GATE,斯坦福核心NLP,OpenNLP和NLTK库选择。如果你有大量文档集合的工作,然后Apache的Lucene的(或者,如果你喜欢SOLR)是是花花公子(虽然GATE支持他们太)。

对于一些较轻的重量可以使用通用的解析器生成。有太多列表(https://en.wikipedia.org/wiki/Comparison_of_parser_generators),但packrat解析器(http://bford.info/packrat/)像ANTLR的是高性能和易于使用。

© www.soinside.com 2019 - 2024. All rights reserved.