You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have an input word that is present in both languages, the result is not as expected.
For Example: dict de en test
should output the english translation of test. But it outputs the german ones first:
If I switch both languages the result stays the same: dict en de test
Is this an API issue of dict.cc, or a workflow problem?
The text was updated successfully, but these errors were encountered:
sorry for the late reply. I didn't have notifications enabled for this repo and I'm not checking in that often. Now I'm watching all activity.
Unfortunately the order of languages you're specifying doesn't influence the output. It just indicates in which languages you're interested.
Under the hood the workflow just calls https://www.dict.cc/?s={your-word} and parses the HTML. The page has two columns and to display the results I'm using a simple heuristic. If the word you've entered appears more often in the left column then that's probably the source-language and you're interested in the right results (the target-language).
Now if you're opening https://www.dict.cc/?s=test you see that the left column contains more direct matches to the word test, so the right column will be printed bold as the result.
Is it possible to fix this? Definitely. I'm happy with the 80:20 approach of the simple heuristic, though.
If anyone is interested in improving this workflow I'm more than happy to accept contributions.
If you have an input word that is present in both languages, the result is not as expected.
For Example:
dict de en test
should output the english translation of
test
. But it outputs the german ones first:If I switch both languages the result stays the same:
dict en de test
Is this an API issue of dict.cc, or a workflow problem?
The text was updated successfully, but these errors were encountered: