nltk.ChunkParserI

class nltk.ChunkParserI[source]

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

Methods

evaluate(gold) Score the accuracy of the chunker against the gold standard.
grammar()
return:The grammar used by this parser.
parse(tokens) Return the best chunk structure for the given tokens and return a tree.
parse_all(sent, *args, **kwargs)
rtype:list(Tree)
parse_one(sent, *args, **kwargs)
rtype:Tree or None
parse_sents(sents, *args, **kwargs) Apply self.parse() to each element of sents.