This folder regroups files used in order to convert the format of input/output data of our models.
It takes the following arguments:
-m [mode]
where[mode]
can be eithertagger
orparser
.-p [pred_file]' where
[pred_file]is the model output from the tagger or parser, in the original
.json` format.-o [output_file]
where[ouput_file]
is where the generated CoNLL-U is to be saved. Defaults to<pred_file>.conllu
if not specified.--multi
should be additionally specified when and only when more than one recipes are included in a single json file.
It takes the following arguments:
-m [mode]
where[mode]
can be eithertagger
orparser
.-p [pred_file]
where[pred_file]
is the model prediction from the tagger or parser, in the original.json
format.-g [gold_file]
where[gold_file]
is the gold file, against which the prediction is to be compared.-o [output_file]
where[ouput_file]
is where the generated TSV file will be saved. Defaults to<pred_file>.tsv
if not specified.-f [format]
where the gold file format can be optionally specified (otherwise it is inferred from file extension). Bothconllu
andconll03
are allowed for the tagger, but onlyconllu
is allowed for the parser.
It takes the following arguments:
-p [pred_file]
where[pred_file]
is the model prediction from the tagger or parser, in the original.json
format.-g [gold_file]
where[gold_file]
is the gold file, against which the prediction is to be evaluated.-o [output_file]
where[ouput_file]
is where the evaluation results can be optionally saved as a.tsv
file in addition to console output.
brat_to_conll.py
: Creates CoNLL-U and CoNLL2003 formatted tsv files from annotations files generated by the brat annotation tool and POS tags annotated with the ParZu parser.flowgraph_to_conll.py
: Creates CoNLL-U and CoNLL2003 formatted tsv files from flowgraph annotation files (described here).id_mappings.tsv
: Associates the names we use for the recipes with the names L'20 used, i.e. with the URLs to the original recipes.reduce_graph.py
: This script converts one CoNNL-U recipe graph with Y'20 labels and dependencies into an action graph or FAT graph.reduce_dir_to_action_graphs
: Traverses a directory and generates action graphs for all recipe graphs in it usingreduce_graph.py
.