* Fix the way supersenses are loaded from the json file

This commit is contained in:
Matthew Honnibal 2015-07-03 13:29:22 +02:00
parent ff1f9fe246
commit 6735439abf

View File

@ -155,7 +155,8 @@ def read_json_file(loc, docs_filter=None):
if labels[-1].lower() == 'root':
labels[-1] = 'ROOT'
ner.append(token.get('ner', '-'))
wsd.append(token.get('ssenses', []))
t_wsd = [s.replace('.', '_') for s in token.get('ssenses', [])]
wsd.append(t_wsd)
sents.append((
(ids, words, tags, heads, labels, ner, wsd),
sent.get('brackets', [])))