Documentation
¶
Index ¶
- type Keyword
- type NLPHelper
- func (instance *NLPHelper) Classifier() *nlp_classifier.NlpClassifier
- func (instance *NLPHelper) Entities() *nlp_entities.EntityMatcher
- func (instance *NLPHelper) GetEntities(text string, list []string) map[string][]string
- func (instance *NLPHelper) GetEntitiesAll(text string) map[string][]string
- func (instance *NLPHelper) GetKeywords(text string, minLen int) []string
- func (instance *NLPHelper) GetKeywordsProgression(text string, minLen int) []string
- func (instance *NLPHelper) GetKeywordsSorted(text string, minLen int) []string
- func (instance *NLPHelper) GetKeywordsSortedWithSpecialChars(text string, minLen int) []string
- func (instance *NLPHelper) GetKeywordsWithSpecialChars(text string, minLen int) []string
- func (instance *NLPHelper) GetLanguageCode(text string) string
- func (instance *NLPHelper) LanguageDetector() *nlp_detect.LanguageDetector
- func (instance *NLPHelper) ListKeywords(text string, minLen int, sortByWeight, includeSpecialChars bool) (response []*Keyword)
- func (instance *NLPHelper) ListKeywordsWith(text string, minLen int, sortByWeight, includeSpecialChars bool) (response []*Keyword)
- func (instance *NLPHelper) ListKeywordsWithMinWeight(text string, minLen, minWeight int, sortByWeight, includeSpecialChars bool) (response []*Keyword)
- func (instance *NLPHelper) MapKeywords(text string, minLen int) map[string]int
- func (instance *NLPHelper) MapKeywordsWithSpecialChars(text string, minLen int) map[string]int
- func (instance *NLPHelper) MatchEntities(text string, list []string) map[string][]string
- func (instance *NLPHelper) MatchEntitiesAll(text string) map[string][]string
- func (instance *NLPHelper) Num2Word(num int, lang ...string) string
- func (instance *NLPHelper) Score() *nlp_scoring.ScoreCalculator
- func (instance *NLPHelper) ScoreAnd(text string, expressions []string) float32
- func (instance *NLPHelper) ScoreBest(text string, expressions []string) float32
- func (instance *NLPHelper) ScoreOr(text string, expressions []string) float32
- func (instance *NLPHelper) SummarizeLexRank(text string, intoSentences int) []string
- func (instance *NLPHelper) SummarizeLexRankHigh(text string) []string
- func (instance *NLPHelper) SummarizeLexRankLow(text string) []string
- func (instance *NLPHelper) SummarizeLexRankMedium(text string) []string
- func (instance *NLPHelper) Summarizer() *nlp_summarize.Summarizer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NLPHelper ¶
type NLPHelper struct {
// contains filtered or unexported fields
}
var NLP *NLPHelper
func (*NLPHelper) Classifier ¶
func (instance *NLPHelper) Classifier() *nlp_classifier.NlpClassifier
func (*NLPHelper) Entities ¶
func (instance *NLPHelper) Entities() *nlp_entities.EntityMatcher
func (*NLPHelper) GetEntities ¶
func (*NLPHelper) GetEntitiesAll ¶
GetEntitiesAll return only existing entities
func (*NLPHelper) GetKeywords ¶
func (*NLPHelper) GetKeywordsProgression ¶
GetKeywordsProgression generate an array of keywords with also partial words like ["word", "wor", "wo"]. This is useful searching for partial words
func (*NLPHelper) GetKeywordsSorted ¶
func (*NLPHelper) GetKeywordsSortedWithSpecialChars ¶
func (*NLPHelper) GetKeywordsWithSpecialChars ¶
func (*NLPHelper) GetLanguageCode ¶
func (*NLPHelper) LanguageDetector ¶
func (instance *NLPHelper) LanguageDetector() *nlp_detect.LanguageDetector
func (*NLPHelper) ListKeywords ¶
func (*NLPHelper) ListKeywordsWith ¶
func (*NLPHelper) ListKeywordsWithMinWeight ¶
func (*NLPHelper) MapKeywords ¶
func (*NLPHelper) MapKeywordsWithSpecialChars ¶
func (*NLPHelper) MatchEntities ¶
func (*NLPHelper) MatchEntitiesAll ¶
func (*NLPHelper) Score ¶
func (instance *NLPHelper) Score() *nlp_scoring.ScoreCalculator
func (*NLPHelper) ScoreAnd ¶
ScoreAnd Calculate a matching score between a phrase and a check test using expressions. ALL expressions are evaluated. Failed expressions add negative score to result @param [string] phrase. "hello humanity!! I'm Mario rossi" @param [string] expressions. All expressions to match. ["hel??0 h*", "I* * ros*"]
func (*NLPHelper) ScoreBest ¶
ScoreBest Calculate a matching score between a phrase and a check test using expressions. ALL expressions are evaluated. Failed expressions do not add negative score to result. Return best score above all @param [string] phrase. "hello humanity!! I'm Mario rossi" @param [string] expressions. All expressions to match. ["hel??0 h*", "I* * ros*"]
func (*NLPHelper) ScoreOr ¶
ScoreOr Calculate a matching score between a phrase and a check test using expressions. ALL expressions are evaluated. Failed expressions do not add negative score to result @param [string] phrase. "hello humanity!! I'm Mario rossi" @param [string] expressions. All expressions to match. ["hel??0 h*", "I* * ros*"]
func (*NLPHelper) SummarizeLexRank ¶
func (*NLPHelper) SummarizeLexRankHigh ¶
SummarizeLexRankHigh very short text. Response is about 15% of original text
func (*NLPHelper) SummarizeLexRankLow ¶
SummarizeLexRankLow response is about 40% of original text
func (*NLPHelper) SummarizeLexRankMedium ¶
SummarizeLexRankMedium response is about 25% of original text
func (*NLPHelper) Summarizer ¶
func (instance *NLPHelper) Summarizer() *nlp_summarize.Summarizer