com.sun.labs.minion.lexmorph.disambiguation
Class Context
java.lang.Object
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 |
counts
protected int[] counts
logTag
public static final java.lang.String logTag
- See Also:
- Constant Field Values
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 disambiguatefield - the field from which contexts should be drawnkey - the document that represents the contextmaxFeat - the maximum number of features to keep from the context.
Currently the most frequent features are selected.
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