Platforms to show: All Mac Windows Linux Cross-Platform

Back to NLEmbeddingMBS class.

NLEmbeddingMBS.Constructor   Private

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Natural Language MBS MacFrameworks Plugin 26.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The private constructor.

NLEmbeddingMBS.containsString(Text as String) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Natural Language MBS MacFrameworks Plugin 26.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Requests a Boolean value that indicates whether the term is in the vocabulary.

Text: The term to search for in the word embedding.

Retruns true if the term is in the word embedding’s vocabulary, otherwise false.

NLEmbeddingMBS.distanceBetweenString(firstString as String, secondString as String, distanceType as Integer = 0) as double

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Natural Language MBS MacFrameworks Plugin 26.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Calculates the distance between two strings in the vocabulary space.
Example
Var e As NLEmbeddingMBS = NLEmbeddingMBS.wordEmbeddingForLanguage("en")
var distance as double = e.distanceBetweenString("bicycle", "motorcycle")

Break // shows 0.76

firstString: A string in the embedding vocabulary.
secondString: Another string in the embedding vocabulary.
distanceType: A means of calculating distance that determines which formula the method uses to evaluate the distance between firstString and secondString.

Returns the distance associated with distanceType.

NLEmbeddingMBS.neighborsForString(text as String, maximumCount as Integer, maximumDistance as double = 0.0, distanceType as Integer = 0) as NLEmbeddingNeighborMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Natural Language MBS MacFrameworks Plugin 26.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Retrieves a limited number of strings near a string in the vocabulary.

text: A string in the embedding vocabulary.
maximumCount: The largest number of neighboring strings that the method can return in an array.
distanceType: A means of calculating distance that determines which formula the method uses to evaluate a neighbor’s distance from string.

Return an array of neighbors.

NLEmbeddingMBS.neighborsForVector(vectorValues() as single, maximumCount as Integer, maximumDistance as double = 0.0, distanceType as Integer = 0) as NLEmbeddingNeighborMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Natural Language MBS MacFrameworks Plugin 26.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Passes the nearest strings, within a radius of a location in the vocabulary space, to a block.
Example
Var e As NLEmbeddingMBS = NLEmbeddingMBS.wordEmbeddingForLanguage("en")
Var vector() as single = e.vectorForString("cat")
Var neighbors() As NLEmbeddingNeighborMBS = e.neighborsForVector(vector, 5)

Break // shows: feline, kitten, dog, tabby, pet

vector: A location in the vocabulary space.
maxCount: The largest number of times the method calls block.
distanceType: A means of calculating distance that determines which formula the method uses to evaluate a neighbor’s distance from vector.

NLEmbeddingMBS.neighborStringsForString(text as String, maximumCount as Integer, maximumDistance as double = 0.0, distanceType as Integer = 0) as String()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Natural Language MBS MacFrameworks Plugin 26.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Retrieves a limited number of strings near a string in the vocabulary.
Example
Var e As NLEmbeddingMBS = NLEmbeddingMBS.wordEmbeddingForLanguage("en")

Var neighbors() As String = e.neighborStringsForString("cat", 5)

Break // shows: feline, kitten, dog, tabby, pet

text: A string in the embedding vocabulary.
maximumCount: The largest number of neighboring strings that the method can return in an array.
distanceType: A means of calculating distance that determines which formula the method uses to evaluate a neighbor’s distance from string.

Return an array of strings.

NLEmbeddingMBS.neighborStringsForVector(vectorValues() as single, maximumCount as Integer, maximumDistance as double = 0.0, distanceType as Integer = 0) as String()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Natural Language MBS MacFrameworks Plugin 26.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Retrieves a limited number of strings within a radius of a location in the vocabulary space.
Example
Var e As NLEmbeddingMBS = NLEmbeddingMBS.wordEmbeddingForLanguage("en")
Var vector() as single = e.vectorForString("cat")
Var neighbors() As String = e.neighborStringsForVector(vector, 5)

Break // shows: feline, kitten, dog, tabby, pet

vector: A location in the vocabulary space.
maxCount: The largest number of neighboring strings that the method can return in an array.
maxDistance: The largest distance a neighbor can be from vector.
distanceType: A means of calculating distance that determines which formula the method uses to evaluate a neighbor’s distance from vector.

Return an array of strings.

NLEmbeddingMBS.vectorForString(text as String) as Single()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Natural Language MBS MacFrameworks Plugin 26.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Requests the vector for the given term.
Example
Var e As NLEmbeddingMBS = NLEmbeddingMBS.sentenceEmbeddingForLanguage("de")
Var vectorValues() As Single = e.vectorForString("Hello World")

Break

Text: The term to find in the word embedding.

Returns a vector represented as an array of doubles if present in the word embedding, otherwise nil.

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


The biggest plugin in space...