mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
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:
parent
8eafe80450
commit
47a3ef06a6
|
@ -144,6 +144,7 @@ class BaseDefaults(object):
|
|||
pipeline.append(nlp.tagger)
|
||||
if nlp.parser:
|
||||
pipeline.append(nlp.parser)
|
||||
pipeline.append(Pseudoprojectivity.deprojectivize)
|
||||
if nlp.entity:
|
||||
pipeline.append(nlp.entity)
|
||||
return pipeline
|
||||
|
|
|
@ -427,8 +427,6 @@ cdef class ArcEager(TransitionSystem):
|
|||
|
||||
def finalize_doc(self, doc):
|
||||
doc.is_parsed = True
|
||||
if doc.vocab.lang == 'de':
|
||||
PseudoProjectivity.deprojectivize(doc)
|
||||
|
||||
cdef int set_valid(self, int* output, const StateC* st) nogil:
|
||||
cdef bint[N_MOVES] is_valid
|
||||
|
|
Loading…
Reference in New Issue
Block a user