BUILDING A BIGRAM LANGUAGE MODEL
dev.to·6h·
Discuss: DEV
Flag this post

This is deeply inspired by Andrej Karpathy’s series about makemore, actually this post is just the notes of Andrej’s first video, together with some insights that I came up with.

An Introduction To N-gram Language Model

N-gram language model is perhaps the simplest form of language model that any human could think of. Imagine the predictive text that pops up above your keyboard for each word that you are typing, which is just some plain predictions given the previous word or phrases. N-gram language model is just it!

N-gram language model considers your n-1 previous words and make prediction about the next word in the sequence.

Some N-gram language models that we should know:

  • Unigram language models: 1-gram, consider no previous words to make prediction, honestly thi…

Similar Posts

Loading similar posts...