Platforms to show: All Mac Windows Linux Cross-Platform

Back to NLEmbeddingMBS class.

NLEmbeddingMBS.available as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Natural Language MBS MacFrameworks Plugin 26.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Whether the class is available.
Example
If NLEmbeddingMBS.available Then
MessageBox "available"
Else
MessageBox "not available"
end if

Returns on macOS 10.15, iOS 13.0 or newer.

NLEmbeddingMBS.currentRevisionForLanguage(language as String) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Natural Language MBS MacFrameworks Plugin 26.2 ✅ Yes ❌ No ❌ No ✅ Yes All
etrieves the current version of a sentence embedding for the given language.

language: A language supported by the Natural Language framework.

Returns an integer representing the current version number of a sentence embedding.

NLEmbeddingMBS.currentSentenceEmbeddingRevisionForLanguage(language as String) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Natural Language MBS MacFrameworks Plugin 26.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Retrieves the current version of a sentence embedding for the given language.

language: A language supported by the Natural Language framework. For possible values, see

Returna an integer representing the current version number of a sentence embedding.

NLEmbeddingMBS.embeddingWithContents(File as FolderItem, byref error as NSErrorMBS) as NLEmbeddingMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Natural Language MBS MacFrameworks Plugin 26.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a word embedding from a model file.

File: The location of the .mlmodel file that contains a word embedding.
error: On output, a pointer to an error object that describes why the method failed, or nil if no error occurred. If you are not interested in the error information, pass nil for this parameter.

Use this initializer to create a word embedding from an .mlmodel file saved by Create ML’s MLWordEmbedding.

See also:

NLEmbeddingMBS.embeddingWithContents(Path as String, byref error as NSErrorMBS) as NLEmbeddingMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Natural Language MBS MacFrameworks Plugin 26.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a word embedding from a model file.

Path: The location of the .mlmodel file that contains a word embedding.
error: On output, a pointer to an error object that describes why the method failed, or nil if no error occurred. If you are not interested in the error information, pass nil for this parameter.

Use this initializer to create a word embedding from an .mlmodel file saved by Create ML’s MLWordEmbedding.

See also:

NLEmbeddingMBS.sentenceEmbeddingForLanguage(language as String, Revision as Integer = -1) as NLEmbeddingMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Natural Language MBS MacFrameworks Plugin 26.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Retrieves a sentence embedding for a given language and revision.
Example
Var e As NLEmbeddingMBS = NLEmbeddingMBS.sentenceEmbeddingForLanguage("de")
Var vectorValues() As Single = e.vectorForString("Hello World")

Break

language: The language of the sentence embedding, such as "fr".
revision: Optionally the revision of the sentence embedding.

Returns an NLEmbedding if available, otherwise nil.

NLEmbeddingMBS.supportedRevisionsForLanguage(language as String) as NSIndexSetMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Natural Language MBS MacFrameworks Plugin 26.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Retrieves all version numbers of a word embedding for the given language.

language: A language supported by the Natural Language framework.

Returns an index set.

NLEmbeddingMBS.supportedSentenceEmbeddingRevisionsForLanguage(language as String) as NSIndexSetMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Natural Language MBS MacFrameworks Plugin 26.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Retrieves all version numbers of a sentence embedding for the given language.

language: A language supported by the Natural Language framework.

Returns an index set representing all of the supported version numbers of the sentence embedding.

NLEmbeddingMBS.wordEmbeddingForLanguage(language as String, Revision as Integer = -1) as NLEmbeddingMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Natural Language MBS MacFrameworks Plugin 26.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Retrieves a word embedding for a given language and revision.
Example
Var e As NLEmbeddingMBS = NLEmbeddingMBS.wordEmbeddingForLanguage("en")
Var vectorValues() As Single = e.vectorForString("a")

Break

language: The language of the word embedding, such as "fr".
revision: Optionally the revision of the word embedding.

Returns an NLEmbedding if available, otherwise nil.

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


The biggest plugin in space...