japanese_pretokenizers (japre)
Custom pretokenizers for Japanese language models
installation
pip install japre
Usage
IpadicPreTokenizer
from japre.ipadic import IpadicPreTokenizer
from transformers import PreTrainedTokenizerFast
from tokenizers import Tokenizer
tokenizer_object = Tokenizer.from_file("your-awesome-tokenizer.json")
tokenizer_object.pre_tokenizer = IpadicPreTokenizer.make()
tokenizer = PreTrainedTokenizerFast(
tokenizer_object=tokenizer_object,
unk_token='[UNK]',
mask_token='[MASK]',
cls_token='[CLS]',
pad_token='[PAD]',
sep_token='[SEP]'
)
ManbyoDictPreTokenizer
export MANBYO_DICT_PATH=/path/to/MANBYO_201907_Dic-utf8.dic
from japre.manbyo import ManbyoDictPreTokenizer
from transformers import PreTrainedTokenizerFast
from tokenizers import Tokenizer
tokenizer_object = Tokenizer.from_file("your-awesome-tokenizer.json")
tokenizer_object.pre_tokenizer = ManbyoDictPreTokenizer.make()
tokenizer = PreTrainedTokenizerFast(
tokenizer_object=tokenizer_object,
unk_token='[UNK]',
mask_token='[MASK]',
cls_token='[CLS]',
pad_token='[PAD]',
sep_token='[SEP]'
)
Metadata
Release files for japre 0.1.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 | Actions |
|---|---|---|---|---|
| japre-0.1.4.tar.gz | 3.1 kB | Without provenance | Details for japre-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| japre-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for japre-0.1.4-py3-none-any.whl |
Total release size: 6.5 kB
Release files / japre-0.1.4.tar.gz
| Download URL | japre-0.1.4.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ce7ceacb35f4fa97c554612849b27a3e0a515c37271fc9f69b5c7de718cbed9
|
|
BLAKE2b-256 checksum How to use checksums |
81c39d9914a7872a608fc81f3020135558f8d6ce9f0c49036c5780230d63f422
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.2 CPython/3.8.0 Darwin/21.4.0
|
Release files / japre-0.1.4-py3-none-any.whl
| Download URL | japre-0.1.4-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cf2af416aad09b683983784a9c329d0265d0bee3a99ad29ea18db20cb045f714
|
|
BLAKE2b-256 checksum How to use checksums |
98e20be90734be878a789e08fcd6e11940c83dc3835686be7cf5c5f015c1c197
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.2 CPython/3.8.0 Darwin/21.4.0
|
Security for japre 0.1.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.