SUPPLEMENTARY MATERIAL FOR PAPER 
"Dependency Parsing with Undirected Graphs",
by
Carlos Gómez-Rodríguez (Universidade da Coruña, Spain, carlos.gomez@udc.es) and
Daniel Fernández-González (Universidade de Vigo, Spain, danifg@uvigo.es),
published in the proceedings of EACL 2012.

This archive contains an implementation of the undirected parsers described in the paper, together with the feature
models used in the experiments and all the settings and parameters needed to reproduce them.

The undirected planar parser (UPlanar), undirected 2 planar parser (U2Planar) and undirected Covington non-projective 
(UCovingtonNonProjective) parser were implemented using Maltparser. 

MaltParser is a system for data-driven dependency parsing, which can be used to induce a parsing model from treebank 
data and to parse new data using an induced model. MaltParser is developed by Johan Hall, Jens Nilsson and 
Joakim Nivre at Växjö University and Uppsala University, Sweden.

We include a modified version of MaltParser to which we have added the implementation of the new algorithms
described in the paper. The full source code is provided, and the code for the new algorithms is located in the packages
org.maltparser.parser.algorithm.planar3t and org.maltparser.parser.algorithm.planar3tLabelStrat (undirected planar), 
org.maltparser.parser.algorithm.twoplanar3t (undirected 2-planar), and org.maltparser.parser.algorithm.ucovington (undirected Covington).
The code in these packages has been written by the authors of the paper and can be used and redistributed following the same
license terms as for the rest of MaltParser 1.4.1 (malt-1.4.1/LICENSE).

In order to use these parsers, please follow the following instructions.
First, we need to train a model using a training treebank, a feature model and a classifier. The 
command is as follows:

	java -jar  malt-1.4.1/dist/malt/malt.jar -c <model> -i <train_treebank> -a <parsing_algorithm> -m learn 
		-F <feature_model> -l <classifier> 


where:
	<model> is the induced model.
	<train_treebank> is the treebank in CONLL format used to train the model.
	<parser_algorithm> can be:
				- "planar3t": If you wish to use the UPlanar parser with naive 
			           reconstruction.
				- "planar3tlab": If you wish to use UPlanar parser with label-based 
			           reconstruction. 
				- "2planar3t": If you wish to use the U2Planar parser algorithm. In that case, 
                                   you need to indicate the reconstruction technique that you wish to use with the 
                                   parameter "-recon". It can be "label" (by default) or "root" (for the naive reconstruction
                                   - note that the naive reconstruction is called root-based reconstruction in the options). 
 				- "ucov": If you want to use the UCovingtonNonProjective parser algorithm. In that case, 
                                   you need to indicate the reconstruction technique that you wish to use with the 
                                   parameter "-recon". It can be "label" (by default) or "root" (for the naive reconstruction). 
    <feature_model> is a feature model in XML format.
	<classifier> can be "liblinear" or "libsvm".
 	


Then, we can use the model previously trained to parse a text. The command is as follows:
			
	java -jar  malt-1.4.1/dist/malt/malt.jar -c <model> -i <test_treebank> -a <parsing_algorithm> -m parse 
		-F <feature_model> -l <classifier> -o <output>

Now we can use a test treebank in CoNLL format and a model to obtain the parsed test treebank, also in CoNLL format.
See the MaltParser documentation for more information about flags and parameters.

=========================================================================================================================

The experiments reported in the EACL paper "Dependency Parsing with Undirected Graphs" were performed using 
version 1.4.1 of MaltParser (included in this archive with the undirected algorithms added). 
Tables below show the exact settings used for UPlanar, U2Planar and UCovingtonNonProjective that
can be used to reproduce all the experiments. The specified settings must be used both in the learning phase (-m learn) 
and in the parsing phase (-m parse). XML files (included in the "Features" folder) specify the feature models used for 
each combination of parser and language. Default settings were used for all MaltParser parameters that are not explicitly mentioned
here. 

 -----------------------------------------
| Parser=UPlanar with Naive Reconstruction|
 -----------------------------------------------------------------------------------------------
|Language   |	Flags							|  Features	        |
 ===============================================================================================
|Arabic     | -a planar3t -l libsvm 					|  AraUPlanarREager.xml |
|Chinese    | -a planar3t -l liblinear					|  ChiUPlanarREager.xml |
|Czech      | -a planar3t -l liblinear -d CPOSTAG -s Input[0] -T 1000   |  CzeUPlanarREager.xml |
|Danish     | -a planar3t -l libsvm 					|  DanUPlanarREager.xml |
|German	    | -a planar3t -l liblinear -d CPOSTAG -s Input[0] -T 1000	|  GerUPlanarREager.xml |
|Portuguese | -a planar3t -l libsvm -d POSTAG -s Input[0] -T 1000	|  PorUPlanarREager.xml |
|Swedish    | -a planar3t -l libsvm -d CPOSTAG -s Input[0] -T 1000	|  SweUPlanarREager.xml |
|Turkish    | -a planar3t -l libsvm -d CPOSTAG -s Input[0] -T 100	|  TurUPlanarREager.xml |
 ----------------------------------------------------------------------------------------------

 -----------------------------------------
