Code Coverage for nltk.chunk.api
100% Covered by Tests!
from nltk.parse import ParserI
class ChunkParserI(ParserI):
"""
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
L{ParserI}, C{ChunkParserI} guarantees that the C{parse} method
will always generate a parse.
"""
def parse(self, tokens):
"""
@return: the best chunk structure for the given tokens
and return a tree.
@param tokens: The list of (word, tag) tokens to be chunked.
@type tokens: C{list} of L{tuple}
@rtype: L{Tree}
"""
assert 0, "ChunkParserI is an abstract interface"