Giter Club home page Giter Club logo

ecws's Introduction

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文件和vocab文件
Model Name Download Link
ecws.v3.model BaiduPan 提取码:ecws
vocab -
  • python引用方式:
from ecws.segment import Segmenter

model_path = 'ecws.model'
vocab_path = 'vocab_dir'  # 指向下载的vocab文件夹

predict = Segmenter(model_path, vocab_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

开发者

@ 张强<<[email protected]>> @ 宋博川<<[email protected]>>

ecws's People

Contributors

campper avatar day-day-ap-ap avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.