Commit be2304df by Sartika Aritonang

Upload New File

parent ba12d0d7
import re
class DisambiguatorPrefixRule27(object):
"""Disambiguate Prefix Rule 27
Rule 27 : pen{c|d|j|z} -> pen-{c|d|j|z}
"""
def disambiguate(self, word):
"""Disambiguate Prefix Rule 27
Rule 27 : pen{c|d|j|z} -> pen-{c|d|j|z}
"""
matches = re.match(r'^pen([cdjz])(.*)$', word)
if matches:
return matches.group(1) + matches.group(2)
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