I’ve been looking to see if I can come up with a rule which can distinguish between the use of suit/suite.
However, it’s a tricky thing since the rules are dependent on the type of object that follows the word.
For example for suit I’ve have…
<rule id="SUIT OF" name="suit of cards" >
<pattern>
<marker>
<token>suite</token>
</marker>
<token>of</token>
<token>playing</token>
<token>cards</token>
</pattern>
<message>Did you mean <suggestion>suit</suggestion> of playing cards?</message>
<url>http://www.oxforddictionaries.com/definition/english/suit</url>
<!-- suit</bold> means a costume, a set of garments, a claim in court, or a set of playing cards bearing the same mark -->
<example type="correct"><marker>suit</marker> of playing cards</example>
<example type="incorrect"><marker>suite</marker> of playing cards</example>
</rule>
<rule id="SUIT OF" name="suit of" >
<pattern>
<marker>
<token>suite</token>
</marker>
<token>of</token>
<token regexp="yes">cards|armour|sails|cards</token>
</pattern>
<message>Did you mean <suggestion>suit</suggestion> of <match no="3"/>?</message>
<url>http://www.oxforddictionaries.com/definition/english/suit</url>
<!-- suit</bold> means a costume, a set of garments, a claim in court, or a set of playing cards bearing the same mark -->
<example type="correct"><marker>suit</marker> of armour</example>
<example type="incorrect"><marker>suite</marker> of armour</example>
</rule>
So as far as I can see this involves identifying all possible objects, which is associated with the word suit.
This seems like an impractical solution.
… and likewise for “suite”
<rule id="SUITE_OF" name="suite of" >
<pattern>
<marker>
<token>suit</token>
</marker>
<token>of</token>
<token regexp="yes">software|rooms|protocols</token>
</pattern>
<message>Did you mean <suggestion>suite</suggestion> of <match no="3"/>?</message>
<url>http://www.oxforddictionaries.com/definition/english/suite</url>
<!-- suite means a musical composition, a staff of attendants, or a set of things that form a unit -->
<example type="correct"><marker>suite</marker> of software</example>
<example type="incorrect"><marker>suit</marker> of software</example>
</rule>
The only easy one was lawsuit…
<rule id="LAWSUIT" name="lawsuit" >
<pattern>
<marker>
<token>law</token>
<token inflected='yes' regexp="yes">suit|suite</token>
</marker>
</pattern>
<message>Did you mean <suggestion>law<match no="2"/></suggestion>?</message>
<example type="correct">The plaintiff brought a <marker>lawsuit</marker> against the defendant</example>
<example type="incorrect">The plaintiff brought a <marker>law suit</marker> against the defendant</example>
</rule>
Any suggestions of an alternative technique which could be used?
I expect there are a number of other words which have a similar issue, i.e. effect/affect/resent/recent so has anyone else encountered this problem before?
The only solution I can think of is an internet phrase search tool which can identify the frequency of different chucks of text on the web or in a database. I believe other grammar tools may use this technique.
I’ve looked at using the Google Web Search API, but this seems to be deprecated now.
Thanks