Subversion Repositories navi

Compare Revisions

Ignore whitespace Rev 117 → Rev 119

/tsimapiak/parse.py
76,19 → 76,29
foundit = False
break
pref, posf = temp
for pre in prefixes:
if pref != u"":
if pref.endswith(pre):
foundprefs[wor].append(pre)
pref = pref[:-len(pre)]
last = u""
while last != pref:
last = pref
for pre in prefixes:
if pref != u"":
if pref.endswith(pre):
if pre in foundprefs[wor]:
break
foundprefs[wor].append(pre)
pref = pref[:-len(pre)]
if pref != u"":
foundit = False
break
for pos in postfixes:
if posf != u"":
if posf.startswith(pos):
foundposts[wor].append(pos)
posf = posf[len(pos):]
last = u""
while last != posf:
last = posf
for pos in postfixes:
if posf != u"":
if posf.startswith(pos):
if pos in foundposts[wor]:
break
foundposts[wor].append(pos)
posf = posf[len(pos):]
if posf != u"":
foundit = False
break
/tsimapiak/parsenum.py
39,12 → 39,12
numre = re.compile(numre)
 
def parse(numin):
if numin in (u"a", u"aa", u"ave", u"avea", u"ve", u"vea"):
return None
try:
mat = numre.match(numin).groups()
except:
return None
if mat[5] == u"" and mat[4] == u"" and mat[3] == u"" and mat[2] == u"" and mat[1] == u"":
return None
numout = 0
numoct = 0
try: