Commit 926390a7 authored by Neeme Kahusk's avatar Neeme Kahusk
Browse files

trans

parent f1ea9b11
......@@ -66,25 +66,43 @@ def main():
)
(options, args) = parser.parse_args()
b = WN()
# b = WN()
oList = wnparser(PWN_PATH,options.pos,
PwnList = wnparser(PWN_PATH,options.pos,
int(options.start),int(options.end)
)
visdic_xml = make_visdic_xml(oList,b.root)
# print 'VISDIC XML:'
out_xml = etree.tostring(visdic_xml, pretty_print=True,
encoding='UTF-8',
xml_declaration=True)
oFileName = '%s-%s-%s-%s.xml' % (options.prefix,
options.pos,
options.start,
options.end
)
# print out_xml
FinList = wnparser(FIN_PATH,options.pos,
int(options.start),int(options.end)
)
# print PwnList
# print FinList
oStr = ''
for j,i in enumerate(FinList):
# print i,j
# print i['synset_offset']
# print PwnList[j]['synset_offset']
if i['gloss'] == PwnList[j]['gloss']:
oStr = oStr + '%s:%s\n' % (i['synset_offset'],
PwnList[j]['synset_offset'])
oFileName = 'fin2pwn-%s' % options.pos
# visdic_xml = make_visdic_xml(oList,b.root)
# # print 'VISDIC XML:'
# out_xml = etree.tostring(visdic_xml, pretty_print=True,
# encoding='UTF-8',
# xml_declaration=True)
# oFileName = '%s-%s-%s-%s.xml' % (options.prefix,
# options.pos,
# options.start,
# options.end
# )
# # print out_xml
f = open(oFileName,'w')
f.write(out_xml)
f.write(oStr)
f.close
......
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