Guess the natural language of a text (idiom).
Based on: https://websvn.kde.org/branches/work/sonnet-refactoring/common/nlp/guesslanguage.cpp?view=markup
Download and install it:
go get github.com/jonathansp/guess-language
Import it in your code:
import "github.com/jonathansp/guess-language"
package main
import (
"fmt"
"github.com/jonathansp/guess-language"
)
func main () {
lang, _ := guesslanguage.Parse("We know what we are, but know not what we may be.")
fmt.Print(lang)
}
Jonathan Simon Prates (@jonathansp)