Benoit Crabbé Denys Duchier Joseph Le Roux Yannick Parmentier
Calligramme / TALARIS projects - LORIA
Latest news
eXtensible MetaGrammar (XMG) is a tool for designing large scaled grammars for natural language. It implements an alternative language of grammatical representation to the classical languages used for this purpose such as PATR II. Provided a compact representation of grammatical information, XMG combines elementary fragments of information to output a fully redundant strongly lexicalised grammar.
XMG is a framework for describing grammatical information without redundancy. More specifically it has been designed to ease the development of strongly lexicalised syntactic formalisms by means of elementary descriptive fragments. The system consists of two main components: a control device aimed at controlling how fragments are to be combined together in order to describe meaningful lexical descriptions and a composition system aimed at resolving how elementary descriptions are to be combined.
Technically, the control device is understood as a logic program of the DCG paradigm, where the terminal symbols are fragments describing some structures. The composition system is a model builder that allows to parametrise the structures output by the compiler (currently trees for Tree Adjoining Grammars and D-Trees for Interaction Grammars). The model-theoretic approach to describing the lexicon also allows linguists to further use an extensible library of constraints, called principles, ensuring additional well-formedness conditions on the output structures.
Current version: 1.1.6
Further information is also available on the XMG Project page at sourcesup (last news, forums, archives, etc).
In particular, one may have a look at the documentation of Benoît Crabbé's TAG for French (documentation in French).
The metagrammar from which this grammar is compiled is available in the XMG Subversion repository. That is, once you downloaded the XMG sources via:
svn checkout http://subversion.renater.fr/xmg local_repository
The metagrammar is available under local_repository/trunk/METAGRAMMAR/FrenchTAG.
dev-lang/mozart tk tcl
in the file /etc/portage/package.use
.
ozmake --install --package=duchier-select__1.3.0__source__1.8.pkg
NB: the ozmake
command is now part of the Oz-Mozart system. Once you have installed Oz-Mozart, you do not need to install any additional package before invoking ozmake. ozmake
package, which is available here (current version: xmg-1.1.6.pkg).a) You can download the last version of the sources from a Subversion repository with anonymous access (last updates, recommended). The commands are the following:
svn checkout http://subversion.renater.fr/xmg local_repository
Once you have imported the sources, invoke:
cd local_repository/trunk/MGCOMPILER/
ozmake --upgrade
b) Here is a stable release
(current version: xmg-1.1.6.tar.gz)
tar xzvf xmg-xxx.tar.gz
cd xmg-xxx
ozmake --upgrade
This will install the two executables in your ~/.oz/1.3.2/bin directory (don't forget to update your $PATH).NB: if you installed the packages built with Oz-Mozart 1.3.1, you may have to create a symbolic link between ~/.oz/1.3.1/bin and ~/.oz/1.3.2/bin.
For Mac OS X users, here is a nice documentation for installing XMG and its dependencies (courtesy of Patrick Watrin).
This contribution is distributed either as an ozmake package or as sources. To install xmg's ozmake package, download it to a local file e.g. xmg-xxx.pkg on your computer, then invoke:
ozmake --install --package=xmg-xxx.pkg
If this package was already installed on your computer and you want to upgrade to a newer version, invoke:
ozmake --upgrade --package=xmg-xxx.pkg
or else ozmake will complain. By default ozmake installs all binary files in the user's ~/.oz/1.3.2/bin directory tree.
NB: the ozmake
command is now part of the Oz-Mozart system. Once you have installed Oz-Mozart, you do not need to install any additional package before invoking ozmake.
MetaTAG metagrammar_file
Compile a TAG metagrammar to produce a TAG
MetaIG metagrammar_file
Compile an IG metagrammar to produce an IG
--gui
--xml
-o file.xml
--chk
-c file.rec
--mac
-s file
--lin
-l file
-s Int
--xml
-o file.xml
We have developed additional tools to ease metagrammar conception or integration with other applications. Among these:
classbrowser
(classbrowser module): graphical interface in perl/Gtk2 allowing one to explore the metagrammar to observe the relations between classes (provides functionalities comparable with javadoc, see the README). perl main.pl metagrammar_file
hierarchy_printer
(hierarchy_printer module): perl programme used to extract from a metagrammar the class hierarchy graph. The output is a set of pdf graphs (see the README). Courtesy of Ulrike Fleury.perl hierarchie_classes.pl valuation_file
CheckTAG
(part of the CHECKER module): program used to remove duplicated trees (i.e. identical trees that are produced by combining different tree fragments).CheckTAG GrammarFile.rec
CheckTAG GrammarFile.rec --gui
CheckTAG GrammarFile.rec --xml -o FilteredGrammarFile.xml
CheckTAG GrammarFile.rec --chk -c FilteredGrammarFile.rec
ViewTAG
(VIEWER module): graphical interface allowing one to search for specific trees in the produced grammar, either from a tree name or a list of fragments (i.e. class names).ViewTAG
ViewTAG GrammarFile.rec
ViewTAG GrammarFile.rec TreeName
SelectTAG
(SELECTOR module):
anchoring module, taking as input a grammar in a binary format (Pickle) and a specification of lexical entries, and produces as output anchored TAG trees.SelectTAG GrammarFile.rec FilterFile --gui
SelectTAG GrammarFile.rec FilterFile --xml -o OutputFile
SelectTAG GrammarFile.rec FilterFile --chk -c OutputFile
XMGExtractor
(XMGExtractor module): graphical interface in Java allowing to display the inheritance hierarchy of classes (see the documentation for installation). Developed by Brice Ambrosiak.XMGExtractor metagrammar_file
All these programs are included in the Subversion repository (so they have been imported when you downloaded the xmg sources). The installation process is identical to XMG's (except for the classbrowser, hierarchy_printer and XMGExtractor for which there is no need to type "ozmake --upgrade"), i.e.:
cd local_repository/trunk/XMG-TOOLS/MODULE-NAME
ozmake --upgrade
The automatically produced grammars can be used for parsing. We are currently working on integration of XMG with TAG and IG parsers.
MetaTAG valuations.mg --tulipa -o grammar.xml