Python binding for nlpO3 Thai language processing library
Project description
Python binding for nlpO3, a Thai natural language processing library in Rust.
Features
- Word tokenizer
- maximal-matching dictionary-based tokenization
- 2x faster than similar pure Python implementation (PyThaiNLP's newmm)
- support custom dictionary
Install
pip install nlpo3
Usage
Tokenization using default dictionary:
from nlpo3 import segment
segment("สวัสดีครับ")
Load file path/to/dict.file
to memory and assigned it with name dict_name
.
Then tokenize a text with dict_name
dictionary:
from nlpo3 import load_dict, segment
load_dict("path/to/dict.file", "dict_name")
segment("สวัสดีครับ", "dict_name")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nlpo3-1.1.0.tar.gz
(4.3 kB
view hashes)
Built Distributions
Close
Hashes for nlpo3-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b2ac9ffe8487d815f43abb60869ce77abb1afafd0ccdd22c3815b530123b895 |
|
MD5 | a01c30c828dd40e16fe74aa0de8f518b |
|
BLAKE2b-256 | 2f1fe26f37d92bbcc30163d88e7fa3671e1ae8da9196abbe9035749b2dc0667a |
Close
Hashes for nlpo3-1.1.0-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1a6084f360522ea2a536c6a7a7cccd34bb8a2c861973fa5a67f399c9ce3ffb7 |
|
MD5 | 1b2d47b17d4423b06632ed7558c380b3 |
|
BLAKE2b-256 | da16bf1edaa817c8a89c129d0e11c8b6e0db65e1595552c58b7656fd2e6ab7a3 |
Close
Hashes for nlpo3-1.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5f01cbd791d7223520b1c82b917f2be3a1f04b5a14c32d19899abc497f83dc2 |
|
MD5 | 14de1f10a5f7bc62a0b8c7d4996bdc5d |
|
BLAKE2b-256 | cbe546885e7c441aa22b829da1ca56c60d42b0f1f7321c03a5d21cb34225261d |
Close
Hashes for nlpo3-1.1.0-cp38-cp38-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed44dc5e096ee11af2a56a6cdfe072614be2100599b25ba9006ec26c2c6085c8 |
|
MD5 | 3f3c68257aa209a2d145f307566a5a4c |
|
BLAKE2b-256 | bab0939becc4fb62cc884b45ee10893bf1bf6031af068850ef31d3dfcc25c108 |
Close
Hashes for nlpo3-1.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da4e3ec6a2864a68def8408222c9ca7462f6899eadc1f2b62506645555875575 |
|
MD5 | 573314bd4c9847671191dc674483acc5 |
|
BLAKE2b-256 | ec4cd330a223e3835dc78903dd01ddebef2b8c9fb07abd1cfaa41257384b7bfc |
Close
Hashes for nlpo3-1.1.0-cp37-cp37m-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab2287fd71c2766c56799ef9278729485b706dba4af7ebb654a0685697ecdeac |
|
MD5 | 52abef6580222a540b443729df53578d |
|
BLAKE2b-256 | 4d1132999d1847e82123cad271f678fb35c98fe51cc5d986f8517b5fc5b4e417 |
Close
Hashes for nlpo3-1.1.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a96616ce01f69c0f39ea1dc2145a9f313147eda30f7c63203981f1da196a8e2b |
|
MD5 | e92e979f9ef69999e97ca0095a5dd367 |
|
BLAKE2b-256 | af5701acd8af49489eda94de4bcf8e1fc0ca44ef660f32fc8982e582d5857ca8 |
Close
Hashes for nlpo3-1.1.0-cp36-cp36m-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e8e0d15bc13c76f9c77959ac4a32459f30ba5da646e87b057395c3697675ae1 |
|
MD5 | 0bfe1c5b79de75e53c432474516538c7 |
|
BLAKE2b-256 | c6bae84118c476d0aea99a29c2bb39ec1a6e0250982f234faf0485d3fb66e16a |