LexRank: Graph-based Lexical Centrality as Salience in Text Summarization
The Use of MMR, Diversity-Based Reranking for Reordering Documents and Producing Summaries
go get github.com/ramenjuniti/lexrankmmr
package main
import github.com/ramenjuniti/lexrankmmr
func main() {
text := "Please input the document you want to summarize here."
summary, err := lexrankmmr.New(
lexrankmmr.MaxLines(maxLines), // option (default 0)
lexrankmmr.MaxCharacters(maxCharacters), // option (default 0)
lexrankmmr.Threshold(threshold), // option (default 0.1)
lexrankmmr.Tolerance(tolerance), // option (default 0.0001)
lexrankmmr.Damping(damping), // option (default 0.85)
lexrankmmr.Lambda(lambda), // option (default 1.0)
)
err = summary.Summarize(text)
if err != nil {
log.Fatal(err)
}
}
This software is released under the MIT License, see LICENSE.