Search within a Chunk
The function chunk() is used to find arguments within a chunk (a group of syntactically connected words in a sentence, such as noun or verb phrase).
Syntax
This function has no required arguments. When called without arguments, the function matches all chunks. The first optional parameter chunk_type specifies the chunk type and accepts the values listed below:
Chunk type |
Comments |
np |
noun phrase |
vp |
verb phrase |
jp |
adjectival phrase |
pp |
prepositional phrase |
rp |
adverbial phrase |
If the chunk type is specified, the function’s arguments can be omitted. In this case the function matches all chunks of the specified type.
Example
The function also supports the following optional named parameters:
-
match:=range which is used to match the whole chunk containing the arguments.
-
whole:=yes which is used to extract chunks containing only the query arguments.
Example
Note
When detecting chunk boundaries, the function relies on the PolyAnalyst proprietary phrase chunking algorithm. You can view the results of the algorithm in the Text Tagger node.

Task Example: Retrieve names of associations
The query chunk(association, match:=range) matches noun phrases that include the word "association", such as "industry associations" or "veterinary associations", and thus may be useful to retrieve association names like "The Homeland Security Industries Association".

Note that without the match:=range parameter only the word "association" is highlighted.
