Back to LanguageTool Homepage - Privacy - Imprint

Help for simple Exclusion rule in bitext.xml


(Jörg Beisiegel) #1

Hello,
I have a simple use case that I do not get resolved. I want to check, if terminology in the source has been translated accordingly. I want do do this as follows:
- Please report Translation Units that have "XXX" in the source and that do not have "YYY" in the target.

When I use the following rule, I get a message for every target token instead of only one message per source occurence of the checked term.
Any help would be greatly appreciated.

My example so far:

<!--rule lang="de" id="RIBBON" name="EN: ribbon, DE not translated with 'Multifunktionsleiste'" type="terminology">


ribbon


Multifunktionsleiste


EN: 'ribbon': Change DE: '\1' to 'Multifunktionsleiste'

ribbon
nicht 'Multifunktionsleiste'


riboon
Multifunktionsleiste

Regards,
Jörg


(Daniel Naber) #2

I think that's just the way the logic currently works: if the source pattern matches, you get the matches of the target pattern as if it was a common rule. I don't see how to express "a word doesn't appear anywhere in this sentence" just with pattern rules. You could probably write a simple Java extension using the new "Rule Filter" feature: http://wiki.languagetool.org/development-overview#toc17


(Jörg Beisiegel) #3

Thank you for clarifying. I was hoping to cover this Quality check item without Java programming as I have some experience in XQuery/Xpath and Regular Expressions but have no experience with Java programming.

Thank you very much for your hard work with LanguageTool :smile:

Regards,
Jörg