ITextClassifier.ClassifyText Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ClassifyText(TextClassification+Request) |
Classifies the specified text and returns a |
ClassifyText(ICharSequence, Int32, Int32, LocaleList) |
Classifies the specified text and returns a |
ClassifyText(TextClassification+Request)
Classifies the specified text and returns a TextClassification
object that can be
used to generate a widget for handling the classified text.
[Android.Runtime.Register("classifyText", "(Landroid/view/textclassifier/TextClassification$Request;)Landroid/view/textclassifier/TextClassification;", "GetClassifyText_Landroid_view_textclassifier_TextClassification_Request_Handler:Android.Views.TextClassifiers.ITextClassifier, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=28)]
public virtual Android.Views.TextClassifiers.TextClassification ClassifyText (Android.Views.TextClassifiers.TextClassification.Request request);
[<Android.Runtime.Register("classifyText", "(Landroid/view/textclassifier/TextClassification$Request;)Landroid/view/textclassifier/TextClassification;", "GetClassifyText_Landroid_view_textclassifier_TextClassification_Request_Handler:Android.Views.TextClassifiers.ITextClassifier, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=28)>]
abstract member ClassifyText : Android.Views.TextClassifiers.TextClassification.Request -> Android.Views.TextClassifiers.TextClassification
override this.ClassifyText : Android.Views.TextClassifiers.TextClassification.Request -> Android.Views.TextClassifiers.TextClassification
Parameters
- request
- TextClassification.Request
the text classification request
Returns
- Attributes
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
ClassifyText(ICharSequence, Int32, Int32, LocaleList)
Classifies the specified text and returns a TextClassification
object that can be
used to generate a widget for handling the classified text.
[Android.Runtime.Register("classifyText", "(Ljava/lang/CharSequence;IILandroid/os/LocaleList;)Landroid/view/textclassifier/TextClassification;", "GetClassifyText_Ljava_lang_CharSequence_IILandroid_os_LocaleList_Handler:Android.Views.TextClassifiers.ITextClassifierInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public Android.Views.TextClassifiers.TextClassification ClassifyText (Java.Lang.ICharSequence text, int startIndex, int endIndex, Android.OS.LocaleList? defaultLocales);
[<Android.Runtime.Register("classifyText", "(Ljava/lang/CharSequence;IILandroid/os/LocaleList;)Landroid/view/textclassifier/TextClassification;", "GetClassifyText_Ljava_lang_CharSequence_IILandroid_os_LocaleList_Handler:Android.Views.TextClassifiers.ITextClassifierInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member ClassifyText : Java.Lang.ICharSequence * int * int * Android.OS.LocaleList -> Android.Views.TextClassifiers.TextClassification
Parameters
- text
- ICharSequence
text providing context for the text to classify (which is specified by the sub sequence starting at startIndex and ending at endIndex)
- startIndex
- Int32
start index of the text to classify
- endIndex
- Int32
end index of the text to classify
- defaultLocales
- LocaleList
ordered list of locale preferences that may be used to disambiguate the provided text. If no locale preferences exist, set this to null or an empty locale list.
Returns
- Attributes
Remarks
Classifies the specified text and returns a TextClassification
object that can be used to generate a widget for handling the classified text.
<strong>NOTE: </strong>Call on a worker thread.
<b>NOTE:</b> Do not implement. The default implementation of this method calls #classifyText(TextClassification.Request)
. If that method calls this method, a stack overflow error will happen.
<strong>NOTE: </strong>If a TextClassifier has been destroyed, calls to this method should throw an IllegalStateException
. See #isDestroyed()
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.