tetrak_translit.hy.fold

The Armenian fold: one index form for every spelling of a word.

For what a fold is for, see tetrak_translit.fold. This module is the Armenian rules. In order:

  1. Armenian input loses the intonation marks Armenian sets inside a word, on the stressed vowel (the question, exclamation and emphasis marks: ելնելո՞ւ is ելնելու), and is normalised across the 1922 reform, towards the reformed spelling: եւ becomes և, է becomes ե, եա becomes յա and իւ becomes յու (the classical digraphs for ya and yu), եո becomes եվո (Գէորգ is Gevorg), a word-initial յ before a vowel becomes հ as the reform wrote it (Յակոբ is Հակոբ, յետ is հետ), and a word-final յ after a vowel is dropped (ծառայ is ծառա). Then it is rendered through ALA-LC – the 2011 table, frozen in this module so that a new edition of the display table never moves a key – so that Armenian and ALA-LC Latin reach the next step by the same road.

  2. Latin written in ISO 9985 or Hübschmann-Meillet, which spell ձ j where ALA-LC and BGN/PCGN spell ջ j, is recognised by a mark only those two schemes make (č ǰ š ž ġ ł ə ë ç, the Hübschmann-Meillet aspiration ʿ, c with an aspiration mark, or ISO ow) anywhere in the text being folded, not only in the token: then its bare j is read as dz.

  3. Latin is lowercased and stripped of every diacritic and aspiration mark, an intonation mark inside a word goes (the schemes render it where it stands, kardac’e?l, and a hand may set it inside a digraph, elnelo?w), an aspirate written with h loses it (th/t, ph/p: Thoumanian), an h after v is dropped (vh/v: Hovannes), then its digraphs are collapsed onto one spelling each (ž/zh, x/kh, ł/gh, ow/ou/oo/u, iw/iu, w/v, ivo/io for the glide Western says in Virkilivos), a y with a consonant beside it and no vowel on either side is read as BGN/PCGN’s ը and becomes e (zhanry, ynker), the voiced and voiceless pairs are merged (b/p, d/t, g/k, dz/ts/c, j/ch) because Eastern and Western pronunciation spellings disagree on exactly those, the glides are regularised (initial ye/he/e and vo/o, where a hyphen or a bracket also starts a word, as BGN/PCGN and Western count it; initial iu/yu; y before a vowel at the start of a word or after a hyphen becomes h, and so does the lone initial Յ., which then shares its key with Հ.; initial ho/o for the Russian-mediated Ovanes and Ovsep; ya/ea/ia), a y after iu at the end of a word is BGN/PCGN’s ը and becomes e (tʻiwy for թիւը), any other y after a vowel is dropped at the end of a word and before a hyphen or a bracket (the silent յ of hay-ṛuseren), doubled letters are collapsed and anything that is not a letter or digit is removed.

Known gaps, because a fold that claims there is a single right answer is lying (LREC 2020, cross-script name matching, cited in Tetrak’s research): popular spellings that insert an unwritten schwa (Megerdich for Մկրտիչ) or come through Russian (Khachaturian for Խաչատրյան) do not fold to the Armenian; a classical աւ that reformed spelling turned into օ (աւր/օր) does not either; ISO 9985 or Hübschmann-Meillet j (which is ձ) folds as if it were ALA-LC j (which is ջ) when nothing else in the text shows the scheme (a lone Jayn) and scheme= does not say. A word beginning հե, յե or ե folds to one key, since a Latin ye is both the classical յե (the reform’s հե) and BGN/PCGN’s initial ե; Hetum therefore shares a key with a bare Etum, an over-merge that is declared rather than a gap. The test set in tests/data/hy_fold_cases.tsv is the published claim; what is not in it is not claimed.

Functions

fold_token(token[, context])

Fold one whitespace-free token, Armenian or Latin, to its key.