diff --git a/spacy/pos_util.py b/spacy/pos_util.py index 039e6b15d..e5716665e 100644 --- a/spacy/pos_util.py +++ b/spacy/pos_util.py @@ -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)