Affix Rules: Lingala Verb Example XML - TrnsltLife/HunspellXML GitHub Wiki
This toy dictionary describes a naive implementation of spell-checking for regular verbs in Lingala. You can read more about how the affixation rules for this file were produced by reading Creating Affixation Rules: an Example with Lingala Verbs.
<hunspell>
<suppress blankLines="false" comments="false" metadata="false" myBlankLines="false" myComments="false"/>
<metadata>
<comment>
This Dictionary is (C) 2013 SIL International.
Some Rights Reserved.
Made available under the Creative Commons Attribution Share-Alike License (CC-BY-SA).
Share Freely!
</comment><br/>
<languageName>Lingala Verb Example</languageName>
<localeList>ln_CD ln_CG ln</localeList>
<dictionaryName>Lingala Verb Example</dictionaryName>
<version>1.0</version>
<license>CC-BY-SA</license>
<readme>No readme</readme>
<description>A simple test of Hunspell rules for describing Lingala verb morphology.</description>
<shortDescription>Lingala Verb Example</shortDescription>
<creator>Jeremy Brown</creator>
<contributors>
<name>Jeremy Brown</name>
</contributors>
<webpage>http://www.sil.org</webpage>
<firefoxVersion min="0" max="30"/>
<thunderbirdVersion min="0" max="30"/>
</metadata>
<affixFile>
<settings>
<languageCode>ln</languageCode>
<characterSet>UTF-8</characterSet>
<flagType>long</flagType>
<ignore>- '</ignore>
<wordChars>- '</wordChars>
<needAffix flag="NA"/> <!-- put this on words that can't stand by themselves, like bare verb roots -->
</settings>
<suggestions>
<tryChars capitalize="true">a b c d e f g h i j k l m n o p q r s t u v w y z ' -</tryChars>
<keyboard layout="QWERTY"/>
<comment>Some common errors caused by French influence.</comment>
<replacements>
<replace from="ph" to="f"/>
<replace from="gn" to="ny"/>
<replace from="ss" to="s"/>
</replacements>
</suggestions>
<affixes>
<comment>Verb Prefixes for non-future, non-infinitive forms.
We roll up the subject and reflexive prefixes in all their possible combinations.
</comment>
<prefix flag="SU" cross="true">
<multiply>
<group>
<!-- simple subject prefixes -->
<rule add="na" remove="0" where="." combineFlags="NA ET"/>
<rule add="o" remove="0" where="." combineFlags="NA ET"/>
<rule add="a" remove="0" where="." combineFlags="NA ET"/>
<rule add="e" remove="0" where="." combineFlags="NA ET"/>
<rule add="to" remove="0" where="." combineFlags="NA ET"/>
<rule add="bo" remove="0" where="." combineFlags="NA ET"/>
<rule add="ba" remove="0" where="." combineFlags="NA ET"/>
</group>
<group>
<!-- null morpheme or "mi-" reflexive morpheme -->
<rule add="" remove="0" where="." combineFlags="NA ET"/>
<rule add="mi" remove="0" where="." combineFlags="NA ET"/>
</group>
</multiply>
</prefix>
<comment>Verb Prefixes for future forms.
We roll up the subject, future, and reflexive prefixes in all their possible combinations.
</comment>
<prefix flag="SF" cross="true">
<multiply>
<group>
<!-- subject prefixes with Future ko- -->
<rule add="nako" remove="0" where="." combineFlags="NA EA"/>
<rule add="oko" remove="0" where="." combineFlags="NA EA"/>
<rule add="ako" remove="0" where="." combineFlags="NA EA"/>
<rule add="eko" remove="0" where="." combineFlags="NA EA"/>
<rule add="toko" remove="0" where="." combineFlags="NA EA"/>
<rule add="boko" remove="0" where="." combineFlags="NA EA"/>
<rule add="bako" remove="0" where="." combineFlags="NA EA"/>
</group>
<group>
<!-- null morpheme or "mi-" reflexive morpheme -->
<rule add="" remove="0" where="." combineFlags="NA EA"/>
<rule add="mi" remove="0" where="." combineFlags="NA EA"/>
</group>
</multiply>
</prefix>
<comment>Verb Prefixes for infinitive forms combined with reflexive.</comment>
<prefix flag="IF" cross="true">
<rule add="ko" remove="0" where="." combineFlags="NA EA"/>
<rule add="komi" remove="0" where="." combineFlags="NA EA"/>
</prefix>
<comment>Verb Prefixes for imperative forms combined with reflexive.</comment>
<prefix flag="IS" cross="true">
<rule add="" remove="0" where="." combineFlags="NA EA"/>
<rule add="bo" remove="0" where="." combineFlags="NA EA"/>
<rule add="mi" remove="0" where="." combineFlags="NA EA"/>
<rule add="bomi" remove="0" where="." combineFlags="NA EA"/>
</prefix>
<comment>Verb Suffixes
Combination of Extension forms (ol, is, el, am, an)
and Tense forms (a, i, aka, aki)
</comment>
<suffix flag="ET" cross="true">
<multiply>
<group>
<!-- verb extension morphemes including null morpheme -->
<rule add="" remove="0" where="."/>
<rule add="ol" remove="0" where="."/>
<rule add="is" remove="0" where="."/>
<rule add="el" remove="0" where="."/>
<rule add="am" remove="0" where="."/>
<rule add="an" remove="0" where="."/>
</group>
<group>
<rule add="a" remove="0" where="."/>
<rule add="i" remove="0" where="."/>
<rule add="aka" remove="0" where="."/>
<rule add="aki" remove="0" where="."/>
</group>
</multiply>
</suffix>
<comment>Verbs with a final -a vowel.
This is needed by the future (SF), imperative (IS), and infinitive (IF) forms.
</comment>
<suffix flag="EA" cross="true">
<rule add="a" remove="0" where="."/>
<rule add="ola" remove="0" where="."/>
<rule add="isa" remove="0" where="."/>
<rule add="ela" remove="0" where="."/>
<rule add="ama" remove="0" where="."/>
<rule add="ana" remove="0" where="."/>
</suffix>
</affixes>
</affixFile>
<dictionaryFile>
<words flags="NA SU SF IS IF">
zal
ling
lamb
luk
kom
li
</words>
</dictionaryFile>
<tests>
<bad>zal ling lamb luk kom li</bad>
<bad>nazal oling alamb eluk tokom boli bazal koling</bad>
<bad>namizal omiling amilamb emiluk tomikom bomili bamizal komiling</bad>
<bad>nakozal okoling akolamb ekoluk tokokom bokoli bakozal</bad>
<bad>nakozalol okolingis akolambel ekolukam tokokoman</bad>
<bad>nakozalaka nakomizalolaki</bad>
<good>nazala olingi alambaki elukaki kokoma lia</good>
<good>nakomizala okolinga akolambola</good>
</tests>
</hunspell>