opennlp.tools.coref.sim
Class NumberModel

java.lang.Object
  extended by opennlp.tools.coref.sim.NumberModel
All Implemented Interfaces:
TestNumberModel, TrainSimilarityModel

public class NumberModel
extends Object
implements TestNumberModel, TrainSimilarityModel

Class which models the number of particular mentions and the entities made up of mentions.


Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

testModel

public static TestNumberModel testModel(String name)
                                 throws IOException
Throws:
IOException

trainModel

public static TrainSimilarityModel trainModel(String modelName)
                                       throws IOException
Throws:
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 IOException
Specified by:
trainModel in interface TrainSimilarityModel
Throws:
IOException


Copyright © 2010. All Rights Reserved.