Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-deterministic output for certain language queries with white list options #11

Open
mikai21 opened this issue Oct 2, 2018 · 1 comment

Comments

@mikai21
Copy link

mikai21 commented Oct 2, 2018

Here is example

package main

import (
    "fmt"
    "github.com/abadojack/whatlanggo"
)

var whitelist_options = whatlanggo.Options{
    Whitelist: map[whatlanggo.Lang]bool{
        whatlanggo.Eng: true,
        whatlanggo.Jpn: true,
        whatlanggo.Kor: true,
        whatlanggo.Vie: true,
        whatlanggo.Ind: true,
        whatlanggo.Cmn: true,
    },
}

func main() {
    info := whatlanggo.DetectWithOptions("appel", whitelist_options)
    fmt.Println("Language:", whatlanggo.LangToString(info.Lang), "Script:", whatlanggo.Scripts[info.Script])
}
@mikai21
Copy link
Author

mikai21 commented Oct 2, 2018

I want to get whole language list If there are same distance(probability).
Or
I want to function that whole languages of probability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant