synchronized text and plural5.py example file

This commit is contained in:
Mark Pilgrim
2009-07-27 22:22:24 -04:00
parent f4c3f46d2f
commit 38aa8600c9
+1 -1
View File
@@ -301,7 +301,7 @@ rules = []
pattern, search, replace = line.split(None, 3)
yield build_match_and_apply_functions(pattern, search, replace)
def plural(noun):
def plural(noun, rules_filename='plural5-rules.txt'):
for matches_rule, apply_rule in rules():
if matches_rule(noun):
return apply_rule(noun)