Skip to main content

分词工具

Project description

分词工具

python版(有node版)

安装

pip install nlp_fenci

command-line

搜狗分词

$ sougou_fenci 武汉市长江大桥
武汉市 n
长江 n
大桥 n

百度分词

$ baidu_fenci 武汉市长江大桥
武汉        地名
长江大桥        地名

sougou 分词 code

import sougou_fenci
resp = sougoou_fenci.sougou("武汉市长江大桥")
for result_item in resp.result:
    print(row_format.format(result_item[0], result_item[1]))

# 结 果
# 武汉市         n
# 长江         n
# 大桥         n

baidu 分词 code

import sougou_fenci
resp = sougoou_fenci.baidu("武汉市长江大桥")
for result_item in resp.result:
    print(row_format.format(result_item[0], result_item[1]))

# 结 果
# 武汉市         地名
# 长江大桥         地名

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for nlp-fenci, version 1.2.3
Filename, size File type Python version Upload date Hashes
Filename, size nlp_fenci-1.2.3-py3-none-any.whl (3.7 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size nlp_fenci-1.2.3.tar.gz (2.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page