Package nltk :: Package chunk :: Module named_entity :: Class NEChunkParserTagger
[hide private]
[frames] | no frames]

type NEChunkParserTagger

source code

                        object --+            
                   tag.api.TaggerI --+        
tag.sequential.SequentialBackoffTagger --+    
                        object --+       |    
                                 |       |    
                   tag.api.TaggerI --+   |    
                                     |   |    
             tag.api.FeaturesetTaggerI --+    
      tag.sequential.ClassifierBasedTagger --+

The IOB tagger used by the chunk parser.

Instance Methods [hide private]
__init__(self, train)
Construct a new classifier-based sequential tagger.
source code
_classifier_builder(self, train) source code
_feature_detector(self, tokens, index, history) source code

Inherited from tag.sequential.ClassifierBasedTagger: __repr__, choose_tag, classifier, feature_detector

Inherited from tag.sequential.ClassifierBasedTagger (private): _train

Inherited from tag.sequential.SequentialBackoffTagger: tag, tag_one

Inherited from tag.api.TaggerI: batch_tag, evaluate

Inherited from tag.api.TaggerI (private): _check_params

Instance Variables [hide private]
Properties [hide private]

Inherited from tag.sequential.SequentialBackoffTagger: backoff

Method Details [hide private]

__init__(self, train)

source code 

Construct a new classifier-based sequential tagger.

  • feature_detector - A function used to generate the featureset input for the classifier:
       feature_detector(tokens, index, history) -> featureset
  • train - A tagged corpus consisting of a list of tagged sentences, where each sentence is a list of (word, tag) tuples.
  • backoff - A backoff tagger, to be used by the new tagger if it encounters an unknown context.
  • classifier_builder - A function used to train a new classifier based on the data in train. It should take one argument, a list of labeled featuresets (i.e., (featureset, label) tuples).
  • classifier - The classifier that should be used by the tagger. This is only useful if you want to manually construct the classifier; normally, you would use train instead.
  • backoff - A backoff tagger, used if this tagger is unable to determine a tag for a given token.
  • cutoff_prob - If specified, then this tagger will fall back on its backoff tagger if the probability of the most likely tag is less than cutoff_prob.
Overrides: tag.sequential.SequentialBackoffTagger.__init__