Skip to content

isi-nlp/DiplomacyAMR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DiplomacyAMR

AMR-related aspects of Diplomacy ALLAN project

Links to related resources

amr-to-daide.py

Script to map AMRs (in AMR annotation file format) to DAIDE (in text or jsonl format)

Argument structure
usage: amr-to-daide.py [-h] [-i AMR-INPUT-FILENAME] [-o OUTPUT-FILENAME] [-j JSONL-OUTPUT-FILENAME] [-m MAX] [-d] [-v]

Maps AMR to DAIDE in classical or jsonl format

options:
  -h, --help            show this help message and exit
  -i AMR-INPUT-FILENAME, --input AMR-INPUT-FILENAME
  -o OUTPUT-FILENAME, --output OUTPUT-FILENAME
                        (default: STDOUT)
  -j JSONL-OUTPUT-FILENAME, --json JSONL-OUTPUT-FILENAME
                        (default: None)
  -m MAX, --max MAX     (maximum number of AMRs in ouput)
  -d, --developer_mode
  -v, --verbose         write change log etc. to STDERR
CLI examples
cd DiplomacyAMR/annotations
../code/amr-to-daide.py -i dip-all-amr-smosher.txt --max 10
../code/amr-to-daide.py -i dip-all-amr-smosher.txt -o dip-all-amr-daide-smosher.txt -j dip-all-amr-daide-smosher.jsonl
jsonl output format jsonl (json lines) output is 1 json per AMR, each on one separate line, with these fields
  1. id: AMR sentence ID, as provided in input
  2. snt: English sentence(s), as provided in input
  3. amr: AMR, as provided in input
  4. daide-status: one of No-DAIDE (contains no DAIDE), Partial-DAIDE (contains mix of DAIDE and AMR), or Full-DAIDE
  5. daide: any partial or full DAIDE (absent if daide-status is No-DAIDE)

jsonl output example line:

{"id": "dip_0001.1", "snt": "Austria", "amr": "(c / country :name (n / name :op1 \"Austria\"))", "daide-status": "Full-DAIDE", "daide": "AUS"}

About

AMR-related aspects of Diplomacy ALLAN project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages