Skip to main content

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.5.tar.gz (21.1 kB view details)

Uploaded Source

File details

Details for the file nlpx-1.4.5.tar.gz.

File metadata

  • Download URL: nlpx-1.4.5.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for nlpx-1.4.5.tar.gz
Algorithm Hash digest
SHA256 d82bc446b142a01c52378b0d68da22e44a41f0b9e6757ce0dc8cf8991b1c8adb
MD5 0dbe06fb752220bc3e1dc91e19d00ee5
BLAKE2b-256 60e9d45903d91117246c8be072c3440f7c2febb7e68a36c54a8e103beff4cb71

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page