I was trying to come up with a rule which prohibits plural nouns to follow 'a/an'.
<rule id="A_FOLLOW_PLURAL" name="a/an should not be followed by an expression containing plural nouns"> <pattern> <token regexp="yes" chunk="B-NP-plural">a|an</token> <token chunk="I-NP-plural" min="0" max="4"/> <marker> <token postag="NNS" chunk="E-NP-plural"> </token> </marker> </pattern> <message>'A' or 'an' should not be follwed by an expression containing plural nouns:<suggestion><match no="3" postag="NN"/></suggestion></message> <example type="correct">This work was done by a student.</example> <example type="correct">He was considered as a diamond by many people.</example> <example type="incorrect" correction="company">He had a fight wth a big trading <marker>companies</marker>.</example> </rule>
I know that this rule will not be applicable in many scenarios(a dozen eggs etc.). But I would like to ask, for this rule definition, why is the suggestion not working properly for the incorrect example. It would really help if the answer could be focussed on resolving this error.
I had also referred to the Rule ID ="A_PLURAL", but the rule does not serve the purpose when there are expressions like 'a big trading companies'.