joshualoehr/ngram-language-model
Python implementation of an N-gram language model with Laplace smoothing and sentence generation.
This tool helps language researchers and natural language processing practitioners create and evaluate simple text generation models. You provide it with pre-processed text data, and it builds a statistical model of word sequences. The output includes newly generated sentences based on the patterns learned from your data, along with a measure of how well the model predicts new text.
No commits in the last 6 months.
Use this if you need to quickly prototype and understand basic text generation, or if you're analyzing simple word probabilities in a given text corpus.
Not ideal if you require sophisticated, context-aware, or long-form text generation that goes beyond simple word sequences.
Stars
88
Forks
27
Language
Python
License
—
Category
Last pushed
Feb 09, 2018
Commits (30d)
0
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/nlp/joshualoehr/ngram-language-model"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Higher-rated alternatives
nlx-group/overlapy
Python package developed to evaluate textual overlap (N-Grams) between two volumes of text.
MannarAmuthan/kural-gen
KuralGen generates Thirukkural for a given English sentence
phughesmcr/SimpleNGrams
The easiest way to get n-grams from strings!
SpydazWebAI-NLP/BasicLanguageModelling2023
Basic Language Models , Bag of Words, Ngram Models Etc NLP modelling and associated tasks
simrann20/Hangman_Game_Project
Hangman Game implementation using n-gram language model in NLP, achieved an accuracy of more than 50%