hypernym

Purpose

Finds documents that contain hypernym of the specified level of the argument term or terms.

Y is hypernym of X, if X is a kind of Y.

For example, animal is a hypernym of elephant or monkey.

The function is equivalent to the generalize() function.

Syntax

hypernym([level], term, …​)

Arguments

The first optional argument level is an integer specifying distance between the function’s argument and the function’s output in the semantic network (WordNet). The default value of level is 1.

Term (or terms) given as the second argument is not searched for, only the hypernyms of the word are matched.

Returned Value

Documents matching the query.

Examples

hypernym(village) = hypernym(1, village) matches the word community that is direct hypernym of village, i.e. the distance between village and community is 1.

hypernym(2, village) matches the word assemblage, because it is direct hypernym of community that is direct hypernym of village, i.e. the distance between village and assemblage is 2.