Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions alphabetic/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ class Language(Enum):
Hebrew = "heb", # Script type: Abjad; Writing system: Hebrew alphabet, Hebrew Braille, Paleo-Hebrew alphabet (Archaic Biblical Hebrew), Imperial Aramaic script (Late Biblical Hebrew), Samaritan script (Samaritan Biblical Hebrew)
Herero = "her", # Script type: Alphabet; Writing system: Latin (Herero alphabet), Herero Braille
Hindi = "hin", # Script type: Abugida; Writing system: Devanagari (official), Kaithi (historical), Mahajani (historical), Laṇḍā (historical), Latin (Hinglish, unofficial), Devanagari Braille
Hungarian = "hun", # Script type: Alphabet; Writing system: Latin (Hungarian alphabet), Hungarian Braille
Icelandic = "isl", # Script type: Alphabet; Writing system: Latin (Icelandic alphabet), Icelandic Braille
Igbo = "ibo", # Script type: Alphabet; Writing system: Latin (Önwu alphabet), Nwagu Aneke script, Neo-Nsibidi, Ndebe script, Igbo Braille
Indonesian = "ind", # Script type: Alphabet; Writing system: Latin (Indonesian alphabet), Indonesian Braille
Expand Down Expand Up @@ -372,6 +373,7 @@ class Language(Enum):
Punjabi_Gurmukhī = "_pan", # Script type: Abugida; Writing system: Shāhmukhī (majority, Pakistan), Gurmukhī (official, India), Punjabi Braille
Punjabi_Shahmukhi = "pan", # Script type: Abjad; Writing system: Shāhmukhī (majority, Pakistan), Gurmukhī (official, India), Punjabi Braille
Quechua = "que", # Script type: Alphabet; Writing system: Latin (Quechuan alphabet)
Romanian = "ron", # Script type: Alphabet; Writing system: Latin (Romanian alphabet), Romanian Braille. Note: Romanian and Moldovan share the same alphabet; "ron" is the ISO 639-3 code for Romanian (distinct from "rum" used for Moldovan).
Rohingya = "rhg", # Script type: Alphabet: Writing system: Hanifi Rohingya, Perso-Arabic (Rohingya Arabic Alphabet), Latin (Rohingyalish), Burmese, Bengali–Assamese (rare)
Russian = "rus", # Script type: Alphabet: Writing system: Cyrillic (Russian alphabet), Russian Braille
Samaritan = "smp", # Script type Abjad; Writing system: Samaritan abjad
Expand Down
2 changes: 1 addition & 1 deletion alphabetic/data/alphabet.json

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions tests/test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,21 @@ def test_generate_all_characters_in_range(self):
umlauts = list(german_letters_umlauts.split("\\", maxsplit=1)[0])

assert "".join(sorted(upper + lower + umlauts)) == "".join(sorted(ws.by_language(ws.Language.German, as_list=True)))


def test_hungarian_alphabet(self):
ws = WritingSystem()
hungarian = ws.by_language(ws.Language.Hungarian, as_list=True)
# Hungarian alphabet has multigraphs: cs, dz, dzs, gy, ly, ny, sz, ty, zs
assert set(['Cs', 'Dz', 'Dzs', 'Gy', 'Ly', 'Ny', 'Sz', 'Ty', 'Zs']).issubset(set(hungarian))
# Plus accented vowels
assert set(['Á', 'É', 'Í', 'Ó', 'Ö', 'Ú', 'Ü', 'Ő', 'Ű']).issubset(set(hungarian))
assert len(hungarian) == 88


def test_romanian_alphabet(self):
ws = WritingSystem()
romanian = ws.by_language(ws.Language.Romanian, as_list=True)
# Romanian special characters with comma below (correct modern form)
assert set(['Ă', 'ă', 'Â', 'â', 'Î', 'î', 'Ș', 'ș', 'Ț', 'ț']).issubset(set(romanian))
assert len(romanian) == 62
Loading