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

fixed PonsTranslator #201

Merged
merged 1 commit into from
Mar 4, 2023
Merged

Conversation

DrRac27
Copy link
Contributor

@DrRac27 DrRac27 commented Mar 3, 2023

Closes #199

@nidhaloff
Copy link
Owner

@DrRac27 Thanks for the PR. It looks good to me, can you add a short description with some examples in the PR? For example I would be interested in the output of the translate function with and without the return_all parameter.

@DrRac27
Copy link
Contributor Author

DrRac27 commented Mar 4, 2023

You mean here as a comment? Sure:

>>> from deep_translator import PonsTranslator
>>> PonsTranslator(source='en', target='de').translate('tree', return_all=True)
['Baum', 'auf einen Baum klettern', 'Geld wächst nicht an Bäumen', 'nicht mehr ganz dicht sein', 'spinnen', 'Laubfrosch', 'Baum', 'Baumstruktur', 'Baumnetzsystem', 'Auswahlsortierverfahren', 'ein Tier auf einen Baum jagen', 'Borke', 'Rinde', 'Bellen', 'Anblaffen', 'Anschnauzen', 'bellen', 'Hunde die bellen beißen nicht', 'bellen', 'kotzen', 'auf dem Holzweg sein', 'Baum rinde', 'Borke', 'Baum der kürzesten Wege von einer Zone ausgehend', 'Apfelbaum', 'Bananenstaude', 'Flaschenbaum', 'Katzenbaum', 'Weihnachtsbaum', 'Christbaum', 'Holunderstrauch', 'Hollerstrauch', 'Holderblüte', 'Familienstammbaum', 'Tanne', 'Obstbaum', 'Galgenbaum', 'Grasbaum']
>>> PonsTranslator(source='en', target='de').translate('tree')
'Baum'

I also force pushed an update because I seem to have done the pre-commit wrong. It should be correct now.

@nidhaloff nidhaloff merged commit 906c957 into nidhaloff:master Mar 4, 2023
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.

PonsTranslator not working
2 participants