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

Auto detect source language #9

Closed
ghost opened this issue Jan 10, 2021 · 5 comments
Closed

Auto detect source language #9

ghost opened this issue Jan 10, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Jan 10, 2021

The api currently requests the source language. But it could be nice to have something like source=auto.

@pierotofy pierotofy added enhancement New feature or request help wanted labels Jan 10, 2021
@pierotofy
Copy link
Member

Yep. It's on the roadmap. Also related: argosopentech/argos-translate#9

Consider sponsoring @PJ-Finlay for this feature, or contribute a PR to Argos Translate. Once it's implemented there we can implement it here.

@vemonet
Copy link
Contributor

vemonet commented Jan 12, 2021

Alternatively, it could be implemented with the langdetect library: https://pypi.org/project/langdetect/

from langdetect import detect
detect("War doesn't show who's right, just who's left.")
# Returns 'en'

Not sure how accurate it is though

@pierotofy
Copy link
Member

Oh, interesting. We could add it via this library until support for (better?) detection is available in Argos Translate I suppose. Should be easy to swap it.

If anyone wants to beat me with a pull request for this one.. go for it :)

@vemonet
Copy link
Contributor

vemonet commented Jan 13, 2021

#12 👀

@pierotofy
Copy link
Member

This can be closed! Thanks for the PR @vemonet ! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants