Class LinearInterpolation

org.elasticsearch.search.suggest.phrase.SmoothingModel
org.elasticsearch.search.suggest.phrase.LinearInterpolation
All Implemented Interfaces:
NamedWriteable, Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentFragment

public final class LinearInterpolation extends SmoothingModel
Linear interpolation smoothing model.

See 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.Params

    Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable

    Writeable.Reader<V>, Writeable.Writer<V>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static
     

    Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor
    Description
    LinearInterpolation​(double trigramLambda, double bigramLambda, double unigramLambda)
    Creates a linear interpolation smoothing model.
    Read from a stream.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    protected boolean
    subtype specific implementation of "equals".
    protected int
     
    fromXContent​(org.elasticsearch.common.xcontent.XContentParser parser)
     
    double
     
    double
     
    double
     
    Returns the name of the writeable object
    protected org.elasticsearch.common.xcontent.XContentBuilder
    innerToXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
     
    void
    Write this into the StreamOutput.

    Methods inherited from class org.elasticsearch.search.suggest.phrase.SmoothingModel

    equals, hashCode, toXContent

    Methods inherited from class java.lang.

    , , , , , , , ,

    Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment

    isFragment
  • Field Details

  • Constructor Details

    • LinearInterpolation

      public LinearInterpolation(double trigramLambda, double bigramLambda, double unigramLambda)
      Creates a linear interpolation smoothing model. Note: the lambdas must sum up to one.
      Parameters:
      trigramLambda - the trigram lambda
      bigramLambda - the bigram lambda
      unigramLambda - the unigram lambda
    • LinearInterpolation

      public LinearInterpolation(StreamInput in) throws
      Read from a stream.
      Throws:
  • Method Details

    • writeTo

      public void writeTo(StreamOutput out) throws
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Throws:
    • getTrigramLambda

      public double getTrigramLambda()
    • getBigramLambda

      public double getBigramLambda()
    • getUnigramLambda

      public double getUnigramLambda()
    • innerToXContent

      protected org.elasticsearch.common.xcontent.XContentBuilder innerToXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws
      Specified by:
      innerToXContent in class SmoothingModel
      Throws:
    • getWriteableName

      public  getWriteableName()
      Description copied from interface: NamedWriteable
      Returns the name of the writeable object
    • doEquals

      protected boolean doEquals(SmoothingModel other)
      Description copied from class: SmoothingModel
      subtype specific implementation of "equals".
      Specified by:
      doEquals in class SmoothingModel
    • doHashCode

      protected int doHashCode()
      Specified by:
      doHashCode in class SmoothingModel
    • fromXContent

      public static LinearInterpolation fromXContent(org.elasticsearch.common.xcontent.XContentParser parser) throws
      Throws:
    • buildWordScorerFactory

      public WordScorer.WordScorerFactory buildWordScorerFactory()
      Specified by:
      buildWordScorerFactory in class SmoothingModel