public class RecognitionSet extends Object
Recognition
Modifier and Type | Field and Description |
---|---|
static RecognitionSet |
NO_RECOGNITION
A constant that represents no recognition results.
|
Constructor and Description |
---|
RecognitionSet()
Construct an empty recognition set.
|
RecognitionSet(Recognition[] rs)
Construct a recognition set that contains the
given recognitions.
|
Modifier and Type | Method and Description |
---|---|
void |
addRecognition(Recognition r)
Add a recognition to the set by inserting it in descending
order of confidence value.
|
Recognition |
getBestRecognition()
Return the recognition object that has the highest confidence
value, or null if there are no recognitions in this set.
|
int |
getRecognitionCount()
Return the number of recognitions in this set.
|
Recognition |
getRecognitionOfType(Type type)
Return the recognition contained by this set with the given
type, or null if it's not contained.
|
Iterator |
recognitions()
Return an iterator over the recognized types in sorted order
from highest confidence to lowest.
|
void |
removeRecognition(Recognition r)
Remove the given recognition from the set.
|
String |
toString()
Return the text representation of the recognition set.
|
public static final RecognitionSet NO_RECOGNITION
public RecognitionSet()
public RecognitionSet(Recognition[] rs)
public void addRecognition(Recognition r)
public Recognition getBestRecognition()
public int getRecognitionCount()
public Recognition getRecognitionOfType(Type type)
public Iterator recognitions()
public void removeRecognition(Recognition r)
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.