mirror of
https://github.com/qurator-spk/dinglehopper.git
synced 2025-06-20 17:19:58 +02:00
Join strings with unique symbol for the hash.
This commit is contained in:
parent
c36396302d
commit
057af6d192
1 changed files with 2 additions and 2 deletions
|
@ -23,8 +23,8 @@ def levenshtein_matrix(seq1, seq2, tempcache=True):
|
||||||
strings, e.g. lists of grapheme clusters or lists of word strings.
|
strings, e.g. lists of grapheme clusters or lists of word strings.
|
||||||
"""
|
"""
|
||||||
if tempcache:
|
if tempcache:
|
||||||
hashseq1 = hashlib.sha1(("".join(seq1)).encode("utf-8")).hexdigest()
|
hashseq1 = hashlib.sha1(("؟".join(seq1)).encode("utf-8")).hexdigest()
|
||||||
hashseq2 = hashlib.sha1(("".join(seq2)).encode("utf-8")).hexdigest()
|
hashseq2 = hashlib.sha1(("؟".join(seq2)).encode("utf-8")).hexdigest()
|
||||||
tempdir = os.path.join(tempfile.gettempdir() + "/dinglehopper/")
|
tempdir = os.path.join(tempfile.gettempdir() + "/dinglehopper/")
|
||||||
if not os.path.exists(tempdir):
|
if not os.path.exists(tempdir):
|
||||||
os.makedirs(tempdir + "/dinglehopper/")
|
os.makedirs(tempdir + "/dinglehopper/")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue