mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 10:46:29 +03:00
Use beam parser
This commit is contained in:
parent
e30ffdd003
commit
dcce9ca3f3
|
@ -1,12 +1,13 @@
|
|||
from .syntax.parser cimport Parser
|
||||
from .syntax.beam_parser cimport BeamParser
|
||||
from .syntax.ner cimport BiluoPushDown
|
||||
from .syntax.arc_eager cimport ArcEager
|
||||
from .tagger cimport Tagger
|
||||
|
||||
|
||||
cdef class EntityRecognizer(Parser):
|
||||
cdef class EntityRecognizer(BeamParser):
|
||||
pass
|
||||
|
||||
|
||||
cdef class DependencyParser(Parser):
|
||||
cdef class DependencyParser(BeamParser):
|
||||
pass
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
from .syntax.parser cimport Parser
|
||||
from .syntax.beam_parser cimport BeamParser
|
||||
from .syntax.ner cimport BiluoPushDown
|
||||
from .syntax.arc_eager cimport ArcEager
|
||||
from .vocab cimport Vocab
|
||||
|
@ -10,10 +11,10 @@ from .syntax.parser import get_templates as get_feature_templates
|
|||
from .attrs import DEP, ENT_TYPE
|
||||
|
||||
|
||||
cdef class EntityRecognizer(Parser):
|
||||
cdef class EntityRecognizer(BeamParser):
|
||||
"""Annotate named entities on Doc objects."""
|
||||
TransitionSystem = BiluoPushDown
|
||||
|
||||
|
||||
feature_templates = get_feature_templates('ner')
|
||||
|
||||
def add_label(self, label):
|
||||
|
@ -28,7 +29,7 @@ cdef class EntityRecognizer(Parser):
|
|||
self.vocab._serializer = None
|
||||
|
||||
|
||||
cdef class DependencyParser(Parser):
|
||||
cdef class DependencyParser(BeamParser):
|
||||
TransitionSystem = ArcEager
|
||||
|
||||
feature_templates = get_feature_templates('basic')
|
||||
|
|
Loading…
Reference in New Issue
Block a user