Repository navigation
GlotScript 2.1
Unicode 18.0.0: 178 scripts, adding Jurchen (Jurc), Pcun and Seal (Seal).
New functions
script_segments(text)(ss): the text cut into single-script parts, as(script, start, end, text).word_scripts(text)(ws): the main script of every word.script_covers(writing_system, script)andCOMPOSITE_SCRIPTS: whether a writing system such asJpan,Kore,HansorHantuses a script such asHiraorHani.
Changes
U+FFFD(replacement character) isZzzzonly.- All functions share one character table;
separate_script(sc) is about 30x faster with the same output. python -m GlotScript.update --version XregeneratesGlotScript/ranges.pyfrom the Unicode Character Database (GlotScript's adjustments are listed inGlotScript/update.py);--checkcompares.UNICODE_VERSIONandSCRIPT_RANGESare exported.- Tests in
tests/test_glotscript.py.
Resource (metadata V0.2): the fas row is complete, and Wikipedia script names that have an ISO 15924 code are mapped to it.