-
Notifications
You must be signed in to change notification settings - Fork 4
DelphinTools
These files are scripts for automating parsing, translation, and generation within the Delphin HPSG framework.
Original Author: Eric Nichols <eric-n@is.naist.jp> Nara Institute of Science and Technology
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
Add the following to your .bashrc
# Batch processing with Delphin
DTHOME=/path/to/delphintools
if [ -f $DTHOME/setup.sh ]; then
. $DTHOME/setup.sh
fi
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.
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.
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
Home | Forum | Discussions | Events