“TinySegmenter in Python” is a Python port by Masato Hagiwara of TinySegmenter, which is an extremely compact Japanese tokenizer originally written in JavaScript by Mr. Taku Kudo.
The library has been finally packaged by Jehan. It resulted into this fork because Masako Hagiwara did not answer emails, and packaging patches could therefore not be committed upstream. But this is a friendly fork, and Masako Hagiwara is welcome to take back maintainance over his project. For the time being, I (Jehan) took up the maintenance, so please refer to this new website as being official, and direct any new patch there. I will follow up on patchs and bug reports, but probably won’t maintain an active development. Anyone wishing to improve the library is welcome to participate and will be gladly given committer rights.
It works on Python 2.6 or above (works on Python 3 too).
Download and Installation
This library can be installed the common ways: with a setup.py, as a pip package… See the INSTALL file in the package for more details.
If you simply want to download the source package, refer to the pypi repository: http://pypi.python.org/pypi/tinysegmenter
Development version can be downloaded anonymously at the Git repository:
$ git clone git://git.tuxfamily.org/gitroot/tinysegmente/tinysegmenter.git
or browsed online at: http://git.tuxfamily.org/tinysegmente/tinysegmenter/
Usage
Example code for direct usage:
> import tinysegmenter
> segmenter = tinysegmenter.TinySegmenter()
> print(' | '.join(segmenter.tokenize(u"私の名前は中野です")))
私 | の | 名前 | は | 中野 | です
TinySegmenter‘s interface is compatible with NLTK’s TokenizerI class, although the distribution does not directly depend on NLTK. Here is one way to use it as a tokenizer in NLTK (order of the multiple base classes matters):
import nltk.tokenize.api
class myTinySegmenter(tinysegmenter.TinySegmenter, nltk.tokenize.api.TokenizerI):
pass
segmenter = myTinySegmenter()
# This segmenter can be used any place which expects a NLTK's TokenizerI subclass.
For more about NLTK (Natural Language Toolkit module), see: http://nltk.org/api/nltk.tokenize.html#nltk.tokenize.api.TokenizerI
Contact, Bugs and Contributing
All bug, patch, question, etc. can be sent to tinysegmenter at zemarmot dot net.
License
This package is distributed under a New BSD License (see COPYING file).
Metadata
Release files for tinysegmenter 0.4
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 | |
|---|---|---|---|---|
| tinysegmenter-0.4.tar.gz | 16.9 kB | Without provenance | Details |
Release files / tinysegmenter-0.4.tar.gz
| Download URL | tinysegmenter-0.4.tar.gz |
|---|---|
| Size | 16.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
64458bdba54ba7482c02c785f960cf3d6cf61594a4dab3d64c325439094fc1b7
|
|
BLAKE2b-256 checksum How to use checksums |
9c70488895cb11e160b548c9ba5847c171b65b86a8ca1e54d206d55b2976bf7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.9.1 pkginfo/1.3.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.6.6
|
Security for tinysegmenter 0.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.