Class Laplace
java.lang.Object
org.elasticsearch.search.suggest.phrase.SmoothingModel
org.elasticsearch.search.suggest.phrase.Laplace
- All Implemented Interfaces:
 NamedWriteable,Writeable,org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentFragment
An additive
 smoothing model.
 
See N-Gram Smoothing for details.
- 
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> - 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic doubleDefault alpha parameter for laplace smoothingstatic StringFields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS - 
Constructor Summary
ConstructorsConstructorDescriptionLaplace(double alpha)Creates a Laplace smoothing model.Laplace(StreamInput in)Read from a stream. - 
Method Summary
Modifier and TypeMethodDescriptionprotected booleandoEquals(SmoothingModel other)subtype specific implementation of "equals".protected intstatic SmoothingModelfromXContent(org.elasticsearch.common.xcontent.XContentParser parser)doublegetAlpha()Returns the name of the writeable objectprotected org.elasticsearch.common.xcontent.XContentBuilderinnerToXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)voidwriteTo(StreamOutput out)Write this into the StreamOutput.Methods inherited from class org.elasticsearch.search.suggest.phrase.SmoothingModel
equals, hashCode, toXContentMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment 
- 
Field Details
- 
NAME
- See Also:
 - Constant Field Values
 
 - 
DEFAULT_LAPLACE_ALPHA
public static final double DEFAULT_LAPLACE_ALPHADefault alpha parameter for laplace smoothing- See Also:
 - Constant Field Values
 
 
 - 
 - 
Constructor Details
- 
Laplace
public Laplace(double alpha)Creates a Laplace smoothing model. - 
Laplace
Read from a stream.- Throws:
 IOException
 
 - 
 - 
Method Details
- 
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Throws:
 IOException
 - 
getAlpha
public double getAlpha()- Returns:
 - the laplace model alpha parameter
 
 - 
innerToXContent
protected org.elasticsearch.common.xcontent.XContentBuilder innerToXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException- Specified by:
 innerToXContentin classSmoothingModel- Throws:
 IOException
 - 
getWriteableName
Description copied from interface:NamedWriteableReturns the name of the writeable object - 
doEquals
Description copied from class:SmoothingModelsubtype specific implementation of "equals".- Specified by:
 doEqualsin classSmoothingModel
 - 
doHashCode
protected int doHashCode()- Specified by:
 doHashCodein classSmoothingModel
 - 
fromXContent
public static SmoothingModel fromXContent(org.elasticsearch.common.xcontent.XContentParser parser) throws IOException- Throws:
 IOException
 - 
buildWordScorerFactory
- Specified by:
 buildWordScorerFactoryin classSmoothingModel
 
 -