I am working on creating an n-gram model for unigrams, bigrams, and trigrams. However, I have two questions:
Should the sum of the unseen probability and the observed probability always equal 1?
If 𝑁𝑐+1 does not exist, what should be the value of 𝑐∗ in the Good-Turing smoothing method?
for syllable in unigram:
c = unigram[syllable]
if c+1 in Nc and c in Nc:
unigram[syllable] = ((c+1) * Nc[c+1] / Nc[c] ) / totalOfunigram
else:
unigram[syllable] = (c) / totalOfunigram # / Nc[c]`