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.3.7.tar.gz
(17.4 kB
view details)
File details
Details for the file nlpx-1.3.7.tar.gz
.
File metadata
- Download URL: nlpx-1.3.7.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac23433222db3ea73d8d2b79f3bd0b82d4fc31faf09366af2e3690a2d5bb5c16 |
|
MD5 | 4a52e041fb0da008a0825dbc22fa39b6 |
|
BLAKE2b-256 | 37e53e2ff7117c3836f6808b0834ab9953b0237802a34e4221ab85212ff01300 |