Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonPair ¶
type CommonPairs ¶
type CommonPairs []CommonPair
func (CommonPairs) Len ¶
func (c CommonPairs) Len() int
func (CommonPairs) Less ¶
func (c CommonPairs) Less(i, j int) bool
func (CommonPairs) Swap ¶
func (c CommonPairs) Swap(i, j int)
type DefaultStopWords ¶
type DefaultStopWords struct{}
func (DefaultStopWords) IsStopWord ¶
func (d DefaultStopWords) IsStopWord(word string) bool
func (DefaultStopWords) SetLanguage ¶
func (d DefaultStopWords) SetLanguage(lang string)
type DefaultTextSplitter ¶
type DefaultTextSplitter struct {
Punctuations []rune
}
func (DefaultTextSplitter) Sentences ¶
func (d DefaultTextSplitter) Sentences(text string) []string
func (DefaultTextSplitter) Words ¶
func (d DefaultTextSplitter) Words(text string) []string
type StopWordsProvider ¶
type Summarize ¶
type Summarize struct { Title string Text string Language string StopWordsProvider StopWordsProvider TextSplitter TextSplitter EndSentenceRunes []rune QuoteTuples [][]rune IdealWordCount int }
func NewFromString ¶
type TextCounter ¶
func NewTextCounterFromPairs ¶
func NewTextCounterFromPairs(pairs CommonPairs) TextCounter
func NewTextCounterFromSlice ¶
func NewTextCounterFromSlice(words []string) TextCounter
func (TextCounter) Add ¶
func (tc TextCounter) Add(text string, score ...int)
func (TextCounter) MostCommon ¶
func (tc TextCounter) MostCommon(limit ...int) CommonPairs
Click to show internal directories.
Click to hide internal directories.