Package nltk_lite :: Package parse :: Module chunk :: Class ChunkParseI
[show private | hide private]
[frames | no frames]

Type ChunkParseI

object --+    
         |    
    ParseI --+
             |
            ChunkParseI

Known Subclasses:
RegexpChunk

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 ParseI, ChunkParseI guarantees that the parse method will always generate a parse.
Method Summary
  parse(self, tokens)
Find the best chunk structure for the given tokens and return a tree
  parse_n(self, tokens, n)
Find a list of the n most likely chunk structures for the tokens, and return a tree.
Inherited from ParseI: get_parse, get_parse_list, get_parse_probs
Inherited from object: __init__, __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Method Details

parse(self, tokens)

Find the best chunk structure for the given tokens and return a tree
Parameters:
tokens - The list of (word, tag) tokens to be chunked.
           (type=list of tuple)
Overrides:
nltk_lite.parse.ParseI.parse

parse_n(self, tokens, n=None)

Find a list of the n most likely chunk structures for the tokens, and return a tree. If there are fewer than n chunk structures, then find them all. The chunk structures should be stored in descending order of estimated likelihood.
Parameters:
tokens - The list of (word, tag) tokens to be chunked.
           (type=list of tuple)
n - The number of chunk structures to generate. At most n chunk structures will be generated. If n is not specified, generate all chunk structures.
           (type=int)

Generated by Epydoc 2.1 on Tue Sep 5 09:37:21 2006 http://epydoc.sf.net