User:Benwing2/test-th-translit


 * 1) translit:

Batch 1
See below the same sentences with outputs listed in the same other using th-xi Cases with (WIP)
 * 1) translit:
 * 2) makeEntryName:
 * 3) preprocessLinks:
 * 4) translit:
 * 5) makeEntryName:
 * 6) preprocessLinks:
 * 7) translit:
 * 8) makeEntryName:
 * 9) preprocessLinks:
 * 10) translit:
 * 11) makeEntryName:
 * 12) preprocessLinks:
 * 13) th is a link to an undefined term with a respelling. The expected transliteration is "mɛɛn-chés-dtəə" (Manchester) (may not be 100% accurate or there could be respelling variants with loanwords)
 * 14) translit:
 * 15) makeEntryName:
 * 16) preprocessLinks:
 * 1) translit:
 * 2) makeEntryName:
 * 3) preprocessLinks:
 * 4) th is a link to an undefined term with a respelling. The expected transliteration is "mɛɛn-chés-dtəə" (Manchester) (may not be 100% accurate or there could be respelling variants with loanwords)
 * 5) translit:
 * 6) makeEntryName:
 * 7) preprocessLinks:
 * 1) preprocessLinks:
 * 1) translit:
 * 2) makeEntryName:
 * 3) preprocessLinks:
 * 4)  (this is impossible to demonstrate with the current Thai templates, it needs to reduplicate more than just the last word). The Thai spelling and transliteration should be . (A Thai reader will know that they have to reduplicate two last words, not just the last one).
 * 5) translit:
 * 6) makeEntryName:
 * 7) preprocessLinks:
 * 1) translit:
 * 2) makeEntryName:
 * 3) preprocessLinks:

Examples of how th-xi handles these with correct transliterations, links and spacing
Literal or semi-literal translations are not tested, only given to help to understand Cases with (WIP)
 * 1) The case with multiword reduplication doesn't work correctly: the correct Thai spelling with incorrect transliteration:  (two words ไป แล้ว are to be reduplicated, not one), the incorrect Thai spelling with correct transliteration.
 * 1) The case with multiword reduplication doesn't work correctly: the correct Thai spelling with incorrect transliteration:  (two words ไป แล้ว are to be reduplicated, not one), the incorrect Thai spelling with correct transliteration.

Batch 2

 * 1)  -  (In my opinion, unrespelled  or  should produce NIL as ambiguous.)
 * 1)  -  (In my opinion, unrespelled  or  should produce NIL as ambiguous.)
 * 1)  -  (In my opinion, unrespelled  or  should produce NIL as ambiguous.)
 * 1)  -  (In my opinion, unrespelled  or  should produce NIL as ambiguous.)


 * Note that th-x can handle without a respelling as with many monosyllabic words and guesses a lack of a vowel (consonant cluster "gr") but it's better to respell it as กฺรีน with the symbol  (phinthu) to avoid ambiguity. Ambiguous cases should produce NIL.

Some special cases

 * 1) translit:
 * 2) preprocessLinks:
 * 3) translit:
 * 4) preprocessLinks:
 * 5) translit:
 * 6) preprocessLinks:
 * 7) translit:
 * 8) preprocessLinks:
 * 9) translit:
 * 10) preprocessLinks:
 * 11) translit:
 * 12) preprocessLinks:
 * 13) translit:
 * 14) preprocessLinks:
 * 15) translit:
 * 16) preprocessLinks:
 * 17) translit:
 * 18) preprocessLinks:
 * 1) translit:
 * 2) preprocessLinks:
 * 3) translit:
 * 4) preprocessLinks:
 * 5) translit:
 * 6) preprocessLinks:
 * 1) translit:
 * 2) preprocessLinks:
 * 1) preprocessLinks:

Some special cases

 * 1)  should be  ✅
 * 2) Thai and Arabic numerals:  should be  and  should be . Working fine. ✅
 * 3)  to be discussed if it should  (and change the respelling in the entry) or leave the same as, i.e. "grung-têep"
 * 4) To decide if various Thai punctuation symbols, e.g.,  should produce nothing, copy as they are (i.e. ๏ = ๏) or have a symbol/respelling assigned to them.
 * 5)  with a possible true cluster should give no transliteration -  or demand respelling in usage examples. e.g. The word ... was not romanised successfully. Please supply its syllabified phonetic respelling .... The first consonant in a cluster, should be followed by . The expected output for  should be NILL (ambiguous), even if it looks like a true cluster. See more on  vs  below.
 * 6) * On Thai consonant clusters:
 * 7) True clusters are made of:, , , , , ,  + one of the sonorants: , , . E.g.  should be respelled as ไกฺล้ (spelled as ai+g+phinthu+l+mai tho). If a syllable starts with consonants without a vowel or phinthu, it should be deemed suspicious and produce NIL or require a respelling. An example where lack of a respelling may produce false positives (these terms should ideally be always respelled by editors using them):
 * 8)  respelled as เพ-ลา is transliterated as "pee-laa"
 * 9)  respelled as เพฺลา is transliterated as "plao"
 * 10) Letter  and in a very few cases (about four words?) + sonorant consonants acts as tone changing marker, e.g.  is respelled as หฺนาว. phinthu marks that letter  is not pronounced separately but acts to change the tone, compare the reading produced without the initial : . Words where letter  acts as, e.g.  are respelled with like this หฺยู่.
 * 11) Non-cluster example: .  and  can't form a cluster (see rule #1), so there must be a vowel between them. The respelling is สะ-หฺนุก. All such cases are respelled with a vowel (which may be also inherent) These include words with inherent vowels, where no cluster occurs:, . The initial consonant and the vowel normally don't require respellings if pronounced as spelled.
 * 12) False clusters: numerous loanwords from Sanskrit and other languages where two consonants are pronounced as one  (s+r=s),  (j+r=j). They are all respelled.
 * 13) Boldface word example:  should be as
 * 14) Quotation marks example:  should be as