diff --git a/tools/grammarcheckers/grammarchecker.cg3 b/tools/grammarcheckers/grammarchecker.cg3 index 154f43941..a4cd1bc4d 100644 --- a/tools/grammarcheckers/grammarchecker.cg3 +++ b/tools/grammarcheckers/grammarchecker.cg3 @@ -1569,9 +1569,11 @@ COPY:double-space-before ("<$2 $1>"v &SUGGESTWF) TARGET ("<(.*)>"r &double-space ## lávvardaga?Bonju - does not work ## ráidovázzimis!Lassin - does not work # 1. Add error tag on punctuation -ADD:no-space-after-punct (&no-space-after-punct-mark) TARGET () IF (T:nextWordCrossSent); +ADD:no-space-after-punct (&no-space-after-punct-mark) TARGET () IF (T:nextWordCrossSent)(NEGATE 0 ( "." CLB) OR ( "?" CLB) OR ( "!" CLB) LINK *1> ("»")); + # 2. Add error tag + &LINK on the following word (part 1 of extending the blue underline to the following word): -ADD:no-space-after-punct-link (&no-space-after-punct-mark &LINK) TARGET (*) IF (T:prevWordCrossSent LINK 0 ()); +ADD:no-space-after-punct-link (&no-space-after-punct-mark &LINK) TARGET (*) IF (T:prevWordCrossSent LINK 0 (&no-space-after-punct-mark) LINK NOT 0 (&LINK))(NEGATE 1 (Num Arab Sg) OR (Num Sem/ID) LINK -1 (";") LINK -1 (Num Arab Sg) LINK *-1 ("ahki") BARRIER (*) - (Num Arab Sg) - (Num Sem/ID) - (";"))(NEGATE 0 (Num Arab Sg) OR (Num Sem/ID) LINK -1 (";") LINK -1 (Num Arab Sg) OR (Num Sem/ID) LINK -1 ("ahki"))(NEGATE 0 COMMA LINK -1 (ABBR Gram/IAbbr))(NEGATE 0 ("!") LINK 1 ("!"))(NEGATE 0 COMMA LINK 1 ("." CLB))(NEGATE 0 ( "." CLB) OR ( "?" CLB) OR ( "!" CLB) LINK *1> ("»")) ; + # 3. Add RIGHT relation on the punctuation (part 2 of extending the blue underline to the following word, # also ensures that the correction will replace the word, not be appended to it): ADDRELATION:no-space-after-punct-rel (RIGHT) (&LINK) FROM (T:prevWordCrossSent LINK 0 ()) ;