Skip to content

Using Flask export jieba, SnowNLP, pkuseg as http API web service.

Notifications You must be signed in to change notification settings

jk195417/chinese-segmentation-as-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chinese-segmentation-as-service

Using Flask export jieba/SnowNLP/pkuseg as http API web service.

require

  1. python 3.7 ($ brew install python3)
  2. pipenv ($ brew install pipenv)

Usage

  1. clone it $ git clone https://github.com/jk195417/chinese-segmentation-as-service.git
  2. $ cd chinese-segmentation-as-service
  3. $ pipenv update
  4. $ pipenv run python app.py, serve on http://localhost:3001
  5. $ curl -X POST -H "Content-Type: application/json" -d '{"text" : "要斷詞的文字"}' "http://localhost:3001/segmentations" or $ curl -X POST -H "Content-Type: application/json" -d '{"text" : ["要斷詞的句子1", "要斷詞的句子2"]}' "http://localhost:3001/segmentations"

Releases

No releases published

Packages

No packages published

Languages