mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-05-23 08:30:07 -03:00
doc: better wording in API godoc
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
This commit is contained in:
parent
b2b61c2a8c
commit
df01124e18
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user