NamedWriteable
, Writeable
, ToXContent
, ToXContentFragment
public final class LinearInterpolation extends SmoothingModel
See N-Gram Smoothing for details.
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.Reader<V>, Writeable.Writer<V>
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
NAME |
EMPTY_PARAMS
Constructor | Description |
---|---|
LinearInterpolation(double trigramLambda,
double bigramLambda,
double unigramLambda) |
Creates a linear interpolation smoothing model.
|
LinearInterpolation(StreamInput in) |
Read from a stream.
|
Modifier and Type | Method | Description |
---|---|---|
WordScorer.WordScorerFactory |
buildWordScorerFactory() |
|
protected boolean |
doEquals(SmoothingModel other) |
subtype specific implementation of "equals".
|
protected int |
doHashCode() |
|
static LinearInterpolation |
fromXContent(XContentParser parser) |
|
double |
getBigramLambda() |
|
double |
getTrigramLambda() |
|
double |
getUnigramLambda() |
|
java.lang.String |
getWriteableName() |
Returns the name of the writeable object
|
protected XContentBuilder |
innerToXContent(XContentBuilder builder,
ToXContent.Params params) |
|
void |
writeTo(StreamOutput out) |
Write this into the StreamOutput.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
equals, hashCode, toXContent
isFragment
public static final java.lang.String NAME
public LinearInterpolation(double trigramLambda, double bigramLambda, double unigramLambda)
trigramLambda
- the trigram lambdabigramLambda
- the bigram lambdaunigramLambda
- the unigram lambdapublic LinearInterpolation(StreamInput in) throws java.io.IOException
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Writeable
java.io.IOException
public double getTrigramLambda()
public double getBigramLambda()
public double getUnigramLambda()
protected XContentBuilder innerToXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
innerToXContent
in class SmoothingModel
java.io.IOException
public java.lang.String getWriteableName()
NamedWriteable
protected boolean doEquals(SmoothingModel other)
SmoothingModel
doEquals
in class SmoothingModel
protected int doHashCode()
doHashCode
in class SmoothingModel
public static LinearInterpolation fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOException
public WordScorer.WordScorerFactory buildWordScorerFactory()
buildWordScorerFactory
in class SmoothingModel