org.itc.irst.tcc.sre.kernel.expl
Class GlobalContextMapping
java.lang.Object
org.itc.irst.tcc.sre.kernel.expl.ContextMapping
org.itc.irst.tcc.sre.kernel.expl.GlobalContextMapping
- All Implemented Interfaces:
- Mapping
public class GlobalContextMapping
- 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
GlobalContextMapping
.
ngram
private int ngram
NUMBER_OF_SUBSPACES
private static final int NUMBER_OF_SUBSPACES
- See Also:
- Constant Field Values
DEFAULT_NGRAM
public static final int DEFAULT_NGRAM
- See Also:
- Constant Field Values
FORE_BETWEEN_SPACE
private static final int FORE_BETWEEN_SPACE
- See Also:
- Constant Field Values
BETWEEN_SPACE
private static final int BETWEEN_SPACE
- See Also:
- Constant Field Values
BETWEEN_AFTER_SPACE
private static final int BETWEEN_AFTER_SPACE
- See Also:
- Constant Field Values
foreBetweenContext
private ForeBetweenContext foreBetweenContext
betweenContext
private BetweenContext betweenContext
betweenAfterContext
private BetweenAfterContext betweenAfterContext
GlobalContextMapping
public GlobalContextMapping()
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)
updateVector
private void updateVector(Vector vec,
FeatureIndex index,
java.lang.String t)
toString
public java.lang.String toString()
- Overrides:
toString
in class ContextMapping