MCPcopy Create free account
hub / github.com/chatdoc-com/OCRFlux / normalized_distance

Method normalized_distance

eval/eval_table_to_html.py:40–43  ·  view source on GitHub ↗

Get distance from 0 to 1

(self, *sequences)

Source from the content-addressed store, hash-verified

38 return max(map(len, sequences))
39
40 def normalized_distance(self, *sequences):
41 """Get distance from 0 to 1
42 """
43 return float(distance.levenshtein(*sequences)) / self.maximum(*sequences)
44
45 def rename(self, node1, node2):
46 """Compares attributes of trees"""

Callers 1

renameMethod · 0.95

Calls 1

maximumMethod · 0.95

Tested by

no test coverage detected