Coder Social home page Coder Social logo

jamr's Introduction

JAMR - AMR Parser

JAMR is a semantic parser for the Abstract Meaning Representation.

Building

JAMR depends on

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.)

Preprocessing

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.

Training

(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)

Evaluating

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

jamr's People

Contributors

jflanigan avatar sammthomson avatar

Watchers

Naomi Saphra avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.