abadojack / whatlanggo

Natural language detection library for Go
MIT License
637 stars 64 forks source link

Non-deterministic output for certain language queries #9

Open rylans opened 6 years ago

rylans commented 6 years ago

I've found that lang := whatlanggo.Detect("wondering if this works").Lang fmt.Println(whatlanggo.LangToString(lang))

prints "eng" about 75% of the time but it prints "nld" 25% of the time.

Maybe the randomness is introduced by using maps since in go, map keys are randomized.