从一段描述中提取出设备、参数等信息

chenhaiyang 504c7264e5 add upgrade command into README 4 gadi atpakaļ
kwextraction c13c1fb224 complite extractor version 0.1.0 4 gadi atpakaļ
tests c13c1fb224 complite extractor version 0.1.0 4 gadi atpakaļ
.gitignore c13c1fb224 complite extractor version 0.1.0 4 gadi atpakaļ
LICENSE 6f50a01fcc Initial commit 4 gadi atpakaļ
MANIFEST.in c13c1fb224 complite extractor version 0.1.0 4 gadi atpakaļ
README.md 504c7264e5 add upgrade command into README 4 gadi atpakaļ
setup.py c13c1fb224 complite extractor version 0.1.0 4 gadi atpakaļ

README.md

keyword-extraction

从一段描述中提取出设备、参数等信息

通过将数据字典标准的设备名称,参数名称与目标文本对比,如果设备名称或参数名称出现在目标文本中,即认为完成关键信息提取。

Exapmle

>>> from kwextraction.extraction import extractor
>>> test_text_list = [
...     '1#1-3号生活热水水泵的耗电功率是多少@=-',
...     '1#1-3号生活热水水泵的出水温度d是多少@=-',
... ]
>>> result = extractor(test_text_list)
>>> type(result)
<class 'generator'>
>>> result_list = [item for item in result]
[{'str': '1#1-3号生活热水水泵的耗电功率是多少@=-', 'equipment': '生活热水水泵', 'param': '耗电功率'}, {'str': '1#1-3号生活热水水泵的出水温度d是多少@=-', 'equipment': '生活热水水泵', 'param': ''}]
>>> type(result_list[0])
<class 'dict'>

Features

目前版本属初级版本,思路简单,功能简陋,准确度不会很高,后续会根据业务,产品反馈进行改进。

Installation

$ pip install kwextraction -i http://dev.dp.sagacloud.cn:8082/repository/saga-pypi-group/simple --trusted-host dev.dp.sagacloud.cn
$ pip install --upgrade kwextraction -i http://dev.dp.sagacloud.cn:8082/repository/saga-pypi-group/simple --trusted-host dev.dp.sagacloud.cn

可定期自行更新设备信息文件

$ python get_equipment_info.py

Contribute

Gogs

可自行提交修改 bug

Dependencies

requests