| Parser=UPlanar with Label Reconstruction|
 ------------------------------------------------------------------------------------------------
|Language   |	Flags							 |  Features	         | 
 ================================================================================================
|Arabic     | -a planar3tlab -l libsvm 					 |  AraUPlanarLEager.xml |
|Chinese    | -a planar3tlab -l liblinear				 |  ChiUPlanarLEager.xml |
|Czech      | -a planar3tlab -l liblinear -d CPOSTAG -s Input[0] -T 1000 |  CzeUPlanarLEager.xml |
|Danish     | -a planar3tlab -l libsvm 					 |  DanUPlanarLEager.xml |
|German	    | -a planar3tlab -l liblinear -d CPOSTAG -s Input[0] -T 1000 |  GerUPlanarLEager.xml |
|Portuguese | -a planar3tlab -l libsvm -d POSTAG -s Input[0] -T 1000	 |  PorUPlanarLEager.xml |
|Swedish    | -a planar3tlab -l libsvm -d CPOSTAG -s Input[0] -T 1000	 |  SweUPlanarLEager.xml |
|Turkish    | -a planar3tlab -l libsvm -d CPOSTAG -s Input[0] -T 100	 |  TurUPlanarLEager.xml |
 -----------------------------------------------------------------------------------------------

 ------------------------------------------
| Parser=U2Planar with Naive Reconstruction|
 --------------------------------------------------------------------------------------------------------------------
|Language   |	Flags									     |  Features	     |
 ====================================================================================================================
|Arabic     | -a 2planar3t -recon root -2pr true -l libsvm 				     | AraU2PlanarREager.xml |
|Chinese    | -a 2planar3t -recon root -2pr true -l liblinear				     | ChiU2PlanarREager.xml |
|Czech      | -a 2planar3t -recon root -2pr true -l liblinear -d CPOSTAG -s Input[0] -T 1000 | CzeU2PlanarREager.xml |
|Danish     | -a 2planar3t -recon root -2pr true -l libsvm 				     | DanU2PlanarREager.xml |
|German	    | -a 2planar3t -recon root -2pr true -l liblinear -d CPOSTAG -s Input[0] -T 1000 | GerU2PlanarREager.xml |
|Portuguese | -a 2planar3t -recon root -2pr true -l libsvm -d POSTAG -s Input[0] -T 1000     | PorU2PlanarREager.xml |
|Swedish    | -a 2planar3t -recon root -2pr true -l libsvm -d CPOSTAG -s Input[0] -T 1000    | SweU2PlanarREager.xml |
|Turkish    | -a 2planar3t -recon root -2pr true -l libsvm -d CPOSTAG -s Input[0] -T 100     | TurU2PlanarREager.xml |
 --------------------------------------------------------------------------------------------------------------------
 
 ------------------------------------------
| Parser=U2Planar with Label Reconstruction|
 --------------------------------------------------------------------------------------------------------------------
|Language   |	Flags									     |  Features	     |
 ====================================================================================================================
|Arabic     | -a 2planar3t -recon label -2pr true -l libsvm 				     | AraU2PlanarLEager.xml |
|Chinese    | -a 2planar3t -recon label -2pr true -l liblinear				     | ChiU2PlanarLEager.xml |
|Czech      | -a 2planar3t -recon label -2pr true -l liblinear -d CPOSTAG -s Input[0] -T 1000| CzeU2PlanarLEager.xml |
|Danish     | -a 2planar3t -recon label -2pr true -l libsvm 				     | DanU2PlanarLEager.xml |
|German	    | -a 2planar3t -recon label -2pr true -l liblinear -d CPOSTAG -s Input[0] -T 1000| GerU2PlanarLEager.xml |
|Portuguese | -a 2planar3t -recon label -2pr true -l libsvm -d POSTAG -s Input[0] -T 1000    | PorU2PlanarLEager.xml |
|Swedish    | -a 2planar3t -recon label -2pr true -l libsvm -d CPOSTAG -s Input[0] -T 1000   | SweU2PlanarLEager.xml |
|Turkish    | -a 2planar3t -recon label -2pr true -l libsvm -d CPOSTAG -s Input[0] -T 100    | TurU2PlanarLEager.xml |
 --------------------------------------------------------------------------------------------------------------------
 
 ---------------------------------------------------------
| Parser=UCovingtonNonProjective with Naive Reconstruction|
 ------------------------------------------------------------------------------------------------------------------------------
