Class WeightedTerm

  • Direct Known Subclasses:
    WeightedSpanTerm

    public class WeightedTerm
    extends java.lang.Object
    Lightweight class to hold term and a weight value used for scoring this term
    • Constructor Summary

      Constructors 
      Constructor Description
      WeightedTerm​(float weight, java.lang.String term)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getTerm()  
      float getWeight()  
      void setTerm​(java.lang.String term)  
      void setWeight​(float weight)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WeightedTerm

        public WeightedTerm​(float weight,
                            java.lang.String term)
    • Method Detail

      • getTerm

        public java.lang.String getTerm()
        Returns:
        the term value (stemmed)
      • getWeight

        public float getWeight()
        Returns:
        the weight associated with this term
      • setTerm

        public void setTerm​(java.lang.String term)
        Parameters:
        term - the term value (stemmed)
      • setWeight

        public void setWeight​(float weight)
        Parameters:
        weight - the weight associated with this term