Is there a way to ensure an article agrees with the adjacent word in a suggestion? For instance, suppose I have the following rule:
<rule id="MIRACULOUS_ESCAPE"> <pattern> <token postag="DT"/> <token min="0" regexp="yes">very|truly|really|wildly</token> <token>miraculous</token> <token>escape</token> </pattern> <message>The phrase is a cliché.</message> <suggestion>\1 escape</suggestion> <example correction="an escape">It was <marker>a very miraculous escape</marker>.</example> </rule>
The rule fails because the suggestion produces “a escape” not “an escape.”
My current workaround involves creating an exception for “a” in DT, then creating another rule that specifically addresses the “a” article as a token, but this does not seem like a best practice. Is there a better way that keeps the rule as one?
I appreciate you!