Documentation ¶
Index ¶
- Variables
- func Contains(s string, a []string) bool
- func CountCommonWords(set1, set2 stringSet) int
- func Intersect(set1, set2 stringSet) stringSet
- func NewGraphForSentences(sentences []sentence) graph
- func NewStringSet(words []string) stringSet
- func PickTopSentence(scores []ScoreSentence) string
- func PickTopSentencesByRatio(scores []ScoreSentence, ratio float64) []string
- func PickTopSentencesByWordCount(scores []ScoreSentence, wordCount int) []string
- func PreProcessSentence(text string, language string, additionalStopWords []string) sentence
- func PreProcessSentences(sentences []string, language string, additionalStopWords []string) []sentence
- func PreProcessWords(text, language string, deaccent bool, additionalStopWords []string) []word
- func ScoreSentenceToText(scores []ScoreSentence) []string
- type Options
- type ScoreSentence
Constants ¶
This section is empty.
Variables ¶
View Source
var AB_ACRONYM_LETTERS = regexp.MustCompile(`([a-zA-Z])\.([a-zA-Z])\.`)
View Source
var REGEX_EMAIL = regexp.MustCompile("[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*")
Functions ¶
func CountCommonWords ¶
func CountCommonWords(set1, set2 stringSet) int
func NewGraphForSentences ¶
func NewGraphForSentences(sentences []sentence) graph
func NewStringSet ¶
func NewStringSet(words []string) stringSet
func PickTopSentence ¶
func PickTopSentence(scores []ScoreSentence) string
func PickTopSentencesByRatio ¶
func PickTopSentencesByRatio(scores []ScoreSentence, ratio float64) []string
func PickTopSentencesByWordCount ¶ added in v0.3.0
func PickTopSentencesByWordCount(scores []ScoreSentence, wordCount int) []string
func PreProcessSentence ¶
func PreProcessSentences ¶
func PreProcessWords ¶
func ScoreSentenceToText ¶
func ScoreSentenceToText(scores []ScoreSentence) []string
Types ¶
type ScoreSentence ¶
func SummarizeSentences ¶
func SummarizeSentences(sentencetexts []string, options Options) ([]ScoreSentence, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.