opennlp.tools.coref.sim
Class GenderModel
java.lang.Object
opennlp.tools.coref.sim.GenderModel
- All Implemented Interfaces:
- TestGenderModel, TrainSimilarityModel
public class GenderModel
- extends java.lang.Object
- implements TestGenderModel, TrainSimilarityModel
Class which models the gender of a particular mentions and entities made up of mentions.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
testModel
public static TestGenderModel testModel(java.lang.String name)
throws java.io.IOException
- Throws:
java.io.IOException
trainModel
public static TrainSimilarityModel trainModel(java.lang.String name)
throws java.io.IOException
- Throws:
java.io.IOException
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
main
public static void main(java.lang.String[] args)
throws java.io.IOException
- Throws:
java.io.IOException
genderDistribution
public double[] genderDistribution(Context np1)
- Specified by:
genderDistribution
in interface TestGenderModel
trainModel
public void trainModel()
throws java.io.IOException
- Specified by:
trainModel
in interface TrainSimilarityModel
- Throws:
java.io.IOException
getFemaleIndex
public int getFemaleIndex()
- Specified by:
getFemaleIndex
in interface TestGenderModel
getMaleIndex
public int getMaleIndex()
- Specified by:
getMaleIndex
in interface TestGenderModel
getNeuterIndex
public int getNeuterIndex()
- Specified by:
getNeuterIndex
in interface TestGenderModel
Copyright © 2011 The Apache Software Foundation. All Rights Reserved.