Support Korean language hashtags

main
Bob Mottram 2022-03-02 10:10:43 +00:00
parent de8ed448d8
commit 3772bf8e66
2 changed files with 6 additions and 0 deletions

View File

@ -5326,6 +5326,7 @@ def _test_valid_hash_tag():
assert valid_hash_tag('ThisIsValid12345')
assert valid_hash_tag('ThisIsVälid')
assert valid_hash_tag('यहमान्यहै')
assert valid_hash_tag('한국어')
assert not valid_hash_tag('ThisIsNotValid!')
assert not valid_hash_tag('#ThisIsAlsoNotValid')
assert not valid_hash_tag('#यहमान्यहै')

View File

@ -1864,6 +1864,11 @@ def _is_valid_language(text: str) -> bool:
"Ogham": [5760, 5792],
"Runic": [5792, 5888],
"Khmer": [6016, 6144],
"Hangul Syllables": [44032, 55203],
"Hangul Jamo": [4352, 4607],
"Hangul Compatibility Jamo": [12592, 12687],
"Hangul Jamo Extended-A": [43360, 43391],
"Hangul Jamo Extended-B": [55216, 55295],
"Mongolian": [6144, 6320]
}
for lang_name, lang_range in natural_languages.items():