opennlp.tools.coref.sim
Class NumberModel
java.lang.Object
opennlp.tools.coref.sim.NumberModel
- All Implemented Interfaces:
- TestNumberModel, TrainSimilarityModel
public class NumberModel
- extends java.lang.Object
- implements TestNumberModel, TrainSimilarityModel
Class which models the number of particular mentions and the entities made up of mentions.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
testModel
public static TestNumberModel testModel(java.lang.String name)
throws java.io.IOException
- Throws:
java.io.IOException
trainModel
public static TrainSimilarityModel trainModel(java.lang.String modelName)
throws java.io.IOException
- Throws:
java.io.IOException
getNumber
public NumberEnum getNumber(Context ec)
setExtents
public void setExtents(Context[] extentContexts)
- Description copied from interface:
TrainSimilarityModel
- Creates simialrity training pairs based on the specified extents.
Extents are considered compatible is they are in the same coreference chain,
have the same named-entity tag, or share a common head word. Incompatible extents are chosen at random
from the set of extents which don't meet this criteria.
- Specified by:
setExtents
in interface TrainSimilarityModel
numberDist
public double[] numberDist(Context c)
- Specified by:
numberDist
in interface TestNumberModel
getSingularIndex
public int getSingularIndex()
- Specified by:
getSingularIndex
in interface TestNumberModel
getPluralIndex
public int getPluralIndex()
- Specified by:
getPluralIndex
in interface TestNumberModel
trainModel
public void trainModel()
throws java.io.IOException
- Specified by:
trainModel
in interface TrainSimilarityModel
- Throws:
java.io.IOException
Copyright © 2011 The Apache Software Foundation. All Rights Reserved.