2019-03-10 21:11:18 +00:00
|
|
|
# All required components, to create and fill a database,
|
|
|
|
# instantiate backend and frontend.
|
|
|
|
|
|
|
|
MAKE_ROOT = $(shell pwd)
|
|
|
|
|
|
|
|
### Input data
|
|
|
|
# I received ssj500k in one .xml file,
|
|
|
|
# kres is composed of many .xml files
|
|
|
|
# I generated srl tags for kres in separate .json files
|
|
|
|
# (for each kres.xml file there is a kres.json file with srl tags)
|
|
|
|
SSJ_FILE = "$(MAKE_ROOT)/data/samples/ssj_example/ssj500k-sl.body.sample.xml"
|
|
|
|
KRES_FOLDER = "$(MAKE_ROOT)/data/samples/kres_example"
|
|
|
|
KRES_SRL_FOLDER = "$(MAKE_ROOT)/data/kres_srl"
|
2019-03-14 07:30:33 +00:00
|
|
|
OUTPUT = "file"
|
2019-03-14 13:13:01 +00:00
|
|
|
OUTDIR = "/home/voje/workdir/test_out"
|
2019-03-14 07:30:33 +00:00
|
|
|
DBADDR = ""
|
2019-03-10 21:11:18 +00:00
|
|
|
export
|
|
|
|
|
|
|
|
.PHONY: dev-env preflight
|
|
|
|
|
|
|
|
all:
|
|
|
|
echo "Select an argument"
|
|
|
|
|
|
|
|
# prereq (environment)
|
|
|
|
dev-env:
|
|
|
|
cd dockerfiles; cd dev-env; $(MAKE)
|
|
|
|
|
|
|
|
# run these inside dev-env container
|
|
|
|
data/samples:
|
|
|
|
cd data; tar xzvf samples.tar.gz
|
|
|
|
|
|
|
|
# installs our python code as packages
|
|
|
|
# when debugging, run this once, then run python3 ... by hand
|
|
|
|
preflight: data/samples
|
|
|
|
pip3 install -e src/pkg/corpusparser/.
|
2019-03-14 07:30:33 +00:00
|
|
|
python3 src/pkg/corpusparser/corpusparser/main.py --kres-folder $(KRES_FOLDER) \
|
|
|
|
--ssj-file $(SSJ_FILE) --kres-srl-folder $(KRES_SRL_FOLDER) --output $(OUTPUT) --outdir $(OUTDIR) --dbaddr $(DBADDR)
|