JAMR is a semantic parser for the Abstract Meaning Representation.
JAMR depends on
- Scala,
- the Illinois NER system (should also work with newer versions),
- the tokenization scripts in cdec (does not require compiling cdec),
- WordNet (for the aligner).
Install these dependencies, and then change the relevant environment variables in
scripts/config.sh
.
Source the config script so that other bash scripts have access to these environment variables (or
add them to ~/.bashrc to set them permanently):
. scripts/config.sh
Run ./compile
to build an uberjar, which will be output to
target/scala-{scala_version}/jamr-assembly-{jamr_version}.jar
(If you get out of memory errors during this step, you may need to edit the Java memory options
in the script sbt
and build.sbt
.)
Download LDC2013E117.tgz
from the LDC Catalog (requires an LDC subscription).
Extract the file deft-amr-release-r3-proxy.txt
into data/LDC-2013-Sep/
and rename it
amr-release-proxy.txt
.
cd scripts/preprocessing
Run ./PREPROCESS.sh
.
(To skip this step, download and extract model weights current.tgz into the directory experiments/current.)
cd scripts/training
Extract concept table:
./cmd.conceptTable.train
Concept identification (stage1) training:
./cmd.stage1-weights
Relation identification (stage2) training:
./cmd.stage2-weights
(Search for 'Performance on Dev' in stage2-weights.err
for early stopping)
Decode test set:
./cmd.test.decode.allstages
or
./cmd.test.decode.stage2only
Evaluate the predictions using smatch:
${JAMR_HOME}/scripts/smatch_v1_0/smatch_modified.py --pr -f ${JAMR_HOME}/experiments/current/test.decode.allstages ${JAMR_HOME}/data/LDC-2013-Sep/amr-release-proxy.test
${JAMR_HOME}/scripts/smatch_v1_0/smatch_modified.py --pr -f ${JAMR_HOME}/experiments/current/test.decode.stage2only ${JAMR_HOME}/data/LDC-2013-Sep/amr-release-proxy.test