|Language   |	Flags									     |  Features	               |
 ==============================================================================================================================
|Arabic     | -a ucov -recon root -l libsvm -d CPOSTAG -s Right[0] -T 1000				                     | AraUCovingtonNonProjectiveR.xml |
|Chinese    | -a ucov -recon root -l liblinear -d CPOSTAG -s Right[0] -T 1000				                     | ChiUCovingtonNonProjectiveR.xml |
|Czech      | -a ucov -recon root -l liblinear -d CPOSTAG -s Input[0] -T 1000                | CzeUCovingtonNonProjectiveR.xml |
|Danish     | -a ucov -recon root -l libsvm -d CPOSTAG -s Input[0] -T 1000				                     | DanUCovingtonNonProjectiveR.xml |
|German	    | -a ucov -recon root -l liblinear -d CPOSTAG -s Input[0] -T 1000                | GerUCovingtonNonProjectiveR.xml |
|Portuguese | -a ucov -recon root -l libsvm -d CPOSTAG -s Input[0] -T 1000                   | PorUCovingtonNonProjectiveR.xml |
|Swedish    | -a ucov -recon root -l libsvm -d CPOSTAG -s Input[0] -T 1000                   | SweUCovingtonNonProjectiveR.xml |
|Turkish    | -a ucov -recon root -l libsvm -d CPOSTAG -s Input[0] -T 100                    | TurUCovingtonNonProjectiveR.xml |
 ------------------------------------------------------------------------------------------------------------------------------

 ---------------------------------------------------------
| Parser=UCovingtonNonProjective with Label Reconstruction|
 ------------------------------------------------------------------------------------------------------------------------------
|Language   |	Flags									     |  Features	               |
 ==============================================================================================================================
|Arabic     | -a ucov -recon label -l libsvm -che new -d CPOSTAG -s Right[0] -T 1000 				                     | AraUCovingtonNonProjectiveL.xml |
|Chinese    | -a ucov -recon label -l liblinear -d CPOSTAG -s Right[0] -T 1000				                     | ChiUCovingtonNonProjectiveL.xml |
|Czech      | -a ucov -recon label -l liblinear -d CPOSTAG -s Input[0] -T 1000               | CzeUCovingtonNonProjectiveL.xml |
|Danish     | -a ucov -recon label -l libsvm -d CPOSTAG -s Input[0] -T 1000				                     | DanUCovingtonNonProjectiveL.xml |
|German	    | -a ucov -recon label -l liblinear -d CPOSTAG -s Input[0] -T 1000               | GerUCovingtonNonProjectiveL.xml |
|Portuguese | -a ucov -recon label -l libsvm -d CPOSTAG -s Input[0] -T 1000                  | PorUCovingtonNonProjectiveL.xml |
|Swedish    | -a ucov -recon label -l libsvm -d CPOSTAG -s Input[0] -T 1000                  | SweUCovingtonNonProjectiveL.xml |
|Turkish    | -a ucov -recon label -l libsvm -d CPOSTAG -s Input[0] -T 100                   | TurUCovingtonNonProjectiveL.xml |
 ------------------------------------------------------------------------------------------------------------------------------

  --------------
| Parser=Planar|
 ----------------------------------------------------------------------------------------------
|Language   |	Flags							|  Features	       |
 ==============================================================================================
|Arabic     | -a planar -l libsvm 					|  AraPlanarEager.xml  |
|Chinese    | -a planar -l liblinear					|  ChiPlanarEager.xml  |
|Czech      | -a planar -l liblinear -d CPOSTAG -s Input[0] -T 1000     |  CzePlanarEager.xml  |
|Danish     | -a planar -l libsvm 					|  DanPlanarEager.xml  |
|German	    | -a planar -l liblinear -d CPOSTAG -s Input[0] -T 1000	|  GerPlanarEager.xml  |
|Portuguese | -a planar -l libsvm -d POSTAG -s Input[0] -T 1000	        |  PorPlanarEager.xml  |
|Swedish    | -a planar -l libsvm -d CPOSTAG -s Input[0] -T 1000	|  SwePlanarEager.xml  |
|Turkish    | -a planar -l libsvm -d CPOSTAG -s Input[0] -T 100		|  TurPlanarEager.xml  |
 ----------------------------------------------------------------------------------------------
 
  ----------------
| Parser=2-Planar|
 ---------------------------------------------------------------------------------------------------------
|Language   |	Flags							          |  Features	          |
 =========================================================================================================
