fnear
Purpose
The function finds terms, which are close to each other and which follow each other (not necessarily within one sentence). In fact, this function combines the near and the follow functions in one.
Arguments
The function accepts several arguments:
-
The first optional argument distance specifies maximum distance (in tokens) between the last and first position of the sequence;
-
The second and the next arguments define the terms to search for (the number of them is unlimited).
The function also supports optional named parameters:
-
range sets exact length of the sequence in tokens, min_range sets minimum length, max_range sets maximum length;
-
distance sets exact difference in positions between the first and the last argument of the sequence, min_distance sets minimum difference, max_distance sets maximum difference;
-
gap sets exact number of tokens between arguments of the sequence, min_gap sets minimum number, max_gap sets maximum number;
-
interval sets exact difference in positions between arguments of the sequence, min_interval sets minimum difference, max_interval sets maximum difference;
-
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 "yes" by default);
-
match:=range matches text range starting from the first found term and ending with the last found term.