Skip to content

NaturalLanguage iOS xcode26.0 b1

Alex Soto edited this page Jun 9, 2025 · 4 revisions

#NaturalLanguage.framework

diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/NaturalLanguage.framework/Headers/NLLanguageRecognizer.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/NaturalLanguage.framework/Headers/NLLanguageRecognizer.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/NaturalLanguage.framework/Headers/NLLanguageRecognizer.h	2025-04-19 04:41:30
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/NaturalLanguage.framework/Headers/NLLanguageRecognizer.h	2025-05-23 06:46:08
@@ -7,7 +7,21 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-/* NLLanguageRecognizer is a class used to automatically identify the language of text. An instance of this class is created and passed one or more pieces of text, and clients can then obtain either a single most likely language or a set of language candidates with probabilities. It is also possible to constrain the identification by specifying either a list of hints about known prior probabilities for languages, or a list of constraint languages into which the predictions are constrained to fall, or both.
+/* NLLanguageRecognizer is a class used to automatically identify the language of text.
+ *
+ * An instance of this class is created and passed one or more pieces of text, and clients can
+ * then obtain either a single most likely language or a set of language candidates with probabilities.
+ *
+ * It is also possible to constrain the identification by specifying either a list of hints
+ * about known prior probabilities for languages, or a list of constraint languages
+ * into which the predictions are constrained to fall, or both.
+ *
+ * @note Accuracy may vary depending on the length and clarity of the input. In particular,
+ * language identification is less reliable for short input strings (e.g., fewer than 30 characters),
+ * where insufficient context may lead to ambiguous or incorrect results.
+ * For best results, provide full sentences or longer phrases. If short text is unavoidable,
+ * consider constraining possible languages (see above), using additional heuristics.
+ *
 */
 
 NS_CLASS_AVAILABLE(10_14, 12_0)

Clone this wiki locally