Skip to content

Author implementation of the paper "Span-based Semantic Parsing for Compositional Generalization"

Notifications You must be signed in to change notification settings

jonathanherzig/span-based-sp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Span-based Semantic Parsing for Compositional Generalization

Author implementation of the following ACL 2021 paper.

Setup

  1. Install an Anaconda virtual environment:
    conda create -n compgen python=3.7 anaconda
    
  2. Install the following pip version
      pip install pip==20.0.2
    
  3. Install the required dependencies:
    pip install -r requirements.txt
    
  4. Install swi-prolog with version <8 (this is a Prolog interpreter used to execute GeoQuery). For example, for Ubuntu follow these instructions.
  5. Download the datasets and extract the content to span-based-sp/datasets

Training and evaluating the span-based parser

The main script for running experiments is span-based-sp/run_span_exps.sh. To run an experiment use:

bash run_span_exps.sh domain

Where domain=[geo, scan, clevr]. A single experiment will train over all splits experimented in the paper for the specific domain. We use early stopping w.r.t denotation accuracy on the dev set. Results are written to a log file under the logs/ folder.

To conveniently print all logs, run:

python utils/combine_logs.py

About

Author implementation of the paper "Span-based Semantic Parsing for Compositional Generalization"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages