mycroft adapt研究

Adapt是一款开源软件库,采用规则驱动的方式将自然语言转换为机器可读的数据结构。适用于创建自然语言接口,例如通过解析用户的语音指令来启动特定的Pandora电台。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Adapt islicensed under the GNU Lesser General Public License version 3.0

The Adapt IntentParser is an open source software library for converting natural language intomachine readable data structures

Adapt is a rulesbased artificial intelligence library that is useful for interpreting naturallanguage input. For example, a user might want to create a natural languageinterface that allows them to play a Pandora station. The user might say"Turn on Pandora", or "Play Pandora", or "Put on myJoan Jett Pandora station." The Adapt engine would take this input andfeed the application a JSON data structure similar to:

{

    "confidence": 0.61,

    "target": null,

    "Artist": "joan jett",

    "intent_type":"MusicIntent",

    "MusicVerb": "put on",

    "MusicKeyword": "pandora"

}

The applicationwould then be designed to parse the JSON and play Joan Jett on using the opensource Pandora application "Pianobar"

GIT:

https://github.com/mycroftai/adapt

windows上安装例子:

1 下载adapt-master.zip

2 解压adapt-master.zip

3 pythonsetup.py install

验证安装是否成功,跑下测试例子:

pythonexamples/multi_intent_parser.py "play some music by the clash"

参考例子:

single_intent_parser.py

必须导入的模块:

import json

import sys

fromadapt.intent import IntentBuilder

fromadapt.engine import IntentDeterminationEngine

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值