From b79721f6a7606e5ca5a5be90045624a2e3e94373 Mon Sep 17 00:00:00 2001 From: voje Date: Sun, 24 Feb 2019 22:23:32 +0100 Subject: [PATCH] srl taggin pipeline (output in .tsv) --- Makefile | 13 + README.md | 15 +- data/kres_example_srl/F0006347.srl.tsv | 162 + data/kres_example_srl/F0012782.srl.tsv | 167 + data/kres_example_srl/F0019343.srl.tsv | 2342 +++++++++++ data/kres_example_srl/F0025741.srl.tsv | 2106 ++++++++++ data/kres_example_srl/F0032377.srl.tsv | 518 +++ data/kres_example_srl/F0039402.srl.tsv | 510 +++ .../F0006347.xml.parsed.tsv | 14 +- .../F0012782.xml.parsed.tsv | 86 +- .../F0019343.xml.parsed.tsv | 3478 ++++++++--------- .../F0025741.xml.parsed.tsv | 3358 ++++++++-------- .../F0032377.xml.parsed.tsv | 712 ++-- .../F0039402.xml.parsed.tsv | 612 +-- tools/Makefile | 13 - tools/{README.md => README.md.obsol} | 0 tools/fillpred_model/Makefile | 5 +- tools/fillpred_model/__init__.py | 0 tools/fillpred_model/step1.py | 60 +- tools/fillpred_model/step2.py | 25 +- tools/{main.py => parse_all.py} | 25 +- tools/parser/parser.py | 34 +- tools/srl-20131216/ger-eval.out | 74 +- .../scripts/parse_srl_only_mod.sh | 5 +- tools/srl-20131216/tag_all.sh | 25 + 25 files changed, 10104 insertions(+), 4255 deletions(-) create mode 100644 Makefile create mode 100644 data/kres_example_srl/F0006347.srl.tsv create mode 100644 data/kres_example_srl/F0012782.srl.tsv create mode 100644 data/kres_example_srl/F0019343.srl.tsv create mode 100644 data/kres_example_srl/F0025741.srl.tsv create mode 100644 data/kres_example_srl/F0032377.srl.tsv create mode 100644 data/kres_example_srl/F0039402.srl.tsv rename data/{kres_example_out => kres_example_tsv}/F0006347.xml.parsed.tsv (99%) rename data/{kres_example_out => kres_example_tsv}/F0012782.xml.parsed.tsv (100%) rename data/{kres_example_out => kres_example_tsv}/F0019343.xml.parsed.tsv (99%) rename data/{kres_example_out => kres_example_tsv}/F0025741.xml.parsed.tsv (99%) rename data/{kres_example_out => kres_example_tsv}/F0032377.xml.parsed.tsv (99%) rename data/{kres_example_out => kres_example_tsv}/F0039402.xml.parsed.tsv (99%) delete mode 100644 tools/Makefile rename tools/{README.md => README.md.obsol} (100%) create mode 100644 tools/fillpred_model/__init__.py rename tools/{main.py => parse_all.py} (61%) create mode 100755 tools/srl-20131216/tag_all.sh diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2568b7a --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +.PHONY: tsv_files srl_tagged_files + +all: srl_tagged_files + +srl_tagged_files: #tsv_files + # cd tools/srl-20131216; ./scripts/parse_srl_only_mod.sh; cd - + cd tools/srl-20131216; ./tag_all.sh ../../data/kres_example_tsv ../../data/kres_example_srl + +tsv_files: fillpred_model/model.pickle + cd tools; python3 parse_all.py + +fillpred_model/model.pickle: + cd tools/fillpred_model; $(MAKE) diff --git a/README.md b/README.md index 8875208..50a01e8 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,8 @@ We'll be using mate-tools to perform SRL on Kres. ## workspace The tools require Java. -See `./dockerfiles/python-java/README.md` for environment preparation. +Go to `./dockerfiles/python-java/` and run `make`. +You should get a docker environment, mounting this repo. ## mate-tools Check out `./tools/srl-20131216/README.md`. @@ -14,15 +15,23 @@ Check all possible xml tags (that occur after the tag. ## Tools * Parser for reading both `SSJ500k 2.1 TEI xml` and `Kres F....xml.parsed.xml"` files found in `./tools/parser/parser.py`. +* `fillpred_model` for creating a yes/no model for preditcing the predicate (based on ssj500k data). ## Usage ```bash -$ ./dockerfiles/python-java` +$ cd ./dockerfiles/python-java` $ make # you should be inside a container now -$ make