import "github.com/olivia-ai/olivia/analysis"
const DontUnderstand = "don't understand"
Arrange check the format of a string to normalize it, put the string to lower case, remove ignored characters
LogResults print in the console the sentence and its tags sorted by prediction
RandomizeResponse takes the entry message, the response tag and the token and returns a random message from res/intents.json where the triggers are applied
Organize intents with an array of all words, an array with a representative word of each tag and an array of Documents which contains a word list associated with a tag
type Intent struct { Tag string `json:"tag"` Patterns []string `json:"patterns"` Responses []string `json:"responses"` Context string `json:"context"` }
SerializeModulesIntents retrieves all the registered modules and returns an array of Intents
NewSentence returns a Sentence object where the content has been arranged
func (sentence Sentence) Calculate(cache gocache.Cache, network neuralnet.NeuralNetwork, token string) (string, string)
Calculate send the sentence content to the neural network and returns a response with the matching tag
func (sentence Sentence) PredictTag(network neuralnet.NeuralNetwork) string
Classify the sentence with the model
Tokenize returns the sentence split in stemmed words
WordsBag retrieves the intents words and returns the sentence converted in a bag of words
Package analysis imports 14 packages (graph) and is imported by 2 packages. Updated 2019-08-09. Refresh now. Tools for package owners.