class documentation
class ChunkParserI(ParserI): (source)
Known subclasses: nltk.chunk.named_entity.NEChunkParser
, nltk.chunk.regexp.RegexpChunkParser
, nltk.chunk.regexp.RegexpParser
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.
Method | evaluate |
Score the accuracy of the chunker against the gold standard. Remove the chunking the gold standard text, rechunk it using the chunker, and return a ChunkScore object reflecting the performance of this chunk peraser. |
Method | parse |
Return the best chunk structure for the given tokens and return a tree. |
Score the accuracy of the chunker against the gold standard. Remove the chunking the gold standard text, rechunk it using the chunker, and return a ChunkScore object reflecting the performance of this chunk peraser.
Parameters | |
gold:list(Tree) | The list of chunked sentences to score the chunker on. |
Returns | |
ChunkScore | Undocumented |
overridden in
nltk.chunk.named_entity.NEChunkParser
, nltk.chunk.regexp.RegexpChunkParser
, nltk.chunk.regexp.RegexpParser
Return the best chunk structure for the given tokens and return a tree.
Parameters | |
tokens:list(tuple) | The list of (word, tag) tokens to be chunked. |
Returns | |
Tree | Undocumented |