go-lang-detector
go-lang-detector copied to clipboard
Wrong language detected
No longer seems to work
package main
import (
"fmt"
"github.com/chrisport/go-lang-detector/langdet"
"github.com/chrisport/go-lang-detector/langdet/langdetdef"
)
var detector langdet.Detector
func init() {
detector = langdetdef.NewWithDefaultLanguages()
}
func main() {
testString := "do not care about quantity"
result := detector.GetClosestLanguage(testString)
fmt.Println(result)
}
Prints the following results:
> go run ./
hebrew