German/English false friend: "on the picture"

I’ve just tried to create my first rule. It should be added to the “false friends” for German users that correct English text. I hope I did everything correctly and am thankful for any feedback.

<rule id="ON_THE_PICTURE" name="On the photo/picture">
 <pattern>
  <marker>
  <token>on</token>
  </marker>
  <token></token>
  <token inflected='yes' regexp='yes'>picture|photo</token>
 </pattern>
 <message>Hinweis: Um das Motiv eines Bildes oder Fotos zu bezeichnen, muss es im Englischen <suggestion>in</suggestion> heißen.</message>
 <url>http://www.learnersdictionary.com/qa/Some-Uses-of-in-and-on-with-Pictures</url>
 <short>Meinten Sie 'in'?</short>
 <example type="incorrect" correction="in">There is a flower <marker>on</marker> the picture.</example>
 <example type="correct">There is a flower <marker>in</marker> the picture.</example>
 <example type="incorrect" correction="In"><marker>On</marker> my picture there is a cow.</example>
 <example type="correct"><marker>In</marker> my picture there is a cow.</example>
</rule>

This would be a great base English rule. False friend rules work in slightly different way (only when you edit text marked in another language).
They are actually easier to create, even though you will have to compile them to check them.
For examples, see:

Thanks for your reply. I think this should be a false friend rule because it’s actually possible to say that there is something “on the picture” in English (e.g. a stain) so this rule can often produce false friends. But if a German learning English writes “on the picture” the possibility is quite high that it’s a false translation from “auf dem Bild”.

I have to admit that I don’t really understand the structure of the false-friends.xml but I’d be glad if somebody added this to the file.

You are welcome. Notice that I was not being pedantic when I referred that it was not a false friend.
If you try your rule in a German text, you will be overwhelmed by spelling errors. If you set your text to English and place this rule in the German grammar.xml, the rule will not trigger.
Some languages have a category equivalent to ‘Translation Errors’. This rule would fit there (if localized to the target language, English in this case).

False friend structure is:

<rulegroup id="ID">
    <rule>
        <pattern lang="XX"><!-- translated language code -->
            <token inflected="yes">false-friend</token>
        </pattern>
        <translation lang="de">false-friend translation</translation>
    </rule>
    <rule>
        <pattern lang="de"><!-- your language -->
            <token inflected="yes">German word similar to the false-friend</token>
        </pattern>
        <translation lang="XX">translation to target language</translation>
    </rule>
</rulegroup>

This is a good place to start:

Just clean the table in Calc/sed/Notepad++ and make a few replacements/greps to get a nice list in instants. The tough part is triaging, finding duplicates and placing the lines in the right place, but it is a great help.
At least, I would thank if you decide to improve German-Portuguese pairs.

You could use a false friend rule like this, but that comes only close:

    <rulegroup id="ON_THE_PHOTO">
        <rule>
            <pattern lang="en">
                <token>on</token>
                <token>the</token>
                <token>photo</token>
            </pattern>
            <translation lang="de">auf dem Foto</translation>
        </rule>
        <rule>
            <pattern lang="de">
                <token>auf</token>
                <token>dem</token>
                <token>Foto</token>
            </pattern>
            <translation lang="en">in the photo</translation>
        </rule>
    </rulegroup>

The user would see this message: Hinweis: "on the photo" (Englisch) bedeutet "auf dem Foto" (Deutsch). Meinten Sie vielleicht 'in the photo'?. So it’s lacking a real explanation. Having a rule in grammar.xml that’s only activated for non-native speakers isn’t supported yet.

I’m afraid this message would be actually confusing rather than helpful.

OK, I misunderstood how the false friend feature works (and even what a false friend actually is). But it was a good exercise anyway :slight_smile:

2 Likes

Yes, please keep going! We are drowning in work. Feedback and suggestions are highly appreciated, but we’re only four people in the German team. That isn’t much for a complicated language.