nltk.chunk.RegexpChunkParser.__init__¶
-
RegexpChunkParser.
__init__
(rules, chunk_label=u'NP', root_label=u'S', trace=0)[source]¶ Construct a new
RegexpChunkParser
.Parameters: - rules (list(RegexpChunkRule)) – The sequence of rules that should be used to generate the chunking for a tagged text.
- chunk_label (str) – The node value that should be used for
chunk subtrees. This is typically a short string
describing the type of information contained by the chunk,
such as
"NP"
for base noun phrases. - root_label (str) – The node value that should be used for the top node of the chunk structure.
- trace (int) – The level of tracing that should be used when
parsing a text.
0
will generate no tracing output;1
will generate normal tracing output; and2
or higher will generate verbose tracing output.