Difference between revisions of "Agglutination"

From Apertium
Jump to navigation Jump to search
Line 44: Line 44:
 
These segmentations could be generated by the process above as shown in Table 1 (where '''NM''' = no match, '''M''' = match, and '''->Arr''' = start new array), with the output in Table 2. Of course, using [http://en.wikipedia.org/wiki/Trie tries] or something similar may be a much more efficient way of doing this than the naïve process above.
 
These segmentations could be generated by the process above as shown in Table 1 (where '''NM''' = no match, '''M''' = match, and '''->Arr''' = start new array), with the output in Table 2. Of course, using [http://en.wikipedia.org/wiki/Trie tries] or something similar may be a much more efficient way of doing this than the naïve process above.
   
  +
{|class="wikitable"
{|align=center
 
 
|k || NM || || || || || || || ||
 
|k || NM || || || || || || || ||
 
|-
 
|-
Line 65: Line 65:
   
   
  +
{|class="wikitable"
{|align=center
 
 
|ku || -ti || -m || -ana || -na
 
|ku || -ti || -m || -ana || -na
 
|-
 
|-

Revision as of 07:22, 6 March 2008

Both the current Apertium system and the suggested plugin system face another set of difficulties with agglutinative languages like Quechua. For instance:

wasi — house
wasikuna — houses
wasita — to the house
wasikunata — to the houses
wasiy — my house
wasiita — to my house
wasiikuna — my houses
wasiikunata — to my houses
wasinchik — our house
wasinchikta — to our house
wasinchikkunata — to our houses

Or Basque:

etxea la casa
etxe gorria la casa roja
etxe gorri zaharra la casa roja y vieja
etxe gorri zaharrarekin para la casa roja y vieja

This sort of complex would actually fit quite well into the current Apertium model, although each paradigm would have a great number of possible members due to the large numbers of suffixes (and this is complicated by the fact that suffix order is variable). It could also be handled by form generation, again with the drawback that many thousands of possible forms would need to be generated.

An alternative method might entail slightly adjusting the way the morphological analyser works. In this approach, the binary dictionaries would consist only of stems and affixes, and instead of having the morphological analyser read to the end of the orthographic word, it would read only to the end of possible morphological boundaries within the word. A naïve algorithm for this might be:

  1. Start at the first letter of the word.
  2. Collect all matches in the stem dictionary where that letter is the first letter.
  3. Read the next letter.
  4. Discard all items in the matched set that do not have that letter as second letter.
  5. Repeat 3 and 4 until the shortest stem that is present in the stem dictionary is found.
  6. Put this in a stem array and start using the affix dictionary as well. Set a new morphological boundary after that letter.
  7. For each subsequently-read letter, add matching stems to the stem array (working from the word-beginning), and add matching affixes to a new affix array (working from the previous morphological boundary).
  8. Each time an affix match is found, set a new morphological boundary after that letter, and start a new affix array.
  9. Add matches to the stem and affix arrays as appropriate until the end of the word.

If we take an imaginary set of stems ku, kuti, kutima, and an imaginary set of affixes -ti, -m, -ana, -ma, -na, possible segmentations for the imaginary kutimana would be:

ku-ti-m-ana
ku-ti-ma-na
kuti-m-ana
kuti-ma-na
kutima-na

These segmentations could be generated by the process above as shown in Table 1 (where NM = no match, M = match, and ->Arr = start new array), with the output in Table 2. Of course, using tries or something similar may be a much more efficient way of doing this than the naïve process above.

k NM
ku M ->Arr
kut NM t NM
kuti M ti M ->Arr
kutim NM tim NM m M ->Arr
kutima M tima NM ma M a NM ->Arr (from ma)
kutiman NM timan NM man NM an NM n NM
kutimana NM timana NM mana NM ana M na M
Table 1 - Example of stem/affix analysis


ku -ti -m -ana -na
kuti -ma
kutima
Table 2 - Output from stem/affix analysis


Once a matrix of possible segmented forms has been generated for the word, there would then be the need to choose which of these are the ones intended.

One way of working towards this might be to have a table of possible affix combinations, with a likelihood assigned to each one. Something like the corpus generated by Kevin Scannell's Crubadán (http://borel.slu.edu/crubadan/index.html) might help here - a corpus is being collected for Bolivian Quechua and Ecuadorean Quichua (though not for Peruvian Quechua, which has more speakers).

Indeed, another way of approaching the segmentation issue would be to use such a table directly, but working backwards from the end of the orthographical word - this would require the analyser to reverse each word before analysis, and then remove the segment which matched the longest affix sequence in the table.

Either of these approaches (intra-word segmentation, affix table) would minimise the number of forms produced either by the current Apertium paradigm model, or by the suggested form generation model. It is likely that these techniques could also be used with other Native American languages.