VieTokenizer
This model architecture that we use is a simple bi-lstm network trained by unsupervised learning on a large pre-segmented dataset. The model will predict if serial word is 1 and non-serial is 0, for example, "Tôi tên là Nguyễn Tiến Đạt" will be equivalent to a sequence of numbers with both zero and one being [0, 0, 0, 0, 1, 1].
Installation 🎉
- This repository is tested on python 3.7+ and Tensorflow 2.8+
- VieTokenizer can be installed using pip as follows:
pip install vietokenizer 🍰
- VieTokenizer can also be installed from source with the following commands:
git clone https://github.com/Nguyendat-bit/VieTokenizer
cd VieTokenizer
pip install -e .
Usage 🔥
>>> import vietokenizer
>>> tokenizer= vietokenizer.vntokenizer()
>>> tokenizer('Tôi tên là Nguyễn Tiến Đạt, hiện là sinh viên Đại học CN GTVT tại Hà Nội.')
'Tôi tên là Nguyễn_Tiến_Đạt , hiện là sinh_viên Đại_học CN GTVT tại Hà_Nội .'
>>> tokenizer('Kim loại nặng thường được định nghĩa là kim loại có khối lượng riêng, khối lượng nguyên tử hoặc số hiệu nguyên tử lớn.')
'Kim_loại nặng thường được định_nghĩa là kim_loại có khối_lượng riêng , khối_lượng nguyên_tử hoặc số_hiệu nguyên_tử lớn .'
License
Apache 2.0 License.
Copyright © 2022 Nguyễn Tiến Đạt. All rights reserved.
Metadata
Release files for vietokenizer 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vietokenizer-1.0.3.tar.gz | 8.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vietokenizer-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.0 kB
Release files / vietokenizer-1.0.3.tar.gz
| Download URL | vietokenizer-1.0.3.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9cd67607c4d9d903453bb8ecc47c5949b18dae06d5e0afb80613f6405fca3215
|
|
BLAKE2b-256 checksum How to use checksums |
4932f72483004b65fae8efa6e2a9b248c235383ca5b0fee43d705ea7412ba8ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.7
|
Release files / vietokenizer-1.0.3-py3-none-any.whl
| Download URL | vietokenizer-1.0.3-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a9d79d54c6a8b2993fc3660c05679e591726b42310309a32e230f676f565c3f5
|
|
BLAKE2b-256 checksum How to use checksums |
b76ccde13f142dff5e822957aaa6236d54d381009690374ec0d1c79b008628d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.7
|