Skip to main content
scseg
========
scseg中文分词,是基于mmseg的简单分词组件


Feature
========
* 支持pinyin分词
* 支持用户自定义词典
* 支持单位合并
* 支持汉字数字识别

Install
==========
* `pip install scseg`
* 通过`import scseg`来引用


Algorithm
==========
* 采用mmseg算法进行切分
* 采用规则方式支持中文数字分词

功能 1):分词`scseg.seg_text`方法
==============

* `scseg.seg_text`函数接受3个参数:
* `text`参数为需要分词的字符
* `ext_dict_words`为用户自定义的扩展字典
* `use_combine`代表是否需要合并处理

代码示例( 全功能分词 )

#encoding=utf-8
import genius

seg_list = scseg.seg_text(u'中国人民站起来了pinyin')
print '\n'.join(seg_list)


功能 2):面向索引的分词
==============
* `scseg.seg_keywords`为面向索引的切割方式
* 其作用是枚举出所有可能的切割方式
* `text`参数为需要分词的字符

代码示例( 全功能分词 )

#encoding=utf-8
import scseg

seg_list = scseg.seg_keywords(u'中国人民站起来了pinyin')
print '\n'.join(seg_list)

Metadata

Release files for scseg 1.7.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scseg 1.7.4
File Size Uploaded Provenance Actions
scseg-1.7.4.tar.gz 1.6 MB Without provenance Details for scseg-1.7.4.tar.gz

Release files / scseg-1.7.4.tar.gz

Download URL scseg-1.7.4.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
185308100e4e134f69e8a3437cd70a2a2755e6e808f19281a21ccfbedb884f39
BLAKE2b-256 checksum
How to use checksums
766d7bd6f514395eb25917724dd6f9c5e8121bdc87b8ae20bcd34adfad42000e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for scseg 1.7.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page