org.itc.irst.tcc.sre.kernel.expl
Class LocalContextMapping
java.lang.Object
org.itc.irst.tcc.sre.kernel.expl.ContextMapping
org.itc.irst.tcc.sre.kernel.expl.LocalContextMapping
- All Implemented Interfaces:
- Mapping
public class LocalContextMapping
- extends ContextMapping
TO DO
- Since:
- 1.0
- Version:
- %I%, %G%
- Author:
- Claudio Giuliano
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
logger
static org.apache.log4j.Logger logger
- Define a static logger variable so that it references the
Logger instance named
LocalContextMapping
.
windowSize
private int windowSize
NUMBER_OF_SUBSPACES
private static final int NUMBER_OF_SUBSPACES
- See Also:
- Constant Field Values
TARGET_SPACE
private static final int TARGET_SPACE
- See Also:
- Constant Field Values
AGENT_SPACE
private static final int AGENT_SPACE
- See Also:
- Constant Field Values
DEFAULT_WINDOW_SIZE
public static final int DEFAULT_WINDOW_SIZE
- See Also:
- Constant Field Values
targetContext
private TargetContext targetContext
secondTargetContext
private SecondTargetContext secondTargetContext
agentContext
private AgentContext agentContext
LocalContextMapping
public LocalContextMapping()
setParameters
public void setParameters(java.util.Properties parameters)
- Description copied from interface:
Mapping
- Set the parameters to the mapping.
- Parameters:
parameters
- the specified parameters
subspaceCount
public int subspaceCount()
- Description copied from class:
ContextMapping
- Returns the number of active subspaces in this context mapping.
- Specified by:
subspaceCount
in class ContextMapping
- Returns:
- the number of active subspaces.
map
public Vector[] map(java.lang.Object x,
FeatureIndex[] index)
throws java.lang.IllegalArgumentException
- Specified by:
map
in class ContextMapping
- Throws:
java.lang.IllegalArgumentException
createSubspace
protected Vector createSubspace(Sentence sent,
FeatureIndex index)
addFeature
protected void addFeature(java.lang.String feat,
int i,
Vector vec,
FeatureIndex index)
findTargetOffset
protected int findTargetOffset(Sentence sent)
toString
public java.lang.String toString()
- Overrides:
toString
in class ContextMapping