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

chunk()

chunk([chunk_type,] term_1, term_2…​)

chunk(chunk_type)

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

chunk() matches all chunks.

chunk(criminal, case) = chunk(case, criminal) matches "…​focus on lower-priority criminal justice cases.." or "Attorneys handle no criminal cases", but not "Each chapter of Criminal Justice Today will have case stories and interactive media" because in this sentence the words "criminal" and "case" are not in the same phrase.

chunk(np) matches all noun phrases, e.g., "additional relevant information", "this event", "the device", "all my expenses".

chunk(jp) matches all adjectival phrases, e.g., "fast", "very fast", "more immediate", "simple and elegant", "Australian Financial Review".

chunk(vp) matches all verb phrases, e.g., "went", "expected to go", "has signed", "want to destroy".

chunk(rp) matches all adverbial phrases, e.g., "recently", "most recently", "When and how".

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

chunk(company, report) matches "the Company’s Annual Report".

chunk(company, report, match:=range) matches "the Company’s Annual Report".

chunk(company, report, match:=range) matches noun phrases with the word "company", e.g., "his company’s 3-D face-recognition technology", "Company News", "the Company’s Annual Report".

chunk(cash, offer) matches "cash tender offer", "cash offer".

chunk(cash, offer, whole:=yes) matches "cash offer".

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.

pdl chunk 1

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".

pdl chunk 2

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

pdl chunk 3