Class FrequencyAnalyzer

java.lang.Object
net.ontopia.topicmaps.classify.FrequencyAnalyzer
All Implemented Interfaces:
TermAnalyzerIF

public class FrequencyAnalyzer extends Object implements TermAnalyzerIF
INTERNAL: A frequency table giving the frequency with which a particular word is used in a particular language.
  • Field Details

    • freqs

      protected gnu.trove.map.hash.TObjectDoubleHashMap<String> freqs
  • Constructor Details

    • FrequencyAnalyzer

      public FrequencyAnalyzer(String filename)
      INTERNAL: Loads a frequency table as a resource. The format is a plain text file where each line is 'term;factor' where factor is a real in the range 0-1. The score of the term after classification is multiplied with the factor. Thus, a factor of 0.5 will reduce the score of the term by half.
    • FrequencyAnalyzer

      public FrequencyAnalyzer(File file)
      INTERNAL: Loads a frequency table from a file. The format is a plain text file where each line is 'term;factor' where factor is a real in the range 0-1. The score of the term after classification is multiplied with the factor. Thus, a factor of 0.5 will reduce the score of the term by half.
  • Method Details