1
2
3
4
5
6
7
8
9
10
11
12
13 from nltk.parse import ParserI
14
16 """
17 A processing interface for identifying non-overlapping groups in
18 unrestricted text. Typically, chunk parsers are used to find base
19 syntactic constituants, such as base noun phrases. Unlike
20 L{ParserI}, C{ChunkParserI} guarantees that the C{parse} method
21 will always generate a parse.
22 """
24 """
25 @return: the best chunk structure for the given tokens
26 and return a tree.
27
28 @param tokens: The list of (word, tag) tokens to be chunked.
29 @type tokens: C{list} of L{tuple}
30 @rtype: L{Tree}
31 """
32 assert 0, "ChunkParserI is an abstract interface"
33