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