Skip to content

Commit

Permalink
fixing space rule in quotation contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
lynnda-hill committed Jul 25, 2023
1 parent 572bab0 commit fe743c4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/grammarcheckers/grammarchecker.cg3
Original file line number Diff line number Diff line change
Expand Up @@ -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 (<NoSpaceAfterPunctMark>) IF (T:nextWordCrossSent);
ADD:no-space-after-punct (&no-space-after-punct-mark) TARGET (<NoSpaceAfterPunctMark>) 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 (<NoSpaceAfterPunctMark>));
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 (<NoSpaceAfterPunctMark>)) ;
Expand Down

0 comments on commit fe743c4

Please sign in to comment.