GithubHelp home page GithubHelp logo

tag's Introduction

Automating synchronous multicomponent tree-adjoining grammar derivations

The system allows a user to specify a synchronous multicomponent tree-adjoining grammar (STAG) using an intuitive, text-based metagrammar. It then automates the specified derivations and outputs the derived trees.

This README is only meant to get you started. Refer to doc/mctagdoc.pdf for in-depth documentation. These slides may also be helpful.

Getting started

Dependencies

You will need OCaml 4.02 (or later) and Menhir. Refer to the OCaml docs for installation instructions. If you install the package manager OPAM with OCaml (highly recommended), Menhir can be installed with the following command:

opam install menhir

You may compile the files with your favorite OCaml compiler, but I suggest OCamlbuild, which can be installed with the following command:

opam install ocamlbuild

Building

To build all the files for the first time, run the following command:

ocamlbuild -use-menhir mctag.byte

This command creates a _build directory within your current working directory. The executables will be stored there, but a symlink should be created in your current directory. If you can't find the target mctag.byte file, look under _build.

Usage

To help the user get off the ground, the repo contains several sample grammars in the grammars folder. Try running

./mctag.byte -i grammars/toy.txt

to print the derived syntax and semantics trees for the sentence 'John saw a girl'.

A full list of example grammars is provided below.

Path Description
grammars/toy.txt 'John saw a girl'
grammars/example.txt Reflexives, topicalization, quantifier scope ambiguity, adjunction at substitution nodes, etc.
grammars/paper.txt Trees from Aggazzotti & Shieber (2017)
grammars/features.txt Basic analyses of features -- see doc for more details

Writing your own grammars

You can specify your own STAGs using the metagrammar specified in the full documentation under doc/mctagdoc.pdf.

Acknowledgments

This system was developed in collaboration with Stuart Shieber and Cristina Aggazotti during the summer of 2016.

tag's People

Contributors

jennhu avatar

Watchers

James Cloos avatar paper2code - bot 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.