From a079677984774cfa518084735668dc7e767a3892 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 16 Oct 2016 11:43:25 +0200 Subject: [PATCH] Fix omission of O action when creating blank entity recognizer --- spacy/pipeline.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/pipeline.pyx b/spacy/pipeline.pyx index 53efce020..4b1bdcf6a 100644 --- a/spacy/pipeline.pyx +++ b/spacy/pipeline.pyx @@ -13,7 +13,7 @@ cdef class EntityRecognizer(Parser): @classmethod def blank(cls, Vocab vocab, **cfg): if 'actions' not in cfg: - cfg['actions'] = {} + cfg['actions'] = {0: {'': True}, 5: {'': True}} entity_types = cfg.get('entity_types', ['']) for action_type in (1, 2, 3, 4): cfg['actions'][action_type] = {ent_type: True for ent_type in entity_types}