|
From: <fri...@us...> - 2008-12-19 09:26:30
|
Revision: 9619
http://zaf.svn.sourceforge.net/zaf/?rev=9619&view=rev
Author: friedelwolff
Date: 2008-12-19 09:26:25 +0000 (Fri, 19 Dec 2008)
Log Message:
-----------
Keep a list of useful replacements and output it to REP statements for myspell
Modified Paths:
--------------
trunk/dict/zu/myspell/zu_aff.py
Modified: trunk/dict/zu/myspell/zu_aff.py
===================================================================
--- trunk/dict/zu/myspell/zu_aff.py 2008-12-19 09:22:23 UTC (rev 9618)
+++ trunk/dict/zu/myspell/zu_aff.py 2008-12-19 09:26:25 UTC (rev 9619)
@@ -67,6 +67,32 @@
new_string = palatalisation_re[0].sub(palatalisation_re[1], new_string)
return new_string
+replace_list = [
+ ["bh", "b"],
+ ["b", "bh"],
+ ["ch", "c"],
+ ["c", "ch"],
+ ["dh", "d"],
+ # dh doesn't occur
+ ["hh", "h"],
+ ["h", "hh"],
+ ["kh", "k"],
+ ["k", "kh"],
+ ["k", "g"],
+ ["g", "k"],
+ ["mg", "mng"],
+ ["g", "k"],
+ ["ph", "p"],
+ ["p", "ph"],
+ ["qh", "q"],
+ ["q", "qh"],
+ ["th", "t"],
+ ["t", "th"],
+ ["xh", "x"],
+ ["x", "xh"],
+]
+"""These are suggestions for replacement."""
+
def illegal_reflexive(subject, object):
"""Returns whether using the given concords together would result in an
illegal reflexive
@@ -193,6 +219,11 @@
TRY aeinulkhosbgywmztdpfcqrvj-ASJMHxEKBGNPTRLDIZFOUWVYC
"""
+ print "REP %d" % len(replace_list)
+ for rep in replace_list:
+ print "REP %s %s" % (rep[0], rep[1].replace(' ', '_'))
+ print
+
for rule_set in rules:
identifier = rule_set[0][0]
rule_set[0][0] = ''
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|