From 8e18e9342d15e7373cb904fba1157ce78a1e89af Mon Sep 17 00:00:00 2001 From: Neil Smith Date: Sat, 5 Jul 2014 14:14:38 +0100 Subject: [PATCH] Updated language_models to include trigrams --- language_models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/language_models.py b/language_models.py index 173de64..59d8588 100644 --- a/language_models.py +++ b/language_models.py @@ -148,7 +148,7 @@ def Pbigrams(letters): return sum(P2l[p] for p in ngrams(letters, 2)) def Ptrigrams(letters): - """The Naive Bayes log probability of the bigrams formed from a sequence + """The Naive Bayes log probability of the trigrams formed from a sequence of letters. """ return sum(P3l[p] for p in ngrams(letters, 3)) -- 2.34.1