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
File details
Details for the file dictionary-model-0.2.2.tar.gz
.
File metadata
- Download URL: dictionary-model-0.2.2.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 366351737209baa1ae9f29cc43f493a8ca8925a8d72f8518046125dfc9c3a842 |
|
MD5 | 1ce04a743f18b1b0fcce546acad95037 |
|
BLAKE2b-256 | b60032b6b166e7c2b14bcf0be810f40767fab37bccb612da27df6ae8c68d0774 |