func summaryFromFulltext(str string) string { bag := tldr.New() result, err := bag.Summarize(str, 3) if err != nil { return "" } return result }
func (story *Story) Summarize(sentences int) string { tldr := tldr.New() result, err := tldr.Summarize(story.Content, sentences) if err != nil { fmt.Printf("There was an error summarizing text:\n%s\n", err) } return result }