Platforms to show: All Mac Windows Linux Cross-Platform

Back to NLContextualEmbeddingResultVectorMBS class.

NLContextualEmbeddingResultVectorMBS.Data as Ptr

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Natural Language MBS MacFrameworks Plugin 26.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The data pointer for the vector data.
Example
const lang = "en"
Var n As NLContextualEmbeddingMBS = NLContextualEmbeddingMBS.contextualEmbeddingWithLanguage(lang)

var e as NSErrorMBS
var r as NLContextualEmbeddingResultMBS = n.embeddingResultForString("Hello World", lang, e)

Var firstVector As NLContextualEmbeddingResultVectorMBS = r.tokenVectorAtIndex(0)
Var data As Ptr = firstVector.Data

// show first 4 values
MessageBox data.Single(0).ToString+EndOfLine+data.Single(4).ToString+EndOfLine+_
data.Single(8).ToString+EndOfLine+data.Single(12).ToString

Currently 512 single precision values.
(Read only property)

NLContextualEmbeddingResultVectorMBS.Length as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Natural Language MBS MacFrameworks Plugin 26.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The length of the text range.

(Read only property)

NLContextualEmbeddingResultVectorMBS.Position as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Natural Language MBS MacFrameworks Plugin 26.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The position of the text range.

(Read only property)

NLContextualEmbeddingResultVectorMBS.Text as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Natural Language MBS MacFrameworks Plugin 26.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The text for the range.

(Read only property)

The items on this page are in the following plugins: MBS MacFrameworks Plugin.


The biggest plugin in space...