<rule id="ARRIVE_NNP" name="arrive nnp (arrive in nnp)">
<pattern>
<token>arrive</token>
<token postag='NNP'></token>
</pattern>
<message>Did you mean <suggestion> arrive in </suggestion></message>
<short>Grammatical problem</short>
<example correction=''>I would like to see flight <marker>arrive Dallas</marker> next day.</example>
<example>I would like to see flight arrive in Dallas next day.</example>
</rule>
<rule id="WILL_LIKE_TO" name="will like to (would like to)">
<pattern>
<token postag='PRP'></token>
<marker>
<token>will</token>
</marker>
<token>like</token>
<token>to</token>
</pattern>
<message>Did you mean <suggestion> would like to </suggestion>?</message>
<short>Grammatical problem</short>
<example correction=''>I <marker>will like to</marker> do something.</example>
<example>I would like to do something.</example>
</rule>
<rule id="THE_NN_AND_THE_NN" name="the nn and the nn is(the nn and the nn are)">
<pattern>
<token>the</token>
<token postag='NN'></token>
<token>and</token>
<token>the</token>
<token postag='NN'></token>
<marker>
<token>is</token>
</marker>
</pattern>
<message>Did you mean <suggestion>are</suggestion>?</message>
<example correction=''>The plane and the train <marker>is</marker> fast.</example>
<example>The plane and the train are fast.</example>
</rule>
The rule editor can only check against a small number of sentences for performance reasons, that’s why I was asking if you could check against a larger number, as documented in our Wiki.
<rule id="BUY_VBG" name="buy+vbg(by+vbg)">
<pattern>
<marker>
<token>buy</token>
</marker>
<token postag='VBG'><exception>cooking</exception></token>
</pattern>
<message>Did you mean <suggestion>by</suggestion>?</message>
<example correction=''>We exploit these two feature <marker>buy</marker> using Named Entity recognition.</example>
<example>We exploit these two feature by using Named Entity recognition.</example>
</rule>
<rule id="A_GREAT_NUMBER_OF+NN" name="a great number of+nn(nns)">
<pattern>
<token>a</token>
<token>great</token>
<token>number</token>
<token>of</token>
<marker>
<token postag='NN'><exception>cars</exception></token>
</marker>
</pattern>
<message>Did you mean<suggestion> <match no="5" postag = "NNS"/></suggestion>?</message>
<example correction=''>A great number of <marker>problem</marker> have arisen.</example>
<example>A great number of problems have arisen.</example>
</rule>
<rule id="MANY_KINDS_OF" name="many kinds of+nn(many kinds of+nns)">
<pattern>
<token>many</token>
<token>kinds</token>
<token>of</token>
<token postag='NN'></token>
</pattern>
<message>Did you mean <suggestion><match no="4" postag="NNS" /></suggestion> ?</message>
<example correction=''>There are <marker>many kinds of book</marker> in the shop.</example>
<example>There are many kinds of books in the shop.</example>
</rule>
Thanks. This causes a false alarm with “How Many Kinds Of Immigrant Visas Does It Take To Staff A Startup?”. At Text Analysis - LanguageTool you can see how this gets analyzed and that the plural phrase “immigrant visas” is detected. Maybe you could use the “” to improve the rule to not detect false alarms? (for this, you need to switch to the “expert mode” and edit the XML directly).
<!-- English rule, 2015-04-15 -->
<rule id="MANY_KINDS_OF_NN" name="many kinds of+nn(many kinds of+nns)">
<antipattern>
<token chunk="B-NP-plural"/>
<token chunk="E-NP-plural"/>
</antipattern>
<pattern>
<token>many</token>
<token>kinds</token>
<token>of</token>
<token postag='NN'></token>
</pattern>
<message>Did you mean <suggestion><match no="4" postag="NNS" /></suggestion> ?</message>
<example correction=''>There are <marker>many kinds of book</marker> in the shop.</example>
<example>There are many kinds of books in the shop.</example>
</rule>
<!-- English rule, 2015-04-17 -->
<rulegroup id="AFFORD_VB" name="'afford', 'choose', 'deserve', 'pretend', 'learn', 'strive' and 'struggle' used with base form instead of infinitive">
<rule>
<pattern>
<token inflected="yes" regexp="yes">afford|choose|deserve|pretend|strive|struggle|learn</token>
<marker>
<token postag="VB"><exception>reward</exception></token>
</marker>
</pattern>
<message>This verb used with infinitive: <suggestion>to <match no="2" postag="VB"></match></suggestion>.</message>
<short>Grammatical problem</short>
<example>We cannot afford to spend the whole month in Alps.</example>
<example>He didn't deserve to lose his job.</example>
<example correction="to spend">We cannot afford <marker>spend</marker> the whole month in Alps.</example>
</rule>
<rule>
<pattern>
<token inflected="yes" regexp="yes">afford|choose|deserve|pretend|strive|struggle|learn</token>
<token>not</token>
<marker>
<token postag="VB"></token>
</marker>
</pattern>
<message>This verb used with infinitive: <suggestion>to <match no="3" postag="VB"></match></suggestion>.</message>
<short>Grammatical problem</short>
<example>We cannot afford not to spend the whole month in Alps.</example>
<example correction="to spend">We cannot afford not <marker>spend</marker> the whole month in Alps.</example>
</rule>
</rulegroup>
<rule id="ID" name="">
<pattern>
<token inflected='yes'>it</token>
<token>is</token>
<token postag='JJ'><exception>subject</exception></token>
<token postag='IN'><exception>for</exception></token>
<token postag='NNS|NN' postag_regexp='yes'></token>
</pattern>
<message>Did you mean <suggestion> for</suggestion>?</message>
<example correction=''><marker>It is important with students</marker> to obtain part-time jobs.</example>
<example>It is important for students to obtain part-time jobs.</example>
</rule>
<rule id="ID" name="">
<pattern>
<token>is</token>
<token>it</token>
<token postag='JJ'><exception>subject</exception></token>
<token postag='IN'><exception>for</exception></token>
<token postag='NNS|NN' postag_regexp='yes'></token>
</pattern>
<message>Did you mean <suggestion> for</suggestion>?</message>
<example correction=''>Why <marker>is it important with students</marker> to obtain part-time jobs?</example>
<example>Why is it important for students to obtain part-time jobs?</example>
</rule>