Commit 853c6f65 by Sartika Aritonang

Upload New File

parent c441de96
import re
class DisambiguatorPrefixRule5(object):
"""Disambiguate Prefix Rule 5
Rule 5 : beC1erC2 -> be-C1erC2 where C1 != 'r'
"""
def disambiguate(self, word):
"""Disambiguate Prefix Rule 5
Rule 5 : beC1erC2 -> be-C1erC2 where C1 != 'r'
"""
matches = re.match(r'be([bcdfghjklmnpqstvwxyz])(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