mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-18 22:23:07 -03:00
changes to improve detection accuracy
This commit is contained in:
@ -31,8 +31,10 @@ func (c *classifier) Classify(content []byte, candidates map[string]float64) map
|
||||
languages = make(map[string]float64, len(candidates))
|
||||
for candidate, weight := range candidates {
|
||||
if lang, ok := GetLanguageByAlias(candidate); ok {
|
||||
languages[lang] = weight
|
||||
candidate = lang
|
||||
}
|
||||
|
||||
languages[candidate] = weight
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user