Skip to main content

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

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

statLM-0.0.2.tar.gz (7.2 kB view hashes)

Uploaded Source

Built Distribution

statLM-0.0.2-py3-none-any.whl (9.7 kB view hashes)

Uploaded Python 3

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