mirror of
https://gitlab.freedesktop.org/uchardet/uchardet.git
synced 2025-12-06 16:56:40 +08:00
script: further fixing BuildLangModel.py.
This commit is contained in:
parent
6365cad4fd
commit
784f614c84
@ -143,6 +143,8 @@ if lang.use_ascii:
|
|||||||
if lang.alphabet is None:
|
if lang.alphabet is None:
|
||||||
lang.alphabet = [chr(l) for l in range(65, 91)] + [chr(l) for l in range(97, 123)]
|
lang.alphabet = [chr(l) for l in range(65, 91)] + [chr(l) for l in range(97, 123)]
|
||||||
else:
|
else:
|
||||||
|
# Allowing to provide an alphabet in string format rather than list.
|
||||||
|
lang.alphabet = list(lang.alphabet)
|
||||||
lang.alphabet += [chr(l) for l in range(65, 91)] + [chr(l) for l in range(97, 123)]
|
lang.alphabet += [chr(l) for l in range(65, 91)] + [chr(l) for l in range(97, 123)]
|
||||||
if lang.alphabet is not None:
|
if lang.alphabet is not None:
|
||||||
# Allowing to provide an alphabet in string format rather than list.
|
# Allowing to provide an alphabet in string format rather than list.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user