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
Copy file name to clipboardExpand all lines: proof/gramcheck/extracting-precision-sentences.md
+22-3Lines changed: 22 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,14 @@ sed 's/$/"/' \
42
42
43
43
This command greps the tag from the positives.csv file. The sentence is at the end of the line. The number of fields may change from rule to rule, the command thus cuts the sentence from behind. The sentence is formatted so that it can be added to the yaml fileset in the `grammarchecker/tests` catalogue.
44
44
45
-
You may then make a list of all rule tags in the grammarchecker, search for each tag in `positives.csv` and store the result in one file for each tag, with a `for` loop. Copy the following (**Note** in the line beginning with `Variant:` you should exchange `smn` with the relevant language code), store it in misc, e.g. as candidates.sh, and run it (stand in `misc` and type the command `sh misc/candidates.sh`):
45
+
You may then make a list of all rule tags in the grammarchecker,
46
+
search for each tag in `positives.csv` and store the result in one
47
+
file for each tag, with a `for` loop. First, make a list `taglist.txt`
48
+
containing all error tags used in the file *grammarchecker.cg3* and
49
+
store it in `misc`. Then copy the following (**Note** in the line
50
+
beginning with `Variant:` you should exchange `smn` with the relevant
51
+
language code), store it in misc, e.g. as candidates.sh, and run it
52
+
(stand in `misc` and type the command `sh candidates.sh`):
After having a look, store the sentences, e.g. (as for the example above) to a yaml file `tests/neg-posspl-ill-gen.yaml` file. Then you may test for regression, e.g. with `make check` or (file by file) with the usual command (standing in `tools/grammarchecker`):
74
+
The resulting files are now stored in
75
+
`tools/grammarchecker/tests/candidates-*.yaml` files, one for each
76
+
tag. Some files may be empty (the smallest ones), delete them.. Then you
77
+
may test for regression, e.g. with `make check` or (file by file) with
78
+
the usual command (standing in `tools/grammarchecker`):
67
79
68
80
```sh
69
-
gtgramtools test -c yaml tests/neg-posspl-ill-gen.yaml
81
+
gtgramtools test -c yaml tests/candidates-neg-posspl-ill-gen.yaml
70
82
```
83
+
84
+
The sentences you may then (throw away or) edit and store in
85
+
`*-FAIL.yaml` (for false positives) or `*-PASS.yaml` (for true
86
+
positives). The false positives should then be fixed by editing the
0 commit comments