Commit 33f5d457 by Sartika Aritonang

Upload New File

parent d28a95ec
import re
class DisambiguatorPrefixRule35(object):
"""Disambiguate Prefix Rule 35
Rule 35 : terC1erC2 -> ter-C1erC2 where C1 != {r}
"""
def disambiguate(self, word):
"""Disambiguate Prefix Rule 35
Rule 35 : terC1erC2 -> ter-C1erC2 where C1 != {r}
"""
matches = re.match(r'^ter([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