You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rule r5 { % keep them lovely kebabs coming: leave det(kebabs, them) but mark "them" as Style=Vrnc
pattern {
X[lemma=they];
Y-[det]->X;
}
commands {
X.Style="Vrnc";
}
}
The above rule should apply to 1 token in my data. The pattern works but the command causes an error
GREW-ERROR : [line: 1] More than 10000 rewriting steps: check for loops or increase max_rules value. Last rules are: […r5, r5, r5, r5, r5, r5, r5, r5, r5, r5]
Setting the lemma is not a problem. The "Style" feature is listed in the project settings with "Vrnc" as a possible value, so I'm not sure what's wrong here.
Steps To Reproduce
Run the above rule on English-EWT test set
Error occurs
Project name
No response
Anything else?
No response
What browsers are you seeing the problem on?
Firefox
The text was updated successfully, but these errors were encountered:
This is a well-know issue with rewriting. As a rule may apply several times in different parts of the same sentence, the system applies the rules iteratively until no more application is possible.
With your rule, after the first application, the pattern is still "there" and so the rule can apply again and again (with no effect).
In your case, you have to ensure that this cannot happen. The easiest way is to use a withoutcondition:
rule r5 { % keep them lovely kebabs coming: leave det(kebabs, them) but mark "them" as Style=Vrnc
pattern {
X[lemma=they];
Y-[det]->X;
}
without { X.Style = "Vrnc" }
commands {
X.Style="Vrnc";
}
}
Interesting! Could the error message be made more informative, e.g. "Note that a rule will apply continually as long as its precondition remains true"?
Is there already an issue for this?
Current Behavior
The above rule should apply to 1 token in my data. The pattern works but the command causes an error
Setting the lemma is not a problem. The "Style" feature is listed in the project settings with "Vrnc" as a possible value, so I'm not sure what's wrong here.
Steps To Reproduce
Project name
No response
Anything else?
No response
What browsers are you seeing the problem on?
Firefox
The text was updated successfully, but these errors were encountered: