NLP/L4

From WikiZMSI

< NLP

N-gram Language Model with NLTK

  1. Practice the: Example
  2. Try ty code

Excercises

1. For a given a sentence:

sentence= “The assumption that the probability of a word depends only on the previous word is called a Markov assumption. Markov models are the class of probabilistic models that assume we can predict the probability of some future unit without looking too far into the past.“

Use NLTK library to extract all - bigrams - trigrams

As a result please send your .py code (including what you have learn from kaggle and the exercise solution)