|
From: <fri...@us...> - 2008-12-23 18:39:19
|
Revision: 9632
http://zaf.svn.sourceforge.net/zaf/?rev=9632&view=rev
Author: friedelwolff
Date: 2008-12-23 18:39:15 +0000 (Tue, 23 Dec 2008)
Log Message:
-----------
Put existing rule sets into the hunspell_format API. Output of the .aff compares well with the old implentation, but proper removal of duplicates causes a (wanted) diff
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-23 17:40:17 UTC (rev 9631)
+++ trunk/dict/zu/hunspell/zu_aff.py 2008-12-23 18:39:15 UTC (rev 9632)
@@ -318,4 +318,11 @@
aff.needaffix = "Y"
aff.complexprefixes = True
+ for rule_set in rules:
+ flag, cross_product, type = rule_set[0]
+ group = aff.add_group(suffix=type=="SFX", cross_product=cross_product, flag=flag)
+ for rule in rule_set[1:]:
+ strip, affix, condition = rule
+ group.add_rule(strip=strip, affix=affix, condition=condition)
+
print aff.hunspell()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|