MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / edit_distance

Function edit_distance

demo/Paper2Poster/utils/src/utils.py:92–93  ·  view source on GitHub ↗
(text1: str, text2: str)

Source from the content-addressed store, hash-verified

90
91
92def edit_distance(text1: str, text2: str):
93 return 1 - Levenshtein.distance(text1, text2) / max(len(text1), len(text2))
94
95
96def get_slide_content(doc_json: dict, slide_title: str, slide: dict):

Callers 2

get_indexed_sectionsFunction · 0.90
get_slide_contentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected