index koinc. s mezerami
[krypto.git] / koincidence.py
index 24c250c..07231b7 100644 (file)
@@ -10,7 +10,7 @@ def index_koincidence(text):
         shod += sum (x == y for x, y in zip(deq, t))
     return float(shod)/(len(t)*(len(t) - 1))
 
-def index_koincidence(text1, text2):
+def index_koincidence2(text1, text2):
     #predpokladam, ze v textech jsou jenom znaky se kterymi pocitam
     shod = sum (x == y for x, y in zip(text1, text2))
     return float(shod)/min(len(text1), len(text2))