-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Franc is providing wrong language #519
Comments
Maybe we should add a checkbox to our form if the report is for a false positive and if yes, what spam reason was set. This would help us to find the method which is the culprit. |
This was added by me in the meantime: About narrowing down the languages, maybe @MatzeKitt can chime in here and help with the API side. |
Since |
Would look like this:
|
Hey @MatzeKitt as this is a different approach to narrowing down the languages on the API side, configured through the allowed languages in WP/ASB - why are you suggesting this approach? What is the advantage to the other approach? And how complicated would it be to implement one of them? |
It is more flexible since you don’t need to manage a list of languages and test only against them but you simply need to set a threshold. This would also make the code less complex. The complexity of my solution is not high:
Your proposed solution:
Especially the first point can be more complex, since you need to either define it for all available languages or have an additional option for that, which is harder to tell the user what to do (especially since there already is an option with languages). |
Isn't this already there?
Why do you think this need to be an additional setting?
There is an |
A list of languages you want is completely different from languages franc should be able to detect. At least in my point of view. I don't know how franc behaves if you e.g. define only English and German but submit a French text. Since you would only allow English or German, I assume that franc would only output these two languages – both with a relatively low score. That wouldn’t help anything, thus you would need to define similar languages (e.g. Scottish should behave the same as English, etc.) From my point of view, limiting franc in its detection would not help us here at all. |
My thought was to eliminate variants (Scots vs. English, Swiss vs. German, etc.) not typical widespread languages, like French in your example. But I see the complexity of this idea. My first look would be to check which package of franc we are using. There are three, based on amount of speakers: 82 -> 8 million or more speakers But I am fine with whatever is working best. I hoped this would be a small change (franc to franc-min for example) and could be fixing the issue reported.
Going this route means, if I understand the workflow correctly, that we need to have a second version for the API to distinguish between v1 requests (only 1 language in return, like now) and v2 requests (multiple languages in return) and we need to build the corresponding part in ASB to react accordingly. Correct? |
I’m not a fan of managing languages available in franc. Especially since we don’t know any variants (of course, we know variants of European languages, but what about variants of e.g. African languages?). So it wouldn’t be a one-time job. My alternative is a one-time change. And yes, we would need a second version for the API, but that’s a no-brainer and done in under an hour. The main work needs to be done in ASB itself, but I also consider this as relatively light work. I could also implement it myself, if we agree on this solution. |
Language management or mapping can be a pain or at least a huge amount of maintenance required at scale. Yes, you can probably cover a great majority of problems with a handful or two of languages (or language families), but definitely not all. +1 for a language list. Maybe capped at 3, 5 or whatever reasonable number of results) and a threshold. Thinking further one might be able to build a rule that explicitly covers mixed language comments (e.g. badly auto-translated stuff) or "no language" (emojis or just random or encoded content, nothing with sufficient confidence) but that's just a quick thought. |
Describe the bug
If I use the content from Line 962/F provided via our report form I get not English but
sco
(Scots) reported and not English.Therefore the lang check is marking the comment as spam. (Needs reproducing.)
Maybe we need to narrow the languages down.
See: https://github.com/wooorm/franc#options
First reported in the forums: https://wordpress.org/support/topic/what-to-do-about-false-positives/
The text was updated successfully, but these errors were encountered: