Purpose

Finds documents that contain argument term(s) or its hyponyms up to the specified level.

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

The function is equivalent to the hyponym() function.

Syntax

related([level], term, …​)

Arguments

The first optional argument level is an integer, which specifies distance between the function’s argument and the function’s output in the semantic network (WordNet).

If no level is specified, the entire hyponym tree starting from the argument is considered.

Returned Value

Documents matching the query.

Examples

related(1, institution) matches words company, academy, education institution, that are direct hyponyms of institution.

related(2, institution) matches words company, academy and also words college, university, foundation.

related(3, institution) matches words company, college, university and also words school, elementary school, church, bank.

related(institution) is a union of related(1, institution), related(2, institution), etc. and matches words company, college, university, elementary school, church, bank, etc.