Finished the revision of norms, with the revised method for finding the best paramete...
[cipher-tools.git] / cipherbreak.py
index 3993a42b5b8f786e9352160032389ac5ae58d476..03165e5ecca6985e6a2ead4912520e8d6000d50b 100644 (file)
@@ -57,15 +57,6 @@ def frequencies(text):
     return collections.Counter(c for c in text)
 
 
-def frequency_compare(text, target_frequency, frequency_scaling, metric):
-    counts = frequency_scaling(frequencies(text))
-    return -1 * metric(target_frequency, counts)
-
-def euclidean_compare(text):
-    return frequency_compare(text, norms.euclidean_scale(english_counts),
-            norms.euclidean_scale, norms.euclidean_distance)
-
-
 def caesar_break(message, fitness=Pletters):
     """Breaks a Caesar cipher using frequency analysis