Class TextRankSummarizer

  • All Implemented Interfaces:
    Extractor, Summarizer, Serializable

    public class TextRankSummarizer
    extends Object
    implements Summarizer

    Implementation of the TextRank algorithm for summarization as defined in: Mihalcea, R., Tarau, P.: "Textrank: Bringing order into texts". In: Lin, D., Wu, D. (eds.) Proceedings of EMNLP 2004. pp. 404–411. Association for Computational Linguistics, Barcelona, Spain. July 2004.

    See Also:
    Serialized Form
    • Constructor Detail

      • TextRankSummarizer

        public TextRankSummarizer()
    • Method Detail

      • extract

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

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