moj.ri.weighting
Class ConstantWS
java.lang.Object
moj.ri.weighting.WeightingScheme
moj.ri.weighting.ConstantWS
- All Implemented Interfaces:
- java.io.Serializable
public class ConstantWS
- extends WeightingScheme
Using a constant weight makes the weighting word order independent.
- Version:
- 2006-Sep-21
- Author:
- Martin Hassel
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConstantWS
public ConstantWS()
applyLeftWeighting
public float[] applyLeftWeighting(RandomLabel focusLabel,
int distance,
RandomLabel leftContextLabel)
- Using a constant weight makes the weighting word order independent.
- Specified by:
applyLeftWeighting
in class WeightingScheme
- Parameters:
focusLabel
- RandomLabel in focus, i.e. the focus word whose context vector
should be modified with the weighted RandomLabel in left context.distance
- leftward distance to the focus word (RandomLabel).leftContextLabel
- RandomLabel in left context at distance
from
the focus word, which can be used together with distance
to
calculate the weight.
- Returns:
- the context of the focus word modified according to the weighting scheme.
applyRightWeighting
public float[] applyRightWeighting(RandomLabel focusLabel,
int distance,
RandomLabel rightContextLabel)
- Using a constant weight makes the weighting word order independent.
- Specified by:
applyRightWeighting
in class WeightingScheme
- Parameters:
focusLabel
- RandomLabel in focus, i.e. the focus word whose context vector
should be modified with the weighted RandomLabel in right context.distance
- rightward distance to the focus word (RandomLabel).rightContextLabel
- RandomLabel in right context at distance
from
the focus word, which can be used together with distance
to
calculate the weight.
- Returns:
- the context of the focus word modified according to the weighting scheme.