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

remove lexeme id fallback translation method; use capitalized word as fallback method #58

Closed
wants to merge 2 commits into from
Closed

remove lexeme id fallback translation method; use capitalized word as fallback method #58

wants to merge 2 commits into from

Conversation

Erich-Reitz
Copy link

No description provided.

@JASchilz
Copy link
Owner

JASchilz commented Oct 27, 2022 via email

@JASchilz
Copy link
Owner

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?

@Erich-Reitz
Copy link
Author

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.
Example:
"Tasche" is the German word for bag
'bag' translates to 'Tasche' and 'Bag' translates to 'Tasche'
'Tasche' translates to 'bag' but 'tasche' has no translation

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 ? 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.

@JASchilz
Copy link
Owner

JASchilz commented Nov 6, 2022 via email

@JASchilz
Copy link
Owner

JASchilz commented Dec 4, 2022

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.

@JASchilz JASchilz closed this Dec 4, 2022
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

Successfully merging this pull request may close these issues.

2 participants