ITextClassifierExtensions.SuggestSelection 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.
Returns suggested text selection start and end indices, recognized entity types, and their associated confidence scores.
public static Android.Views.TextClassifiers.TextSelection SuggestSelection(this Android.Views.TextClassifiers.ITextClassifier self, string text, int selectionStartIndex, int selectionEndIndex, Android.OS.LocaleList? defaultLocales);
static member SuggestSelection : Android.Views.TextClassifiers.ITextClassifier * string * int * int * Android.OS.LocaleList -> Android.Views.TextClassifiers.TextSelection
Parameters
- self
- ITextClassifier
- text
- String
text providing context for the selected text (which is specified by the sub sequence starting at selectionStartIndex and ending at selectionEndIndex). This value cannot be null.
- selectionStartIndex
- Int32
start index of the selected part of text. Value is 0 or greater
- selectionEndIndex
- Int32
end index of the selected part of text. 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
Returns suggested text selection start and end indices, recognized entity types, and their associated confidence scores. The entity types are ordered from highest to lowest scoring.
NOTE: Call on a worker thread.
NOTE: If a TextClassifier has been destroyed, calls to this method should throw an IllegalStateException. See isDestroyed().
NOTE: Do not implement. The default implementation of this method calls suggestSelection(TextSelection.Request). If that method calls this method, a stack overflow error will happen. 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.suggestSelection.
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.