nltk.tag.TnT.__init__

TnT.__init__(unk=None, Trained=False, N=1000, C=False)[source]

Construct a TnT statistical tagger. Tagger must be trained before being used to tag input.

Parameters:unk – instance of a POS tagger, conforms to TaggerI

:type unk:(TaggerI) :param Trained: Indication that the POS tagger is trained or not :type Trained: boolean :param N: Beam search degree (see above) :type N:(int) :param C: Capitalization flag :type C: boolean

Initializer, creates frequency distributions to be used for tagging

_lx values represent the portion of the tri/bi/uni taggers to be used to calculate the probability

N value is the number of possible solutions to maintain while tagging. A good value for this is 1000

C is a boolean value which specifies to use or not use the Capitalization of the word as additional information for tagging. NOTE: using capitalization may not increase the accuracy of the tagger