Subversion Repositories navi

Compare Revisions

Ignore whitespace Rev 74 → Rev 76

/tsimapiak/parse2.py
15,7 → 15,6
 
def parseword(wordin):
ret = {"word": {"id": 0, "navi": u" ".join(wordin), "infix": u"", "type": u""}}
foundword = u""
for word in wordlist:
foundit = True
foundprefs = []
25,6 → 24,8
foundit = False
next
for wor in range(len(splitword)):
if not foundit:
break
foundprefs.append([])
foundposts.append([])
center = u""
31,7 → 32,6
foundins = [u"", u"", u""]
pre = []
post = []
found = False
if u"<1>" in splitword[wor]:
for in1 in infixes1:
for in2 in infixes2:
40,8 → 40,8
center = splitword[wor].replace(u"<1><2>",in1+in2).replace(u"<3>",in3)
foundins = [in1, in2, in3]
break
if foundinf: break
if foundinf: break
if center != u"": break
if center != u"": break
else:
if splitword[wor] in wordin[wor]:
center = splitword[wor]
/webapp/main.py
62,7 → 62,7
def post(self):
try:
word = self.get_argument("word").strip()
word = self.get_argument("word").strip().split(u" ")
except:
self.redirect("/parse2")
out = parse2.parseword(word)