Commit f13b7024 by Sartika Aritonang

Upload New File

parent 543b72bd
import re
class DisambiguatorPrefixRule31a(object):
"""Disambiguate Prefix Rule 31a
Rule 31a : penyV -> pe-nyV
"""
def disambiguate(self, word):
"""Disambiguate Prefix Rule 31a
Rule 31a : penyV -> pe-nyV
"""
matches = re.match(r'^peny([aiueo])(.*)$', word)
if matches:
return 'ny' + matches.group(1) + matches.group(2)
class DisambiguatorPrefixRule31b(object):
"""Disambiguate Prefix Rule 31b
Original Rule 31 : penyV -> peny-sV
Modified by CC, shifted to 31b
"""
def disambiguate(self, word):
"""Disambiguate Prefix Rule 31b
Original Rule 31 : penyV -> peny-sV
Modified by CC, shifted to 31b
"""
matches = re.match(r'^peny([aiueo])(.*)$', word)
if matches:
return 's' + 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