changes to improve detection accuracy

This commit is contained in:
Manuel Carmona
2017-06-13 13:56:07 +02:00
parent ef03de7adf
commit 1fc8cf7a5d
47 changed files with 279713 additions and 230656 deletions

View File

@ -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
}
}