Class SimpleTermExtractor


  • public class SimpleTermExtractor
    extends Object
    • Constructor Detail

      • SimpleTermExtractor

        public SimpleTermExtractor()
    • Method Detail

      • initialize

        public void initialize​(Parameters params,
                               LocaleId sourceLocaleId,
                               String rootDir,
                               String inputRootDir)
        Initializes this extractor. This must be called before starting to process the input files.
        Parameters:
        params - the options to use.
        sourceLocaleId - the source locale.
        rootDir - the value to use for the ${rootDir} variable (can be null).
        inputRootDir - the value to use for the ${inputRootDir} variable (can be null).
      • processTextUnit

        public void processTextUnit​(ITextUnit tu)
        Processes a text unit for term extraction.
        Parameters:
        tu - the text unit to process.
      • completeExtraction

        public void completeExtraction()
        Performs the post-processing clean-up. this must be called once all files have been processed.
      • getTerms

        public Map<String,​Integer> getTerms()
        Gets the list of term candidates.
        Returns:
        the list of term candidates.