Class TFIDFKeywordExtractor

    • Constructor Detail

      • TFIDFKeywordExtractor

        public TFIDFKeywordExtractor()
        Instantiates a new TFIDFKeywordExtractor.
      • TFIDFKeywordExtractor

        public TFIDFKeywordExtractor​(@NonNull
                                     @NonNull FeaturizingExtractor termExtractor)
        Instantiates a new TFIDFKeywordExtractor.
        Parameters:
        termExtractor - the specification for filtering and converting annotations to strings
    • Method Detail

      • extract

        public Extraction extract​(HString source)
        Description copied from interface: Extractor
        Generate an Extraction from the given HString.
        Specified by:
        extract in interface Extractor
        Parameters:
        source - the source text from which we will generate an Extraction
        Returns:
        the Extraction
      • fit

        public void fit​(DocumentCollection corpus)
        Description copied from interface: KeywordExtractor
        In certain cases a keyword extractor needs to collect corpus level statistics or construct a model of what a good keyword looks like. The fit method allows implementations to perform this logic at a corpus level.
        Specified by:
        fit in interface KeywordExtractor
        Parameters:
        corpus - the corpus to fit the extractor to