metadata {

authority_id: odni
id: 2015
language: iso-639-2:tgk
source_script: Cyrl
destination_script: Latn
name: ICS-630-01 Romanization of Tajik Personal Names (2015)
source: ICS-630-01 Annex N
creation_date: 2015
confirmation_date: 2015
description: |
  This system is the Intelligence Community standard for the transliteration of Tajik names that
  will be applied to all final written reports and products for IC consumers. It is not intended to
  eliminate variations of a name that can contribute forensic information. Rather, it is to provide
  an IC standard Romanized (English) transliteration from Tajik that can then be linked to forensic
  information in ways that will help identify the referent of the name.

  In cases where an individual’s name has already been transliterated in a variant spelling, the IC
  Standard spelling should appear first, followed by the variant spelling(s) in parentheses at the
  first usage. In addition, if the original Cyrillic-script spelling is known, that spelling should
  also appear in parentheses following the name, if possible, following best practices of the
  issuing organization and taking into consideration information system capabilities. For example:
  Parvona Jamshedov (also seen as Parvona Dzhamshedov, Парвона Ҷамшедов). This convention is
  designed to ensure that vital forensic information is not lost.

  For names of persons who are known to not be part of the Tajik-speaking community, use the
  relevant IC transliteration standard for names from that language (e.g., Mikhail, Yitzhak).
  A translator’s note may be used to clarify the known origin of the person. Spell names of
  individuals from languages that are written in Roman letters as they are spelled in those
  languages (e.g., George Clooney, Jorge Garcia, Georges Pompidou).

  In the case of active senior government officials in the on-line CIA World Factbook and the on-
  line directory of Chiefs of State and Cabinet Members of Foreign Governments, the spellings given
  in these on-line reference works should be used in place of the IC Standard. For any individual
  who has at one time been listed in the Factbook or Chiefs of State directory but who no longer
  appears in those resources (i.e. is no longer a government official), the IC Standard spelling
  should appear first, with the spelling, if known, as it previously appeared in those resources
  listed within parentheses at the first usage.

  The primary goal is to produce a consistent Romanized transcription of names that is specifically
  readable to the English-speaking non-specialist. The system uses the 26 letters of the standard
  (English) Roman alphabet. Some ambiguities in the Romanized form will occur without the use of
  diacritics. However, within the context of a report, where additional information about the
  individual is provided, the referent will be clearly identified. This system will be used in
  conjunction with on-line tools, name dictionaries, and lists containing conventional spellings of
  names of well-known individuals.

notes:
  - Transliterate double digraphs as a single digraph, i.e. шш -> sh, not shsh
  - In the Roman, no distinction is made between digraphs such as 'sh' and single contiguous letters,
    (e.g. 's' followed by 'h').
  - The Cyrillic ъ and ь are not transliterated, but instead are left out of the transliteration.
  - Transliterate ‘е‘ as ‘ye’ at beginning of words, ‘e’ elsewhere

}

tests {

test "Парвона Ҷамшедов", "Parvona Jamshedov"

}

stage {

# RULES
# note[1]
# generated with: "ҒЁЖХЧШЮЯЦЩ".split("").each { |i| puts %{sub capture(any("#{i}#{i.downcase}"))+any("#{i}#{i.downcase}"), ref(1)} }
sub capture(any("Ғғ"))+any("Ғғ"), ref(1)
sub capture(any("Ёё"))+any("Ёё"), ref(1)
sub capture(any("Жж"))+any("Жж"), ref(1)
sub capture(any("Хх"))+any("Хх"), ref(1)
sub capture(any("Чч"))+any("Чч"), ref(1)
sub capture(any("Шш"))+any("Шш"), ref(1)
sub capture(any("Юю"))+any("Юю"), ref(1)
sub capture(any("Яя"))+any("Яя"), ref(1)
sub capture(any("Цц"))+any("Цц"), ref(1)
sub capture(any("Щщ"))+any("Щщ"), ref(1)
# note[3]
sub any("\u044A\u044C"), none
# note[4]
sub boundary+"\u0415", "Ye"
sub boundary+"\u0435", "ye"

# CHARACTERS
parallel {
  sub "\u0410", "A" # А
  sub "\u0411", "B" # Б
  sub "\u0412", "V" # В
  sub "\u0413", "G" # Г
  sub "\u0492", "Gh" # Ғ
  sub "\u0414", "D" # Д
  sub "\u0415", "E" # Е
  sub "\u0401", "Yo" # Ё
  sub "\u0416", "Zh" # Ж
  sub "\u0417", "Z" # З
  sub "\u0418", "I" # И
  sub "\u04E2", "I" # Ӣ
  sub "\u0419", "Y" # Й
  sub "\u041A", "K" # К
  sub "\u049A", "Q" # Қ
  sub "\u041B", "L" # Л
  sub "\u041C", "M" # М
  sub "\u041D", "N" # Н
  sub "\u041E", "O" # О
  sub "\u041F", "P" # П
  sub "\u0420", "R" # Р
  sub "\u0421", "S" # С
  sub "\u0422", "T" # Т
  sub "\u0423", "U" # У
  sub "\u04EE", "U" # Ӯ
  sub "\u0424", "F" # Ф
  sub "\u0425", "Kh" # Х
  sub "\u04B2", "H" # Ҳ
  sub "\u0427", "Ch" # Ч
  sub "\u04B6", "J" # Ҷ
  sub "\u0428", "Sh" # Ш
  sub "\u042D", "E" # Э
  sub "\u042E", "Yu" # Ю
  sub "\u042F", "Ya" # Я
  sub "\u0426", "Ts" # Ц
  sub "\u0429", "Shch" # Щ
  sub "\u042B", "Y" # Ы

  sub "\u0430", "a" # а
  sub "\u0431", "b" # б
  sub "\u0432", "v" # в
  sub "\u0433", "g" # г
  sub "\u0493", "gh" # ғ
  sub "\u0434", "d" # д
  sub "\u0435", "e" # e
  sub "\u0451", "yo" # ё
  sub "\u0436", "zh" # ж
  sub "\u0437", "z" # з
  sub "\u0438", "i" # и
  sub "\u04E3", "i" # ӣ
  sub "\u0439", "y" # й
  sub "\u043A", "k" # к
  sub "\u049B", "q" # қ
  sub "\u043B", "l" # л
  sub "\u043C", "m" # м
  sub "\u043D", "n" # н
  sub "\u043E", "o" # о
  sub "\u043F", "p" # п
  sub "\u0440", "r" # р
  sub "\u0441", "s" # с
  sub "\u0442", "t" # т
  sub "\u0443", "u" # у
  sub "\u04EF", "u" # ӯ
  sub "\u0444", "f" # ф
  sub "\u0445", "kh" # х
  sub "\u04B3", "h" # ҳ
  sub "\u0447", "ch" # ч
  sub "\u04B7", "j" # ҷ
  sub "\u0448", "sh" # ш
  sub "\u044D", "e" # э
  sub "\u044E", "yu" # ю
  sub "\u044F", "ya" # я
  sub "\u0446", "ts" # ц
  sub "\u0449", "shch" # щ
  sub "\u044B", "y" # ы
}

}