tokeyword

Purpose

Converts the argument to a keyword that coincides or intersects with the position of the argument. If the position of the argument does not intersect with a keyword, then the value of that argument is returned without changes. For the function to work properly it is necessary to have a Keyword Extraction parent node.

Syntax

tokeyword([part_of_speech], $group)

Arguments

The first optional argument part_of_speech specifies the keyword’s available part of speech, for example, Noun, Verb, Adjective, Adverb. The function accepts any number of part of speech arguments separated by a vertical bar. For instance, Noun|Verb.

The second required argument is a reference to a named group a user wants to format.

Returned Value

The returned data type is string.

Examples

tokeyword($m) converts the argument to any intersecting keyword.

tokeyword(noun, $m) converts the argument to any intersecting noun keyword.