From 4bb73b1a93835b82675d1c603a3c4e83cd9fd313 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 16 Oct 2016 17:03:22 +0200 Subject: [PATCH] Fix parser labels in pipeline --- spacy/pipeline.pyx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spacy/pipeline.pyx b/spacy/pipeline.pyx index 4b1bdcf6a..a65a4f512 100644 --- a/spacy/pipeline.pyx +++ b/spacy/pipeline.pyx @@ -28,14 +28,14 @@ cdef class DependencyParser(Parser): @classmethod def blank(cls, Vocab vocab, **cfg): if 'actions' not in cfg: - cfg['actions'] = {1: {'': True}, 2: {'': True}, 3: {}, 4: {}, - 5: {'ROOT': True}} + cfg['actions'] = {0: {'': True}, 1: {'': True}, 2: {}, 3: {}, + 4: {'ROOT': True}} for label in cfg.get('left_labels', []): - cfg['actions'][3][label] = True + cfg['actions'][2][label] = True for label in cfg.get('right_labels', []): - cfg['actions'][4][label] = True + cfg['actions'][3][label] = True for label in cfg.get('break_labels', []): - cfg['actions'][5][label] = True + cfg['actions'][4][label] = True return Parser.blank(vocab, ArcEager, **cfg)