Data and code for the paper Synthetic-Error Augmented Parsing of Swedish as a Second language by Arianna Masciolini, Emilie Marie Carreau Francis, Maria Irena Szawerna
Data and preprocessing scripts
-
SweLL-derived evaluation set, obtained by:
- extracting sentence-correction pairs from the full SweLL-gold corpus with the extract_sentence_pairs.py script
- filtering out sentences that do not exclusively contain word order errors with the filter.py
- parsing the resulting corrected sentences with the
swedish-talbanken-ud-2.12-230717UDPipe 2 model - applying the transfer_annotation.py script to transfer UD annotation from correction hypotheses to learner originals
-
corrupted version of the Talbanken Swedish treebank, obtained by processing UD_Swedish-Talbanken with the corrupt.py script
-
we have also used the original version of UD_Swedish-Talbanken, which is not included in the repository
-
mix_treebanks.py combines and creates splits for normative and corrupted data in different configurations for the various parsing experiments
Training and MaChAmp configurations
For training our models we have used the MaChAmp toolkit. The configurations for the training can be found in the machamp_configs folder.
Evaluation
- swell_scripts/prune.py is used to isolate ungrammatical segments for the targeted evaluation
- eval_scripts/ contains two evaluation scripts:
- sentence_eval.py calculates LAS and UAS scores
- sentence_scoring.py is used to run the scorer and present the result in a readable format
License
This code is released under the CRAPL academic-strength open source license.