Share via


ITextClassifier.SuggestSelection Method

Definition

Overloads

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

the text selection request

Returns

Attributes

Remarks

Java documentation for android.view.textclassifier.TextClassifier.suggestSelection(android.view.textclassifier.Request).

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

text providing context for the selected text (which is specified by the sub sequence starting at selectionStartIndex and ending at selectionEndIndex)

selectionStartIndex
Int32

start index of the selected part of text

selectionEndIndex
Int32

end index of the selected part of text

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

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.

<strong>NOTE: </strong>Call on a worker thread.

<strong>NOTE: </strong>If a TextClassifier has been destroyed, calls to this method should throw an IllegalStateException. See #isDestroyed().

<b>NOTE:</b> 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.

Java documentation for android.view.textclassifier.TextClassifier.suggestSelection(java.lang.CharSequence, int, int, android.os.LocaleList).

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