ClipDescription.GetConfidenceScore(String) 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 a score indicating confidence that an instance of the given entity is present in the first item of the clip data, if that item is plain text and text classification has been completed.
[Android.Runtime.Register("getConfidenceScore", "(Ljava/lang/String;)F", "GetGetConfidenceScore_Ljava_lang_String_Handler", ApiSince=31)]
public virtual float GetConfidenceScore(string entity);
[<Android.Runtime.Register("getConfidenceScore", "(Ljava/lang/String;)F", "GetGetConfidenceScore_Ljava_lang_String_Handler", ApiSince=31)>]
abstract member GetConfidenceScore : string -> single
override this.GetConfidenceScore : string -> single
Parameters
- entity
- String
The non-null entity whose confidence score is requested.
Returns
Value is between 0.0f and 1.0f inclusive
- Attributes
Exceptions
Thrown if ClassificationStatus is not ClassificationComplete.
Remarks
Returns a score indicating confidence that an instance of the given entity is present in the first item of the clip data, if that item is plain text and text classification has been completed. This method throws IllegalStateException unless ClassificationStatus is ClassificationComplete. The value ranges from 0 (low confidence) to 1 (high confidence). 0 indicates that the entity was not found in the classified text.
Entities should be as defined in the TextClassifier class, such as TextClassifier#TYPE_ADDRESS, TextClassifier#TYPE_URL, or TextClassifier#TYPE_EMAIL.
If the result is positive for any entity, the full classification result as a TextLinks object may be obtained using the ClipData.Item#getTextLinks() method.
Java documentation for android.content.ClipDescription.getConfidenceScore(java.lang.String).
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.