opennlp.model
Class ComparablePredicate

java.lang.Object
  extended by opennlp.model.ComparablePredicate
All Implemented Interfaces:
Comparable<ComparablePredicate>

public class ComparablePredicate
extends Object
implements Comparable<ComparablePredicate>

A maxent predicate representation which we can use to sort based on the outcomes. This allows us to make the mapping of features to their parameters much more compact.


Field Summary
 String name
           
 int[] outcomes
           
 double[] params
           
 
Constructor Summary
ComparablePredicate(String n, int[] ocs, double[] ps)
           
 
Method Summary
 int compareTo(ComparablePredicate cp)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public String name

outcomes

public int[] outcomes

params

public double[] params
Constructor Detail

ComparablePredicate

public ComparablePredicate(String n,
                           int[] ocs,
                           double[] ps)
Method Detail

compareTo

public int compareTo(ComparablePredicate cp)
Specified by:
compareTo in interface Comparable<ComparablePredicate>

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.