Package net.ontopia.topicmaps.classify
Class FrequencyAnalyzer
java.lang.Object
net.ontopia.topicmaps.classify.FrequencyAnalyzer
- All Implemented Interfaces:
TermAnalyzerIF
INTERNAL: A frequency table giving the frequency with which a
particular word is used in a particular language.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFrequencyAnalyzer(File file) INTERNAL: Loads a frequency table from a file.FrequencyAnalyzer(String filename) INTERNAL: Loads a frequency table as a resource. -
Method Summary
-
Field Details
-
freqs
-
-
Constructor Details
-
FrequencyAnalyzer
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
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
-
analyzeTerm
- Specified by:
analyzeTermin interfaceTermAnalyzerIF
-
startAnalysis
- Specified by:
startAnalysisin interfaceTermAnalyzerIF
-
endAnalysis
public void endAnalysis()- Specified by:
endAnalysisin interfaceTermAnalyzerIF
-