projects
/
cipher-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Scytale fixed by padding message during enciphering and assuming all rows are the...
[cipher-tools.git]
/
segment.py
diff --git
a/segment.py
b/segment.py
index e4b019f4c8248d8647f938fea8295c132308de0b..08bc0aa84244bf222655defba7b4a0773f87ebcf 100644
(file)
--- a/
segment.py
+++ b/
segment.py
@@
-3,6
+3,8
@@
import string
import collections
from math import log10
import itertools
import collections
from math import log10
import itertools
+import sys
+sys.setrecursionlimit(1000000)
def memo(f):
"Memoize function f."
def memo(f):
"Memoize function f."
@@
-58,7
+60,5
@@
def avoid_long_words(key, N):
"""
return -log10((N * 10**(len(key) - 2)))
"""
return -log10((N * 10**(len(key) - 2)))
-# N = 1024908267229 ## Number of tokens
-
Pw = Pdist(datafile('count_1w.txt'), avoid_long_words)
Pw = Pdist(datafile('count_1w.txt'), avoid_long_words)