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

[feature request] add batch invoke #81

Closed
newcworld opened this issue Oct 10, 2022 · 1 comment
Closed

[feature request] add batch invoke #81

newcworld opened this issue Oct 10, 2022 · 1 comment

Comments

@newcworld
Copy link

can I invoke like this

detector.detect_language_of(["languages are awesome", "languages"])
@pemistahl
Copy link
Owner

No, I'm not planning to extend the API like this. I want to keep the API as simple as possible. You can achieve the same by using a list comprehension instead:

texts = ["languages are awesome", "languages"]
detected_languages = [detector.detect_language_of(text) for text in texts]

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

No branches or pull requests

2 participants