ITextClassifier.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.
Overloads
| Name | Description |
|---|---|
| SuggestSelection(TextSelection+Request) |
Returns suggested text selection start and end indices, recognized entity types, and their associated confidence scores. |
| SuggestSelection(ICharSequence, Int32, Int32, LocaleList) |
Returns suggested text selection start and end indices, recognized entity types, and their associated confidence scores. |
SuggestSelection(TextSelection+Request)
Returns suggested text selection start and end indices, recognized entity types, and their associated confidence scores.
[Android.Runtime.Register("suggestSelection", "(Landroid/view/textclassifier/TextSelection$Request;)Landroid/view/textclassifier/TextSelection;", "GetSuggestSelection_Landroid_view_textclassifier_TextSelection_Request_Handler:Android.Views.TextClassifiers.ITextClassifier, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=28)]
public virtual Android.Views.TextClassifiers.TextSelection SuggestSelection(Android.Views.TextClassifiers.TextSelection.Request request);
[<Android.Runtime.Register("suggestSelection", "(Landroid/view/textclassifier/TextSelection$Request;)Landroid/view/textclassifier/TextSelection;", "GetSuggestSelection_Landroid_view_textclassifier_TextSelection_Request_Handler:Android.Views.TextClassifiers.ITextClassifier, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=28)>]
abstract member SuggestSelection : Android.Views.TextClassifiers.TextSelection.Request -> Android.Views.TextClassifiers.TextSelection
override this.SuggestSelection : Android.Views.TextClassifiers.TextSelection.Request -> Android.Views.TextClassifiers.TextSelection
Parameters
- request
- TextSelection.Request
TextSelection.Request: the text selection request. This value cannot be null.
Returns
This value cannot be null.
- Attributes
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(). 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.
Applies to
SuggestSelection(ICharSequence, Int32, Int32, LocaleList)
Returns suggested text selection start and end indices, recognized entity types, and their associated confidence scores.
[Android.Runtime.Register("suggestSelection", "(Ljava/lang/CharSequence;IILandroid/os/LocaleList;)Landroid/view/textclassifier/TextSelection;", "GetSuggestSelection_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.TextSelection SuggestSelection(Java.Lang.ICharSequence text, int selectionStartIndex, int selectionEndIndex, Android.OS.LocaleList? defaultLocales);
[<Android.Runtime.Register("suggestSelection", "(Ljava/lang/CharSequence;IILandroid/os/LocaleList;)Landroid/view/textclassifier/TextSelection;", "GetSuggestSelection_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 SuggestSelection : Java.Lang.ICharSequence * int * int * Android.OS.LocaleList -> Android.Views.TextClassifiers.TextSelection
Parameters
- text
- ICharSequence
CharSequence: 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
int: start index of the selected part of text. Value is 0 or greater
- selectionEndIndex
- Int32
int: end index of the selected part of text. Value is 0 or greater
- defaultLocales
- LocaleList
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
This value cannot be null.
- Attributes
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.
See also:
Throws: IllegalArgumentException if text is null; selectionStartIndex is negative; selectionEndIndex is greater than text.length() or not greater than selectionStartIndex
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.