NamedWriteable, Writeable, ToXContent, ToXContentFragmentpublic final class Laplace extends SmoothingModel
See N-Gram Smoothing for details.
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsWriteable.Reader<V>, Writeable.Writer<V>| Modifier and Type | Field | Description |
|---|---|---|
static double |
DEFAULT_LAPLACE_ALPHA |
Default alpha parameter for laplace smoothing
|
static java.lang.String |
NAME |
EMPTY_PARAMS| Constructor | Description |
|---|---|
Laplace(double alpha) |
Creates a Laplace smoothing model.
|
Laplace(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 SmoothingModel |
fromXContent(XContentParser parser) |
|
double |
getAlpha() |
|
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, waitequals, hashCode, toXContentisFragmentpublic static final java.lang.String NAME
public static final double DEFAULT_LAPLACE_ALPHA
public Laplace(double alpha)
public Laplace(StreamInput in) throws java.io.IOException
java.io.IOExceptionpublic void writeTo(StreamOutput out) throws java.io.IOException
Writeablejava.io.IOExceptionpublic double getAlpha()
protected XContentBuilder innerToXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
innerToXContent in class SmoothingModeljava.io.IOExceptionpublic java.lang.String getWriteableName()
NamedWriteableprotected boolean doEquals(SmoothingModel other)
SmoothingModeldoEquals in class SmoothingModelprotected int doHashCode()
doHashCode in class SmoothingModelpublic static SmoothingModel fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOExceptionpublic WordScorer.WordScorerFactory buildWordScorerFactory()
buildWordScorerFactory in class SmoothingModel