Unhack deprojetivization, moving it into pipeline

Previously the deprojectivize() call was attached to the transition
system, and only called for German. Instead it should be a separate
process, called after the parser. This makes it available for any
language. Closes #898.
This commit is contained in:
Matthew Honnibal 2017-03-31 12:30:14 +02:00
parent 8eafe80450
commit 47a3ef06a6
2 changed files with 1 additions and 2 deletions

View File

@ -144,6 +144,7 @@ class BaseDefaults(object):
pipeline.append(nlp.tagger) pipeline.append(nlp.tagger)
if nlp.parser: if nlp.parser:
pipeline.append(nlp.parser) pipeline.append(nlp.parser)
pipeline.append(Pseudoprojectivity.deprojectivize)
if nlp.entity: if nlp.entity:
pipeline.append(nlp.entity) pipeline.append(nlp.entity)
return pipeline return pipeline

View File

@ -427,8 +427,6 @@ cdef class ArcEager(TransitionSystem):
def finalize_doc(self, doc): def finalize_doc(self, doc):
doc.is_parsed = True doc.is_parsed = True
if doc.vocab.lang == 'de':
PseudoProjectivity.deprojectivize(doc)
cdef int set_valid(self, int* output, const StateC* st) nogil: cdef int set_valid(self, int* output, const StateC* st) nogil:
cdef bint[N_MOVES] is_valid cdef bint[N_MOVES] is_valid