|Arabic     | -a planar -l libsvm 					          |  Ara2PlanarEager.xml  |
|Chinese    | -a planar -l liblinear					          |  Chi2PlanarEager.xml  |
|Czech      | -a 2planar -2pr true -l liblinear -d CPOSTAG -s Input[0] -T 1000    |  Cze2PlanarEager.xml  |
|Danish     | -a 2planar -2pr true -l libsvm 					  |  Dan2PlanarEager.xml  |
|German	    | -a 2planar -l liblinear -d CPOSTAG -s Input[0] -T 1000	          |  Ger2PlanarEager.xml  |
|Portuguese | -a 2planar -2pr true -l libsvm -d POSTAG -s Input[0] -T 1000	  |  Por2PlanarEager.xml  |
|Swedish    | -a 2planar -2pr true -l libsvm -d CPOSTAG -s Input[0] -T 1000	  |  Swe2PlanarEager.xml  |
|Turkish    | -a 2planar -l libsvm -d CPOSTAG -s Input[0] -T 100		  |  Tur2PlanarEager.xml  |
 ---------------------------------------------------------------------------------------------------------

  -----------------------------
| Parser=CovingtonNonProjective|
 ----------------------------------------------------------------------------------------------
|Language   |	Flags							|  Features	       |
 ==========================================================================================================
|Arabic     | -a covnonproj -l libsvm -d CPOSTAG -s Right[0] -T 1000 					|  AraCovingtonNonProjective.xml   |
|Chinese    | -a covnonproj -l liblinear -d CPOSTAG -s Right[0] -T 1000				|  ChiCovingtonNonProjective.xml   |
|Czech      | -a covnonproj -l liblinear -d CPOSTAG -s Input[0] -T 1000 |  CzeCovingtonNonProjective.xml   |
|Danish     | -a covnonproj -l libsvm -d CPOSTAG -s Input[0] -T 1000 					|  DanCovingtonNonProjective.xml   |
|German	    | -a covnonproj -l liblinear -d CPOSTAG -s Input[0] -T 1000	|  GerCovingtonNonProjective.xml   |
|Portuguese | -a covnonproj -l libsvm -d CPOSTAG -s Input[0] -T 1000	|  PorCovingtonNonProjective.xml   |
|Swedish    | -a covnonproj -l libsvm -d CPOSTAG -s Input[0] -T 1000	|  SweCovingtonNonProjective.xml   |
|Turkish    | -a covnonproj -l libsvm -d CPOSTAG -s Input[0] -T 100	|  TurCovingtonNonProjective.xml   |
 ----------------------------------------------------------------------------------------------------------


  -------------------------------------
| Parser=Malt P (arc-eager projective)|
 ----------------------------------------------------------------------------------------------
|Language   |	Flags							|  Features	       |
 ==============================================================================================
|Arabic     | -a nivreeager -l libsvm 					|  AraNivreEager.xml   |
|Chinese    | -a nivreeager -l liblinear				|  ChiNivreEager.xml   |
|Czech      | -a nivreeager -l liblinear -d CPOSTAG -s Input[0] -T 1000 |  CzeNivreEager.xml   |
|Danish     | -a nivreeager -l libsvm 					|  DanNivreEager.xml   |
|German	    | -a nivreeager -l liblinear -d CPOSTAG -s Input[0] -T 1000	|  GerNivreEager.xml   |
|Portuguese | -a nivreeager -l libsvm -d POSTAG -s Input[0] -T 1000	|  PorNivreEager.xml   |
|Swedish    | -a nivreeager -l libsvm -d CPOSTAG -s Input[0] -T 1000	|  SweNivreEager.xml   |
|Turkish    | -a nivreeager -l libsvm -d CPOSTAG -s Input[0] -T 100	|  TurNivreEager.xml   |
 ----------------------------------------------------------------------------------------------
 
  -----------------------------------------------------------------
| Parser=Malt PP (arc-eager with pseudo-projective transformation)|
 ----------------------------------------------------------------------------------------------------
|Language   |	Flags							|  Features	             |
 ====================================================================================================
|Arabic     | -a nivreeager -pp head -l libsvm 					|  AraNivreEager.xml |
|Chinese    | -a nivreeager -pp head -l liblinear				|  ChiNivreEager.xml |
|Czech      | -a nivreeager -pp head -l liblinear -d CPOSTAG -s Input[0] -T 1000|  CzeNivreEager.xml |
|Danish     | -a nivreeager -pp head -l libsvm 					|  DanNivreEager.xml |
|German	    | -a nivreeager -pp head -l liblinear -d CPOSTAG -s Input[0] -T 1000|  GerNivreEager.xml |
|Portuguese | -a nivreeager -pp head -l libsvm -d POSTAG -s Input[0] -T 1000	|  PorNivreEager.xml |
|Swedish    | -a nivreeager -pp head -l libsvm -d CPOSTAG -s Input[0] -T 1000	|  SweNivreEager.xml |
|Turkish    | -a nivreeager -pp head -l libsvm -d CPOSTAG -s Input[0] -T 100	|  TurNivreEager.xml |
 ----------------------------------------------------------------------------------------------------
 

