Skip to content

Commit c5f1180

Browse files
committed
minor
1 parent d2906cf commit c5f1180

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bmstparser/src/parser.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@
5858
else:
5959
os.system(
6060
'python src/utils/evaluation_script/conll17_ud_eval.py -v -w src/utils/evaluation_script/weights.clas ' + options.conll_test + ' ' + testpath + ' > ' + testpath + '.txt')
61+
with open(testpath + '.txt', 'rb') as f:
62+
for l in f:
63+
if l.startswith('UAS'):
64+
print 'UAS:%s' % l.strip().split()[-1]
65+
elif l.startswith('LAS'):
66+
print 'LAS:%s' % l.strip().split()[-1]
6167
else:
6268
print 'Preparing vocab'
6369
words, w2i, pos, rels = utils.vocab(options.conll_train)

0 commit comments

Comments
 (0)