Subversion Repositories navi

Compare Revisions

Ignore whitespace Rev 76 → Rev 77

/tsimapiak/parse2.py
65,4 → 65,13
ret["post"] = foundposts
ret["inf"] = foundins
ret["word"] = foundword
return ret
 
def parsesent(sent):
ret = []
left = len(sent)
while left:
word = parseword(sent)
left -= len(word)
ret.append(word)
return ret
/webapp/main.py
62,10 → 62,10
def post(self):
try:
word = self.get_argument("word").strip().split(u" ")
word = self.get_argument("word").strip()
except:
self.redirect("/parse2")
out = parse2.parseword(word)
out = parse2.parsesent(word.split(u" "))
self.render("templates/parse2.html", last=word, out=out)
 
application = tornado.web.Application([