The XTAG grammar generator generates XDG grammars from the TAG grammar developed in the XTAG project (http://www.cis.upenn.edu/~xtag/). For installing the relevant files from the XTAG grammar, see Installation (optional installation bits, XTAG grammar generator, XTAG additional functionality).
The grammar generator uses the socket functionality of the XDK, which provides the possibility to read in grammars for specific input sentences from a server (over a socket connection).
To make it work, you need to take two steps:
XTAG
directory
and then starting the server by typing:
./XTAGServer.exe -p 4712
where the -p
option determines the port which is taken by the
server (default: 4712).
4712.ulsocket
(given the server runs on port 4712). Now, if the connection of the XDK and the server could be established, you can parse English sentences using the XTAG grammar. For each sentence, a new grammar is generated on-the-fly.
The full set of commandline arguments is the following:
--help
or --nohelp
(short version: -h
): Display an
overview of the commandline arguments. Default: --nohelp
.
--prune
or --noprune
(-r
): Prune tree lookup, i.e., when looking
up the elementary trees for a word in the input, remove those multiply
anchored trees where any of the additional anchors is not present in
the input sentence. Pruning is used per default.
--filter none
or --filter simple
or --filter tagger
or --filter supertagger
(-f none
or -f simple
or -f tagger
or -f supertagger
): Filter the set of elementary trees
selected for the words in the input. none
does not filter,
simple
uses a reimplementation of simple_filter.pl
, the
default tree filter from the lem parser distribution, tagger
a
reimplementation of tagger_filter.pl
, and supertagger
uses the supertagger available on the XTAG webpage. For the
tagger
option, the mxpost
tagger by Adwait Ratnaparkhi
must be installed in the directory denoted by the environment variable
MXPOST
. For the supertagger
option, the environment
variable COREF
must point to the currently used data directory
within the supertagger directory (as stated in the README
there), e.g. to the 200K.data
directory. Default:
--filter none
.
The XDG grammars generated from the XTAG grammar make use of the principles:
principle.xTAG
(XTAG1)
principle.xTAGRedundant
(XTAGRedundant)
principle.xTAGRoot
(XTAGRoot)
And the output output.xTAGDerivation
(XTAGDerivation) to
display XTAG derivation trees using the tree viewer from the XTAG
project lem parser.