Back to LanguageTool Homepage - Privacy - Imprint

New redundant rule: free gift


(andrew ziem) #1
<rule id="FREE_GIFT" name="free gift">
 <pattern>
  <token>free</token>
  <token>gift</token>
 </pattern>
 <message>Shorten this redundant phrase to <suggestion>gift</suggestion>.</message>
 <url>https://en.wikipedia.org/wiki/Pleonasm</url>
 <example correction=''>Receive a <marker>free gift</marker> with every purchase.</example>
 <example>Receive a gift with every purchase.</example>
</rule>

(Mike Unwalla) #2

Thanks Andrew.

I will add the rule as soon as possible. (I have a problem with GitHub, so I cannot add the rule now.)

Thanks for your contribution.


(andrew ziem) #3

Hi Mike,

OK, thank you. It was interesting to create this rule in XML.

I could list many redundant phrases and other rules, but I probably could not find the time to code them into XML. Is there another good way to suggest them for submission? For example I group them into chunks and could post them here or as GitHub issues.

Here are two good sources for more rules
1. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4522609/
2. https://en.wikipedia.org/wiki/Pleonasm

Andrew


(andrew ziem) #4

One more source: https://en.wikipedia.org/wiki/Auto-antonym


(Mike Unwalla) #5

Hi Andrew,

LT has a rule editor, which can help you to create a rule: http://community.languagetool.org/ruleEditor2/. If you have many rules, using the rule editor is slow.

You could automate the rule-creation process. I have an Excel spreadsheet in which I keep the source data for rules. I convert the source data into XML rules using PowerGrep (http://www.powergrep.com/). (This method is not good for all types of rule.)

If automation is not possible for you, add a group of proposed rules to a post in the forum. I will then convert the proposed rules to XML.


(Daniel Naber) #6

If there are many rules and they have all the same structure and the same message we might also write a Java rule. This way we don't repeat the XML.


(Mike Unwalla) #7

A nice feature in LanguageTool Options would be to show which rules are coded in Java and which rules are in the XML.


(Daniel Naber) #8

You can see this on http://community.languagetool.org/rule/list?lang=en when you click on one of the links. There's either a "Pattern" or a link to a Java rule.


(Mike Unwalla) #9

Andrew,

I added a rule for 'free gift'. It should be in the build tonight (https://languagetool.org/download/snapshots/?C=M;O=D).