projects
/
cipher-training.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Bits of tinkering
[cipher-training.git]
/
language_models.py
diff --git
a/language_models.py
b/language_models.py
index 59d858868dd5b67d5de9dd848fe26d6b5f1c6391..63aac6bab48daf56f1bcec1fd649121d1d86f17b 100644
(file)
--- a/
language_models.py
+++ b/
language_models.py
@@
-100,7
+100,7
@@
def ngrams(text, n):
"""
return [text[i:i+n] for i in range(len(text)-n+1)]
-
+
class Pdist(dict):
"""A probability distribution estimated from counts in datafile.
Values are stored and returned as log probabilities.