Add exception to rules

Hi,
I am trying to add an exception to the rule THERE_RE_MANY[6] which catches
“there are a variety …” and suggests there is a variety.
(and a few others of this sort, where I would like the tool to ignore some words from a general rule.)

I see that I have to add a rule to grammar.xml, and the tutorial on site seem to suggest that may be added either as a disambiguation or an exception.

I searched for other examples where this was done, and came up with a blank. Could any one please point me to an example of this sort, where specific words are ignored from a general rule? (for exampe for the THERE_RE_MANY[6] in grammar.xml)?

Regards,
Rahul

Thanks for your interest in improving the rules. I think this should work:

variety

If you manage to improve the rules, please send your result to me or post it here in the forum.

Thank you very much, that worked, :slight_smile:

Now I have a related question. The pattern “public goods” is caught by POSSESIVE_APOSTROPHE, and I want to add an exception that would fire only if the preceding word is public or private (or an adjective.). How do I do that?

if you could explain both (catching a specific sequence and catching a part of speech) that would be really great.

Rahul

On Mo 21.01.2013, 17:06:29 you wrote:

Now I have a related question. The pattern “public goods” is caught by
POSSESIVE_APOSTROPHE, and I want to add an exception that would fire only
if the preceding word is public or private (or an adjective.). How do I
do that?

Which sentence exactly triggered an error with that pattern? I couldn’t
reproduce that here. I don’t have time to test it, but “not like …” works
with negate=“yes”, and several words can be matched with the pipe symbol
(|) when regexp=“yes” is activated. Something like this maybe:

public|private

Regards
Daniel


http://www.danielnaber.de

The sentence is:
“The social loafing is similar to the effect of public goods dilemma”
The error is
1.) 1 55 Rule ID: POSSESIVE_APOSTROPHE[1]
Message: Possible typo: apostrophe is missing. Did you mean ‘goods’’ or ‘good’s’?
Suggestion: goods’; good’s
…l loafing is similar to the effect of public goods dilemma

I am not sure where to place the token negate definition you gave. Where should I place it in the pattern? When I looked at the other negate examples, they seem to indicate that negate works by turning off matching if a pattern was found before the pattern to be matched is found. In this case, I want to exclude a particular match from the tokens. Any idea?

Regards,
Rahul

On Do 24.01.2013, 21:39:37 you wrote:

The sentence is:
“The social loafing is similar to the effect of public goods dilemma”

As there is already an exception on the token before “goods” (the one
inside …) you can add another one:

So instead of

you can use

public|private

Regards
Daniel


http://www.danielnaber.de

Thank you, that worked.