@@ -708,11 +708,11 @@ interface.
708
708
709
709
We can add a suggestion as well with a ` COPY ` rule:
710
710
711
- COPY:msyn-hallan (Inf & SUGGEST) EXCEPT (Imprt Pl1 Dial/-KJ) TARGET (Imprt Pl1 Dial/-KJ &real-hallan) ;
711
+ COPY:msyn-hallan (Inf SUGGEST) EXCEPT (Imprt Pl1 Dial/-KJ) TARGET (Imprt Pl1 Dial/-KJ &real-hallan) ;
712
712
713
713
This creates a new reading where the tags ` Imprt Pl1 Dial/-KJ ` have
714
- been changed into ` Inf & SUGGEST ` (and other tags are unchanged). The
715
- ` & SUGGEST` tag is necessary to get ` divvun-suggest ` (the ` <suggest> `
714
+ been changed into ` Inf SUGGEST ` (and other tags are unchanged). The
715
+ ` SUGGEST ` tag is necessary to get ` divvun-suggest ` (the ` <suggest> `
716
716
module) to try to generate a form from that reading. It is smart
717
717
enough to skip things like weights, tracing and syntax tags when
718
718
trying to suggest, but all morphological tags need to be correct and
@@ -824,7 +824,7 @@ instead of deleting the word "dego" to the left, we should change the
824
824
case of the word "lávvomuorran" from essive to nominative case:
825
825
826
826
ADD (&syn-dego-nom) TARGET Ess IF (-1 ("dego"));
827
- COPY (Sg Nom & SUGGEST) EXCEPT (Ess) TARGET (&syn-dego-nom) ;
827
+ COPY (Sg Nom SUGGEST) EXCEPT (Ess) TARGET (&syn-dego-nom) ;
828
828
829
829
Here we want to keep the suggestions for ` &syn-dego-nom ` separate from
830
830
the suggestions for ` &syn-not-dego ` – in particular, we don't want to
@@ -836,12 +836,12 @@ same time. But if we use the above rules, CG gives us this output:
836
836
:
837
837
"<lávvomuorran>"
838
838
"lávvomuorra" N Ess @COMP-CS< &syn-not-dego ID:12 R:DELETE1:11
839
- "lávvomuorra" N Sg Nom @COMP-CS< &syn-dego-nom ID:12 R:DELETE1:11 & SUGGEST
839
+ "lávvomuorra" N Sg Nom @COMP-CS< &syn-dego-nom ID:12 R:DELETE1:11 SUGGEST
840
840
841
841
Notice how the DELETE relation is on both readings, and also how how
842
842
the relation target id (` 11 ` ) refers to a cohort, not a reading of a
843
843
cohort. There is no way from this output to know that "dego" should
844
- not also be deleted from the ` & SUGGEST` reading.
844
+ not also be deleted from the ` SUGGEST ` reading.
845
845
846
846
So when there are such multiple alternative interpretations for errors
847
847
spanning multiple words, the less central parts ("dego" above) need a
@@ -873,7 +873,7 @@ changed to "boahtit" (infinitive). Alternatively, only the first part
873
873
is changed and the second part remains unchanged. In this case we can
874
874
change the "soaitá" (3.Sg.) to the adverb "kánske".
875
875
876
- As usual, this requires ` & SUGGEST` readings for the parts that are two
876
+ As usual, this requires ` SUGGEST ` readings for the parts that are two
877
877
be changed, and one unique error tag for each interpretation, ie.
878
878
` &msyn-kánske ` for the "Kánske boađán" correction and
879
879
` &msyn-fin_fin-fin_inf ` for the "Soaittán boahtit" correction.
@@ -966,7 +966,7 @@ Then you can first of all turn that blanktag tag into an error tag with
966
966
967
967
Now, we could just suggest a wordform on the comma and call it a day:
968
968
969
- COPY ("<, >" & SUGGESTWF) TARGET ("," &no-space-after-punct-mark) ;
969
+ COPY ("<, >" SUGGESTWF) TARGET ("," &no-space-after-punct-mark) ;
970
970
971
971
but that will
972
972
@@ -996,7 +996,7 @@ word is a "link" word. In the above rules,
996
996
997
997
Then we can add a suggestion that puts a space between the forms:
998
998
999
- COPY:no-space-after-punct ("<$1 $2>"v & SUGGESTWF)
999
+ COPY:no-space-after-punct ("<$1 $2>"v SUGGESTWF)
1000
1000
TARGET ("<(.*)>"r &no-space-after-punct-mark)
1001
1001
IF (1 ("<(.*)>"r))
1002
1002
(NOT 0 (co&no-space-after-punct-mark))
@@ -1014,7 +1014,7 @@ We don't put a suggestion-tag on the `co&` cohort (here the word
1014
1014
` <ja> ` ), which would lead to some strange suggestions since it is
1015
1015
already part of the suggestion-tag on the comma ` <,> ` cohort. See
1016
1016
[ How underlines and replacements are built] ( #orgb25740d ) for more
1017
- on the relationship between ` & SUGGESTWF` and replacements.
1017
+ on the relationship between ` SUGGESTWF ` and replacements.
1018
1018
1019
1019
Now the output is
1020
1020
@@ -1024,7 +1024,7 @@ Now the output is
1024
1024
"3" Num Arab Sg Ill Attr @HNOUN
1025
1025
"<,>"
1026
1026
"," CLB <NoSpaceAfterPunctMark> &no-space-after-punct-mark ID:3 R:RIGHT:4
1027
- "," CLB <NoSpaceAfterPunctMark> "<, ja>" &no-space-after-punct-mark & SUGGESTWF ID:3 R:RIGHT:4
1027
+ "," CLB <NoSpaceAfterPunctMark> "<, ja>" &no-space-after-punct-mark SUGGESTWF ID:3 R:RIGHT:4
1028
1028
"<ja>"
1029
1029
"ja" CC @CNP co&no-space-after-punct-mark ID:4
1030
1030
@@ -1126,17 +1126,17 @@ Note that the readings added by the speller don't include any error
1126
1126
tags (tags with ` & ` in front). To turn these readings into error
1127
1127
underlines and actually show the suggestions, add a rule like
1128
1128
1129
- ADD (&typo & SUGGESTWF) (<spelled>) ;
1129
+ ADD (&typo SUGGESTWF) (<spelled>) ;
1130
1130
1131
- to the grammar checker CG. The reason we add ` & SUGGESTWF` and not
1132
- ` & SUGGEST` is that we're using the wordform-tag directly as the
1131
+ to the grammar checker CG. The reason we add ` SUGGESTWF ` and not
1132
+ ` SUGGEST ` is that we're using the wordform-tag directly as the
1133
1133
suggestion, and not sending each analysis through the generator (as
1134
- ` & SUGGEST` would do). See also the next section on how replacements
1134
+ ` SUGGEST ` would do). See also the next section on how replacements
1135
1135
are built. So if, after disambiguation and grammarchecker CG's, we had
1136
1136
1137
1137
"<coffes>"
1138
- "coffee" N Pl <W:37.3018> <WA:17.3018> <spelled> "<coffees>" &typo & SUGGESTWF
1139
- "coffer" N Pl <W:39.1010> <WA:17.3018> <spelled> "<coffers>" &typo & SUGGESTWF
1138
+ "coffee" N Pl <W:37.3018> <WA:17.3018> <spelled> "<coffees>" &typo SUGGESTWF
1139
+ "coffer" N Pl <W:39.1010> <WA:17.3018> <spelled> "<coffers>" &typo SUGGESTWF
1140
1140
1141
1141
then the final ` divvun-suggest ` step would simply use the contents of
1142
1142
the tags
@@ -1181,38 +1181,38 @@ different parts of the error](#orge26043f) for more info on this.
1181
1181
By default, * a cohort's word form is used to construct the
1182
1182
replacement* . So if we have the sentence "we was" where "was" is
1183
1183
** central** and tagged ` &typo ` , and there's a ` LEFT ` relation to "we",
1184
- then the default replacement if there were no ` & SUGGEST` tags would
1184
+ then the default replacement if there were no ` SUGGEST ` tags would
1185
1185
simply be the input "we was" (which would be filtered out since it's
1186
1186
equal, giving no suggestions).
1187
1187
1188
- If we now add a ` & SUGGEST` reading on "we" that generates "he" then we
1189
- get a "he was" suggestion. ` & SUGGEST` readings with matching
1188
+ If we now add a ` SUGGEST ` reading on "we" that generates "he" then we
1189
+ get a "he was" suggestion. ` SUGGEST ` readings with matching
1190
1190
(co-)error tags are prioritised over input word form.
1191
1191
1192
- If we also have a ` & SUGGEST` for was→are for the possible replacment
1192
+ If we also have a ` SUGGEST ` for was→are for the possible replacment
1193
1193
"we are" (tagged ` &agr ` ) – now we don't want both of these to apply at
1194
1194
the same time giving * "we is". In this case, we need to ensure we have
1195
- disambiguating ` co&errtype ` tags on the ` & SUGGEST` readings. The
1195
+ disambiguating ` co&errtype ` tags on the ` SUGGEST ` readings. The
1196
1196
following CG parse:
1197
1197
1198
1198
"<we>"
1199
1199
"we" Prn &agr ID:1 R:RIGHT:2
1200
- "he" Prn & SUGGEST co&agr-typo ID:1 R:RIGHT:2
1200
+ "he" Prn SUGGEST co&agr-typo ID:1 R:RIGHT:2
1201
1201
:
1202
1202
"<was>"
1203
1203
"be" V 3Sg &agr-typo ID:2 R:LEFT:1
1204
- "be" V 3Pl co&agr & SUGGEST ID:2 R:LEFT:1
1204
+ "be" V 3Pl co&agr SUGGEST ID:2 R:LEFT:1
1205
1205
1206
1206
will give us all and only the suggestions we want ("he was" and "we
1207
1207
were", but not * "he were").
1208
1208
1209
1209
There is one exception to the above principles; for
1210
- backwards-compatibility, ` & SUGGESTWF` is still used to mean that the
1211
- whole underline should be replaced by what's in ` & SUGGESTWF` . This
1212
- means that if you combine ` & SUGGESTWF` with ` RIGHT/LEFT ` , you will not
1210
+ backwards-compatibility, ` SUGGESTWF ` is still used to mean that the
1211
+ whole underline should be replaced by what's in ` SUGGESTWF ` . This
1212
+ means that if you combine ` SUGGESTWF ` with ` RIGHT/LEFT ` , you will not
1213
1213
automatically get the word form for the relation target(s) in your
1214
1214
replacement, you have to construct the whole replacement yourself.
1215
- This also means you cannot combine ` & SUGGESTWF` with ` & SUGGEST` on
1215
+ This also means you cannot combine ` SUGGESTWF ` with ` SUGGEST ` on
1216
1216
other words. (If we ever change how this works, we will have to first
1217
1217
update many existing CG3 rules.)
1218
1218
@@ -1233,10 +1233,10 @@ don't conflict with the below special tags.
1233
1233
1234
1234
### Tags
1235
1235
1236
- - ` & SUGGEST` on a reading means that ` divvun-suggest ` should try to
1236
+ - ` SUGGEST ` on a reading means that ` divvun-suggest ` should try to
1237
1237
generate this reading into a form for suggestions, using the
1238
1238
generator FST. See [ Simple grammarchecker.cg3 rules] ( #org0955ce1 ) .
1239
- - ` & SUGGESTWF` on a reading means that ` divvun-suggest ` should use the
1239
+ - ` SUGGESTWF ` on a reading means that ` divvun-suggest ` should use the
1240
1240
reading's wordform-tag (e.g. a tag like
1241
1241
1242
1242
"<Cupertino >"
0 commit comments