package linguistics

// LanguageDetector defines a provider that can detect the language of a text
type LanguageDetector interface {
	// DetectLanguage returns a BCP-47 or ISO-like code and whether detection was confident
	DetectLanguage(text string) (string, error)
}

// SentimentProvider defines a provider that scores sentiment in [-1, 1]
type SentimentProvider interface {
	// Score returns sentiment for the text (optionally using language)
	Score(text string, language string) (float64, error)
}

// KeywordProvider defines a provider that extracts keywords from text
type KeywordProvider interface {
	// Extract returns a list of keywords with relevance in [0,1]
	Extract(text string, language string) ([]Keyword, error)
}
