mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-05 14:10:34 +03:00
* Fix the way supersenses are loaded from the json file
This commit is contained in:
parent
ff1f9fe246
commit
6735439abf
|
@ -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', [])))
|
||||
|
|
Loading…
Reference in New Issue
Block a user