Skip to content

NaturalLanguage macOS xcode15.0 b3

Haritha Mohan edited this page Sep 18, 2023 · 3 revisions

#NaturalLanguage.framework https://github.com/xamarin/xamarin-macios/pull/19039

diff -ruN /Applications/Xcode_15.0.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/NaturalLanguage.framework/Headers/NLContextualEmbedding.h /Applications/Xcode_15.0.0-beta3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/NaturalLanguage.framework/Headers/NLContextualEmbedding.h
--- /Applications/Xcode_15.0.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/NaturalLanguage.framework/Headers/NLContextualEmbedding.h	2023-06-08 11:00:22
+++ /Applications/Xcode_15.0.0-beta3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/NaturalLanguage.framework/Headers/NLContextualEmbedding.h	2023-06-23 13:06:07
@@ -45,8 +45,15 @@
 @property (readonly, copy) NSArray <NLLanguage> *languages;
 @property (readonly, copy) NSArray <NLScript> *scripts;
 @property (readonly) NSUInteger revision;
+
+/* The dimensionality of the embedding vectors generated by the model.
+*/
 @property (readonly) NSUInteger dimension;
 
+/* The maximum number of embedding vectors in sequence which the model will generate.
+*/
+@property (readonly) NSUInteger maximumSequenceLength;
+
 /* When an NLContextualEmbedding is created, the model is not loaded by default until it is needed. The load and unload methods can be used to control when the model is loaded. The return value of load indicates whether it succeeded. The load method will fail if the necessary assets for the specified model are not present on device, in which case hasAvailableAssets and requestEmbeddingAssetsWithCompletionHandler: can be used to manage the loading of the assets.
 */
 - (BOOL)loadWithError:(NSError **)error;
@@ -81,8 +88,15 @@
 @property (readonly, copy) NSString *string;
 @property (readonly, copy) NLLanguage language;
 
-- (nullable NSArray <NSNumber *> *)tokenVectorAtIndex:(NSUInteger)characterIndex tokenRange:(nullable NSRangePointer)tokenRange NS_REFINED_FOR_SWIFT;
+/* The number of embedding vectors which were generated.
+*/
+@property (readonly) NSUInteger sequenceLength;
+
+/* This method allows clients to iterate over all of the embedding vectors generated for a particular range in the text.
+*/
 - (void)enumerateTokenVectorsInRange:(NSRange)range usingBlock:(void (NS_NOESCAPE ^)(NSArray <NSNumber *> *tokenVector, NSRange tokenRange, BOOL *stop))block NS_REFINED_FOR_SWIFT;
+
+- (nullable NSArray <NSNumber *> *)tokenVectorAtIndex:(NSUInteger)characterIndex tokenRange:(nullable NSRangePointer)tokenRange NS_REFINED_FOR_SWIFT;
 
 @end
 
Clone this wiki locally