2 Star 1 Fork 1

计算所-电力认知智能计算研究室 / ecws

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Documentation Status CODE SIZE Build status PyPI Downloads

电力领域中文分词模型

ecws 是面向电力领域的基础中文分词模型组件,目标是打造电力领域的自然语言处理基础能力

安装指南

ecws 依赖以下包:

  • torch==1.5.1
  • allennlp==1.0.0

版本号

R3.0.5

模型命名

NLP-ECWS-R3.0.5

安装

  • 第一步,安装 ecws

使用 pip 安装

pip install ecws

或从源代码安装

git clone https://github.com/rises-tech/ecws.git
cd NLP-ECWS
pip install -e .
  • 下载ecws.model文件
Model Name Download Link
ecws.v3.model BaiduPan 提取码:ecws
  • python引用方式:

from ecws.segment import Segmenter

model_path = 'ecws.model'

predict = Segmenter(model_path)

d = predict.seg(sent)
  • 接口demo界面
http://120.27.25.150:8082/
  • web api 调用方式
def webservice_ecws(sentence):
  data = {'sent': sentence}
  url = 'http://120.27.25.150:8082/predict'
  r = requests.post(url, json=data)
  data = json.loads(r.text)
  seg = data['spans']
  return seg

其中返回的结果是一个字典,字段'sent'中包含分词结果。

  • 电力自然语言处理演示平台

http://demo.rises.tech

开发者

@ 张强<<alxor@live.cn>> @ 宋博川<<abc_hhhh@163.com>>

MIT License Copyright (c) 2020, rises.tech <alxor@live.cn> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

电力领域中文分词模型 ecws 是面向电力领域的基础中文分词模型组件,目标是打造电力领域的自然语言处理基础能力 展开 收起
Python
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/sgccnlp/ecws.git
git@gitee.com:sgccnlp/ecws.git
sgccnlp
ecws
ecws
master

搜索帮助