An abstract base class for taggers that tags words sequentially, left
to right. Tagging of individual words is performed by the method choose_tag(), which should be defined by subclasses. If
a tagger is unable to determine a tag for the specified token, then its
backoff tagger is consulted.
|
|
__init__(self,
backoff=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
source code
|
|
|
|
|
list of (token, tag)
|
tag(self,
tokens)
Determine the most appropriate tag sequence for the given token
sequence, and return a corresponding list of tagged tokens. |
source code
|
|
str
|
tag_one(self,
tokens,
index,
history)
Determine an appropriate tag for the specified token, and return that
tag. |
source code
|
|
str
|
choose_tag(self,
tokens,
index,
history)
Decide which tag should be used for the specified token, and return
that tag. |
source code
|
|
|
Inherited from api.TaggerI:
batch_tag
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__str__
|
|
|
|