opennlp.model
Class ComparablePredicate

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

public class ComparablePredicate
extends java.lang.Object
implements java.lang.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
 java.lang.String name
           
 int[] outcomes
           
 double[] params
           
 
Constructor Summary
ComparablePredicate(java.lang.String n, int[] ocs, double[] ps)
           
 
Method Summary
 int compareTo(ComparablePredicate cp)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public java.lang.String name

outcomes

public int[] outcomes

params

public double[] params
Constructor Detail

ComparablePredicate

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

compareTo

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


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