| { |
| "paper_id": "Y95-1036", |
| "header": { |
| "generated_with": "S2ORC 1.0.0", |
| "date_generated": "2023-01-19T13:38:59.865003Z" |
| }, |
| "title": "Sorting by Sound -Arbitrary Lexical Ordering for Transcribed Thai Text", |
| "authors": [ |
| { |
| "first": "Doug", |
| "middle": [], |
| "last": "Cooper", |
| "suffix": "", |
| "affiliation": {}, |
| "email": "<doug@chula.ac.th>" |
| } |
| ], |
| "year": "", |
| "venue": null, |
| "identifiers": {}, |
| "abstract": "When either Thai or transcribed (Romanized) Thai is sorted alphabetically, words that sound very much alike usually end up far apart. maay and may are thrown to opposite ends of the letter m entries, even though mistaking one for the other causes problems for both foreign students who cannot speak clearly, and Thais who can't spell. This paper explains how and why the difficulty occurs, and shows why both Thai and transcription are inherently difficult to sort by sound. It introduces a method of preprocessing-deriving phonemic signatures-that lets us define improved lexical or dictionary orders, yet does not require anything but standard sorting code. The method can be applied to other languages-Lao, Khmer, and Burmese-that, like Thai, distinguish words on the basis of vowel length and/or tone.", |
| "pdf_parse": { |
| "paper_id": "Y95-1036", |
| "_pdf_hash": "", |
| "abstract": [ |
| { |
| "text": "When either Thai or transcribed (Romanized) Thai is sorted alphabetically, words that sound very much alike usually end up far apart. maay and may are thrown to opposite ends of the letter m entries, even though mistaking one for the other causes problems for both foreign students who cannot speak clearly, and Thais who can't spell. This paper explains how and why the difficulty occurs, and shows why both Thai and transcription are inherently difficult to sort by sound. It introduces a method of preprocessing-deriving phonemic signatures-that lets us define improved lexical or dictionary orders, yet does not require anything but standard sorting code. The method can be applied to other languages-Lao, Khmer, and Burmese-that, like Thai, distinguish words on the basis of vowel length and/or tone.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Abstract", |
| "sec_num": null |
| } |
| ], |
| "body_text": [ |
| { |
| "text": "Consider the dilemma of the Thai speller: these words are spelled thirteen different ways, but have essentially the same sound (than) , and vary only in tone and vowel length:", |
| "cite_spans": [ |
| { |
| "start": 127, |
| "end": 133, |
| "text": "(than)", |
| "ref_id": null |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Introduction", |
| "sec_num": null |
| }, |
| { |
| "text": "flu, lila, 614 111U, vntd,", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Introduction", |
| "sec_num": null |
| }, |
| { |
| "text": "iiiu, Thu, ru, mu.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Introduction", |
| "sec_num": null |
| }, |
| { |
| "text": "There are a remarkable number of ways to spell words with this sound. Thai has six different th letters, five ways to show a or aa, and six ways to write the final n. There are also four different tone marks, and a sign (over this letter 91) that means 'ignore me.' Finally, the tone mark does not actually give the tone -rather, it modifies an implicit tone that depends on the word's spelling.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Introduction", |
| "sec_num": null |
| }, |
| { |
| "text": "Because a simple one phoneme/one grapheme (or one sound/one letter) relationship doesn't exist, words with identical or similar sounds can be widely scattered when lexically ordered. This complicates applications, ranging from 'sound-alike' spell checking to introductory language instruction, that depend on a Thai word's sound, not its spelling.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Introduction", |
| "sec_num": null |
| }, |
| { |
| "text": "As a result, we find that sorting transcribed Thai is much more convenient that using native Thai orthography. We return to a relatively straightforward relationship between symbols and sounds; one that lets us group words with the same sounds regardless of their original Thai spelling.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Introduction", |
| "sec_num": null |
| }, |
| { |
| "text": "Sorting transcriptions involves two basic issues: definition and implementation. First, we must define a lexical or dictionary order: if transcribed Thai adds the IPA symbols a, c, a, ti to the English a, e, o, u, what should the combined set look like? Should may come before maay or vice versa? Should two-character symbols like kh or p h be removed from the midst of the k's and p's? What is the proper order of words that vary only by tone?", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Introduction", |
| "sec_num": null |
| }, |
| { |
| "text": "Second, we have to find an easy implementation -one that uses existing sort programs, even with a new character set or lexical order.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Introduction", |
| "sec_num": null |
| }, |
| { |
| "text": "This paper looks at the issues involved in sorting by sound. Part I states the problem: it presents the terminology and issues of ordering, describes the difficulties of languages like Thai, and looks at questions that persist even with effective transcription systems.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Introduction", |
| "sec_num": null |
| }, |
| { |
| "text": "Part II outlines the solution. It lists considerations for defining new lexical orders, then gives an algorithm for extracting phonemic signatures as part of a sorting strategy.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Introduction", |
| "sec_num": null |
| }, |
| { |
| "text": "Finally, Part III deals with the implementation. It shows how to derive phonemic signatures, and uses simple UNIX tools to implement the algorithm for a test alphabet. The method is easily generalized to any consistent transcription scheme.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Introduction", |
| "sec_num": null |
| }, |
| { |
| "text": "Ordering, as opposed to sorting, relies on three sequences collating, sorting, and lexical.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Part 1: the Problem", |
| "sec_num": null |
| }, |
| { |
| "text": "-The collating sequence defines the order of the letters in a character set.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Part 1: the Problem", |
| "sec_num": null |
| }, |
| { |
| "text": "The ASCII set of 128 characters is the best known. Programs compare individual characters by their positions in the collating sequence; eg. b > a and 2 > 1.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Part 1: the Problem", |
| "sec_num": null |
| }, |
| { |
| "text": "But because ASCII arbitrarily defines relations like A > a and # > $, the collating sequence does not reasonably answer questions like what is the correct order of abAB? There are six equally plausible possibilities: abAB, ABab, aAbB, AaBb, AabB and aABb.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Part 1: the Problem", |
| "sec_num": null |
| }, |
| { |
| "text": "-The sorting sequence overrides the collating sequence to put characters in a reasonable order regardless of relative positions. This is useful for sets that include extended or upper ASCII characters (eg. ISO Latin 1: AAA A A. A. AIE aa a. a a ...).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Part 1: the Problem", |
| "sec_num": null |
| }, |
| { |
| "text": "-Lexical ordering (or dictionary ordering) extends the sorting sequence by interpreting the meaning of characters.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Part 1: the Problem", |
| "sec_num": null |
| }, |
| { |
| "text": "In real dictionaries, this interpretation can be fairly sophisticated; eg. the number 9 may appear with the letter n, and punctuation is typically ignored.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Part 1: the Problem", |
| "sec_num": null |
| }, |
| { |
| "text": "Sorting Thai by sound or tone turns out to be quite difficult. Reasons include:", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Difficulty of Sorting by Sound in Thai", |
| "sec_num": null |
| }, |
| { |
| "text": "-Letters are not read in order as written. In Thai, a vowel's sound frequently follows the next consonant. The word an, which would be transliterated letter-for-letter as Eck, is instead transcribed as km -There are more letters than sounds. In Thai, the initial k h (aspirated k) equivalent has three different letters devoted solely to it; t h has six, s has four, etc. A final t can be written with eighteen different letters. -Tone production rules are not unique. Thai derives tone from a combination of the orthographic and phonemic characteristics of opening and closing consonants, vowel length, as well as tone marks.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Difficulty of Sorting by Sound in Thai", |
| "sec_num": null |
| }, |
| { |
| "text": "The Haas method [1] is the best approach to Thai transcription. It relies on the International Phonetic Alphabet (IPA), and brings us close to the idyllic state -one grapheme per phoneme -that makes lexical ordering easy. I use it somewhat informally here; my apologies to the linguists in the audience. However, even Haas transcription has problems when it is used with standard sorting programs. We'll consider three of them.", |
| "cite_spans": [ |
| { |
| "start": 16, |
| "end": 19, |
| "text": "[1]", |
| "ref_id": "BIBREF0" |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Difficulties of Ordering Transcriptions", |
| "sec_num": null |
| }, |
| { |
| "text": "The Ordering Problem The IPA is a set of supplemental symbols, rather than an ordinary alphabet. In effect, IPA is sorted by the coincidental overlap of your IPA font, and whatever standard set (eg. the Windows sort sequence, or the extended ASCII position numbers) the computer follows. For example, I use the freely available SIL Premier IPA fonts. Here's how the extended vowel symbols used to transcribe Thai fit in with the ordinary vowels. Neither sort has any visible logic, and neither matches the order I find easiest to remember personally.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Difficulties of Ordering Transcriptions", |
| "sec_num": null |
| }, |
| { |
| "text": "Windows sort eaeiouoae UNIX (positional) aoeaciouti my preferred order", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "aeioueaou original list aseiooueu", |
| "sec_num": null |
| }, |
| { |
| "text": "Tone marks are scattered randomly through the character layout, and have the same problem. Their order makes no logical sense -lexical order must be organized externally.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "aeioueaou original list aseiooueu", |
| "sec_num": null |
| }, |
| { |
| "text": "The Intrusion Problem Transcribed Thai has 3 exceptions to a one-sound, one-letter rule:", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "aeioueaou original list aseiooueu", |
| "sec_num": null |
| }, |
| { |
| "text": "-Ch, and the aspirated consonants kh, ph, and t h are shown with two letters (possibly as ch, kh, ph, and th).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "aeioueaou original list aseiooueu", |
| "sec_num": null |
| }, |
| { |
| "text": "long vowels are doubled, eg. e/ee or alas.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "aeioueaou original list aseiooueu", |
| "sec_num": null |
| }, |
| { |
| "text": "the glottal stop is shown with ?, either before or after the vowel.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "aeioueaou original list aseiooueu", |
| "sec_num": null |
| }, |
| { |
| "text": "The two-letter sounds cause a problem I call intrusiona two-letter consonant can, and invariably does, appear in the middle of another consonant's dictionary section. The p entries are split in half by the intruding p h. k, and t have equivalent problems, as do many of the glottal, short, and long vowels.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "aeioueaou original list aseiooueu", |
| "sec_num": null |
| }, |
| { |
| "text": "The Alternate Character Problem The undotted i character, 1, may be used to avoid conflicts with tone marks, eg.:", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "aeioueaou original list aseiooueu", |
| "sec_num": null |
| }, |
| { |
| "text": "11, 11 vs. 11,", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "aeioueaou original list aseiooueu", |
| "sec_num": null |
| }, |
| { |
| "text": "This wreaks havoc with lexical ordering. Because the undotted i character is in the position of \" in standard character sets, ordinary sorting code handles ii and ii differently.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "aeioueaou original list aseiooueu", |
| "sec_num": null |
| }, |
| { |
| "text": "Tone marks also vary. The SIL IPA set has four versions of each tone mark, designed to fit appropriately around various characters. Once again, symbols with the same lexical position are found in different parts of the collating sequence.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "aeioueaou original list aseiooueu", |
| "sec_num": null |
| }, |
| { |
| "text": "Part II: the Solution Thus, sorting Thai begins with transcription, then requires decisions about the order of:", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "t ti", |
| "sec_num": "41" |
| }, |
| { |
| "text": "consonants, including IPA and two-letter consonants like 0 and kh.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "t ti", |
| "sec_num": "41" |
| }, |
| { |
| "text": "vowels, particularly IPA vowels c a vowel length, eg. glottal, short, long.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "t ti", |
| "sec_num": "41" |
| }, |
| { |
| "text": "tones; for instance, Thai is conventionally ordered mid, low, falling, high, rising.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "t ti", |
| "sec_num": "41" |
| }, |
| { |
| "text": "We must also come up with ways to:", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "t ti", |
| "sec_num": "41" |
| }, |
| { |
| "text": "separate collating and sorting sequences, -make two-character sequences sort as though they were single characters, and temporarily ignore tone marks or substitute characters that confuse sort programs. Instead of editing the original words (that would destroy the useful information they contain) we extract information -the word's phonemic signature. If we prepend the signature to the word, and then sort, words will be in the order we seek: When sorting is done, we throw the signatures away, and keep only the sorted originals. More formally, we generate signatures and use them as sort keys. This approach is useful for sorting information, like fingerprint records, that does not easily lend itself to being ordered, and can also be applied to various programming problems (see [2] ).", |
| "cite_spans": [ |
| { |
| "start": 785, |
| "end": 788, |
| "text": "[2]", |
| "ref_id": "BIBREF1" |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "t ti", |
| "sec_num": "41" |
| }, |
| { |
| "text": "The example above has no tones, so one signature suffices. But multiple signatures let each signature act as the representative of a single sorting characteristic.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "t ti", |
| "sec_num": "41" |
| }, |
| { |
| "text": "Suppose we have a number of characteristics -call them S, T, U -and each characteristic has alternatives, S,, 52, and so on. ", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "t ti", |
| "sec_num": "41" |
| }, |
| { |
| "text": "First, note the ASCII collating sequence (lowest to highest) is:", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Part III: Implementation", |
| "sec_num": null |
| }, |
| { |
| "text": "all white space, through single blank !", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Part III: Implementation", |
| "sec_num": null |
| }, |
| { |
| "text": "# % & * + . /", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Part III: Implementation", |
| "sec_num": null |
| }, |
| { |
| "text": "-0 through 9, then : ; < = > ? -A through Z, then ] A a through z, then ( I } Deriving Signatures A variety of techniques are employed to derive signatures from transcriptions:", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Part III: Implementation", |
| "sec_num": null |
| }, |
| { |
| "text": "-Unifying -giving different letters one value (so that i and i might both be i).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Part III: Implementation", |
| "sec_num": null |
| }, |
| { |
| "text": "-Stripping -removing characters (like tone marks) not relevant to a signature.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Part III: Implementation", |
| "sec_num": null |
| }, |
| { |
| "text": "-Compression -turning a two-character sequence into a single character (eg. turning kh and th into K and T). -Substitution -giving individual characters more convenient names (eg. referring to c and 4th as E and U).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Part III: Implementation", |
| "sec_num": null |
| }, |
| { |
| "text": "-Remapping -relocating non-contiguous characters (like stTuU...) to a sequence that sorts properly (eg. STUVW).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Part III: Implementation", |
| "sec_num": null |
| }, |
| { |
| "text": "A few UNIX tools (also available as standalone utilities under DOS) suffice for all tasks.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Part III: Implementation", |
| "sec_num": null |
| }, |
| { |
| "text": "An Example Alphabet Consider a simple alphabet that displays all of the full alphabet's problems: ", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Part III: Implementation", |
| "sec_num": null |
| }, |
| { |
| "text": "Let's assume that we would like to define lexical ordering in the following way: characters are ordered as listed, single vowels follow doubled vowels, and tone marks appear in order following no tone marks.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "The transcription alphabet", |
| "sec_num": null |
| }, |
| { |
| "text": "The nonsense syllables below are properly ordered. The signatures are left in place; in a moment, we'll see how they were generated (they are the contents of file s4, below). -SI carries the tone-mark phoneme.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "The transcription alphabet", |
| "sec_num": null |
| }, |
| { |
| "text": "-S2 strips tones, but carries the vowel length and final consonant phonemes.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "S3", |
| "sec_num": null |
| }, |
| { |
| "text": "-S3 strips vowel length, but carries the initial consonant and vowel phonemes.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "S3", |
| "sec_num": null |
| }, |
| { |
| "text": "a marks a doubled vowel, and y or z mark tones. These particular values are chosen because they are greater, alphabetically, than the upper-case letters used for words. For example, BAAD precedes BAD, but BAD comes before BAaD.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "S3", |
| "sec_num": null |
| }, |
| { |
| "text": "If the alphabet includes a glottal stop, a slightly different strategy is used. Below, we rely on the fact that the digits precede the letters. All three vowel lengths are given a twocharacter signature; in S2, note that B9 is glottal, BB is normal, and Ba is long. ", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "S3", |
| "sec_num": null |
| }, |
| { |
| "text": "The method presented here can be modified to accommodate different notions of appropriate phonemic sorting. We continue to work on additional questions, including:", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Further Work", |
| "sec_num": null |
| }, |
| { |
| "text": "deciding what the most easily understood and used phonemic orders are, building electronic dictionaries / spelling assistants that are based on these orders, developing an easier user-interface for specifying how phonemic signatures should be extracted and evaluated, automatically generating the starting transcription.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Further Work", |
| "sec_num": null |
| } |
| ], |
| "back_matter": [], |
| "bib_entries": { |
| "BIBREF0": { |
| "ref_id": "b0", |
| "title": "The Thai System of Writing", |
| "authors": [ |
| { |
| "first": "Mary", |
| "middle": [], |
| "last": "Haas", |
| "suffix": "" |
| } |
| ], |
| "year": 1956, |
| "venue": "", |
| "volume": "", |
| "issue": "", |
| "pages": "", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "Haas, Mary. The Thai System of Writing. Spoken Language Services, Inc./American Council of Learned Societies, 1956.", |
| "links": null |
| }, |
| "BIBREF1": { |
| "ref_id": "b1", |
| "title": "Programming Pearls", |
| "authors": [ |
| { |
| "first": "Jon", |
| "middle": [], |
| "last": "Bentley", |
| "suffix": "" |
| } |
| ], |
| "year": 1986, |
| "venue": "", |
| "volume": "", |
| "issue": "", |
| "pages": "", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "Bentley, Jon. Programming Pearls Addison-Wesley Publishing Company, Reading, Massachusetts, 1986.", |
| "links": null |
| } |
| }, |
| "ref_entries": { |
| "TABREF1": { |
| "content": "<table><tr><td colspan=\"4\">aobchdeeefhijkkhlmnoopphrstthutivvy</td><td/></tr><tr><td colspan=\"5\">Suppose we assume that short vowels precede longer ones. All that's left to define is tone</td></tr><tr><td>order, which is traditionally:</td><td/><td/><td/><td/></tr><tr><td>A</td><td>V</td><td colspan=\"2\">mid, low, falling, high, rising</td><td/></tr><tr><td colspan=\"5\">Below, I've applied the rule initial consonant / vowel length / tone yields:</td></tr><tr><td>m ay</td><td>ITU</td><td>made of</td><td>1</td><td>Thai</td></tr><tr><td>may m ay</td><td>1 ii chili</td><td>mile new</td><td>4 6</td><td>dictionary order</td></tr><tr><td>m ay</td><td colspan=\"2\">1 ij no, not</td><td>8</td><td/></tr><tr><td>m ay</td><td>11111</td><td>burn</td><td>9</td><td/></tr><tr><td>m ay</td><td>111</td><td>wood</td><td>5</td><td/></tr><tr><td>m ay</td><td>1111J</td><td>silk/question</td><td>7</td><td/></tr><tr><td>maay</td><td>U1 tl</td><td>measure, much</td><td>2</td><td/></tr><tr><td>maay</td><td>i1t1</td><td>widowed</td><td>3</td><td/></tr><tr><td>maay</td><td>Yi 1.I 1(1</td><td>widow</td><td>11</td><td/></tr><tr><td>maay</td><td>11 MU</td><td>to intend</td><td>10</td><td/></tr><tr><td colspan=\"2\">Sorting on Phonemic Signatures</td><td/><td/><td/></tr><tr><td colspan=\"2\">Picking an Order for Sounds</td><td/><td/><td/></tr><tr><td colspan=\"5\">Here's a restricted subset of the Thai alphabet that includes only the most regular of the du-</td></tr><tr><td>plicated consonant sounds:</td><td/><td/><td/><td/></tr><tr><td colspan=\"3\">frualsoimuuthirlumwmia-r</td><td/><td/></tr><tr><td colspan=\"5\">No Thai letter is used out of order. I can transcribe this 'alphabet' literally as:</td></tr><tr><td colspan=\"3\">kkhojchdtthnbpphfmyrIwsh?oaieueeeo</td><td/><td/></tr></table>", |
| "num": null, |
| "type_str": "table", |
| "html": null, |
| "text": "Or, in an easier-to-remember arrangement, no English letter is out-of-order." |
| }, |
| "TABREF3": { |
| "content": "<table><tr><td>ma</td><td>1</td><td>y</td><td>1</td><td>may</td><td>Ill</td></tr><tr><td>ma</td><td>1</td><td>y</td><td>3</td><td>may</td><td>111 U</td></tr><tr><td>ma</td><td>2</td><td>y</td><td>3</td><td>mbay</td><td>IJ1LJ</td></tr><tr><td>ma</td><td>2</td><td>y</td><td>4</td><td>maay</td><td>111J1U</td></tr><tr><td colspan=\"6\">Each signature's influence depends on its position, left to right. Thai spellings, however dif-</td></tr><tr><td colspan=\"6\">ferent, are only considered if the signatures and the IPA transcriptions are identical.</td></tr><tr><td/><td/><td>T2</td><td>Ul</td><td>word2</td><td/></tr><tr><td/><td/><td>T2</td><td>U2</td><td>word3</td><td/></tr><tr><td/><td/><td>T2</td><td>U3</td><td>wordy</td><td/></tr></table>", |
| "num": null, |
| "type_str": "table", |
| "html": null, |
| "text": "All the words with characteristic Si group together. The S1,7,, alternatives fall within this group, then the Si,T1 U,, alternative (Si , T1 U1), and Sh T2 U\" alternatives (there are three) follow.In concrete terms we say that our signatures consist of opening consonant and vowel, vowel length, closing consonant, and tone, eg:" |
| }, |
| "TABREF5": { |
| "content": "<table><tr><td>original</td><td colspan=\"3\">de i I kkh noopph -</td></tr><tr><td>source</td><td>d E</td><td colspan=\"2\">k kti!I N o p ph+ , -</td></tr><tr><td colspan=\"4\">compressed d E I i kKnNopP+ -</td></tr><tr><td>unified</td><td colspan=\"3\">E i i k K nNop P+ -</td></tr><tr><td colspan=\"4\">substituted d A i i k K n N y o p P y z</td></tr><tr><td colspan=\"4\">remapped ABCCD E FGH I J yz</td></tr><tr><td/><td colspan=\"3\">The transliteration step</td></tr><tr><td>The code below creates file s 1:</td><td/><td/><td/></tr><tr><td colspan=\"2\">sed 's/kh/K/g' < source I</td><td/><td>compress kh</td></tr><tr><td colspan=\"2\">sed 's/ph/P/g' I</td><td/><td>compress ph</td></tr><tr><td colspan=\"2\">tr \"IE+-\" \"iAyz\" I</td><td/><td>unify and substitute</td></tr><tr><td colspan=\"4\">tr \"dAikKnNopP\" \"ABCDEFGHIJ\" > sl remap</td></tr><tr><td/><td>S2</td><td>S.1</td><td>actual</td></tr><tr><td>paste s3 s2 I</td><td>AB9</td><td>ABy9</td><td>AB do? paste the first two</td></tr><tr><td>AB paste -sl I</td><td>ABB</td><td>ABy</td><td>da add the third</td></tr><tr><td colspan=\"2\">AB paste -source I ABa</td><td>AByB</td><td>d6e add the original data</td></tr><tr><td>sort > s4</td><td/><td/><td>do the work</td></tr><tr><td colspan=\"2\">Implementation Details cut -f4 < s4 > out</td><td/><td>strip off the first 3 fields</td></tr><tr><td colspan=\"4\">To generate the signatures, we begin with a wholesale transformation, then strip or modify</td></tr><tr><td colspan=\"2\">individual characters as we build signatures.</td><td/><td/></tr><tr><td colspan=\"3\">source -> transliterate > sl</td><td/></tr><tr><td colspan=\"4\">sl -> strip-tones I tag-double-vowels > s2</td></tr><tr><td colspan=\"3\">s2 -> strip-vowel-tags > s3</td><td/></tr><tr><td colspan=\"4\">assemble s3 s2 sl source I sort > s4</td></tr><tr><td colspan=\"2\">s4 -> take-apart > out</td><td/><td/></tr></table>", |
| "num": null, |
| "type_str": "table", |
| "html": null, |
| "text": "All the intermediate files aren't necessary; I've left them to make the code easier to follow.Transliteration The transliteration step requires several transformations. Some forethought is required in the transcription alphabet's design -if k and kh are each treated as a single letter, then h can't be a unique letter in the original alphabet unless k + h is illegal (as it is in Thai).Strip-Tones, Tag-Double-Vowels Next we create file s2 (my apologies for the sed):tr -d yz < sl I strip the tones sed 's/\\([BCH]\\)\\l/\\la/g' > s2tag the doubled vowels Strip-Vowel-Tags, Assemble, Take-Apart Next we'll strip the vowel tags and create file 53. Using auxiliary files in the next two steps makes the programming a bit clearer.tr -d a < s2 > s3 strip the vowel tagsFinally, we put the signatures together, sort, and cut the signatures out:" |
| } |
| } |
| } |
| } |