Skip to content

QuickStart

MichaelGoodman edited this page Jan 22, 2017 · 8 revisions

These are instructions to quickly get started parsing with the ERG and processing the results. It uses the ACE parser/generator and pyDelphin.

Linux (64-bit)

Install ACE

You can get precompiled ACE binaries at http://sweaglesw.org/linguistics/ace/. Command-line instructions for getting the latest version (since this wiki was last updated) are as follows:

~$ wget http://sweaglesw.org/linguistics/ace/download/ace-0.9.24-x86-64.tar.gz -q -O - | tar xz
~$ sudo mv ace-0.9.24 /opt/

To make ACE accessible as a command, at its directory to the PATH variable (e.g., in .bashrc)

PATH=/opt/ace-0.9.24:"$PATH"

Confirm that it is installed:

~$ ace -V
ACE version 0.9.24
compiled at 23:40:36 on Jul 14 2016

Download the ERG

A pre-compiled grammar file for the ERG is available at ACE's website:

~$ mkdir -p ~/grammars  # or some suitable place for grammar files
~$ wget http://sweaglesw.org/linguistics/ace/download/erg-1214-x86-64-0.9.24.dat.bz2 -q -O - | bunzip2 > ~/grammars/erg-1214-x86-64-0.9.24.dat

Confirm the grammar works with ACE:

~$ ace -g ~/grammars/erg-1214-x86-64-0.9.24.dat -Tq <<< "Dogs sleep."
[ LTOP: h0 INDEX: e2 [ e SF: prop TENSE: pres MOOD: indicative PROG: - PERF: - ] RELS: < [ udef_q<0:4> LBL: h4 ARG0: x3 [ x PERS: 3 NUM: pl IND: + ] RSTR: h5 BODY: h6 ]  [ _dog_n_1<0:4> LBL: h7 ARG0: x3 ]  [ _sleep_v_1<5:11> LBL: h1 ARG0: e2 ARG1: x3 ] > HCONS: < h0 qeq h1 h5 qeq h7 > ]
[ LTOP: h0 INDEX: e2 [ e SF: prop TENSE: pres MOOD: indicative PROG: - PERF: - ] RELS: < [ _dog_v_1<0:4> LBL: h1 ARG0: e2 ARG1: i3 ARG2: x4 [ x PERS: 3 NUM: sg ] ]  [ udef_q<5:11> LBL: h5 ARG0: x4 RSTR: h6 BODY: h7 ]  [ _sleep_n_1<5:11> LBL: h8 ARG0: x4 ] > HCONS: < h0 qeq h1 h6 qeq h8 > ]
NOTE: 2 readings, added 334 / 53 edges to chart (20 fully instantiated, 40 actives used, 12 passives used)      RAM: 942k


NOTE: parsed 1 / 1 sentences, avg 942k, time 0.02486s

Install pyDelphin

PyDelphin is available from PyPI

~$ pip install pydelphin

If you want the latest features of pyDelphin, you might try getting it from its GitHub repository (you'll need to have git installed) and switching to the develop branch:

~$ git clone https://github.com/delph-in/pydelphin.git
~$ git checkout develop

Confirm it works (the following is available if you installed via pip):

~$ ace -g ~/grammars/erg-1214-x86-64-0.9.24.dat -Tq1 <<< "The dog barks." | delphin convert -t eds --pretty-print
{e2:
 _1:_the_q<0:3>[BV x3]
 x3:_dog_n_1<4:7>[]
 e2:_bark_v_1<8:14>[ARG1 x3]
}

The -T option to ACE suppresses the output of derivation trees, and -q suppresses the printing of the input sentence, and together they allow pyDelphin to read a stream of MRS data for conversion. However, the -q option should not be considered a core functionality of ACE and it may be removed in future builds.

Install art

The art utility is useful for parsing [incr tsdb()] profiles.

~$ wget http://sweaglesw.org/linguistics/libtsdb/download/art-0.1.9-x86-64.tar.gz -q -O - | tar xf
~$ sudo mv art-0.1.9 /opt/

To make art accessible as a command, at its directory to the PATH variable (e.g., in .bashrc)

PATH=/opt/art-0.1.9:"$PATH"

Confirm it works:

~$ mkdir -p ~/tsdb/skeletons ~/tsdb/current  # or some other suitable location
~$ wget http://svn.emmtee.net/trunk/lingo/lkb/src/tsdb/skeletons/english/Relations -O ~/tsdb/skeletons/Relations
~$ echo -e "The dog barks.\nThe cat meows." | mkprof -r tsdb/skeletons/Relations tsdb/current/ex
~$ art -a 'ace -g ~/grammars/erg-1214-x86-64-0.9.24.dat' tsdb/current/ex
reading results for                1    2 results
reading results for                2    2 results

MacOS

(add instructions here)

Windows (with agree)

(add instructions here)

Other configurations

If you want a more full-featured setup for grammar development, you might look into the full LOGON distribution: LogonTop

Clone this wiki locally