/tsimapiak/parse.py |
---|
126,6 → 126,8 |
wordlist = sorted(wordlist + extrawords, key=lambda x: len(x["navi"]) * 2 + (0 if x["lenited"] else 1), reverse=True) |
# TODO add reef Na'vi |
def parseword(wordin): |
tempid = 0 |
temptype = u"" |
271,6 → 273,7 |
def parsesent(sent): |
sent = sent.strip().lower().replace(u"’", u"'") |
sent = sent.replace("ù", "u") # Basic support for reef Na'vi |
sent = re.sub(r"[^\wìä' ]", u"", sent) |
sent = re.sub(r"\ +", u" ", sent) |
sent = sent.split(u" ") |