We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have the following text:
Ein neues Korpus mit Stichtag Juli 2012 wurde Ende des Jahres zugänglich gemacht.
and the following program:
package main import ( "fmt" "github.com/pemistahl/lingua-go" "os" ) func main() { detector := lingua.NewLanguageDetectorBuilder(). FromAllLanguages(). Build() text, err := os.ReadFile(os.Args[1]) if err != nil { panic(err) } stext := string(text) for _, result := range detector.DetectMultipleLanguagesOf(stext) { fmt.Printf("%s: '%s'\n", result.Language(), stext[result.StartIndex():result.EndIndex()]) } }
The output is:
German: 'Ein neues Korpus mit ' Swahili: 'Stichtag Juli ' German: '2012 wurde Ende des Jahres zugänglich gemacht. '
How to work around such problems?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have the following text:
and the following program:
The output is:
How to work around such problems?
The text was updated successfully, but these errors were encountered: