LibreTranslate icon indicating copy to clipboard operation
LibreTranslate copied to clipboard

French word not recognised

Open zaouch opened this issue 4 years ago • 5 comments

Hi, I have used the translate.argosopentech.com API to translate french into english but got the same french sentence returned.

The sentence was: "Tout philosophe a deux philosophies : la sienne et celle de Spinoza."

As soon as I cut "la sienne et celle de spinoza" off the text, I get a successful french to english translation. This isn't the first I get this bug. Maybe it hasn't been trained a big french dataset.

zaouch avatar Apr 16 '22 11:04 zaouch

Hi @zaouch , when going through the UI https://translate.argosopentech.com/ it is properly translated everytime

I am getting "every philosopher has two philosophies: his and spinoza" (nice quote btw)

Could you share the snippet of code to reproduce the error please?

vemonet avatar Apr 21 '22 18:04 vemonet

same, i have no translation error

image

dingedi avatar Apr 21 '22 20:04 dingedi

@vemonet Here is the code to reproduce the error:

              const res = await fetch("https://translate.argosopentech.com/translate", {
                   method: "POST",
                   body: JSON.stringify({
                       q: "Tout philosophe a deux philosophies : la sienne et celle de Spinoza.",
                       source: "auto",
                       target: "en",
                       format: "text"
                   }),
                   headers: { "Content-Type": "application/json" }
               });

               var translated = await res.json();

ghost avatar Apr 21 '22 20:04 ghost

Okay, setting source to "fr" makes the error disappear. Automatic language detection should be fixed.

ghost avatar Apr 21 '22 20:04 ghost

We'd welcome contributions to improve auto-language detection. :pray:

pierotofy avatar Apr 21 '22 22:04 pierotofy

For context: lingua-py does detect this as french with a ConfidenceValue of 0.707637394161458 (all languages it can detect considered)

schrmh avatar Jan 17 '23 11:01 schrmh