|
From: <fri...@us...> - 2009-02-26 11:10:03
|
Revision: 9677
http://zaf.svn.sourceforge.net/zaf/?rev=9677&view=rev
Author: friedelwolff
Date: 2009-02-26 11:09:53 +0000 (Thu, 26 Feb 2009)
Log Message:
-----------
A fairly complete implementation of relatives (qualificative nouns with a fossilised noun class prefix) and adjectives (qualificative nouns with a alternating noun class prefix). This covers several cases that doesn't even occur in the currently available corpus. This still needs review but is usable for now.
Modified Paths:
--------------
trunk/dict/zu/hunspell/zu_aff.py
Modified: trunk/dict/zu/hunspell/zu_aff.py
===================================================================
--- trunk/dict/zu/hunspell/zu_aff.py 2009-02-26 08:31:08 UTC (rev 9676)
+++ trunk/dict/zu/hunspell/zu_aff.py 2009-02-26 11:09:53 UTC (rev 9677)
@@ -57,6 +57,15 @@
possesive_morphemes = ["wa", "ba", "ya", "la", "sa", "za", "lwa", "kwa"]
#bu -> ba
+#TODO: review all these adjective things
+adjective_prefixes = ["ngim", "siba", "um", "niba", "ba", "mu", "mi", "li", "ma", "si", "zin", "in", "lu", "bu", "ku"]
+#TODO: class 1 with monosyllabic stems: "mu" vs. "m", "ngimu" vs. "ngim"
+adjective_prefixes_neg = ["angim", "asiba", "awum", "aniba", "ababa", "awumu", "ayimi", "alili", "awama", "asisi", "azizin", "ayin", "alulu", "abubu", "akuku"]
+#TODO: class 1 with monosyllabic stems: "akamu" vs. "akam", "angimu" vss "angim"
+qualificative_adjective_prefixes = ["engim", "esiba", "niba", "aba", "om", "emi", "eli", "ama", "esi", "ezin", "en", "olu", "obu", "oku"]
+qualificative_adjective_prefixes_neg = ["engingem", "esingeba", "ningeba", "angeba", "ongem", "engemi", "elingeli", "angema", "esingesi", "ezingezin", "engen", "olungelu", "obungebu", "okungeku"]
+#TODO: class 1 with monosyllabic stems: "ongemu" vs. "ongem", "engingemu" vs. "engingem"
+
a_rules = [["a", "Y", "PFX"]]
"""prefixes only applicable to verbs ending on -a"""
A_rules = [["A", "Y", "PFX"]]
@@ -463,6 +472,14 @@
locative_sfx_ini = aff.add_group(suffix=True, flag="m")
# This group will contain rules for locative suffixes
+ relative = aff.add_group(suffix=False, flag="V")
+ # This group will contain rules for the relatives, also known as the
+ # qualificative noun with a fossilised noun class prefix
+
+ adjective = aff.add_group(suffix=False, flag="W")
+ # This group will contain rules for the adjectives, also known as the
+ # qualificative noun with a alternating noun class prefix
+
for morpheme in subject_morphemes:
# Indicative short form, present, positive with subject morpheme only
verb_rules(main_subjects, affix=morpheme, continuation_classes=[past_indicative, question])
@@ -671,4 +688,23 @@
noun_rules(noun, affix="nga", morphology="INSTRUMENTAL/REFERENTIAL_PARTICLE")
+ ### Adjectives and relatives ###
+
+ for morpheme in adjective_prefixes:
+ adjective.add_rule(affix=morpheme, morphology="COPULATIVE")
+ for morpheme in adjective_prefixes_neg:
+ adjective.add_rule(affix=morpheme, morphology="NEG_COPULATIVE")
+ for morpheme in qualificative_adjective_prefixes:
+ adjective.add_rule(affix=morpheme, morphology="RELATIVE/QUALIFICATIVE")
+ for morpheme in qualificative_adjective_prefixes_neg:
+ adjective.add_rule(affix=morpheme, morphology="NEG_RELATIVE/QUALIFICATIVE")
+
+ for morpheme in subject_morphemes:
+ relative.add_rule(affix=morpheme, morphology="COPULATIVE")
+ relative.add_rule(affix=add_semivowels("a"+morpheme), morphology="NEG_COPULATIVE")
+ relative.add_rule(affix="aka", morphology="NEG_COPULATIVE")
+ for morpheme in relative_prefixes:
+ relative.add_rule(affix=morpheme, morphology="RELATIVE/QUALIFICATIVE")
+ relative.add_rule(affix=morpheme+"nge", morphology="NEG_RELATIVE/QUALIFICATIVE")
+
print aff.hunspell()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|