SegJb
- Lazy initialization.
- Initialization with user defined dict.
- Build-in stop-words dict, punctuations dict.
- Output control of stopwords, punctuations, minimum word length, output delimiters etc..
- Support ngram.
API
- return: void.
- stopwords_file: stopword dictionary. Use “” to disable. [SegJb.DEFAULT_STPW]
- puncs_file: punctuation dictionary. Use “” to disable. [SegJb.DEFAULT_PUNC]
- user_dict: load user customized dictionary. Use “” to disable. [SegJb.DEFAULT_DICT]
- silent: whether print initializing log. [True]
thread: number of part to separate the corpus for parallel. [1]
- return: void
- return: list
- corp: unicode or utf8 sentence.
- return: unicode string.
- corp: unicode or utf8 sentence.
Parameters
- delim [’ ‘]the delimeter used to constuct the segmentation result in string.
- min_word_len [1]word with length less than min_word_len will not in segmentation result.
- ngram [1]result can be ngram.
- keep_stopwords [True]whether to keep stopwords in result.
- keep_puncs [True]whether to keep stopwords in result.
Example:
from segjb import SegJb
hdl_seg = SegJb()
hdl_seg.init()
hdl_seg.set_param(delim=' ', ngram=2, keep_stopwords=True, keep_puncs=False)
print hdl_seg.cut2str('这是一场精彩的比赛')
Reference:
Bigdict from iLife(562193561@qq.com)
Metadata
Release files for segjb 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| segjb-1.0.tar.gz | 5.9 MB | Without provenance | Details for segjb-1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| segjb-1.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for segjb-1.0-py2.py3-none-any.whl |
Total release size: 11.9 MB
Release files / segjb-1.0.tar.gz
| Download URL | segjb-1.0.tar.gz |
|---|---|
| Size | 5.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9547cf4bca2e9c6023c9ffd365e3a47988a2b1be1d1911231af8d87e6790e4b0
|
|
BLAKE2b-256 checksum How to use checksums |
1b348b3cfeeda727afdfd99d95343a7fe40bab802f4852398b9ca1be751c9cee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.6
|
Release files / segjb-1.0-py2.py3-none-any.whl
| Download URL | segjb-1.0-py2.py3-none-any.whl |
|---|---|
| Size | 6.0 MB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
fe3d89891aef3723f7edfdb214475c5dbbb2aeb9738a6bf9109261fc77962244
|
|
BLAKE2b-256 checksum How to use checksums |
024a99025719efafe7cff864f24be592a529593b279cbdec029a5bab4f1b4aef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.6
|
Security for segjb 1.0
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.