A trainer for brill taggers.
|
__init__(self,
initial_tagger,
templates,
trace=0,
deterministic=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
source code
|
|
|
train(self,
train_sents,
max_rules=200,
min_score=2)
Trains the Brill tagger on the corpus train_token ,
producing at most max_rules transformations, each of
which reduces the net number of errors in the corpus by at least
min_score . |
source code
|
|
|
|
|
_find_rules(self,
test_sents,
train_sents)
Find all rules that correct at least one token's tag in
test_sents . |
source code
|
|
Set
|
_find_rules_at(self,
test_sent,
train_sent,
i)
Returns:
the set of all rules (based on the templates) that correct token
i 's tag in test_sent . |
source code
|
|
|
|
|
_trace_rule(self,
rule,
score,
fixscore,
numchanges) |
source code
|
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__str__
|