Learn Before
Concept

Sentence Generation from Unigram Model

Procedure of generating random sentences from unigram model: Let all the words of the English language covering the probability space between 0 and 1, each word covering an interval proportional to its frequency. We choose a random value between 0 and 1 and print the word whose interval includes this chosen value. We continue choosing random numbers and generating words until we randomly generate the sentence-final token //.

0

1

Updated 2022-06-28

Tags

Data Science