mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-07-12 04:09:48 +00:00
doc: better wording in API godoc
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
This commit is contained in:
@ -26,7 +26,7 @@ var DefaultStrategies = []Strategy{
|
|||||||
GetLanguagesByClassifier,
|
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{
|
var DefaultClassifier Classifier = &classifier{
|
||||||
languagesLogProbabilities: data.LanguagesLogProbabilities,
|
languagesLogProbabilities: data.LanguagesLogProbabilities,
|
||||||
tokensLogProbabilities: data.TokensLogProbabilities,
|
tokensLogProbabilities: data.TokensLogProbabilities,
|
||||||
@ -390,8 +390,8 @@ func getDotIndexes(filename string) []int {
|
|||||||
return dots
|
return dots
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetLanguagesByContent returns a slice of possible languages for the given content.
|
// GetLanguagesByContent returns a slice of languages for the given content.
|
||||||
// It complies with the signature to be a Strategy type.
|
// It is a Strategy that uses a content-based regexp heuristics and a filename extension.
|
||||||
func GetLanguagesByContent(filename string, content []byte, _ []string) []string {
|
func GetLanguagesByContent(filename string, content []byte, _ []string) []string {
|
||||||
if filename == "" {
|
if filename == "" {
|
||||||
return nil
|
return nil
|
||||||
|
Reference in New Issue
Block a user