Move files

This commit is contained in:
Andras Schmelczer 2022-07-04 13:55:44 +02:00
parent cb67823d24
commit 6987da4629
No known key found for this signature in database
GPG key ID: 0EA1BC97D0AB076E
159 changed files with 104 additions and 88 deletions

View file

@ -0,0 +1,11 @@
from typing import Optional
from langcodes import standardize_tag, tag_distance
def is_english(language_code: Optional[str]) -> bool:
if not language_code:
language_code = "und"
language_code = standardize_tag(language_code)
return tag_distance(language_code, "en") < 15