Class SimpleNgramEntryStatistics

    • Constructor Detail

      • SimpleNgramEntryStatistics

        public SimpleNgramEntryStatistics​(EntryStatistics e)
      • SimpleNgramEntryStatistics

        public SimpleNgramEntryStatistics()
      • SimpleNgramEntryStatistics

        public SimpleNgramEntryStatistics​(int ws)
    • Method Detail

      • getFrequency

        public int getFrequency()
        Description copied from interface: EntryStatistics
        Return the frequency (total number of occurrences) of the term.
        Specified by:
        getFrequency in interface EntryStatistics
        Returns:
        the frequency (total number of occurrences) of the entry (term).
      • getDocumentFrequency

        public int getDocumentFrequency()
        Description copied from interface: EntryStatistics
        Return the number of documents that the term occurs in.
        Specified by:
        getDocumentFrequency in interface EntryStatistics
        Returns:
        the number of documents that the term occurs in.
      • getTermId

        public int getTermId()
        Description copied from interface: EntryStatistics
        Return the id of the term.
        Specified by:
        getTermId in interface EntryStatistics
        Returns:
        the id of the term.
      • add

        public void add​(EntryStatistics e)
        Description copied from interface: EntryStatistics
        Increment the statistics of this object by that of another.
        Specified by:
        add in interface EntryStatistics
        Parameters:
        e - the other object whose statistics are used to increment the statistics of this object.
      • subtract

        public void subtract​(EntryStatistics e)
        Description copied from interface: EntryStatistics
        Decrement the statistics of this object by that of another.
        Specified by:
        subtract in interface EntryStatistics
        Parameters:
        e - the other object whose statistics are used to decrement the statistics of this object.
      • readFields

        public void readFields​(java.io.DataInput in)
                        throws java.io.IOException
        Specified by:
        readFields in interface org.apache.hadoop.io.Writable
        Throws:
        java.io.IOException
      • write

        public void write​(java.io.DataOutput out)
                   throws java.io.IOException
        Specified by:
        write in interface org.apache.hadoop.io.Writable
        Throws:
        java.io.IOException
      • getMaxFrequencyInDocuments

        public int getMaxFrequencyInDocuments()
        Description copied from interface: EntryStatistics
        Return the maximum in-document term frequency of the term among all documents the terms appears in.
        Specified by:
        getMaxFrequencyInDocuments in interface EntryStatistics
        Returns:
        the maximum in-document term frequency of the term among all documents the terms appears in.
      • setMaxFrequencyInDocuments

        public void setMaxFrequencyInDocuments​(int max)
        Description copied from interface: EntryStatistics
        Set the maximum in-document term frequency of the term among all documents the terms appears in.
        Specified by:
        setMaxFrequencyInDocuments in interface EntryStatistics
        Parameters:
        max - the maximum in-document term frequency of the term among all documents the terms appears in.
      • toString

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

        public void setFrequency​(int F)
        Description copied from interface: EntryStatistics
        Set the frequency (total number of occurrences) of the term.
        Specified by:
        setFrequency in interface EntryStatistics
        Parameters:
        F - the frequency (total number of occurrences) of the entry (term).
      • setDocumentFrequency

        public void setDocumentFrequency​(int nt)
        Description copied from interface: EntryStatistics
        Set the number of documents that the term occurs in.
        Specified by:
        setDocumentFrequency in interface EntryStatistics
        Parameters:
        nt - the number of documents that the term occurs in.