opennlp.maxent
Class Context

java.lang.Object
  extended by opennlp.maxent.Context
Direct Known Subclasses:
MutableContext

public class Context
extends java.lang.Object

Class which associates a real valueed parameter or expected value with a particular contextual predicate or feature. This is used to store maxent model parameters as well as model and emperical expected values.

Author:
Tom Morton

Field Summary
protected  int[] outcomes
          The outcomes which occur with this context.
protected  double[] parameters
          The real valued parameters or expected values for this context.
 
Constructor Summary
Context(int[] outcomePattern, double[] parameters)
          Creates a new parametes object with the specifed parameters associated with the specified outcome pattern.
 
Method Summary
 int[] getOutcomes()
          Returns the outcomes for which parameters exists for this context.
 double[] getParameters()
          Returns the paramaters or expected values for the outcomes which occur with this context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parameters

protected double[] parameters
The real valued parameters or expected values for this context.


outcomes

protected int[] outcomes
The outcomes which occur with this context.

Constructor Detail

Context

public Context(int[] outcomePattern,
               double[] parameters)
Creates a new parametes object with the specifed parameters associated with the specified outcome pattern.

Parameters:
outcomePattern - Array of outcomes for which parameters exists for this context.
parameters - Paramaters for the outcomes specified.
Method Detail

getOutcomes

public int[] getOutcomes()
Returns the outcomes for which parameters exists for this context.

Returns:
Array of outcomes for which parameters exists for this context.

getParameters

public double[] getParameters()
Returns the paramaters or expected values for the outcomes which occur with this context.

Returns:
Array of paramaters for the outcomes of this context.


Copyright © 2005 Jason Baldridge, Gann Bierner, and Thomas Morton. All Rights Reserved.