A tool set for NLP.
Project description
Usage Sample ''''''''''''
.. code:: python
from nlpx.text_token import Tokenizer
if __name__ == '__main__':
corpus = ...
tokenizer = Tokenizer(corpus)
sent = 'I love you'
tokens = tokenizer.encode(sent, max_length=6, pad_begin_end=True)
# [101, 66, 88, 99, 102, 0]
sent = tokenizer.decode(sent)
# ['<bos>', 'I', 'love', 'you', '<eos>', '<pad>']
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
nlpx-1.4.3.tar.gz
(20.6 kB
view details)
File details
Details for the file nlpx-1.4.3.tar.gz
.
File metadata
- Download URL: nlpx-1.4.3.tar.gz
- Upload date:
- Size: 20.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 216d25423a98516b1d03c90fac6e32c78d7172e431c9813bc4e1666510e53f3e |
|
MD5 | 44334acbe1117c04c2f39733cc26c9d2 |
|
BLAKE2b-256 | e8587068a3aba43a89815f7ea79178e8f68643ae0d416fcd70f1cde2ba278c29 |