public class NumberModel extends Object implements TestNumberModel, TrainSimilarityModel
| Modifier and Type | Method and Description |
|---|---|
NumberEnum |
getNumber(Context ec) |
int |
getPluralIndex() |
int |
getSingularIndex() |
double[] |
numberDist(Context c) |
void |
setExtents(Context[] extentContexts)
Creates simialrity training pairs based on the specified extents.
|
static TestNumberModel |
testModel(String name) |
void |
trainModel() |
static TrainSimilarityModel |
trainModel(String modelName) |
public static TestNumberModel testModel(String name) throws IOException
IOExceptionpublic static TrainSimilarityModel trainModel(String modelName) throws IOException
IOExceptionpublic NumberEnum getNumber(Context ec)
public void setExtents(Context[] extentContexts)
TrainSimilarityModelsetExtents in interface TrainSimilarityModelpublic double[] numberDist(Context c)
numberDist in interface TestNumberModelpublic int getSingularIndex()
getSingularIndex in interface TestNumberModelpublic int getPluralIndex()
getPluralIndex in interface TestNumberModelpublic void trainModel()
throws IOException
trainModel in interface TrainSimilarityModelIOExceptionCopyright © 2019 The Apache Software Foundation. All rights reserved.