Platforms to show: All Mac Windows Linux Cross-Platform
Back to NLContextualEmbeddingResultMBS class.
NLContextualEmbeddingResultMBS.averageToken as NLContextualEmbeddingResultVectorMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Natural Language | MBS MacFrameworks Plugin | 26.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The "Hello World" has six tokens. We sum them up and later divide by count to get the average.
NLContextualEmbeddingResultMBS.Constructor Private
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Natural Language | MBS MacFrameworks Plugin | 26.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
NLContextualEmbeddingResultMBS.tokenVectorAtIndex(characterIndex as Integer) as NLContextualEmbeddingResultVectorMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Natural Language | MBS MacFrameworks Plugin | 26.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
characterIndex: The index to get the token vector at.
NLContextualEmbeddingResultMBS.tokenVectors as NLContextualEmbeddingResultVectorMBS()
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Natural Language | MBS MacFrameworks Plugin | 26.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Use this method to access the individual (subword) token embeddings. You can apply pooling or combination techniques to aggregate these subword vectors into a single representation for a word, phrase, or entire input.
Common pooling techniques include
- Mean pooling to take the average of subword vectors.
- Max pooling for finding the element-wise maximum across tokens.
- Use the embeddings of the first or last subword tokens to represent the entire input.
The items on this page are in the following plugins: MBS MacFrameworks Plugin.