-
Notifications
You must be signed in to change notification settings - Fork 10
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
remove lexeme id fallback translation method; use capitalized word as fallback method #58
Conversation
Acknowledged and thank you! Will check this out this weekend.
…On Tue, Oct 25, 2022, 10:37 PM Erich Reitz ***@***.***> wrote:
------------------------------
You can view, comment on, or merge this pull request online at:
#58
Commit Summary
- 53dabd4
<53dabd4>
remove endpoint removed by duolingo
- 701c059
<701c059>
remove lexeme id fallback translation method; use capitalize varient as
fallback method
File Changes
(2 files <https://github.com/JASchilz/AnkiSyncDuolingo/pull/58/files>)
- *M* duolingo_sync/duolingo.py
<https://github.com/JASchilz/AnkiSyncDuolingo/pull/58/files#diff-66bc7cfa245252b214d99c2de9f65ef38a0db54f6b7662bc3bf856d6129959bd>
(17)
- *M* duolingo_sync/plugin.py
<https://github.com/JASchilz/AnkiSyncDuolingo/pull/58/files#diff-92c6e4a7fce81e2e3779af98f2b633ef76175130d8df8ce2c0f28de7e5e58ab1>
(19)
Patch Links:
- https://github.com/JASchilz/AnkiSyncDuolingo/pull/58.patch
- https://github.com/JASchilz/AnkiSyncDuolingo/pull/58.diff
—
Reply to this email directly, view it on GitHub
<#58>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABO2Q4AMYOLTSKKIXVOUWKTWFC7P5ANCNFSM6AAAAAAROTXIX4>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hi @Erich-Reitz ! Thanks for looking into and addressing this. I don't touch this code too often, so I've got to build up some context. Does this relate to #57 ? What's the outcome with respect to that issue: you can now get translations for most words? I see your comment on removing https://www.duolingo.com/api/1/dictionary_page?lexeme_id=%s. I see that that's still in the duolingo.py that I pull that file from, but also there's an issue describing how this endpoint is 404'ing. Is that your experience as well? |
Yup! For more context about the PR, in German all nouns are capitalized, so Duolingo likely marks lowercase versions as incorrect. Yet there is no real indication that 'Tasche' should be capitalized when you call
Now, all the words I was pulling have translations. German only. I don't think this change will have impacts for other languages because the lexeme id translation endpoint is broken for all languages. |
Makes a ton of sense, thank you!
I'm pretty swamped, so it might take me a bit to get this fix in. The code
wasn't immediately clear to me, but that might be just that I haven't
touched the code base in a while. In any case, the idea of the fix makes a
lot of sense.
…On Sun, Oct 30, 2022 at 5:32 PM Erich Reitz ***@***.***> wrote:
I see your comment on removing
https://www.duolingo.com/api/1/dictionary_page?lexeme_id=%s. I see that
that's still in the duolingo.py
<https://github.com/KartikTalwar/Duolingo/blob/5ae7cb03069f7c4165fb7260d227507daf461f75/duolingo.py#L615-L631>
that I pull that file from, but also there's an issue describing how this
endpoint is 404'ing <KartikTalwar/Duolingo#120>.
Is that your experience as well?
Yup! For more context about the PR, in German all nouns are capitalized,
so Duolingo likely marks lowercase versions as incorrect.
Example:
"Tasche" is the German word for bag
'bag' translates to 'Tasche'
<https://d2.duolingo.com/api/1/dictionary/hints/en/de?tokens=%5B%22bag%22%5D>
and 'Bag' translates to 'Tasche'
<https://d2.duolingo.com/api/1/dictionary/hints/en/de?tokens=%5B%22Bag%22%5D>
'Tasche' translates to 'bag'
<https://d2.duolingo.com/api/1/dictionary/hints/de/en?tokens=%5B%22Tasche%22%5D>
but 'tasche' has no translation
<https://d2.duolingo.com/api/1/dictionary/hints/de/en?tokens=%5B%22tasche%22%5D>
Yet there is no real indication that 'Tasche' should be capitalized when
you call get_vocabulary (except for the part of speech being "Noun")
{'strength_bars': 4, 'infinitive': None, 'normalized_string': 'tasche', 'pos': 'Noun',
'last_practiced_ms': 1660957546000, 'skill': 'Packing', 'related_lexemes': [], 'last_practiced': '2022-08-20T01: 05: 46Z', 'strength': 0.833545, 'skill_url_title': 'Packing',
'gender': 'Feminine', 'id': 'b9ccc1c0fd841c21d5445e3d64575bc9',
'lexeme_id': 'b9ccc1c0fd841c21d5445e3d64575bc9', 'word_string': 'tasche'},
I don't touch this code too often, so I've got to build up some context.
Does this relate to #57
<#57> ? What's the
outcome with respect to that issue: you can now get translations for most
words?
Now, all the words I was pulling have translations. German only. I don't
think this change will have impacts for other languages because the lexeme
id translation endpoint is broken for all languages.
—
Reply to this email directly, view it on GitHub
<#58 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABO2Q4FKE46MBRAHHDUGALLWF4HSTANCNFSM6AAAAAAROTXIX4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hey @Erich-Reitz ! This work is much appreciated. However, it looks like Duolingo has shut down the APIs that provide translations. See #59 for more information. So I won't be able to use this code. |
No description provided.