Skip to content

mphilippides1/N-Gram-Language-Model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

N-Gram Language Model (Trigram)

πŸ“Œ Project Description

This project implements and evaluates a trigram language model using the NLTK Brown corpus. It performs next-word prediction with Laplace smoothing, sentence generation, probability estimation, and perplexity evaluation, demonstrating core concepts in statistical language modelling and NLP.

🧠 Key Features

  • Trigram language model implementation
  • Laplace smoothing for stable predictions
  • Next-word prediction (e.g. "I am β†’ ...")
  • Sentence generation
  • Probability & perplexity evaluation
  • Short story generation using Gemini API

πŸ›  Technologies

  • Python
  • NLTK
  • Jupyter Notebook
  • Brown Corpus

πŸ“‚ Files

  • N-Gram Language Model.ipynb – implementation & experiments
  • N-Gram Language Model Report.pdf – analysis & results

About

This project implements and evaluates a trigram language model using the NLTK Brown corpus. It performs next-word prediction with Laplace smoothing, sentence generation, probability estimation, and perplexity evaluation, demonstrating core concepts in statistical language modelling and NLP, alongside controlled text generation and analysis.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors