Contents

embeddingResult(for:language:)

Applies an embedding to a string and obtains the resulting embedding vectors.

Declaration

func embeddingResult(for string: String, language: NLLanguage?) throws -> NLContextualEmbeddingResult

Parameters

  • string:

    The string to apply an embedding to.

  • language:

    The language of the string.

Return Value

An embedding result. On failure, this method returns nil.

See Also

Applying an embedding