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

Duplicate Translation Output for the Word "enrolled" in Portuguese #428

Open
Siddarth256pi opened this issue Jun 12, 2024 · 0 comments
Open

Comments

@Siddarth256pi
Copy link

Siddarth256pi commented Jun 12, 2024

When translating the word "enrolled" from English to Portuguese, the translation output is repeated multiple times. This behavior was observed using the following code:

import argostranslate.package
import argostranslate.translate

from_code = "en"
to_code = "pt"

# Download and install Argos Translate package
argostranslate.package.update_package_index()
available_packages = argostranslate.package.get_available_packages()
package_to_install = next(
    filter(
        lambda x: x.from_code == from_code and x.to_code == to_code, available_packages
    )
)
argostranslate.package.install_from_path(package_to_install.download())

# Translate
translatedText = argostranslate.translate.translate("enrolled", from_code, to_code)
print(translatedText)

Output:

matriculados matriculados matriculados

Environment:

OS: Windows 11
Python Version: 3.12.3
Argos Translate Version: 1.9.6

Thank you for looking into this issue.

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

1 participant