/tsimapiak/parse2.py |
---|
15,7 → 15,7 |
#prefixesv = ur"(?P<vpr>(?:nì|sä|tì|rä'ä |ke )?)" |
def parseword(wordin): |
ret = {"word": {"id": 0, "navi": u" ".join(wordin), "infix": u"", "type": u""}} |
ret = {"word": {"id": 0, "navi": u"[" + u" ".join(wordin) + u"]", "infix": u"", "type": u""}} |
for word in wordlist: |
foundit = True |
foundprefs = [] |
67,10 → 67,10 |
if foundit == True: |
foundword = word |
break |
ret["pref"] = foundprefs |
ret["post"] = foundposts |
ret["inf"] = foundins |
if foundit == True: |
ret["pref"] = foundprefs |
ret["post"] = foundposts |
ret["inf"] = foundins |
ret["word"] = foundword |
return ret |
/webapp/templates/parse2.html |
---|
8,6 → 8,7 |
<input id="word" name="word" type="text" value="{{last}}" style="width: 100%;" /> |
<input name="btn" type="submit" value="Parse!" /> |
</form> |
{% if out %} |
<table border="1"> |
<tr> |
<th>Words</th> |
30,6 → 31,7 |
</tr> |
{% end %} |
</table> |
{% end %} |
<script type="text/javascript"> |
document.getElementById("word").focus(); |
</script> |