|
From: <fri...@us...> - 2008-12-26 10:08:39
|
Revision: 9643
http://zaf.svn.sourceforge.net/zaf/?rev=9643&view=rev
Author: friedelwolff
Date: 2008-12-26 10:08:32 +0000 (Fri, 26 Dec 2008)
Log Message:
-----------
Use verb_rules to generate correct rules for vowel verbs
Modified Paths:
--------------
trunk/dict/zu/hunspell/zu_aff.py
Modified: trunk/dict/zu/hunspell/zu_aff.py
===================================================================
--- trunk/dict/zu/hunspell/zu_aff.py 2008-12-24 13:40:35 UTC (rev 9642)
+++ trunk/dict/zu/hunspell/zu_aff.py 2008-12-26 10:08:32 UTC (rev 9643)
@@ -27,6 +27,7 @@
# This currently only handles morphology for verbs. More to follow later.
+#TODO: review class 1 exceptions
#TODO: be- and se- verbs
#TODO: monosyllabic verbs
#TODO: statives
@@ -153,7 +154,7 @@
#Let's make a temporary group to work with
group = AffixGroup(flag="tmp", suffix=False)
else:
- prefix = kwargs.pop('prefix')
+ prefix = kwargs.pop('affix')
#normal verb starting on consonant:
group.add_rule(affix=prefix, condition="[^aeiou]", **kwargs)
@@ -376,21 +377,22 @@
for morpheme in subject_morphemes:
# Indicative short form, present, positive with subject morpheme only
- main_subjects.add_rule(affix=morpheme, continuation_classes=[past_indicative, question])
+ verb_rules(main_subjects, affix=morpheme, continuation_classes=[past_indicative, question])
# Duplicate it for the sake of the indicative long form, present, positive
+ # Here we don't use verb_rules, because this will always combine with -ya-
simple_subjects.add_rule(affix=morpheme)
# Indicative, present, negative with subject morpheme only
- main_subjects.add_rule(affix=add_semivowels("a"+morpheme), needaffix=True, circumfix=True, continuation_classes=[negative_indicative])
+ verb_rules(main_subjects, affix=add_semivowels("a"+morpheme), needaffix=True, circumfix=True, continuation_classes=[negative_indicative])
# We handle class 1 negative separately:
- main_subjects.add_rule(affix="aka", needaffix=True, circumfix=True, continuation_classes=[negative_indicative])
+ verb_rules(main_subjects, affix="aka", needaffix=True, circumfix=True, continuation_classes=[negative_indicative])
- infixes.add_rule(affix="ya", needaffix=True, morphology="PRESENT_IND_LONG", continuation_classes=[simple_subjects])
- infixes.add_rule(affix="yaku", needaffix=True, morphology="PRESENT_IND_LONG_OBJ_ku", continuation_classes=[simple_subjects])
- infixes.add_rule(affix="sa", needaffix=True, morphology="STILL", continuation_classes=[main_subjects])
- infixes.add_rule(affix="ku", needaffix=True, morphology="OBJ_ku", continuation_classes=[main_subjects])#
- infixes.add_rule(affix="saku", needaffix=True, continuation_classes=[main_subjects])
- infixes.add_rule(affix="uku", morphology="INFINITIVE", continuation_classes=[locative])
+ verb_rules(infixes, affix="ya", needaffix=True, morphology="PRESENT_IND_LONG", continuation_classes=[simple_subjects])
+ verb_rules(infixes, affix="yaku", needaffix=True, morphology="PRESENT_IND_LONG_OBJ_ku", continuation_classes=[simple_subjects])
+ verb_rules(infixes, affix="sa", needaffix=True, morphology="STILL", continuation_classes=[main_subjects])
+ verb_rules(infixes, affix="ku", needaffix=True, morphology="OBJ_ku", continuation_classes=[main_subjects])#
+ verb_rules(infixes, affix="saku", needaffix=True, continuation_classes=[main_subjects])
+ verb_rules(infixes, affix="uku", morphology="INFINITIVE", continuation_classes=[locative])
infixes.add_rule(affix="", condition="[^aeiou]", morphology="IMPERATIVE", continuation_classes=[imperative])
infixes.add_rule(affix="y", condition="[aeiou]", morphology="IMPERATIVE", continuation_classes=[imperative])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|