39,9 → 39,9 |
(u"pxengenga", u"ngenga", u"", u"", u"", [[u"pxe"]], (()), False), |
(u"kìmä", u"kä", u"", u"ìm", u"", (()), (()), False), |
(u"apxay", u"pxay", u"", u"", u"", [[u"a"]], (()), False), |
(u"akawng", u"kawng", u"", u"", u"", [[u"a"]], (()), False), |
(u"kawnga", u"kawng", u"", u"", u"", (()), [[(u"a", None)]], False), |
(u"kawng", u"kawng", u"", u"", u"", (()), (()), False), |
#(u"akawng", u"kawng", u"", u"", u"", [[u"a"]], (()), False), |
#(u"kawnga", u"kawng", u"", u"", u"", (()), [[(u"a", None)]], False), |
#(u"kawng", u"kawng", u"", u"", u"", (()), (()), False), |
(u"ka", u"ka", u"", u"", u"", (()), (()), False), |
(u"uo", u"uo", u"", u"", u"", (()), (()), False), |
(u"sìk", u"sìk", u"", u"", u"", (()), (()), False), |
57,6 → 57,15 |
#prefixesn = ur"(?P<npr>(?:(?:fì|tsa)?(?:me|pxe|ay|fra)?|(?:fay)?|(?:tsay)?)(?:fne)?(?:tì|sä)?" |
#prefixesv = ur"(?P<vpr>(?:nì|sä|tì|rä'ä |ke )?)" |
|
EXTRAINFIXES = [ |
{"id": "-1", "navi": "eiy", "gloss": "LAUD.", "position": 2}, |
{"id": "-2", "navi": "eng", "gloss": "PEJ.", "position": 2}, |
] |
|
EXTRAPOSTFIXES = [ |
{"id": "-3", "navi": "eyä", "gloss": "GEN."}, |
] |
|
EXTRAADP = (("to", [x["id"] for x in wordlist if x["navi"] == "to"][0]), ("sì", [x["id"] for x in wordlist if x["navi"] == "sì"][0])) # words that act like adpositions but technically aren't |
|
LENIT = ((u"px", u"p"), (u"tx", u"t"), (u"kx", u"k"), (u"ts", u"s"), (u"t", u"s"), (u"p", u"f"), (u"k", u"h"), (u"'", u"")) |
66,10 → 75,14 |
for prefix in prefixes: |
for letter, replacement in LENIT: |
if prefix["navi"].startswith(letter): |
extraprefixes.append({"id": prefix["id"], "navi": prefix["navi"].replace(letter, replacement, 1), "gloss": prefix["gloss"] + ".LENTD"}) |
new_prefix = prefix["navi"].replace(letter, replacement, 1) |
if not [x for x in prefixes if x["navi"] == new_prefix]: # always assume a dictionary word over a lenited prefix |
extraprefixes.append({"id": prefix["id"], "navi": new_prefix, "gloss": prefix["gloss"] + ".LENTD"}) |
break |
|
prefixes = sorted(prefixes + extraprefixes, key=lambda x: len(x["navi"]), reverse=True) |
infixes = sorted(infixes + EXTRAINFIXES, key=lambda x: len(x["navi"]), reverse=True) |
postfixes = sorted(postfixes + EXTRAPOSTFIXES, key=lambda x: len(x["navi"]), reverse=True) |
|
def parseword(wordin): |
tempid = 0 |
136,21 → 149,45 |
center = temp |
if center == u"": |
if splitword[wor].endswith(u"nga"): |
temp = splitword[wor][:-3] + u"ng" |
temp = splitword[wor][:-3] + u"nge" |
if temp in wordin[wor]: |
center = temp |
if splitword[wor].endswith(u"fo"): |
temp = splitword[wor][:-2] + u"f" |
temp = splitword[wor][:-2] + u"fe" |
if temp in wordin[wor]: |
center = temp |
if splitword[wor].endswith(u"po"): |
temp = splitword[wor][:-2] + u"p" |
temp = splitword[wor][:-2] + u"pe" |
if temp in wordin[wor]: |
center = temp |
if splitword[wor].endswith(u"tsa"): |
temp = splitword[wor][:-3] + u"ts" |
temp = splitword[wor][:-3] + u"tse" |
if temp in wordin[wor]: |
center = temp |
if splitword[wor].endswith(u"fko"): |
temp = splitword[wor][:-3] + u"fke" |
if temp in wordin[wor]: |
center = temp |
if splitword[wor].endswith(u"tsa'u"): |
temp = splitword[wor][:-5] + u"tse" |
if temp in wordin[wor]: |
center = temp |
if splitword[wor].endswith(u"sa'u"): |
temp = splitword[wor][:-4] + u"se" |
if temp in wordin[wor]: |
center = temp |
if splitword[wor].endswith(u"sa"): |
temp = splitword[wor][:-2] + u"se" |
if temp in wordin[wor]: |
center = temp |
if splitword[wor].endswith(u"sno"): |
temp = splitword[wor][:-3] + u"sne" |
if temp in wordin[wor]: |
center = temp |
if splitword[wor].endswith(u"ayla"): |
temp = splitword[wor][:-3] + u"ayle" |
if temp in wordin[wor]: |
center = temp |
if center == u"": |
foundit = False |
break |