Commit 8df9fb94 by Sartika Aritonang

Upload New File

parent 33f5d457
import re
class DisambiguatorPrefixRule36(object):
"""Disambiguate Prefix Rule 36
Rule 36 : peC1erC2 -> pe-C1erC2 where C1 != {r|w|y|l|m|n}
"""
def disambiguate(self, word):
"""Disambiguate Prefix Rule 36
Rule 36 : peC1erC2 -> pe-C1erC2 where C1 != {r|w|y|l|m|n}
"""
matches = re.match(r'^pe([bcdfghjkpqstvxz])(er[bcdfghjklmnpqrstvwxyz])(.*)$', word)
if matches:
return matches.group(1) + matches.group(2) + matches.group(3)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment