-
Notifications
You must be signed in to change notification settings - Fork 35
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
Don't follow "Did you mean '...'?" redirection #23
Comments
Oh, thanks for reporting. Great catch! I implemented automatic following for redirects, assuming that it would only fire on words without translations (mostly typos.) The "wit" case provides a counter-example --- a page having both translations and a suggestion. It would probably make sense to introduce a new "follow_corrections" option having three variants.
Does it make sense, @fin0? Please let me know if you have any questions, concerns, or suggestions before I start implementing the |
Alright, the flag is implemented, as described above. The changes are live on the testing server. always follow corrections (default and backward-compatible behavior) |
Hello @imankulov, wow that was fast! Thanks a lot for your quick response and implementation. Will do further testing once it is merged into master, but everything looks perfect already :) |
Hey @fin0, for the record, it's already merged with the master branch. |
The flag defines how to treat responses with a 'did you mean' link. - `always` (default): always follow the suggestion if found on a page, even if the page itself has translations. - `never`: never follow the suggested correction. - `on_empty_translations`: only follow the link if there are no translations on the page. Ref: #23
I used linguee-api to search for some translations from English to German and experienced the following problem:
If a word is rare and there is an alternative which is syntactically close and much more frequently used in the language, Linguee offers a "Did you mean '...'?" link at the top of the search results. If this is the case, linguee-api gives the result of the redirection and not the one of the searched word.
Examples (given by the URL linguee-api is querying):
https://www.linguee.com/english-german/search?query=wit&ajax=1
https://www.linguee.com/english-german/search?query=nod&ajax=1
I guess this is not by intention? I don't know, if this behavior occurs on all cases where the result is prefixed with a "Did you mean '...'?" question.
Thanks in advance :)
The text was updated successfully, but these errors were encountered: