Commit e618f4b8 authored by Neeme Kahusk's avatar Neeme Kahusk
Browse files

pwn relations

parent 1a2f57b3
......@@ -98,8 +98,11 @@ POINTER_SYMBOLS = { # (symbol, pos):
def deadj(iStr):
"""Remove part in parentheses (used at adjectives)
"""
if iStr.count('('):
return iStr[0:iStr.index('(')]
elif iStr.count('<'):
return iStr[0:iStr.index('<')]
else:
return iStr
......@@ -252,7 +255,7 @@ def parse_dataline(iList,indexDict=WNI):
# of 0 is the default, and therefore is not present in
# lexicographer files.
while wordCounter:
oDict['synonym'].append({'word':first.pop(0).decode('utf8'),
oDict['synonym'].append({'word':first.pop(0), #.decode('utf8'),
'lex_id':first.pop(0)}
)
wordCounter -=1
......@@ -474,8 +477,8 @@ def make_visdic_xml(dataDict,xml):
sense = etree.SubElement(literal,
'SENSE').text = j['sense_number']
except KeyError:
print i
print j
print " i", i
print " j",j
lemma = etree.SubElement(literal, 'LEMMA')
gloss = etree.SubElement(synset, 'DEF').text = glossText
for j in i['usage']:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment