public class RandomChooser extends Object implements NumAnnotationsChooser
Modifier and Type | Field and Description |
---|---|
protected int |
max |
protected int |
min |
protected Random |
rng |
Constructor and Description |
---|
RandomChooser(int max)
Construct so that the maximum possible number of annotations
is max and the minimum is 0.
|
RandomChooser(int min,
int max)
Construct so that the minimium possible number of annotations
is min and the maximum is max.
|
Modifier and Type | Method and Description |
---|---|
int |
numAnnotations() |
<O,A> void |
train(List<? extends Annotated<O,A>> data)
Train the chooser with the given data.
|
public RandomChooser(int max)
max
- the maximum possible number of annotationspublic RandomChooser(int min, int max)
min
- the minimium possible number of annotationsmax
- the maximum possible number of annotationspublic <O,A> void train(List<? extends Annotated<O,A>> data)
NumAnnotationsChooser
train
in interface NumAnnotationsChooser
O
- Type of object being annotatedA
- Type of annotationdata
- the training datapublic int numAnnotations()
numAnnotations
in interface NumAnnotationsChooser