public class SSTrainingModel extends Object
Modifier and Type | Field and Description |
---|---|
protected static boolean |
NEGATIVE
Internal constant for the array slot of negative examples.
|
protected static boolean |
POSITIVE
Internal constant for the array slot of positive examples.
|
Constructor and Description |
---|
SSTrainingModel()
Construct an empty training model.
|
Modifier and Type | Method and Description |
---|---|
void |
addExample(String t,
TimedStroke s,
boolean which)
Add an example to this training model for the given type
(either positive or negative, denoted by the "which" argument).
|
void |
addNegativeExample(String t,
TimedStroke s)
Add a negative example to this training model for the given type.
|
void |
addPositiveExample(String t,
TimedStroke s)
Add a positive example to this training model for the given type.
|
boolean |
containsType(String t)
Return true if the training type with the specified name is
in the model, or false otherwise.
|
int |
getTypeCount()
Return how many types are contained in this training model.
|
int |
negativeExampleCount(String t)
Returns the number of negative examples for the given type.
|
Iterator |
negativeExamples(String t)
An iterator over the negative examples for the given type.
|
int |
positiveExampleCount(String t)
Returns the number of positive examples for the given type.
|
Iterator |
positiveExamples(String t)
An iterator over the positive examples for the given type.
|
Iterator |
types()
An iterator over the types contained in this training model.
|
protected static final boolean NEGATIVE
protected static final boolean POSITIVE
public final void addNegativeExample(String t, TimedStroke s)
public final void addPositiveExample(String t, TimedStroke s)
public final void addExample(String t, TimedStroke s, boolean which)
public final boolean containsType(String t)
public final int getTypeCount()
public final int negativeExampleCount(String t)
public final Iterator negativeExamples(String t)
public final int positiveExampleCount(String t)
public final Iterator positiveExamples(String t)
public Iterator types()
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.