ITextClassifierExtensions.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.
Classifies the specified text and returns a TextClassification object that can be used to generate a widget for handling the classified text.
public static Android.Views.TextClassifiers.TextClassification ClassifyText(this Android.Views.TextClassifiers.ITextClassifier self, string text, int startIndex, int endIndex, Android.OS.LocaleList? defaultLocales);
static member ClassifyText : Android.Views.TextClassifiers.ITextClassifier * string * int * int * Android.OS.LocaleList -> Android.Views.TextClassifiers.TextClassification
Parameters
- self
- ITextClassifier
- text
- String
text providing context for the text to classify (which is specified by the sub sequence starting at startIndex and ending at endIndex). This value cannot be null.
- startIndex
- Int32
start index of the text to classify. Value is 0 or greater
- endIndex
- Int32
end index of the text to classify. Value is 0 or greater
- 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
Remarks
Classifies the specified text and returns a TextClassification object that can be used to generate a widget for handling the classified text.
NOTE: Call on a worker thread.
NOTE: 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.
NOTE: If a TextClassifier has been destroyed, calls to this method should throw an IllegalStateException. See isDestroyed(). This method may take several seconds to complete, so it should only be called from a worker thread.
Android reference for android.view.textclassifier.TextClassifier.classifyText.
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.