{"id":44264,"library":"anls","title":"ANLS","description":"Average Normalized Levenshtein Similarity (ANLS) for evaluating text similarity, especially in OCR and document understanding tasks. Version 0.0.2, released occasionally.","status":"active","version":"0.0.2","language":"python","source_language":"en","source_url":"https://github.com/shunk031/ANLS","tags":["levenshtein","similarity","ocr","evaluation"],"install":[{"cmd":"pip install anls","lang":"bash","label":"Default install"}],"dependencies":[{"reason":"ANLS uses Levenshtein distance internally","package":"levenshtein","optional":false}],"imports":[{"note":"Direct import from anls package","symbol":"anls_score","correct":"from anls import anls_score"}],"quickstart":{"code":"from anls import anls_score\nreference = \"hello world\"\nprediction = \"hello world\"\nscore = anls_score(reference, prediction)\nprint(score)","lang":"python","description":"Compute ANLS between two strings."},"warnings":[{"fix":"Ensure both inputs are str.","message":"anls_score expects two strings; do not pass lists or tuples.","severity":"gotcha","affected_versions":"all"},{"fix":"Consider implementing custom Levenshtein or use rapidfuzz.","message":"The library uses Levenshtein package, which may be deprecated in future Python versions.","severity":"deprecated","affected_versions":">=3.10"}],"env_vars":null,"search_vec":"'0.0.2':19 'anl':1,6 'averag':2 'document':15 'especi':11 'evalu':8,25 'levenshtein':4,22 'normal':3 'occasion':21 'ocr':13,24 'releas':20 'similar':5,10,23 'task':17 'text':9 'understand':16 'version':18","created_at":"2026-06-07T12:49:17.454975+00:00","updated_at":"2026-06-07T12:49:17.454975+00:00","problems":[{"fix":"pip install anls","cause":"Package not installed.","error":"ModuleNotFoundError: No module named 'anls'"},{"fix":"Use anls_score(reference, prediction) with exactly two strings.","cause":"Extra argument passed to anls_score.","error":"TypeError: anls_score() takes 2 positional arguments but 3 were given"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/shunk031/ANLS","github":"https://github.com/shunk031/ANLS","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}