An abstract base class for sequential backoff taggers that choose a
tag for a token based on the value of its "context". Different
subclasses are used to define different contexts.
|
|
(hashable)
|
context(self,
tokens,
index,
history)
Returns:
the context that should be used to look up the tag for the specified
token; or None if the specified token should not be
handled by this tagger. |
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
|
|
|
size(self)
Returns:
The number of entries in the table used by this tagger to map from
contexts to tags. |
source code
|
|
|
|
|
|
Inherited from SequentialBackoffTagger :
tag ,
tag_one
Inherited from api.TaggerI :
batch_tag
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__str__
|
Inherited from SequentialBackoffTagger :
tag_sents
|