bf engine sdk for python
Project description
机器人工厂引擎
目录
提供的功能有:
- 创建BOT
- 问答管理
- 知识图谱
- 任务引擎
安装方式
pip安装
pip install -U bfengine
如果比较慢,可以使用清华的pip源:-i https://pypi.tuna.tsinghua.edu.cn/simple
使用方式
1.加载BF引擎
import bf_engine
result = bf_engine.init() #加载BF引擎
2.使用BF引擎
import bf_engine
# 机器人创建
bot = bf_engine.create_bot()
# 训练问答语料
bot.qa.train(question_path='data/问答上传模板.xlsx',corpus_path='data/语料上传模板.xlsx')
# 问答语料测试
print('qa出话: ' + bot.qa.query('你好').text)
# 训练知识图谱语料
bot.kg.train(path='data/kg-test.xlsx')
# 知识图谱测试
print('kg出话: ' + bot.kg.query('竹间的年龄').text)
# 加载任务
bot.te.load(path='data/taskengine.json')
# 任务出话
print('te出话: ' + bot.te.query('我要买火车票').text)
print('te出话: ' + bot.te.query('北京').text)
print('te出话: ' + bot.te.query('是的').text)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bfengine-0.1.27.tar.gz
(40.4 kB
view details)
Built Distributions
bfengine-0.1.27-py3.8.egg
(100.1 kB
view details)
bfengine-0.1.27-py3-none-any.whl
(48.2 kB
view details)
File details
Details for the file bfengine-0.1.27.tar.gz
.
File metadata
- Download URL: bfengine-0.1.27.tar.gz
- Upload date:
- Size: 40.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccf24c5c1d739f69c0d11b1da5662096fa700ba510e7c468b7c207fee03c0ff5 |
|
MD5 | b5c41a9f06690931828f2fb3634b6f37 |
|
BLAKE2b-256 | ec969e64a5719c674ef120200b2f6af6c42ebfc787e346f9512d962ceb8654f9 |
File details
Details for the file bfengine-0.1.27-py3.8.egg
.
File metadata
- Download URL: bfengine-0.1.27-py3.8.egg
- Upload date:
- Size: 100.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9eace729b42913dd99b5a6fc7fef2ff9be9c26eb7365ac4fa572ce9b9332901c |
|
MD5 | 6d91b2c8ff589f8d9fb1347673b6bb74 |
|
BLAKE2b-256 | f034cb92c1afe8626924352e31a762a854b96074f682a1bc0eb7636f469fa628 |
File details
Details for the file bfengine-0.1.27-py3-none-any.whl
.
File metadata
- Download URL: bfengine-0.1.27-py3-none-any.whl
- Upload date:
- Size: 48.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a3699554fb3ed2b99954277229d3788129c065ec5f7b183766282f5d9a7385f |
|
MD5 | f2e749834c8c0137a8cf66ae3950729b |
|
BLAKE2b-256 | 29b00a42b0acf53d701c320deb9f29769de6b9d02ed050449d7409183003ec07 |