doc: better wording in API godoc

Signed-off-by: Alexander Bezzubov <bzz@apache.org>
This commit is contained in:
Alexander Bezzubov 2019-04-03 16:07:14 +02:00
parent b2b61c2a8c
commit df01124e18
No known key found for this signature in database
GPG Key ID: 8039F5787EFCD05D

View File

@ -26,7 +26,7 @@ var DefaultStrategies = []Strategy{
GetLanguagesByClassifier,
}
// DefaultClassifier is a naive Bayes classifier based on Linguist samples.
// DefaultClassifier is a Naive Bayes classifier trained on Linguist samples.
var DefaultClassifier Classifier = &classifier{
languagesLogProbabilities: data.LanguagesLogProbabilities,
tokensLogProbabilities: data.TokensLogProbabilities,
@ -390,8 +390,8 @@ func getDotIndexes(filename string) []int {
return dots
}
// GetLanguagesByContent returns a slice of possible languages for the given content.
// It complies with the signature to be a Strategy type.
// GetLanguagesByContent returns a slice of languages for the given content.
// It is a Strategy that uses a content-based regexp heuristics and a filename extension.
func GetLanguagesByContent(filename string, content []byte, _ []string) []string {
if filename == "" {
return nil