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

UrlTextFilter finds not all urls which results into wrong detection #77

Open
nbartels opened this issue Jul 4, 2017 · 0 comments
Open

Comments

@nbartels
Copy link

nbartels commented Jul 4, 2017

I have documents with URLs and added the UrlTextFilter to remove them so I get a good language detection. But on some test data the language detection was wrong or at least with a very low accuracy.

The test document (german text) with the UrlTextFilter shows a propability of 0.15 for german and 0.7 for nl.

The URLs are rather complex with some special chars (brackets and so on) in it. After removing the URLs with a more complex regexp before sending the text to the language detector, the probability for the same text is 0.99 for german.

So I suggest you improve the regular expressions.

I'll try to provide a PR, but have to check this first...

nbartels added a commit to nbartels/language-detector that referenced this issue Jul 8, 2017
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