com.sun.labs.minion.lexmorph.disambiguation
Class Context

java.lang.Object
  extended by com.sun.labs.minion.lexmorph.disambiguation.Context

public class Context
extends java.lang.Object

A context in which a word occurs, used for sense disambiguation.


Field Summary
protected  int[] counts
           
static java.lang.String logTag
           
 
Constructor Summary
Context(java.lang.String disTerm, java.lang.String field, DocKeyEntry key, int maxFeat)
          Creates a context for use in disambiguating a term
 
Method Summary
 java.util.Map<java.lang.String,TermFreq> getTerms()
          Gets the term to frequency map.
 void setCounts(java.lang.String[] features)
          Sets the counts for the features in an array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

counts

protected int[] counts

logTag

public static final java.lang.String logTag
See Also:
Constant Field Values
Constructor Detail

Context

public Context(java.lang.String disTerm,
               java.lang.String field,
               DocKeyEntry key,
               int maxFeat)
Creates a context for use in disambiguating a term

Parameters:
disTerm - the term to disambiguate
field - the field from which contexts should be drawn
key - the document that represents the context
maxFeat - the maximum number of features to keep from the context. Currently the most frequent features are selected.
Method Detail

setCounts

public void setCounts(java.lang.String[] features)
Sets the counts for the features in an array.

Parameters:
features -

getTerms

public java.util.Map<java.lang.String,TermFreq> getTerms()
Gets the term to frequency map.

Returns:
a map from terms in the context to the frequencies