Class QueryTerm


  • public final class QueryTerm
    extends java.lang.Object
    A query term. Query terms are equal if they have the same term string.
    Author:
    bratseth
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object object)  
      float getConnectedness()
      Returns how connected this term is to the previous term in the query.
      float getExactness()
      The degree to which this is exactly the term the user specified (1), or a stemmed form (closer to 0)
      float getSignificance()  
      java.lang.String getTerm()  
      int getWeight()  
      int hashCode()  
      void setConnectedness​(float connectedness)  
      void setSignificance​(float significance)
      The significance of this term: 1-term frequency
      void setTerm​(java.lang.String term)  
      void setWeight​(int weight)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • QueryTerm

        public QueryTerm​(java.lang.String term)
      • QueryTerm

        public QueryTerm​(java.lang.String term,
                         float connectedness)
    • Method Detail

      • setTerm

        public void setTerm​(java.lang.String term)
      • getTerm

        public java.lang.String getTerm()
      • getConnectedness

        public float getConnectedness()
        Returns how connected this term is to the previous term in the query. Default: 0.1. This is always a number between 0 (not connected at all) and 1 (virtually inseparable)
      • setConnectedness

        public void setConnectedness​(float connectedness)
      • setWeight

        public void setWeight​(int weight)
      • getWeight

        public int getWeight()
      • setSignificance

        public void setSignificance​(float significance)
        The significance of this term: 1-term frequency
      • getSignificance

        public float getSignificance()
      • getExactness

        public float getExactness()
        The degree to which this is exactly the term the user specified (1), or a stemmed form (closer to 0)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object