key pattern solver (shift and mirror)

This commit is contained in:
relikd
2021-02-06 14:21:14 +01:00
parent 36c73f1b97
commit 9e9067c775
4 changed files with 111 additions and 3 deletions

View File

@@ -61,7 +61,7 @@ class Probability(object):
def load_indices(fname, interrupt, maxinterrupt=None, minlen=None, limit=None):
with open(fname, 'r') as f:
data = RuneText(re_norune.sub('', f.read()))['index'][:limit]
data = RuneText(re_norune.sub('', f.read())).index[:limit]
if maxinterrupt is not None:
# incl. everything up to but not including next interrupt
# e.g., maxinterrupt = 0 will return text until first interrupt