No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea Merge branch 'master' of Jun 7, 2018
data model else where Oct 14, 2018
parser fix root Oct 14, 2018
src fix Oct 14, 2018
utility model else where Oct 14, 2018
.Rhistory initial Mar 18, 2017 Update Dec 6, 2018


This repository contains code for training and using the Abstract Meaning Representation model described in: AMR Parsing as Graph Prediction with Latent Alignment

If you use our code, please cite our paper as follows:

    title={AMR Parsing as Graph Prediction with Latent Alignment},
    author={Chunchuan Lyu and Ivan Titov},
    booktitle={Proceedings of the Annual Meeting of the Association for Computational Linguistics},



  • Set up Stanford Corenlp server, which feature extraction relies on.
  • Change file paths in utility/ accordingly.


Combine all *.txt files into a single one, and use stanford corenlp to extract ner, pos and lemma. Processed file saved in the same folder. python src/ or Process from AMR-to-English aligner using java script in AMR_FEATURE (I used eclipse to run it)

Build the copying dictionary and recategorization system (can skip as they are in data/). python src/ Build data into tensor. python src/


Default model is saved in [save_to]/ . (save_to is defined in python src/


Load model to parse from pre-build data. python src/ -train_from []


Please use amr-evaluation-tool-enhanced. This is based on Marco Damonte's amr-evaluation-tool But with correction concerning unlabeled edge score.


Parse a file where each line consists of a single sentence, output saved at [file]_parsed python src/ -train_from [] -input [file] or Parse a sentence where each line consists of a single sentence, output saved at [file]_parsed python src/ -train_from [] -text [type sentence here]

Pretrained models

Keeping the files under data/ folder unchanged, download model Should allow one to run parsing.


This "python src/" starts with sentence original AMR files, while the paper version is trained on tokenized version provided by AMR-to-English aligner So the results could be slightly different. Also, to build a parser for out of domain data, please start preprocessing with "python src/" to make everything consistent.


Contact ( if you have any questions!