Skip to content

DelphinTools

EricNichols edited this page May 22, 2009 · 18 revisions

Objective

These files are scripts for automating parsing, translation, and generation within the Delphin HPSG framework.

Original Author: Eric Nichols <[email protected]> Nara Institute of Science and Technology

Installation

Reference Link: http://cl.naist.jp/~eric-n/hg/delphintools

* Via mercurial

$ hg pull 'http://cl.naist.jp/~eric-n/hg/delphintools' /path/to/delphintools

* Via tarball

$ wget 'http://cl.naist.jp/~eric-n/hg/delphintools/archive/tip.tar.gz' -O /path/to/delphintools.tgz
$ cd /path/to/ && tar -zxvf delphintools.tgz

Shell Environment Setup

Add the following to your .bashrc

# Batch processing with Delphin
DTHOME=/path/to/delphintools
if [ -f $DTHOME/setup.sh ]; then
        . $DTHOME/setup.sh
fi

Automation with logon_do

delphintools/bin/logon_do provides a simple interface for parsing, tranlating, and generating using the LOGON binary. It automatically creates a collection of profiles from a bitext-formatted input file.

Creating a Profile Top

Prior to any processing, logon_do should be invoked with the --bitext (or -b option) to create a directory to store future profiles in:

$ logon_do --bitext /path/to/bitext.txt /path/to/profile_top

The above command will create the directory /path/to/profile_top and a subdirectory bitext/ that contains the original bitext file (called original) and a bitext file with the source and target language swapped (object) that is used for parsing and paraphrasing the target language.

Using logon_do

usage: logon_do -g|--grammar <jaen|enen> -t|--task <smrs|tmrs|pmrs|gmrs|vmrs|omrs|imrs> [/path/to/profile_top]

Calling logon_do in the following manner will create the profile /path/to/profile_top/smrs and parse the source sentences in bitext/original with the Japanese grammar Jacy.

$ logon_do --grammar jaen --task smrs /path/to/profile_top

If /path/to/profile is omitted, logon_do will default to the current directory. So the following command is equivalent:

$ cd /path/to/profile_top && logon_do --grammar jaen --task smrs

Once parsing is complete, the profile smrs will contain the parse results:

$ ls /path/to/profile/smrs
analysis  decision  fold  item-phenomenon  output     parse       preference  result  run    set   update
daughter  edge      item  item-set         parameter  phenomenon  relations   rule    score  tree

SUPPORTED GRAMMARS

Currently, the following grammars are supported.

jaen: Japanese->English translation enen: English->English paraphrasing (tmrs, gmrs, omrs, and imrs are not currently supported)

Users can add support for their own systems by copying and modifying the settings files for an existing grammar to call appropriate TSDB CPUs for each task:

$ cp -r lisp/jaen lisp/koen
$ emacs lisp/koen/*.lisp

SUPPORTED TASKS

Currently, the following tasks are supported.

smrs: MRS from parsing source language
tmrs: MRS from applying transfer grammar to smrs
pmrs: "partial transfer" results -- MRS containing mix of translated and untranslated rels from applying transfer grammar to smrs
gmrs: MRS from applying generation grammar to tmrs
vmrs: variants (i.e. paraphrases) of source language parses in smrs
omrs: MRS from parsing "object" (i.e. target) language
imrs: "iikae" (i.e. paraphrases) of target language parses in omrs
Clone this wiki locally