Open MikeUnwalla opened 2 years ago
All the words in the exception (except 'actor') are not ignored by the rule.
<rule id="INFLECTED_EXCEPTION_TESTv2" name="Inflected exception test v2">
<pattern>
<token regexp="yes">[a-z].+
<exception regexp="yes" inflected="yes">actor|backdated|bated|bifidobacteria|binoculars|blubbering|blubbing|calipers|callipers|carousing|cognoscenti|cyanobacteria|debarred|doth|earnings|errata|Europeanised|Europeanized|goggles|innings|keyboarding|me|measles|minima|minutiae|mollified|moneys|nos|overpriced|pajamas|Parkerised|Parkerises|Parkerising|pyjamas|sated|shrouded|slaked|snooping|spectacles|stats|stokes|surefire|throes|transfixing|unfreezing|unshackled|us</exception>
</token>
</pattern>
<message>This is a word.</message>
<example type="incorrect"><marker>test</marker></example>
<example type="correct"><marker>actor</marker></example>
<example type="triggers_error"><marker>backdated</marker></example>
<example type="triggers_error"><marker>bated</marker></example>
<example type="triggers_error"><marker>bifidobacteria</marker></example>
<example type="triggers_error"><marker>binoculars</marker></example>
<example type="triggers_error"><marker>blubbering</marker></example>
<example type="triggers_error"><marker>blubbing</marker></example>
<example type="triggers_error"><marker>calipers</marker></example>
<example type="triggers_error"><marker>callipers</marker></example>
<example type="triggers_error"><marker>carousing</marker></example>
<example type="triggers_error"><marker>cognoscenti</marker></example>
<example type="triggers_error"><marker>cyanobacteria</marker></example>
<example type="triggers_error"><marker>debarred</marker></example>
<example type="triggers_error"><marker>doth</marker></example>
<example type="triggers_error"><marker>earnings</marker></example>
<example type="triggers_error"><marker>errata</marker></example>
<example type="triggers_error"><marker>Europeanised</marker></example>
<example type="triggers_error"><marker>Europeanized</marker></example>
<example type="triggers_error"><marker>goggles</marker></example>
<example type="triggers_error"><marker>innings</marker></example>
<example type="triggers_error"><marker>keyboarding</marker></example>
<example type="triggers_error"><marker>me</marker></example>
<example type="triggers_error"><marker>measles</marker></example>
<example type="triggers_error"><marker>minima</marker></example>
<example type="triggers_error"><marker>minutiae</marker></example>
<example type="triggers_error"><marker>mollified</marker></example>
<example type="triggers_error"><marker>moneys</marker></example>
<example type="triggers_error"><marker>nos</marker></example>
<example type="triggers_error"><marker>overpriced</marker></example>
<example type="triggers_error"><marker>pajamas</marker></example>
<example type="triggers_error"><marker>Parkerised</marker></example>
<example type="triggers_error"><marker>Parkerises</marker></example>
<example type="triggers_error"><marker>Parkerising</marker></example>
<example type="triggers_error"><marker>pyjamas</marker></example>
<example type="triggers_error"><marker>sated</marker></example>
<example type="triggers_error"><marker>shrouded</marker></example>
<example type="triggers_error"><marker>slaked</marker></example>
<example type="triggers_error"><marker>snooping</marker></example>
<example type="triggers_error"><marker>spectacles</marker></example>
<example type="triggers_error"><marker>stats</marker></example>
<example type="triggers_error"><marker>stokes</marker></example>
<example type="triggers_error"><marker>surefire</marker></example>
<example type="triggers_error"><marker>throes</marker></example>
<example type="triggers_error"><marker>transfixing</marker></example>
<example type="triggers_error"><marker>unfreezing</marker></example>
<example type="triggers_error"><marker>unshackled</marker></example>
<example type="triggers_error"><marker>us</marker></example>
</rule>
Removeinflected="yes"
and the rule operates correctly.
The testrules tests pass for this rule:
Because of the exception, the last sentence should not trigger an error.
If I change the exception to use a regexp, the last sentence does not trigger an error:
<exception regexp="yes">moments?</exception>