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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file statLM-0.0.2.tar.gz.

File metadata

  • Download URL: statLM-0.0.2.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.4

File hashes

Hashes for statLM-0.0.2.tar.gz
Algorithm Hash digest
SHA256 9c38148a01c21544096bc8a7646bc93b59787c92d11cbde9a96650e4bf2b5284
MD5 a947bf1de499a212bfa87f0e796eba2d
BLAKE2b-256 003b5c9de675b166833c4d0971bf625afdcbcdd2d5583bfbe67411aba95d9bf5

See more details on using hashes here.

File details

Details for the file statLM-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: statLM-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.4

File hashes

Hashes for statLM-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cb67c95fca9b7cd8d507971d9104c19501959d21ed8ac7911556a8128bdab20c
MD5 2ef3b084b00a45c20eca358c1c519569
BLAKE2b-256 adedf1135771f3c081ec96e637cbef08e2de10c75300fd991b73f0ec80b07a87

See more details on using hashes here.

Supported by

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