Package nltk :: Package chunk :: Module api :: Class ChunkParserI
[hide private]
[frames] | no frames]

Class ChunkParserI

source code

       object --+    
                |    
parse.api.ParserI --+
                    |
                   ChunkParserI
Known Subclasses:

A processing interface for identifying non-overlapping groups in unrestricted text. Typically, chunk parsers are used to find base syntactic constituants, such as base noun phrases. Unlike ParserI, ChunkParserI guarantees that the parse method will always generate a parse.

Instance Methods [hide private]
Tree
parse(self, tokens)
Returns: the best chunk structure for the given tokens and return a tree.
source code

Inherited from parse.api.ParserI: batch_iter_parse, batch_nbest_parse, batch_parse, batch_prob_parse, grammar, iter_parse, nbest_parse, prob_parse

Inherited from object: __delattr__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

    Deprecated

Inherited from parse.api.ParserI: batch_test, get_parse, get_parse_dict, get_parse_list, get_parse_prob

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

parse(self, tokens)

source code 
Parameters:
  • tokens (list of tuple) - The list of (word, tag) tokens to be chunked.
Returns: Tree
the best chunk structure for the given tokens and return a tree.
Overrides: parse.api.ParserI.parse