Documentation
¶
Index ¶
- func AlphaStart(text string) bool
- func Capitalize(str string) string
- func DefaultSimilarity(n1, n2 []*basically.Token, filter basically.TokenFilter) float64
- func IsAdj(tag string) bool
- func IsAdv(tag string) bool
- func IsNoun(tag string) bool
- func IsVerb(tag string) bool
- func RemoveConj(s *basically.Sentence)
- func SubStr(str string, start, end int) string
- type Matcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlphaStart ¶ added in v0.2.0
AlphaStart determines if the starting rune in the given string is a letter.
func Capitalize ¶ added in v0.1.3
Capitalize capitalizes the first letter in a string.
func DefaultSimilarity ¶
func DefaultSimilarity(n1, n2 []*basically.Token, filter basically.TokenFilter) float64
DefaultSimilarity is the default similarity implementation used in Biased TextRank. Tokens are normalized (converted to lowercase and stemmed), before calculating similarity.
func RemoveConj ¶ added in v0.2.0
RemoveConj removes the first coordinating conjunction (for, and, nor, etc.) from the sentence.
Types ¶
type Matcher ¶ added in v0.2.0
type Matcher struct {
Stopwords map[string]struct{}
}
func CreateMatcher ¶ added in v0.2.0
CreateMatcher creates a Matcher and loads stopwords into a dictionary.
func (*Matcher) NVAAFilter ¶ added in v0.2.0
NVAAFilter is a filter that whitelists tokens with n(oun), v(erb), a(djective) and a(dverb) tokens.