Language models to predict words
Project description
statLM (Statistical Language Models) is a library for classical as well as modern language models.
Example Usage
Train a language model and make predictions based on queries i.e. test data.
corpus = ["let us see were this project leads us",
"we are having great fun so far",
"we are actively developing",
"it is getting tougher but it is still fun",
"this project teaches us how to construct test cases"]
sb = StupidBackoff(n_max=3, alpha=0.4)
# fit model on corpus
sb.fit( corpus )
# make predictions
queries = ["let us see were that project", "how many options"]
sb.predict(queries)
In Progress
more language models
improve efficiency of ngram comparisons
construct CD/CI tests via github action
add type checking
Copyright
Copyright (C) 2020 statLM Raphael Redmer
For license information, see LICENSE.txt.
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
statLM-0.0.2.tar.gz
(7.2 kB
view hashes)
Built Distribution
statLM-0.0.2-py3-none-any.whl
(9.7 kB
view hashes)