paragraph

Purpose

Finds documents that contain arguments within a specified number of paragraphs.

Syntax

paragraph([paragraphs_number,] [term_1,] [term_2,..])

Arguments

This function has no required arguments. When called without arguments, the function matches all paragraphs.

  • The first optional argument paragraphs_number allows to set the maximum amount of paragraphs, within which the arguments should be found. Its default value is 1.

  • The other arguments define the terms to search for.

The function also supports optional named parameters:

  • allow_punct:=yes/no allows or prohibits punctuation between arguments (set to "yes" by default).

  • allow_space:=yes/no allows or prohibits spaces between arguments (set to "no" by default).

  • match:=range matches text range starting from the first found term and ending with the last found term.

  • match:=first/last/shortest/longest matches the first/last/shortest/longest paragraph.

  • match:=inverse matches text range starting from the first found term and ending with the last found term except for the specified arguments.

  • whole:=yes matches paragraphs made up only by the arguments listed in the query.

Note

Results of splitting the text into paragraphs can be seen in the Index or Text Tagger nodes.

Returned Value

Documents matching the query.

Examples

paragraph(2, "document id", title) matches the arguments within two consecutive paragraphs.

paragraph(Key, Topics, Covered, whole:=yes) matches "Key topics covered" if this phrase constitutes a whole paragraph.

paragraph(not company) matches the paragraphs not containing the word "company".

paragraph(company, match:=inverse) matches the paragraphs containing the word "company" and highlights the whole paragraph except for the word "company".