apertium / apertium-python

now you can even use apertium from python
GNU General Public License v3.0
31 stars 27 forks source link

Incorrect double translations #109

Open sheeerio opened 1 year ago

sheeerio commented 1 year ago

Translating from English to Spanish and using the translation back gives out a very different (and incorrect) output.

[In]: apertium.translate('en', 'spa', 'These helps of handy tool believe dummy text for all your needs of design.') [Out]: Estas ayudas de herramienta manejable creen *dummy texto para todas vuestras necesidades de diseño. [In]: apertium.translate('spa', 'en', 'Estas ayudas de herramienta manejable creen *dummy texto para todas vuestras necesidades de diseño.') [Out]: These helps of handy tool believe **dummy text for all your needs of design.

TinoDidriksen commented 1 year ago

If so, your example doesn't show it? Those strings are almost identical. Pasted the wrong thing?

Regardless, the pairs are not meant to roundtrip translations. One direction is often much better than the other direction - sometimes there is only one functional direction at all.

ygorg commented 1 year ago

Maybe it's because of the * characters. Theoretically this should be solved by adding mark_unknown=False. If so, it is linked to #82 and fixed by #111.