Lingala and Kikuyu

From LING073
Revision as of 17:42, 6 April 2017 by Apowell1 (talk | contribs)

Jump to: navigation, search

Resources for machine translation between Lingala and Kikuyu. Code is stored in a GitHub Repository.

Developed Resources

Parallel Corpus

A parallel corpus created using two translations of Genesis is available on Github.

Installing Unidecode For MT Evaluation

Most available Lingala text does not mark tones; however, the Lingala transducer has been configured using spellrelax to provide analyses and surface generation with tone markings included as accents on vowels. As a result, generated translations will include tone markings not present in the reference translation and artificially inflate evaluation metrics such as WER and PER. Fortunately, we can take advantage of the fact that accented characters are not present in ASCII to replace accented characters with their unaccented version on the command line.

Unidecode is a Python package that implements a function to convert Unicode strings into their closest ASCII approximation. For simple accented characters, this is precisely the mapping we need to remove the accents for evaluation against a reference translation. Unidecode can also be used on the command line with our machine translation system as follows: echo /path/to/kik-corpus | apertium -d . kik-lin | unidecode. To install unidecode, it is recommended to use pip, as experience suggests that apt-get will not run the necessary installation scripts to make unidecode accessible in Bash.

On the Ling 073 virtual machines, Pip can be installed using sudo apt-get install python-pip. After installing pip, unidecode can be installed using pip install unidecode.

Contrastive Grammar

Contrastive Grammar is detailed on the wiki page Lingala and Kikuyu/Contrastive Grammar.

Lexical Selection

Lexical selection is detailed on the wiki page Lingala and Kikuyu/Lexical Selection.

Structural Transfer

Structural transfer is detailed on the wiki page Lingala and Kikuyu/Structural Transfer

Lexical Selection

In addition to adding many one-to-one mappings to our .dix file, we have included a couple of one-to-many mappings for each direction of translation. See Lingala and Kikuyu/Lexical Selection for further details.

From Lingala to Kikuyu, we consider four one-to-many mappings:

  • The Lingala verb kokíma can be translated in English as both "to run" and "to run away." Kikuyu has two distinct verbs corresponding to these English translations, respectively, hanyũk and ũr.
  • The Lingala verb kofánda can be translated in English as both "to sit" and "to live" (as in reside). Kikuyu has two distinct verbs corresponding to these English translations, respectively, ikar and tũũr.
  • The Lingala verb kobánza can be translated in English as both "to think" and "to remember." Kikuyu has two distinct verbs corresponding to these English translations, respectively, ĩcir and ririkan.
  • The Lingala noun mabele can be translated in English as both "sand" and "milk." Kikuyu has two distinct nouns corresponding to these English translations, respectively, thanga and ria.

From Kikuyu to Lingala, we consider three one-to-many-mappings:

  • The Kikuyu verb igu can be translated in English as both "to obey" and "to hear." Lingala has two distinct verbs corresponding to these English translations, respectively, kotosa and koyoka.
  • The Kikuyu verb rut can be translated in English as both "to learn" and "to remove." Lingala has two distinct verbs corresponding to these English translations, respectively, koyekola and kokukula.
  • the Kikuyu noun ria can be translated in English as both "milk" and "pond." Lingala has two distinct nouns corresponding to these English translations, respectively, mabele and etimá.

lin → kik evaluation

  • Evaluation on mini corpus:
    • WER: 87.50%
    • PER: 87.50%
    • Number of words: 9
    • Number of unknown words: 0
    • Proportion of stems translated correctly: 100%
  • Evaluation of corpus:
    • WER: 99.06%
    • PER: 94.34%
    • Number of words: 107
    • Number of unknown words: 71
    • Proportion of stems translated correctly:33.64%

kik → lin evaluation

  • Evaluation on mini corpus:
    • WER: 80%
    • PER: 80%
    • Number of words: 7 (This should really be 8, but the command we are supposed to use to count this outputs 7. The proportion remains unchanged in our case, however.)
    • Number of unknown words: 0
    • Proportion of stems translated correctly: 100%
  • Evaluation of corpus:
    • WER: 98.13%
    • PER: 90.65%
    • Number of words: 106
    • Number of unknown words: 79 (Note: Using the commands on the wiki gives a slightly different count that using the apertium-eval-translator tool. We use the count given by the command, not the tool)
    • Proportion of stems translated correctly: 25.47%