Back to LanguageTool Homepage - Privacy - Imprint

This plural


(PeterLawrence) #1

Hi I've developed this rule related to "this" followed by a plural.
It been tested on over 10K sentences, but has a lot of exceptions. What do you think?

<rule id="THIS-NNS" name="This plural">    
         <pattern>
          <token>this</token>
          <token postag='NNS'><exception regexp='yes'>stands|looks|seems|keeps|makes|means|effects|affects|score|leads|genus|finds|results|produces|numbers|helps</exception></token>
         </pattern>
         <message>Did you mean <suggestion><match no="1" /> <match no="2" postag="NN"/></suggestion>?</message>
         <example type="incorrect" correction='This author'><marker>This authors</marker> should rewrite this point.</example>
        </rule>

Thanks


(Daniel Naber) #2

Hi Peter,

if you run this through http://community.languagetool.org/ruleEditor/expert you'll see several more words that could be added as exceptions. Maybe instead of adding exceptions to the second token, one could add e.g. a|the|ADV as an exception to the following token?

Regards
Daniel


(PeterLawrence) #3

OK, I've updated it further...

<rule id="THIS-NNS" name="This plural">

         <pattern>
          <marker>
            <token>this</token>
            <token postag='NNS'><exception postag='NN:UN'></exception></token>
          </marker>
          <token postag='MD'></token>
         </pattern>
         <message>Did you mean <suggestion><match no="1" /> <match no="2" postag="NN"/></suggestion>?</message>
         <example type="incorrect" correction='This author'><marker>This authors</marker> should rewrite this point.</example>
        </rule>

It checks out with rule editor on the web, so will run through wikipedia tool