RecognitionResult
Stay organized with collections
Save and categorize content based on your preferences.
Object representing the output of an ink recognition.
A recognizer usually provides several recognition alternatives, because the user intent is
not always clear. For example, if the user writes a vertical line and then a circle, the
recognition alternatives could include "10", "IO", and "lo".
Alternatives are named "candidates". This object represents a set of candidates as a list
of RecognitionCandidate
.
Use DigitalInkRecognizer
to perform the recognition itself.
Protected Constructor Summary
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
Protected Constructors
protected RecognitionResult ()
Public Methods
public boolean equals (Object other)
Returns the list of recognition alternatives.
Candidates are ordered from most likely to least likely. When scores are provided,
they are in increasing order.
The number of candidates depends on the options used when initializing the
recognizer. See DigitalInkRecognitionModel
and
DigitalInkRecognizerOptions
for details. If nothing can be recognized,
this list will be empty.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[],[],null,["# RecognitionResult\n\npublic class **RecognitionResult** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nObject representing the output of an ink recognition.\n\nA recognizer usually provides several recognition alternatives, because the user intent is\nnot always clear. For example, if the user writes a vertical line and then a circle, the\nrecognition alternatives could include \"10\", \"IO\", and \"lo\".\n\nAlternatives are named \"candidates\". This object represents a set of candidates as a list\nof [RecognitionCandidate](/android/reference/com/google/mlkit/vision/digitalink/common/RecognitionCandidate).\n\nUse `DigitalInkRecognizer` to perform the recognition itself. \n\n### Protected Constructor Summary\n\n|---|---------------------------------------------------------------------------------------------------------------------------|\n| | [RecognitionResult](/android/reference/com/google/mlkit/vision/digitalink/common/RecognitionResult#RecognitionResult())() |\n\n### Public Method Summary\n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| boolean | [equals](/android/reference/com/google/mlkit/vision/digitalink/common/RecognitionResult#equals(java.lang.Object))([Object](//developer.android.com/reference/java/lang/Object.html) other) |\n| [List](//developer.android.com/reference/java/util/List.html)\\\u003c[RecognitionCandidate](/android/reference/com/google/mlkit/vision/digitalink/common/RecognitionCandidate)\\\u003e | [getCandidates](/android/reference/com/google/mlkit/vision/digitalink/common/RecognitionResult#getCandidates())() Returns the list of recognition alternatives. |\n| int | [hashCode](/android/reference/com/google/mlkit/vision/digitalink/common/RecognitionResult#hashCode())() |\n| [String](//developer.android.com/reference/java/lang/String.html) | [toString](/android/reference/com/google/mlkit/vision/digitalink/common/RecognitionResult#toString())() |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nProtected Constructors\n----------------------\n\n#### protected **RecognitionResult** ()\n\nPublic Methods\n--------------\n\n#### public boolean **equals** ([Object](//developer.android.com/reference/java/lang/Object.html) other)\n\n#### public [List](//developer.android.com/reference/java/util/List.html)\\\u003c[RecognitionCandidate](/android/reference/com/google/mlkit/vision/digitalink/common/RecognitionCandidate)\\\u003e\n**getCandidates** ()\n\nReturns the list of recognition alternatives.\n\nCandidates are ordered from most likely to least likely. When scores are provided,\nthey are in increasing order.\n\nThe number of candidates depends on the options used when initializing the\nrecognizer. See `DigitalInkRecognitionModel` and\n`DigitalInkRecognizerOptions` for details. If nothing can be recognized,\nthis list will be empty. \n\n#### public int **hashCode** ()\n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **toString** ()"]]