projects
/
cipher-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fiddling with cracking dictionaries
[cipher-tools.git]
/
language_models.py
diff --git
a/language_models.py
b/language_models.py
index 5626edbfd03bd802877e7114699437af7dd6164a..8c98a2e27906ed959b5820f2ef58f38f5dbd157a 100644
(file)
--- a/
language_models.py
+++ b/
language_models.py
@@
-70,7
+70,9
@@
def unaccent(text):
>>> unaccent('HÉLLÖ')
'HELLO'
"""
>>> unaccent('HÉLLÖ')
'HELLO'
"""
- return unicodedata.normalize('NFKD', text).encode('ascii', 'ignore').decode('utf-8')
+ return unicodedata.normalize('NFKD', text).\
+ encode('ascii', 'ignore').\
+ decode('utf-8')
def sanitise(text):
"""Remove all non-alphabetic characters and convert the text to lowercase
def sanitise(text):
"""Remove all non-alphabetic characters and convert the text to lowercase