mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 01:16:28 +03:00
* When encoding POS/NER tags, accept '-' as a missing value
This commit is contained in:
parent
949a6245f9
commit
68d1cdad62
|
@ -36,6 +36,8 @@ def read_gold(file_, tag_list, col):
|
|||
return golds
|
||||
|
||||
def _encode_pos(tag, tag_ids, tag_list):
|
||||
if tag == '-':
|
||||
return 0
|
||||
if tag not in tag_ids:
|
||||
tag_ids[tag] = len(tag_list)
|
||||
tag_list.append(tag)
|
||||
|
|
Loading…
Reference in New Issue
Block a user