embedding

Purpose

Finds documents that contain arguments or semantically similar words defined as their nearest neighbors in the embedding space.

Syntax

embedding([part_of_speech,] term, …​)

Arguments

Requires one or more arguments.

The first optional argument part of speech is used to search only for words with the indicated part of speech. It accepts the values listed below:

  • noun

  • verb

  • adjective

  • adverb

  • pronoun

  • numeral

  • particle

The function also supports optional named parameters:

  • count:=[number] sets a maximum number of the nearest neighbors;

  • threshold:=[number between 0 and 1] sets a similarity threshold;

Returned Value

Documents matching the query.

Examples

embedding(vehicle) matches "vehicle", "motorbike", "jeep", "car", "suv", "minivan", "scooter", etc.

embedding(steel) matches "stainless", "aluminum", "iron", "titanium", "fiberglass", "metal", etc.

embedding(steel, count:=2) matches "stainless", "aluminium"

embedding(inconvenience) matches "annoyance", "embarrassment", "unnecessary", etc.

embedding(noun, inconvenience) matches "annoyance", "embarrassment" but not "unnecessary"

embedding(steel, vehicle) = embedding(steel) or embedding(vehicle)