public class AdaptiveWordValueEncoder extends WordValueEncoder
CONTINUOUS_VALUE_HASH_SEED, WORD_LIKE_VALUE_HASH_SEED
Constructor and Description |
---|
AdaptiveWordValueEncoder(String name) |
Modifier and Type | Method and Description |
---|---|
void |
addToVector(String originalForm,
double weight,
Vector data)
Adds a value to a vector.
|
com.google.common.collect.Multiset<String> |
getDictionary() |
protected double |
getWeight(byte[] originalForm,
double w) |
protected double |
weight(byte[] originalForm) |
addToVector, asString, hashForProbe
addToVector, addToVector, bytesForString, getName, getProbes, hash, hash, hash, hash, hash, hashesForProbe, isTraceEnabled, setProbes, setTraceDictionary, trace, trace
public AdaptiveWordValueEncoder(String name)
public void addToVector(String originalForm, double weight, Vector data)
addToVector
in class FeatureVectorEncoder
originalForm
- The original form of the value as a string.data
- The vector to which the value should be added.weight
- The weight to be applied to this feature.protected double getWeight(byte[] originalForm, double w)
getWeight
in class WordValueEncoder
protected double weight(byte[] originalForm)
weight
in class WordValueEncoder
public com.google.common.collect.Multiset<String> getDictionary()
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.