use 0 instead of none for no annotation

This commit is contained in:
Peter Baumgartner 2023-01-11 14:47:10 -05:00
parent bfb9fa44a0
commit 28c31048c9

View File

@ -914,7 +914,7 @@ def _compile_gold(
data["n_cycles"] += 1
if "trainable_lemmatizer" in factory_names:
# from EditTreeLemmatizer._labels_from_data
if all(token.lemma is None for token in gold):
if all(token.lemma == 0 for token in gold):
data["no_lemma_annotations"] += 1
else:
lemma_set = set()