\_sh v3.0 380 Readme Notes \id ADAPT1A \s Prinderella and the Cince \p This is a simple and cute example of adaptation starting from an English text which has the starting consonants of some pairs of words swapped. \p This example illustrates an effective adaptation technique for language pairs that have a significant number of words that do not change. \p Basically, words and phrases are looked up in a simple cross-lexicon that contains only words which change. \p * Words that do not change are allowed to pass through the adaptation process unchanged. \p * Words and phrases that are found in the lexicon are replaced with the target equivalent from the lexicon. \s Things to see \s2 Interlinear Setup \p Click in the Prinder.txt window, and then take a look at the interlinear setup (choose Database, Properties, Interlinear). You will see that there is only one interlinear process (a Lookup process). Double-click the lookup and observe that it goes from \t to \e. Observe that it keeps capitalization and punctuation. Also observe that if lookup fails, it outputs the word without a failure mark. This allows words not in the lexicon to pass through unchanged. \p Notice that it is also possible to pass a word through a Consistent Changes (CC) table if it is not found in the lexicon. This can be used to apply regular sound changes, with the lexicon used as an override for words that are not cognates or are otherwise exceptions to the regular sound change rules. \p This approach is also very useful for orthography conversions in which there are exceptions to a standard conversion table. The exceptions can be entered in a small lexicon so that they override the predictable changes performed by the CC table. \p \s2 The Lexicon \p To see the lexical entry for a changed word, right-click (option-click on Mac) on the word in the text line of the interlinear window. For example, right-click on "Prinderella" will show its lexical entry in the lexicon window. Right-clicking on a word that is not in the lexicon gives a message saying it is not found. \p \s2 Alternate forms in the Lexicon \p Look in the lexicon at the entry for "wine". Notice that it has two \e fields, "time" and "wine". This is the way to handle a word or phrase that has more than one possible equivalent. Since "wine" is a real English word, in this silly example, it might occur as itself somewhere and not be changed to "time". To see the result, place the cursor at the front of "wine" in the Prinder text and press Alt+A (command+A on the Mac). An Ambiguity Selection box appears. Notice that the order of choices in the box is the same as in the lexical entry. If you place the most frequent choice first, it will be the default and will be the easiest to choose. \p Another way to make a word ambiguous is to make two lexical entries for the same word, with different equivalents in the \e field. This works, but it does not allow you to control the order in which the ambiguities will be shown in the selection box. \p \s2 Phrase substitution \p Phrase substitution is a powerful capability of Shoebox. To see an example, move down in the interlinear text to the word "twink", which changes to "eye". (This is about ten lines down.) Notice that in this context a simple change of "twink" to "eye" would give "a eye". In later samples we will see more general ways to handle this, but in this case it is handled by doing a phrase match on "a twink" and changing it to "an eye". To see the lexical entry that does this, select the phrase "a twink" and then right-click on it. (Be sure you don't select the comma! You can also get there by going to the first record of the lexicon.) A phrase in the lexicon can be changed into either a phrase or a single word. A single word can also be changed into a phrase. \p Notice that "twink" is also in the lexicon, but "a twink" is used because the adapt process attempts to use longer entries first. (The longest entry almost always wins over shorter ones, but searching moves across the line from left to right, so it is possible for a shorter phrase to win over a longer one if the shorter one starts earlier in the line.) \p In the next sample project, we will handle the difference between "a" and "an" in a more general way. \p \s2 Plurals \p Look through the interlinear file and the lexicon. You can use Browse to see the lexicon. (But Browse in an interlinear file is useless because it shows only the \id line, which is the record marker.) Notice that some entries in the lexicon have entries for both singular and plural. In the next sample project, we will parse words so that we can handle those in a more general way. \p \s Exercises \p At the bottom of the Prinderella interlinear text file there are two exercises for you to try. \nt Try to do them before you read the answers below. \p \s Answers to Exercises: \s2 Exercise 1 \p Place the cursor in front of "Twance" and press Alt+A. \p Choose the approriate answer at each ambiguity. \p \s2 Exercise 2 \p Place the cursor in front of "They" and press Alt+A. \p Right-click on "hassle" and choose Insert. \p Enter "castle" in the \e field. \p Go back to the text window and press Alt+A to see "castle" appear in the English line. \p To make "hassle" ambiguous, Ctrl+right-click (control+option+click on Mac) on "hassle". \p Choose Insert. \p Enter "hassle" in the \e field. \p Go back to the text window and press Alt+A to see the ambiguity question appear. \p Choose "castle". \p Insert "cill" (hill), "chots" (lots) and "lildren" (children) the same way as you inserted "hassle" above. \p \s To go to the next Adaptation tutorial, open the project in the ADAPT1B folder.