Skip to main content

Model for tracking context of utterance and predicting future characters.

Project description

To use, first create CharPredictor object:

>>> predictor = CharPredictor()

This may take a while as model is being downloaded and loaded.

Then, to track utterance context, use:

>>> letter_index = 1    # 1 -> a,   letters should be indexed in order: ' abcdefghijklmnopqrstuvwxyz' (0 -> space)
>>> predictor.add_to_context(letter_index)

or:

>>> letter = 'a'
>>> predictor.add_to_context(letter)

And finally - you can predict letter (letter index) based on stored context:

>>> predictor.transform()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dictionary-model-0.2.2.tar.gz (2.8 kB view details)

Uploaded Source

File details

Details for the file dictionary-model-0.2.2.tar.gz.

File metadata

File hashes

Hashes for dictionary-model-0.2.2.tar.gz
Algorithm Hash digest
SHA256 366351737209baa1ae9f29cc43f493a8ca8925a8d72f8518046125dfc9c3a842
MD5 1ce04a743f18b1b0fcce546acad95037
BLAKE2b-256 b60032b6b166e7c2b14bcf0be810f40767fab37bccb612da27df6ae8c68d0774

See more details on using hashes here.

Provenance

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