From b45b4aa392feea15cd2f8366a21244c2573094ac Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 22 May 2017 05:17:44 -0500 Subject: [PATCH] PseudoProjectivity --> nonproj --- spacy/pipeline.pyx | 4 ++-- spacy/syntax/parser.pyx | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/spacy/pipeline.pyx b/spacy/pipeline.pyx index 6f949a5b9..7eb75953a 100644 --- a/spacy/pipeline.pyx +++ b/spacy/pipeline.pyx @@ -31,7 +31,7 @@ from .syntax.stateclass cimport StateClass from .gold cimport GoldParse from .morphology cimport Morphology from .vocab cimport Vocab -from .syntax.nonproj import PseudoProjectivity +from .syntax import nonproj from .attrs import ID, LOWER, PREFIX, SUFFIX, SHAPE, TAG, DEP, POS from ._ml import rebatch, Tok2Vec, flatten, get_col, doc2feats @@ -265,7 +265,7 @@ class NeuralLabeller(NeuralTagger): pass def begin_training(self, gold_tuples, pipeline=None): - gold_tuples = PseudoProjectivity.preprocess_training_data(gold_tuples) + gold_tuples = nonproj.preprocess_training_data(gold_tuples) for raw_text, annots_brackets in gold_tuples: for annots, brackets in annots_brackets: ids, words, tags, heads, deps, ents = annots diff --git a/spacy/syntax/parser.pyx b/spacy/syntax/parser.pyx index b9de1e114..78698db12 100644 --- a/spacy/syntax/parser.pyx +++ b/spacy/syntax/parser.pyx @@ -33,7 +33,6 @@ from ._parse_features cimport CONTEXT_SIZE from ._parse_features cimport fill_context from .stateclass cimport StateClass from ._state cimport StateC -from .nonproj import PseudoProjectivity from .transition_system import OracleError from .transition_system cimport TransitionSystem, Transition from ..structs cimport TokenC