Index: TXM/trunk/org.txm.groovy.core/src/java/org/txm/groovy/core/InstallGroovyFiles.java
===================================================================
--- TXM/trunk/org.txm.groovy.core/src/java/org/txm/groovy/core/InstallGroovyFiles.java	(revision 3299)
+++ TXM/trunk/org.txm.groovy.core/src/java/org/txm/groovy/core/InstallGroovyFiles.java	(revision 3300)
@@ -83,22 +83,16 @@
 		// BundleUtils.copyFiles(bundle_id, "src/", "groovy/org/txm", "tal/", samplesDirectory);
 		
 		String bundle_id = "org.txm.groovy.core";
-		BundleUtils.copyFiles(bundle_id, "", "src/groovy", "", userDirectory);
+		BundleUtils.copyFiles(bundle_id, "", "src/groovy", "", userDirectory, true);
 		
 		bundle_id = "org.txm.core";
+		
 		File scriptsPackageDirectory = new File(userDirectory, "org/txm/scripts/importer");
 		scriptsPackageDirectory.mkdirs();
-		BundleUtils.copyFiles(bundle_id, "src/java/", "org/txm/scripts/importer", "", scriptsPackageDirectory);
+		BundleUtils.copyFiles(bundle_id, "src/java/", "org/txm/scripts/importer", "", scriptsPackageDirectory, true);
 		
-		try {
-			FileCopy.copyFiles(userDirectory, systemDirectory);
-			Log.fine("Copying user Groovy files to " + systemDirectory);
-		}
-		catch (IOException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
 		
+		
 		return scriptsDirectory.exists();
 	}
 	
Index: TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/export/conll2009/ToCoNLL2009.groovy
===================================================================
--- TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/export/conll2009/ToCoNLL2009.groovy	(revision 3299)
+++ TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/export/conll2009/ToCoNLL2009.groovy	(revision 3300)
@@ -28,7 +28,7 @@
 	 */
 	public boolean process(File outfile, CQPCorpus corpus, StructuralUnitProperty sentenceUnit, Property word, Property lemme, Property pos, String encoding)
 	{
-		def matches = corpus.query(new CQLQuery("<s> []+ </s>"), "TMPEXPORTCONNL", false).getMatches()
+		def matches = corpus.query(new CQLQuery("<s> []+ </s>"), "TMPEXPORTCONLL", false).getMatches()
 		if (debug) println matches.size()
 		int npositions = 0;
 		for (def match : matches) npositions += match.size() +1
Index: TXM/trunk/org.txm.edition.rcp/src/org/txm/edition/rcp/handlers/BackToText.java
===================================================================
--- TXM/trunk/org.txm.edition.rcp/src/org/txm/edition/rcp/handlers/BackToText.java	(revision 3299)
+++ TXM/trunk/org.txm.edition.rcp/src/org/txm/edition/rcp/handlers/BackToText.java	(revision 3300)
@@ -179,7 +179,7 @@
 			}
 		}
 		else {
-			text = corpus.getProject().getFirstText();
+			text = corpus.getProject().getText(corpus.getCorpusTextIdsList()[0]);
 			if (text == null) {
 				System.out.println("Error: corpus has no text.");
 				return false;
Index: TXM/trunk/org.txm.edition.rcp/src/org/txm/edition/rcp/editors/SynopticEditionEditor.java
===================================================================
--- TXM/trunk/org.txm.edition.rcp/src/org/txm/edition/rcp/editors/SynopticEditionEditor.java	(revision 3299)
+++ TXM/trunk/org.txm.edition.rcp/src/org/txm/edition/rcp/editors/SynopticEditionEditor.java	(revision 3300)
@@ -27,6 +27,7 @@
 //
 package org.txm.edition.rcp.editors;
 
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -72,7 +73,9 @@
 import org.txm.rcp.editors.IEditionEditor;
 import org.txm.rcp.editors.TXMEditor;
 import org.txm.rcp.swt.GLComposite;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.CQPCorpus;
+import org.txm.searchengine.cqp.serverException.CqiServerError;
 import org.txm.utils.logger.Log;
 
 /**
@@ -123,15 +126,19 @@
 	
 	private Project project;
 	
-	// TODO finish editor conversion
+	// TODO finish editor conversion and implement a TXMResult : EditionNavigation
 	@Override
 	public Text getResult() {
 		
 		for (EditionPanel panel : editionPanels.values()) {
 			return panel.getCurrentText();
 		}
-		if (textIdToOpen != null) return this.getCorpus().getProject().getText(textIdToOpen);
-		return this.getCorpus().getProject().getFirstText();
+		
+		if (textIdToOpen != null) {
+			return this.getCorpus().getProject().getText(textIdToOpen);
+		} else {
+			return this.getCorpus().getProject().getFirstText();
+		}
 	}
 	
 	public SearchEditionToolbar getSearchEditionToolbar() {
@@ -744,16 +751,6 @@
 		}
 	}
 	
-	// /**
-	// * Opens the default corpus edition with the first Text
-	// *
-	// * @param corpus
-	// */
-	// public boolean openEditions(CQPCorpus corpus) {
-	// if (corpus == null) return false;
-	// return openEditions(corpus, corpus.getProject().getFirstText(), corpus.getProject().getDefaultEdition());
-	// }
-	
 	/**
 	 * update editor title using the first panel only
 	 */
@@ -808,8 +805,11 @@
 	 * 
 	 * @param corpus
 	 * @param editionNames
+	 * @throws CqiServerError 
+	 * @throws IOException 
+	 * @throws CqiClientException 
 	 */
-	public boolean openEditions(List<String> editionNames, String textId, String pageId, String wordIds) {
+	public boolean openEditions(List<String> editionNames, String textId, String pageId, String wordIds) throws CqiClientException, IOException, CqiServerError {
 		
 		boolean reloadPanels = true ;// editionNames.size() != this.getEditionPanels().keySet().size(); // not working
 		if (!reloadPanels) {
@@ -859,12 +859,10 @@
 		}
 		
 		Text text = null;
-		if (textId != null) {
-			text = this.corpus.getProject().getText(textId);
-		} else {
-			text = this.corpus.getProject().getFirstText();
+		if (textId == null) {
+			textId = this.corpus.getCorpusTextIdsList()[0];
 		}
-		
+		text = this.corpus.getProject().getText(textId);
 		if (text == null) {
 			Log.warning("** Error: no text found with id="+textId);
 			return false;
@@ -951,7 +949,13 @@
 		editionNames = ((SynopticEditorInput) input).getEditions();
 		textIdToOpen = ((SynopticEditorInput) input).getTextID();
 		if (textIdToOpen == null) {
-			textIdToOpen = corpus.getProject().getFirstText().getName();
+			try {
+				textIdToOpen = corpus.getCorpusTextIdsList()[0];
+			}
+			catch (Exception e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
 		}
 		pageIdToOpen = ((SynopticEditorInput) input).getPageID();
 		wordIdsToOpen = ((SynopticEditorInput) input).getWordId();
Index: TXM/trunk/org.txm.edition.rcp/src/org/txm/edition/rcp/editors/SynopticEditorInput.java
===================================================================
--- TXM/trunk/org.txm.edition.rcp/src/org/txm/edition/rcp/editors/SynopticEditorInput.java	(revision 3299)
+++ TXM/trunk/org.txm.edition.rcp/src/org/txm/edition/rcp/editors/SynopticEditorInput.java	(revision 3300)
@@ -37,12 +37,6 @@
 		this.pageId = pageId;
 		this.wordId = wordIds;
 		
-		// if (text == null) {
-		// this.text = corpus.getProject().getFirstText();
-		// } else {
-		// this.text = corpus.getProject().getText(text);
-		// }
-		
 		if (editions == null) {
 			String[] defaultEditions = corpus.getProject().getDefaultEditionName().split(",");
 			this.editions = Arrays.asList(defaultEditions);
Index: TXM/trunk/org.txm.rcp/src/main/java/org/eclipse/jface/fieldassist/TXMAutoCompleteField.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/eclipse/jface/fieldassist/TXMAutoCompleteField.java	(revision 3299)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/eclipse/jface/fieldassist/TXMAutoCompleteField.java	(revision 3300)
@@ -1,9 +1,6 @@
 package org.eclipse.jface.fieldassist;
 
-import java.util.ArrayList;
-
 import org.eclipse.jface.bindings.keys.KeyStroke;
-import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.widgets.Control;
 
 /**
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TokenizerSection.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TokenizerSection.java	(revision 3299)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TokenizerSection.java	(revision 3300)
@@ -310,7 +310,7 @@
 	}
 	
 	@Override
-	public void update(Project project) {
+	public void updateFields(Project project) {
 		if (this.section.isDisposed()) return;
 		if (project == null) return;
 		
@@ -338,7 +338,7 @@
 	}
 	
 	@Override
-	public boolean save(Project project) {
+	public boolean saveFields(Project project) {
 		
 		if (textWhiteSpaces.getText().length() == 0 && textPuncts.getText().length() == 0) {
 			System.out.println(TXMUIMessages.errorWhileSavingTokenizerParameters);
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/EditionSection.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/EditionSection.java	(revision 3299)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/EditionSection.java	(revision 3300)
@@ -253,7 +253,7 @@
 	}
 	
 	@Override
-	public void update(Project project) {
+	public void updateFields(Project project) {
 		if (this.section.isDisposed()) return;
 		if (project == null) return;
 		
@@ -294,10 +294,11 @@
 		if (defaults != null && defaults.length() > 0 && defaultEditions != null) {
 			defaultEditions.setText(defaults);
 		}
+		
 	}
 	
 	@Override
-	public boolean save(Project project) {
+	public boolean saveFields(Project project) {
 		if (this.section != null && !this.section.isDisposed()) {
 			
 			String page_break_tag = "pb";
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/OptionsSection.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/OptionsSection.java	(revision 3299)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/OptionsSection.java	(revision 3300)
@@ -56,7 +56,7 @@
 	}
 	
 	@Override
-	public void update(Project project) {
+	public void updateFields(Project project) {
 		cleanButton.setSelection(project.getCleanAfterBuild());
 		//
 		//// value = (String) params.getKeyValueParameters().get(ImportKeys.MULTITHREAD);
@@ -65,7 +65,7 @@
 	}
 	
 	@Override
-	public boolean save(Project project) {
+	public boolean saveFields(Project project) {
 		if (this.section != null && !section.isDisposed()) {
 			//
 			project.setCleanAfterBuild(cleanButton.getSelection());
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/InfosSection.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/InfosSection.java	(revision 3299)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/InfosSection.java	(revision 3300)
@@ -73,7 +73,7 @@
 	}
 	
 	@Override
-	public void update(Project project) {
+	public void updateFields(Project project) {
 		section.setText(NLS.bind(TXMUIMessages.descriptionOfTheP0CorpusP1, project.getName(), project.getSrcdir()));
 		
 		String descContent = project.getDescription();
@@ -86,7 +86,7 @@
 	}
 	
 	@Override
-	public boolean save(Project project) {
+	public boolean saveFields(Project project) {
 		project.setDescription("<pre><br/>" + descText.getText().replace("\n", "<br/>") + "</pre>"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		
 		return true;
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/FrontXSLSection.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/FrontXSLSection.java	(revision 3299)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/FrontXSLSection.java	(revision 3300)
@@ -194,7 +194,7 @@
 	}
 	
 	@Override
-	public void update(Project project) {
+	public void updateFields(Project project) {
 		if (this.section.isDisposed()) return;
 		
 		this.project = project;
@@ -210,7 +210,7 @@
 	}
 	
 	@Override
-	public boolean save(Project project) {
+	public boolean saveFields(Project project) {
 		if (xsltfileValue != null && !xsltfileValue.isDisposed())
 			project.setXslt(xsltfileValue.getText());
 		
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/CommandsSection.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/CommandsSection.java	(revision 3299)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/CommandsSection.java	(revision 3300)
@@ -100,7 +100,7 @@
 	}
 	
 	@Override
-	public void update(Project project) {
+	public void updateFields(Project project) {
 		CorpusCommandPreferences concPrefs = project.getCommandPreferences("concordance");
 		if (concPrefs.get("context_limits") != null) {
 			structLimitsText.setText(concPrefs.get("context_limits"));
@@ -127,7 +127,7 @@
 	}
 	
 	@Override
-	public boolean save(Project project) {
+	public boolean saveFields(Project project) {
 		if (this.section != null && !section.isDisposed()) {
 			CorpusCommandPreferences concPrefs = project.getCommandPreferences("concordance");
 			concPrefs.set("context_limits_type", "list");
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/ImportEditorSection.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/ImportEditorSection.java	(revision 3299)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/ImportEditorSection.java	(revision 3300)
@@ -1,6 +1,7 @@
 package org.txm.rcp.editors.imports.sections;
 
 import java.lang.reflect.Field;
+import java.util.ArrayList;
 
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.forms.widgets.FormToolkit;
@@ -10,14 +11,14 @@
 import org.txm.core.results.BeanParameters;
 import org.txm.core.results.Parameter;
 import org.txm.objects.Project;
-import org.txm.rcp.editors.TXMEditor;
-import org.txm.rcp.messages.TXMUIMessages;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
 
 public abstract class ImportEditorSection {
 	
+	ArrayList<ImportSubSection> subsections = new ArrayList<ImportSubSection>();
+	
 	public static TableWrapData getButtonLayoutData() {
 		TableWrapData td = new TableWrapData(TableWrapData.LEFT, TableWrapData.MIDDLE);
 		return td;
@@ -46,6 +47,18 @@
 		return gdata;
 	}
 	
+	public FormToolkit getToolkit() {
+		return toolkit;
+	}
+	
+	public ScrolledForm getScrolledForm() {
+		return form;
+	}
+	
+	public Section getSection() {
+		return section;
+	}
+	
 	protected ScrolledForm form;
 	
 	protected Project project;
@@ -80,6 +93,25 @@
 	 * @param project
 	 * @return true if all necessary parameters are set
 	 */
+	public final boolean check() {
+		
+		if (this.checkFields()) {
+			for (ImportSubSection sub : subsections) {
+				if (!sub.checkFields()) {
+					return false;
+				}
+			}
+			return true;
+		}
+		return false;
+	}
+	
+	/**
+	 * Check if all necessary parameters are set
+	 * 
+	 * @param project
+	 * @return true if all necessary parameters are set
+	 */
 	public abstract boolean checkFields();
 	
 	public abstract int getSectionSize(); // 1 2 3, it depends the number of element inserted in the form
@@ -93,17 +125,36 @@
 	 * Update the Project import parameters using the section widgets values
 	 * 
 	 * @param project
-	 * @deprecated interface write parameters in a import.xml
 	 */
-	@Deprecated
-	public abstract boolean save(Project params);
+	public final boolean save(Project project) {
+		
+		if (this.saveFields(project)) {
+			for (ImportSubSection sub : subsections) {
+				if (!sub.saveFields(project)) {
+					return false;
+				}
+			}
+			return true;
+		}
+		return false;
+	}
 	
 	/**
+	 * Update the Project import parameters using the section widgets values
+	 * 
+	 * @param project
+	 */
+	public abstract boolean saveFields(Project project);
+	
+	/**
 	 * write interface parameters to a XML DOM
 	 * 
+	 * NOT USED YET
+	 * 
 	 * @param xmlFile
 	 */
 	public boolean save(Document document) {
+		
 		NodeList sectionList = document.getElementsByTagName("section");
 		Element sectionElement = null;
 		for (int i = 0; i < sectionList.getLength(); i++) {
@@ -133,9 +184,20 @@
 	 * Update the section widgets with the Project import parameters
 	 * 
 	 * @param project
-	 * @deprecated interface is now loaded from a import.xml file
 	 */
-	@Deprecated
-	public abstract void update(Project project);
+	public final void update(Project project) {
+		
+		this.updateFields(project);
+		for (ImportSubSection sub : subsections) {
+			sub.updateFields(project);
+		}
+	}
+	
+	/**
+	 * Update the section widgets with the Project import parameters
+	 * 
+	 * @param project
+	 */
+	public abstract void updateFields(Project project);
 }
 
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/LangSection.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/LangSection.java	(revision 3299)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/LangSection.java	(revision 3300)
@@ -148,7 +148,7 @@
 	}
 	
 	@Override
-	public void update(Project project) {
+	public void updateFields(Project project) {
 		if (this.section.isDisposed()) return;
 		if (project == null) return;
 		
@@ -189,7 +189,7 @@
 	}
 	
 	@Override
-	public boolean save(Project project) {
+	public boolean saveFields(Project project) {
 		if (!this.section.isDisposed()) {
 			// LANGUAGE
 			String lang = null, annotate = null;
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/ImportSubSection.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/ImportSubSection.java	(revision 0)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/ImportSubSection.java	(revision 3300)
@@ -0,0 +1,22 @@
+package org.txm.rcp.editors.imports.sections;
+
+import org.eclipse.swt.SWT;
+import org.txm.objects.Project;
+import org.txm.rcp.swt.GLComposite;
+
+public abstract class ImportSubSection extends GLComposite {
+	
+	protected ImportEditorSection isection;
+	
+	public ImportSubSection(ImportEditorSection isection, String name) {
+		
+		super(isection.section, SWT.NONE, name);
+		this.isection = isection;
+	}
+	
+	public abstract void updateFields(Project project);
+	
+	public abstract boolean saveFields(Project project);
+	
+	public abstract boolean checkFields();
+}
\ No newline at end of file

Property changes on: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/ImportSubSection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TextualPlansSection.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TextualPlansSection.java	(revision 3299)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TextualPlansSection.java	(revision 3300)
@@ -84,7 +84,7 @@
 	}
 	
 	@Override
-	public void update(Project project) {
+	public void updateFields(Project project) {
 		if (this.section != null && !section.isDisposed()) {
 			outsideTextElementsText.setText(project.getTextualPlan("OutSideTextTags"));
 			outsideTextElementsToEditText.setText(project.getTextualPlan("OutSideTextTagsAndKeepContent"));
@@ -94,7 +94,7 @@
 	}
 	
 	@Override
-	public boolean save(Project project) {
+	public boolean saveFields(Project project) {
 		if (this.section != null && !section.isDisposed()) {
 			
 			project.setTextualPlan("OutSideTextTags", outsideTextElementsText.getText().trim());
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/EncodingSection.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/EncodingSection.java	(revision 3299)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/EncodingSection.java	(revision 3300)
@@ -89,7 +89,7 @@
 			"ISO-8859-15", "Big5", "Windows-1256", "ISO-8859-9" };
 	
 	@Override
-	public void update(Project project) {
+	public void updateFields(Project project) {
 		if (this.section.isDisposed()) return;
 		if (project == null) return;
 		// fill combo and select default encoding
@@ -132,7 +132,7 @@
 	}
 	
 	@Override
-	public boolean save(Project project) {
+	public boolean saveFields(Project project) {
 		if (this.section == null) return true;
 		
 		String encoding = project.getEncoding();
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/FontSection.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/FontSection.java	(revision 3299)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/FontSection.java	(revision 3300)
@@ -71,7 +71,7 @@
 	}
 	
 	@Override
-	public void update(Project project) {
+	public void updateFields(Project project) {
 		if (this.section.isDisposed()) return;
 		if (project == null) return;
 		
@@ -88,7 +88,7 @@
 	}
 	
 	@Override
-	public boolean save(Project project) {
+	public boolean saveFields(Project project) {
 		if (!this.section.isDisposed()) {
 			String value = fontCombo.getText();
 			if (DEFAULTFONT.equals(value)) value = "";
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TRSSection.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TRSSection.java	(revision 3299)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TRSSection.java	(revision 3300)
@@ -1,7 +1,5 @@
 package org.txm.rcp.editors.imports.sections;
 
-import java.util.HashMap;
-
 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Button;
@@ -91,7 +89,7 @@
 	}
 	
 	@Override
-	public void update(Project project) {
+	public void updateFields(Project project) {
 		if (this.section.isDisposed()) return;
 		if (project == null) return;
 		
@@ -103,7 +101,7 @@
 	}
 	
 	@Override
-	public boolean save(Project project) {
+	public boolean saveFields(Project project) {
 		if (this.section != null && !this.section.isDisposed()) {
 			
 			IEclipsePreferences customNode = project.getImportParameters();
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/CorpusPage.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/CorpusPage.java	(revision 3299)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/CorpusPage.java	(revision 3300)
@@ -27,11 +27,8 @@
 //
 package org.txm.rcp.editors.imports;
 
-import java.io.File;
 import java.io.IOException;
 import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.util.Date;
 import java.util.HashMap;
 
 import javax.xml.parsers.ParserConfigurationException;
@@ -49,7 +46,6 @@
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPartConstants;
 import org.eclipse.ui.forms.IManagedForm;
 import org.eclipse.ui.forms.editor.FormPage;
 import org.eclipse.ui.forms.events.HyperlinkAdapter;
@@ -62,10 +58,10 @@
 import org.eclipse.ui.forms.widgets.Section;
 import org.eclipse.ui.forms.widgets.TableWrapData;
 import org.eclipse.ui.forms.widgets.TableWrapLayout;
-import org.txm.metadatas.Metadatas;
 import org.txm.objects.Project;
 import org.txm.rcp.IImageKeys;
 import org.txm.rcp.corpuswizard.ImportWizard;
+import org.txm.rcp.editors.imports.sections.CommandsSection;
 import org.txm.rcp.editors.imports.sections.EditionSection;
 import org.txm.rcp.editors.imports.sections.EncodingSection;
 import org.txm.rcp.editors.imports.sections.FontSection;
@@ -76,15 +72,10 @@
 import org.txm.rcp.editors.imports.sections.OptionsSection;
 import org.txm.rcp.editors.imports.sections.TextualPlansSection;
 import org.txm.rcp.editors.imports.sections.TokenizerSection;
-import org.txm.rcp.editors.imports.sections.CommandsSection;
-import org.txm.rcp.handlers.results.DeleteObject;
 import org.txm.rcp.handlers.scripts.ExecuteImportScript;
 import org.txm.rcp.messages.TXMUIMessages;
 import org.txm.rcp.utils.SWTEditorsUtils;
-import org.txm.utils.AsciiUtils;
 import org.txm.utils.logger.Log;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
 import org.xml.sax.SAXException;
 
 /**
@@ -753,8 +744,9 @@
 				if (project != null) {
 					saveConfig();
 				}
-				else
+				else {
 					System.out.println(TXMUIMessages.cannotStartImportConfigurationNoSourceFolderSelected);
+				}
 			}
 		};
 		
@@ -769,8 +761,9 @@
 						startImport();
 					}
 				}
-				else
+				else {
 					System.out.println(TXMUIMessages.cannotStartImportConfigurationNoSourceFolderSelected);
+				}
 			}
 		};
 		
@@ -939,37 +932,37 @@
 		// TEST ALL SECTIONS
 		boolean doSave = true;
 		if (infosSection != null && !infosSection.isDisposed()) {
-			doSave = doSave & infosSection.checkFields();
+			doSave = doSave & infosSection.check();
 		}
 		if (langSection != null && !langSection.isDisposed()) {
-			doSave = doSave & langSection.checkFields();
+			doSave = doSave & langSection.check();
 		}
 		if (xsltSection != null && !xsltSection.isDisposed()) {
-			doSave = doSave & xsltSection.checkFields();
+			doSave = doSave & xsltSection.check();
 		}
 		if (tokenizerSection != null && !tokenizerSection.isDisposed()) {
-			doSave = doSave & tokenizerSection.checkFields();
+			doSave = doSave & tokenizerSection.check();
 		}
 		if (uiSection != null && !uiSection.isDisposed()) {
-			doSave = doSave & uiSection.checkFields();
+			doSave = doSave & uiSection.check();
 		}
 		if (encodingSection != null && !encodingSection.isDisposed()) {
-			doSave = doSave & encodingSection.checkFields();
+			doSave = doSave & encodingSection.check();
 		}
 		if (editionSection != null && !editionSection.isDisposed()) {
-			doSave = doSave & editionSection.checkFields();
+			doSave = doSave & editionSection.check();
 		}
 		if (fontSection != null && !fontSection.isDisposed()) {
-			doSave = doSave & fontSection.checkFields();
+			doSave = doSave & fontSection.check();
 		}
 		if (textualPlansSection != null && !textualPlansSection.isDisposed()) {
-			doSave = doSave & textualPlansSection.checkFields();
+			doSave = doSave & textualPlansSection.check();
 		}
 		if (optionsSection != null && !optionsSection.isDisposed()) {
-			doSave = doSave & optionsSection.checkFields();
+			doSave = doSave & optionsSection.check();
 		}
 		if (additionalSection != null && !additionalSection.isDisposed()) {
-			doSave = doSave & additionalSection.checkFields();
+			doSave = doSave & additionalSection.check();
 		}
 		if (!doSave) {
 			System.out.println("Some fields are not correctly filled.");
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/ImportEditorSectionConfigurator.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/ImportEditorSectionConfigurator.java	(revision 0)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/ImportEditorSectionConfigurator.java	(revision 3300)
@@ -0,0 +1,17 @@
+package org.txm.rcp.editors.imports;
+
+
+/**
+ * Section configurator that adds section or subsection (a part of section)
+ * 
+ * @author mdecorde
+ *
+ */
+public abstract class ImportEditorSectionConfigurator {
+	
+	public ImportEditorSectionConfigurator() {
+		
+	}
+	
+	public abstract void installSections();
+}

Property changes on: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/ImportEditorSectionConfigurator.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/ImportModuleCustomization.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/ImportModuleCustomization.java	(revision 3299)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/ImportModuleCustomization.java	(revision 3300)
@@ -3,8 +3,13 @@
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IContributor;
+import org.eclipse.core.runtime.RegistryFactory;
+import org.txm.core.messages.TXMCoreMessages;
 import org.txm.rcp.editors.imports.sections.ImportEditorSection;
 import org.txm.rcp.editors.imports.sections.TRSSection;
+import org.txm.utils.logger.Log;
 
 /**
  * static class that defines what parameters are used by import modules
@@ -46,11 +51,11 @@
 	
 	public static final String IMPORT_NAME = "import_name";
 	
-	static HashMap<String, HashMap<String, Boolean>> sectionsPerImportModule = new HashMap<>();
+	public static HashMap<String, HashMap<String, Boolean>> sectionsPerImportModule = new HashMap<>();
 	
-	static HashMap<String, Class<? extends ImportEditorSection>> additionalSections = new HashMap<>();
+	public static HashMap<String, Class<? extends ImportEditorSection>> additionalSections = new HashMap<>();
 	
-	static HashMap<String, String> names = new HashMap<>();
+	public static HashMap<String, String> names = new HashMap<>();
 	
 	static { // init import module
 		HashMap<String, Boolean> params = new HashMap<>();
@@ -167,7 +172,6 @@
 		params.put(OPTIONS, true);
 		sectionsPerImportModule.put("transcriberLoader.groovy", params); //$NON-NLS-1$
 		names.put("transcriberLoader.groovy", "XML-TRS + CSV"); //$NON-NLS-1$ //$NON-NLS-2$
-		additionalSections.put("transcriberLoader.groovy", TRSSection.class);
 		
 		params = new HashMap<>();
 		params.put(PARALLEL, false);
@@ -320,6 +324,25 @@
 		params.put(OPTIONS, true);
 		sectionsPerImportModule.put("xtzLoader.groovy", params); //$NON-NLS-1$
 		names.put("xtzLoader.groovy", "XML-TEI Zero + CSV"); //$NON-NLS-1$ //$NON-NLS-2$
+		
+		IConfigurationElement[] contributions = RegistryFactory.getRegistry().getConfigurationElementsFor("org.txm.rcp.importsection");
+			
+		for (int i = 0; i < contributions.length; i++) {
+			try {
+				IContributor c = contributions[i].getContributor();
+				@SuppressWarnings("unchecked")
+				ImportEditorSectionConfigurator iesc = (ImportEditorSectionConfigurator) contributions[i].createExecutableExtension("class"); //$NON-NLS-1$
+				
+				Log.fine(TXMCoreMessages.bind("Initializing import section with: {0}...", iesc));
+				
+				iesc.installSections();
+			}
+			catch (Exception e) {
+				Log.severe("Error: failed to instantiate " + contributions[i].getName() + ".");
+				e.printStackTrace();
+			}
+		}	
+		additionalSections.put("transcriberLoader.groovy", TRSSection.class);
 	}
 	
 	/**
Index: TXM/trunk/org.txm.rcp/plugin.xml
===================================================================
--- TXM/trunk/org.txm.rcp/plugin.xml	(revision 3299)
+++ TXM/trunk/org.txm.rcp/plugin.xml	(revision 3300)
@@ -3,6 +3,7 @@
 <plugin>  
    <extension-point id="org.txm.rcp.extentionpoint.command" name="%extension-point.name" schema="schema/org.txm.rcp.extentionpoint.command.exsd"/>
    <extension-point id="org.txm.rcp.editors.TXMEditorExtension" name="%extension-point.name.0" schema="schema/org.txm.rcp.editors.TXMEditorExtension.exsd"/>
+   <extension-point id="org.txm.rcp.importsection" name="Import parameter section" schema="schema/org.txm.rcp.importsection.exsd"/>
  
    <extension
          id="Application"
Index: TXM/trunk/org.txm.rcp/schema/org.txm.rcp.importsection.exsd
===================================================================
--- TXM/trunk/org.txm.rcp/schema/org.txm.rcp.importsection.exsd	(revision 0)
+++ TXM/trunk/org.txm.rcp/schema/org.txm.rcp.importsection.exsd	(revision 3300)
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.txm.rcp" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appinfo>
+         <meta.schema plugin="org.txm.rcp" id="org.txm.rcp.importsection" name="Import parameter section"/>
+      </appinfo>
+      <documentation>
+         [Enter description of this extension point.]
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appinfo>
+            <meta.element />
+         </appinfo>
+      </annotation>
+      <complexType>
+         <choice minOccurs="1" maxOccurs="unbounded">
+            <element ref="importsectionconfiguration"/>
+         </choice>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute translatable="true"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="importsectionconfiguration">
+      <complexType>
+         <attribute name="class" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="java" basedOn="org.txm.rcp.editors.imports.ImportEditorSectionConfigurator:"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="since"/>
+      </appinfo>
+      <documentation>
+         [Enter the first release in which this extension point appears.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="examples"/>
+      </appinfo>
+      <documentation>
+         [Enter extension point usage example here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="apiinfo"/>
+      </appinfo>
+      <documentation>
+         [Enter API information here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="implementation"/>
+      </appinfo>
+      <documentation>
+         [Enter information about supplied implementation of this extension point.]
+      </documentation>
+   </annotation>
+
+
+</schema>

Property changes on: TXM/trunk/org.txm.rcp/schema/org.txm.rcp.importsection.exsd
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.annotation.rcp/src/org/txm/annotation/rcp/editors/imports/sections/AnnotationSection.java
===================================================================
--- TXM/trunk/org.txm.annotation.rcp/src/org/txm/annotation/rcp/editors/imports/sections/AnnotationSection.java	(revision 3299)
+++ TXM/trunk/org.txm.annotation.rcp/src/org/txm/annotation/rcp/editors/imports/sections/AnnotationSection.java	(revision 3300)
@@ -56,13 +56,13 @@
 	}
 	
 	@Override
-	public void update(Project project) {
+	public void updateFields(Project project) {
 		if (this.section.isDisposed()) return;
 		if (project == null) return;
 	}
 	
 	@Override
-	public boolean save(Project project) {
+	public boolean saveFields(Project project) {
 		if (!this.section.isDisposed()) {
 			String value = nameText.getText();
 			
Index: TXM/trunk/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/InstallRUserPart.java
===================================================================
--- TXM/trunk/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/InstallRUserPart.java	(revision 3299)
+++ TXM/trunk/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/InstallRUserPart.java	(revision 3300)
@@ -17,7 +17,7 @@
 		
 		File scriptsDirectory = new File(dir, "scripts");
 		scriptsDirectory.mkdirs();
-		BundleUtils.copyFiles("org.txm.statsengine.r.core", "", "", "R/", scriptsDirectory);
+		BundleUtils.copyFiles("org.txm.statsengine.r.core", "", "", "R/", scriptsDirectory, true);
 		
 		return dir.exists() && scriptsDirectory.exists();
 	}
Index: TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/editors/imports/sections/AnnotationSection.java
===================================================================
--- TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/editors/imports/sections/AnnotationSection.java	(revision 3299)
+++ TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/editors/imports/sections/AnnotationSection.java	(revision 3300)
@@ -57,7 +57,7 @@
 	}
 	
 	@Override
-	public void update(Project project) {
+	public void updateFields(Project project) {
 		if (this.section.isDisposed()) return;
 		if (project == null) return;
 		
@@ -71,7 +71,7 @@
 	}
 	
 	@Override
-	public boolean save(Project project) {
+	public boolean saveFields(Project project) {
 		if (!this.section.isDisposed()) {
 			String value = nameText.getText();
 			
Index: TXM/trunk/org.txm.dictionary.rcp/src/org/txm/dictionary/commands/DoInstallStep.java
===================================================================
--- TXM/trunk/org.txm.dictionary.rcp/src/org/txm/dictionary/commands/DoInstallStep.java	(revision 3299)
+++ TXM/trunk/org.txm.dictionary.rcp/src/org/txm/dictionary/commands/DoInstallStep.java	(revision 3300)
@@ -3,14 +3,10 @@
 
 import java.io.File;
 
-import org.eclipse.core.commands.ExecutionEvent;
 import org.osgi.framework.Version;
 import org.txm.PostInstallationStep;
 import org.txm.Toolbox;
-import org.txm.core.preferences.TBXPreferences;
-import org.txm.core.preferences.TXMPreferences;
 import org.txm.dictionary.preferences.DictionaryPreferences;
-import org.txm.rcp.TxmPreferences;
 import org.txm.utils.BundleUtils;
 import org.txm.utils.logger.Log;
 
@@ -43,7 +39,17 @@
 		System.out.println("Post-installing Dictionary version="+currentVersion);
 		
 		File macroDirectory = new File(Toolbox.getTxmHomePath(), "scripts/macro/org/txm/macro");
-		if (!BundleUtils.copyFiles("Dictionary", "src", "org/txm/macro/", "frolex", macroDirectory)) {
+		
+		File previousURSMacroDirectory = new File(macroDirectory, "frolex");
+		if (previousURSMacroDirectory.exists() && saved != null && saved.length() > 0) {
+			File back = new File(previousURSMacroDirectory.getParentFile(), previousURSMacroDirectory.getName()+"_"+saved); //$NON-NLS-1$
+			if (back.exists()) {
+				return;
+			}
+			previousURSMacroDirectory.renameTo(back);
+		}
+		
+		if (!BundleUtils.copyFiles("Dictionary", "src", "org/txm/macro/", "frolex", macroDirectory, true)) {
 			Log.severe("Error while coping Dictionary org/txm/macro/frolex in "+macroDirectory.getAbsolutePath());
 			return;
 		}
Index: TXM/trunk/org.txm.connlu.core/META-INF/MANIFEST.MF
===================================================================
--- TXM/trunk/org.txm.connlu.core/META-INF/MANIFEST.MF	(revision 3299)
+++ TXM/trunk/org.txm.connlu.core/META-INF/MANIFEST.MF	(revision 3300)
@@ -1,12 +1,12 @@
 Manifest-Version: 1.0
 Automatic-Module-Name: org.txm.connlu.core
-Bundle-SymbolicName: org.txm.ud.core;singleton:=true
-Export-Package: org.txm.ud.core,
- org.txm.ud.function,
- org.txm.ud.preferences
-Bundle-Name: CONNLU
+Bundle-SymbolicName: org.txm.conllu.core;singleton:=true
+Export-Package: org.txm.conllu.core,
+ org.txm.conllu.core.function,
+ org.txm.conllu.core.preferences
+Bundle-Name: org.txm.conllu.core
 Bundle-Version: 1.0.0.qualifier
-Require-Bundle: org.txm.core;bundle-version="0.8.0";visibility:=reexport,
+Require-Bundle: org.txm.core;visibility:=reexport,
  org.txm.groovy.core;bundle-version="1.0.0";visibility:=reexport,
  org.txm.treesearch.core;bundle-version="1.0.0";visibility:=reexport,
  org.txm.libs.deptreeviz;bundle-version="0.3.0";visibility:=reexport,
Index: TXM/trunk/org.txm.connlu.core/.project
===================================================================
--- TXM/trunk/org.txm.connlu.core/.project	(revision 3299)
+++ TXM/trunk/org.txm.connlu.core/.project	(revision 3300)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>org.txm.ud.core</name>
+	<name>org.txm.conllu.core</name>
 	<comment></comment>
 	<projects>
 	</projects>
Index: TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/conll2tiger-ud.pl
===================================================================
--- TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/conll2tiger-ud.pl	(revision 0)
+++ TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/conll2tiger-ud.pl	(revision 3300)
@@ -0,0 +1,1136 @@
+#!/usr/bin/perl
+
+use File::Basename;
+
+my $CMD="conll2tiger.pl";
+my $VERSION="1.5";
+my $MODIFIED="8/12/2015";   # angepasst für Perseus CoNLL erzeugt mit conll.pl -l.  CHECK: funktioniert SRCMF noch?
+
+# columns (default are the predicted values in CoNLL 2009 format)
+my $coll = 2;  # lemma
+my $colm = 3;  # morph (pos)
+my $colf = 5;  # features
+my $colh = 6;  # head
+my $cold = 7; # deprel
+my $outdir = "conllexport"; # deprel
+my $split = 1000; # split output after nr sentences
+
+# tree structure
+my %dominates  = ();
+my %deprel  = ();  # deprel{nr} = deprel
+my @daughters = ();    # daughter nodes, stored in %dominates
+my %duplicates = my %relators = my %notes = my %aux = ();    # store nodes of duplicates, relators
+my $type = "--"; # node attribute
+my $vform = my $vlemma = "--"; # node attributes for verbs store form and lemma
+my $label = "D"; # default edge label
+my $nt_features_header = ''; # option -x 
+my $nt_features = ''; # option -x 
+my $nt_empty_features = ''; # option -x 
+my @scodes = (); # option -x
+my $add_to_sentcode = '';
+my $rootname = 'root';  # default
+my $featcol = 13;
+
+######################################################################
+#  conll2tiger.pl: converts CoNLL-U from the Universal Dependecies
+#  treebanks to TigerXML
+#          Achim Stein <achim.stein@ling.uni-stuttgart.de>
+# License : GNU GPL v. 3 (see the LICENSE file)
+######################################################################
+# TO DO:
+# - coordination
+# - Umgang mit zu langen, gesplitteten Sätzen (conll.pl -r 100)
+#   - dafür wurde als Wort-ID statt $w (for-Zähler) $wnr verwendet
+#   - es gibt aber noch unbound nodes wenn Regens entfernt (im anderen Teil) ist
+######################################################################
+# Modifications by Alexei Lavrentiev <alexei.lavrentev@ens-lyon.fr> 
+# for Profiterole project (2019-2021)
+
+# 2019-09-25
+# - updated default column numbers for CONNL-U SRCMF format
+# - added processing for comment lines
+# - added @textid to terminal nodes
+# - deleted ppos, pmor et plemma (predicted tags and lemmas)
+# - replaced specific SRCMF with standard UD tags
+
+# Update 2020-05-13
+# - added @editionId for synchronization with BFM word ID
+
+# Update 2021-03-22
+# - using $infilename for @textid
+# - added support for .conllu extension
+
+# Update 2021-03-29
+# - added editionId to declarations in main.xml
+
+# Update 2021-07-16
+# - added "punct" to cat values
+
+# Update 2021-07-20
+# - added cat value list compiled from 
+#   https://universaldependencies.org/ext-dep-index.html and the previous 
+#   version. All relation types and subtypes from the UD 2.8 corpora 
+#   should be there.
+# - contractions indexed
+######################################################################
+
+my $HELP="
+==================================================================
+$CMD $VERSION: Help
+==================================================================
+FUNKTION: converts CoNLL parser output to TigerXML (for mate tools)
+          creates master file, splits input files, corrects unbound nodes
+SYNTAX:      $CMD [Options] <CoNLL file>
+OPTIONEN:
+ -c          ignore coordination (delete coordx- prefix in deprel)
+ -C str      corpus specials: nca
+ -h          show help
+ -o          create all files in this output directory (default: $outdir)
+set COLUMNS for required info (0 = column 1, 1 = column 2, etc.)
+ -D nr       colum for deprel default=$cold
+ -H nr       colum for head default=$colh
+ -M nr       colum for morphology (POS) default=$colm
+ -F nr       colum for morph. features default=$colf
+ -R str      Root category (default: $rootname)
+ -s nr       split output files after each nr sentence (default = $split)
+ -x str,...  include these attributes if present in the -X column of the first word
+             (the first code is also copied into the sentence id)
+ -X nr       the column where attributes are stored (default: $featcol)
+EXAMPLE:
+  - For mate parser output: no further options required
+    $CMD parsed.conll
+  - For Le Monde 2005: include attributes
+    gunzip -c parsed.conll.gz | conll2tiger.pl -x date,artnr,rubr
+  - For NCA:
+    conll2tiger.pl -C nca -x id,deaf,titreDees,editionDees,manuscritDees,regionDees,coefficientRegionDees,dateMoyenneDees,codeRegional,coefficientRegional,vers,ponctuation,mots,passage,commentairePhilologique,qualite,sourceQualite,commentaireForme,auteur,dateComposition,dateManuscrit,lieuComposition,lieuManuscrit,sourceDateComposition,sourceDateManuscrit,sourceLieuComposition,sourceLieuManuscrit,genre,traditionTextuelle,analyses,lignes,editionNCA tagged-oldfrench-lrec2014-dep.conll
+";
+
+###########################################################################
+#                    DO NOT MODIFY FOLLOWING CODE !
+###########################################################################
+
+
+###########################################################################
+# parse the command line
+###########################################################################
+
+use Getopt::Std;
+getopts('c:C:hD:H:M:o:R:s:x:X:');
+
+if (defined($opt_h)) {
+  print STDERR "$HELP";
+  exit(0);
+}
+
+if (defined($opt_o)) {
+  $outdir = $opt_o
+}
+if (defined($opt_C)) {
+  $corpus = $opt_C;
+}
+if (defined($opt_D)) {
+  $cold = $opt_D
+}
+if (defined($opt_H)) {
+  $colh = $opt_H
+}
+if (defined($opt_M)) {
+  $colm = $opt_M
+}
+
+if (defined($opt_R)) {
+  $rootname = $opt_R;
+}
+
+if (defined($opt_s)) {
+  $split = $opt_s
+}
+
+if (defined($opt_X)) {
+  $featcol = $opt_X;
+}
+
+if (defined($opt_x)) {
+  @scodes = split(",", $opt_x);
+  for (my $i=0; $i<=$#scodes; $i++) {
+    $nt_features_header = $nt_features_header . sprintf("<feature name=\"%s\" domain=\"NT\"></feature>\n", $scodes[$i]);
+  }
+  $nt_features_header =~ s/\bid\b/ncaid/;  # avoid reserved Tiger attribute "id"
+}
+
+
+my @colnames = ("url", "ID", "FORM", "LEMMA", "PLEMMA", "POS", "PPOS", "FEAT", "PFEAT", "HEAD", "PHEAD", "DEPREL", "PDEPREL");
+# my %pos = %lemma = %form = %deprel = %head = %governs = %cat2abbrev = %abbrev2cat = %coordnr_cat = %coordnr_head = %w_coordnr = %w_head = %w_deprel = %first_coordnr = %coordnr_first = %verb_head = ();
+my @coordelements = ();
+
+my $id = my $form = my $lemma = my $plemma = my $pos = my $ppos = my $feat = my $pfeat = my $head = my $phead = my $deprel = my $pdeprel = my $edition_id = "";
+
+my $timestamp = `date`;
+chomp($timestamp);
+
+my $infile = $ARGV[0];
+$infile =~ s/\.conllu?//i;
+if($infile eq '') {
+  $infile = 'subcorpus';
+}
+my $counter = 1;
+$suffix = sprintf("%05d", $counter);
+$infilename = basename($infile);
+
+$foo = `if [ ! -d $outdir ];then mkdir $outdir;fi`;
+open(XML, ">$outdir/$infilename-$suffix.xml")  or die "\nopen file error of $outdir/$infilename-$suffix.xml\n";
+open(LOG, ">$outdir/conversion.log")  or die "\nopen file error of conversion.log\n";
+open(MASTER, ">$outdir/main.xml")  or die "\nopen file error of main.xml\n";
+write_xml_header();
+write_master_header ();
+
+# flush output for log and master file
+select(LOG); $| = 1; 
+select(MASTER); $| = 1;
+
+$commandline = $0 . " ". (join " ", @ARGV);
+print LOG "$commandline\n\n";
+
+print MASTER "<subcorpus name='$infilename-$suffix' external='file:$infilename-$suffix.xml'/>\n";
+
+$/ = ""; # treat empty line as RS
+while (<>) {
+  if($. % $split == 0) {
+    print XML "</subcorpus>\n";
+    close(XML);
+    $suffix = sprintf("%05d", ++$counter);
+    open(XML, ">$outdir/$infilename-$suffix.xml")  or die "\nopen file error\n";
+    write_xml_header();
+    print MASTER "<subcorpus name='$infilename-$suffix' external='file:$infilename-$suffix.xml'/>\n";
+  }
+
+  # ----------------------------------------
+  # set root (or fake root if ROOT is missing)
+  # ----------------------------------------
+  $rootnode = $fakeroot = 0; # m = Treat string as multiple lines, so that ^ matches beginning of line
+  $thisrootname = $rootname;
+  ($rootnode) = (/^(\d+?)\s.*?\b$rootname\b/m);  # real root marked by parser
+  if($rootnode == 0) {
+#    ($rootnode) = (/^(\d+?)\t.*?\t-1\t0\t/m);  # no marked ROOT, but top node (head = 0)   TOO SPECIFIC
+#    ($rootnode) = (/^(\d+?)\t.*?\t.*?\t.*?\t.*?\t.*?\t.*?\t.*?\t0\t/m);  # no marked ROOT, but top node (head = 0) in col9 (original by Achim Stein)
+    ($rootnode) = (/^(\d+?)\t.*?\t.*?\t.*?\t.*?\t.*?\t0\t/m);  # no marked ROOT, but top node (head = 0) in col7 (updated by AL)
+    print LOG " Warning sentence $.: not marked root ($rootname), using top node $rootnode\n";
+    $fakeroot = 1;
+    $thisrootname = 'nSnt';
+  }
+  if($rootnode == 0) {
+    $rootnode = 1;   # set fake root if nothing goes
+    print LOG " Error sentence $.: setting fake root to first word:\n$_\n";
+    $fakeroot = 2;
+    $thisrootname = 'Err';
+  }
+
+  my @cols = ();
+  @words = split (/\n/);
+  @terminals = ();
+
+  %dominates = (); # empty at beginning of sentence
+  %deprel = (); # empty at beginning of sentence
+  %aux = (); # empty at beginning of sentence
+  @daughters = ();
+
+  my $commentlines = 0; #added by AL
+#  my $contractions = 0; #added by AL
+#  my $text_id = "unknown_text";
+my $text_id = $infilename;
+  my $sent_id = "0";
+
+  # ----------------------------------------
+  # loop through words #1: write tokens (terminal nodes) to XML file
+  # store tree relevant information for loop #2
+  # ----------------------------------------
+  for (my $w=0; $w<=$#words; $w++) {
+# Added by AL for comment lines
+    if ($words[$w] =~ /^#/) {
+	if ($words[$w] =~ /^# newdoc/) {
+		$text_id = $words[$w];
+		$text_id =~ s/# newdoc id = //;
+	}
+	elsif ($words[$w] =~ /^# sent_id/) {
+		$sent_id = $words[$w];
+		$sent_id =~ s/# sent_id = //;
+	}
+#	print LOG "Comment line loop 1: $words[$w]\n";
+	$commentlines++;
+	next;
+    }
+# Added by AL for contractions
+    elsif ($words[$w] =~ /^\d+-\d+/) {
+#	print LOG "Contraction line loop 1: $words[$w]\n";
+	$commentlines++;
+#	$contractions++;
+	next;
+    }
+    else {
+    if(defined ($opt_c)) {
+      $words[$w] =~ s/coord(\d+)-//g;
+    }
+    @cols = split (/\t/, $words[$w]);
+    $wnr = $cols[0];
+    $word = $cols[1];
+    $lemma = $cols[2];
+    $plemma = $cols[2]; # predicted
+    $pos = $cols[3];
+    $ppos = $cols[4]; # predicted
+    $mor = $cols[5];
+    $pmor = $cols[5]; # predicted
+    $cat = $cols[$cold];
+    $edition_id = $cols[9];
+    $edition_id =~ s/^.*XmlId=([^|]+).*$/\1/g;
+
+    if($cat =~ /[<>]/) {
+      print LOG "Warning in line $.: illegal node name: \"$cat\" -> \"Err2\"\n";
+      $cat = 'Err2';
+    }
+
+    # NCA: enclose lemmas in underscores (easier for regex construction)
+    if($corpus =~ /nca/i) {
+      $lemma = "_"."$lemma"."_"
+    }
+
+    clean_data ();
+
+    # get attribute-value pairs from col #13 of first word (option -x)
+      if($opt_x == "all") {
+	$cols[$featcol] = "all=".$cols[$featcol];
+      }
+    if($w == 0 && $cols[$featcol] =~ /=/) {
+#      print STDERR "========== getting att-value for word $w: $cols[$featcol] scodes=@scodes\n";
+      $nt_features = $nt_empty_features = '';
+#      while($cols[$featcol] =~ m/ (.*?)="([^"]*)"/gs) {   # quoted values
+      while($cols[$featcol] =~ m/ ?([^=]*?)="?([^, ]+)\b"?\b/gs) {  # maybe unquoted values (e.g. Le Monde 2005)
+	$att = $1;
+	$val = $2;
+	# pick the attributes that match those of the command line option -x
+	for (my $t=0; $t<=$#scodes; $t++) {
+	  if($att eq $scodes[$t]) {
+	    $val =~ s/\&/\&amp;/g;  #  replace "&" in values (appears in URLs)
+	    if($t == 0) { $add_to_sentcode = "_$att$val"; }
+	    $nt_features = $nt_features . " $att=\"$val\"";
+#	    print STDERR "$./$w/$featcol: $cols[$featcol] --- nt_features: $nt_features\n";
+	  }
+	  if($att eq $scodes[$t]) { $nt_empty_features = $nt_empty_features . " $att=\"--\"";}
+	}
+      }
+      # replace the reserved feature 'id' (Tiger)
+      $add_to_sentcode =~ s/\bid=/ncaid=/;
+      $nt_features =~ s/\bid=/ncaid=/;
+      $nt_empty_features =~ s/\bid=/ncaid=/;
+    } # if col 13 contains attributes
+    else {
+      if(defined($opt_x) && ($w==0)) {
+	print STDERR "Warning: sentence=$.  option -x is defined, but no attribute=value declarations were found!\n";
+      }
+    }
+
+
+    # store output for terminal node in array, output later. For double categories make a duplicate node.
+    $tempid = sprintf("%d_%d", $., $wnr);
+#    push(@terminals, sprintf("      <t id=\"s%d_%d\" word=\"%s\" pos=\"%s\" mor=\"%s\" lemma=\"%s\" ppos=\"%s\" pmor=\"%s\" plemma=\"%s\" textid=\"%s\" editionId=\"%s\"/>\n", $., $wnr, $word, $pos, $mor, $lemma, $ppos, $pmor, $plemma, $text_id, $edition_id));
+    push(@terminals, sprintf("      <t id=\"s%d_%d\" word=\"%s\" pos=\"%s\" mor=\"%s\" lemma=\"%s\" textid=\"%s\" editionId=\"%s\"/>\n", $., $wnr, $word, $pos, $mor, $lemma, $text_id, $edition_id));
+    if($cat =~ /_/) {
+#      push(@terminals, sprintf("      <t id=\"s%d_%d_dupl\" word=\"%s\" pos=\"%s\" mor=\"%s\" lemma=\"%s\" ppos=\"%s\" pmor=\"%s\" plemma=\"%s\" textid=\"%s\" editionId=\"%s\"/>\n", $., $wnr, "*", "_", "_", "_", "_", "_", "_", $text_id, $edition_id));
+      push(@terminals, sprintf("      <t id=\"s%d_%d_dupl\" word=\"%s\" pos=\"%s\" mor=\"%s\" lemma=\"%s\" textid=\"%s\" editionId=\"%s\"/>\n", $., $wnr, "*", "_", "_", "_", $text_id, $edition_id));
+      $duplicates{$tempid} = 1; # store, check later to attach the duplicates to the mother
+    }
+
+    # associate Aux with main verb, to create an attribute in the verb node in loop #2 (TODO: more than one Aux)
+    if($cat =~ /Aux/) {
+      $aux{$cols[$colh]} = "$word"."_"."$plemma"; # $aux{head} = word_lemma (of Aux)
+    }
+
+    # ----------------------------------------
+    # store information needed for tree
+    # ----------------------------------------
+    # if fake rootnode == 1: nSnt as root node
+    if (($fakeroot == 1) && ($w-$commentlines+1 == $rootnode)) {
+      $cat = 'nSnt';
+      $notes{$tempid} = 'Warning no marked ROOT node in CoNLL';  # TODO: geht nicht
+    }
+    # if fake rootnode == 2: flatten structure: attach all words to the first word
+    if (($fakeroot == 2) && ($w-$commentlines+1 != $rootnode)) {
+      $cols[$colh] = 1;
+      $notes{$tempid} = 'Error neither ROOT node nor top node in CoNLL'; 
+    }
+    # correct unbound words in parser output (phead = 0, but not marked as ROOT)
+    if(($cols[$colh] eq "0") && ($w-$commentlines+1 != $rootnode)) { #AL: added: -$commentlines
+      printf LOG " Warning sentence $. ($tempid): unbound node %d (attached to root %d)\n", ($w-$commentlines+1), $rootnode;
+      $cols[$colh] = $rootnode;
+      $cat = 'Err';  # let Err instead of deprel appear in dom attribute
+      $notes{$tempid} = 'Warning unbound node in CoNLL'; 
+    }
+    # store for R edge labels
+    if ($cols[$cold] =~ /RelN?C/) {
+      $relators{$tempid} = 1; 
+    }
+    # store deprel for dom attribute
+    $deprel{$tempid} = $cat; # $cols[$cold];
+    # if real root, add this node to daughter array, store array in hash dominates{head}{@daughters}
+    if (($fakeroot < 2) && ($w-$commentlines+1 != $rootnode)) {
+      @daughters = @{$dominates{$cols[$colh]}};  # get the array from the hash of the dominating node
+      push(@daughters, $wnr);
+      $dominates{$cols[$colh]} = [@daughters];
+    }
+  } # for each word loop #1
+} # AL condition end
+
+  # print graph code (needs root attribute) and terminal nodes
+  if ($rootnode == 0) {
+    $noroot++;
+    print LOG "Error sentence $. ($tempid): root node not found:\n$_\n"; next;
+  } else {
+    printf XML "<s id=\"s%s%s\" textid=\"$text_id\" sentid=\"$sent_id\">\n", $., $add_to_sentcode;
+    print XML "  <graph root=\"n$._$rootnode\">\n";
+    print XML "    <terminals>\n";
+    for (my $t=0; $t<=$#terminals; $t++) {
+      print XML $terminals[$t];
+    }
+    print XML "    </terminals>\n";
+  }
+  
+  # ----------------------------------------
+  # loop through words #2 to build Tiger tree (non terminal nodes)
+  # ----------------------------------------
+  print XML "    <nonterminals>\n";
+  for (my $i=0; $i<=$#words; $i++) {
+#Added AL for comment lines
+    if ($words[$i] =~ /^#/) {
+#       print LOG "Comment line loop 2 : $words[$i]\n";
+       next;
+    }
+#Added AL for contractions
+    if ($words[$i] =~ /^\d+-\d+/) {
+#       print LOG "Contraction loop 2 : $words[$i]\n";
+       next;
+    }
+   
+    else {
+
+    @cols = split (/\t/, $words[$i]);
+    $w = $cols[0];
+    ### TODO: redundante Variablenzuweisung (= loop #1)??
+    $word = $cols[1];
+    $lemma = $cols[2];
+    $plemma = $cols[3]; # predicted
+    $pos = $cols[4];
+    $ppos = $cols[5]; # predicted
+    $mor = $cols[6];
+    $pmor = $cols[7]; # predicted
+    $cat = $cols[$cold];
+
+    if($cat =~ /[<>]/) {
+      print Log "Warning in line $.: illegal node name: \"$cat\" -> \"Err2\"\n";
+      $cat = 'Err2';
+    }
+
+    #  OF parser has not learned punctuation: set cat for punctuation to PON
+    if(($corpus =~ /nca/i) && ($pos eq 'PON')) {
+      $cols[$cold] = $cat = 'Pon';
+    }
+
+    clean_data();
+
+    # retrieve daughters, make dom attribute (string of dominated nodes)
+    @daughters = @{$dominates{"$w"}};
+    $dom = '';
+    for (my $d=0; $d<=$#daughters; $d++) {
+      $dom = $dom . "_" . $deprel{"$._$daughters[$d]"};
+    }
+    if($dom =~ /_/) {
+      $dom =~ s/^_//;
+    } else {
+      $dom = '--';
+    }
+
+    # if verbal, set node attributes for verb form and lemma
+    $type = "nV";
+    $vform = $vlemma = "--";
+    if($pos =~ /VER/) { # AL: $ppos -> $pos
+      if($mor =~ /infi/) { $type = "VInf"; } #AL: $pmor -> $mor
+      elsif($pmor =~ /pper|ppre/) { $type = "VPar"; }
+      else { $type = "VFin"; }
+      # if Aux is present, create attribute for main verb 
+      if($aux{$w} =~ /(.*?)_(.*)/) {
+	$vform = "$1";
+	$vlemma = "$2";
+      }
+      # else create attr for simple verb
+      else {
+	$vform = $word;
+	$vlemma = $lemma; # AL: $plemma -> $lemma (always void in SRCMF)
+      }
+      # NCA: enclose lemmas in underscores (easier for regex construction)
+      if($corpus =~ /nca/i) {
+	$vlemma = "_"."$vlemma"."_"
+      }
+    }
+
+    # call output function (twice for duplicate categories)
+    if($cat =~ /(.*?)_(.*)/) {
+      write_nonterminals("$2", "");   # RelNC is always node (see clean categories), function is duplicate, e.g. SjPer_RelNC
+      write_nonterminals("$1", "_dupl");  # other category is duplicate
+    } else {
+      write_nonterminals($cat);
+    }
+  } # for words
+} #AL end condition
+
+  print XML "    </nonterminals>\n";
+  print XML "  </graph>\n";
+  print XML "</s>\n";
+  if($. % 100 == 0) { print STDERR "\b\b\b\b\b\b\b\b"; printf STDERR "%08d", $.;}
+} # main
+print XML "</subcorpus>\n";
+print STDERR "\n$CMD: $. sentences converted. Results in $outdir. Log in $outdir/conversion.log.\n";
+print STDERR "   Hint 1: on OS X convert master file to MacRoman, e.g  iconv -f latin1 -t macroman\n";
+print STDERR "   Hint 2: use tiger.pl -c <Tiger XML file> to detect unbound nodes.\n";
+print STDERR "   Hint 3: build reliable feature declarations using tiger.sh\n";
+print STDERR "           tiger.sh -a \"lemma word pos ppos\"  (for terminals)\n";
+print STDERR "           tiger.sh -A \"lemma word pos ppos\"  (for non-terminals)\n";
+if($noroot > 0) {print STDERR "$noroot sentences ignored: root not found (see log file)\n";}
+write_master_footer ();
+close(MASTER);
+close(XML);
+close(LOG);
+
+exit;
+
+
+
+# ----------------------------------------
+# sub
+# ----------------------------------------
+
+sub write_xml_header {
+  print XML "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
+  <subcorpus name=\"$infilename-$suffix\">
+";
+}
+
+sub write_master_header {
+  printf MASTER '<?xml version="1.0" encoding="UTF-8"?>
+';
+
+  printf MASTER "<corpus id=\"$corpus\">
+<head>
+  <meta><name>$corpus</name> 
+    <author>ILR Stuttgart</author> 
+    <date></date> 
+    <description>Parsed with mate tools using a SRCMF-based grammar model (http://srcmf.org). </description> 
+    <format>SRCMF</format>
+    <history>TigerXML converted by conll2tiger.pl</history>
+  </meta>
+";
+
+#  printf MASTER '<annotation>
+#<feature name="word" domain="T" ></feature>
+#<feature name="pos" domain="T" ></feature>
+#<feature name="mor" domain="T" ></feature>
+#<feature name="lemma" domain="T" ></feature>
+#<feature name="ppos" domain="T" ></feature>
+#<feature name="pmor" domain="T" ></feature>
+#<feature name="plemma" domain="T" ></feature>
+#<feature name="cat" domain="NT" >
+#  <value name="Apst">apostrophe</value>
+#  <value name="AtObj">attribut d objet</value>
+#  <value name="AtRfc">attribut réfléchi</value>
+#  <value name="AtSj">attribut de sujet</value>
+#  <value name="AttributReflechi">attribut réfléchi</value>
+#  <value name="Aux">auxilié</value>
+#  <value name="AuxA">auxilié actif</value>
+#  <value name="AuxP">auxilié passif</value>
+#  <value name="Circ">circonstant</value>
+#  <value name="Circ_RelNC">circonstant pronom relatif</value>
+#  <value name="Cmpl">complément</value>
+#  <value name="Cmpl_RelNC">complément pronom relatif</value>
+#  <value name="Coo">coordination</value>
+#  <value name="Det">déterminant</value>
+#  <value name="Err">unbound node in CoNLL input</value>
+#  <value name="Err2">illegal node name was replaced</value>
+#  <value name="GpCoo">coordonné</value>
+#  <value name="Ignorer">Ignorer</value>
+#  <value name="Insrt">incidente</value>
+#  <value name="Intj">interjection</value>
+#  <value name="Lac">lacune</value>
+#  <value name="ModA">modifieur attaché</value>
+#  <value name="ModD">modifieur détaché</value>
+#  <value name="Ng">négation</value>
+#  <value name="NgPrt">forclusif</value>
+#  <value name="Obj">objet</value>
+#  <value name="Obj_RelNC">direct object pronom relatif</value>
+#  <value name="Pon">ponctuation</value>
+#  <value name="PON">ponctuation</value>
+#  <value name="Regim">régime</value>
+#  <value name="RelC">relateur coordonnant</value>
+#  <value name="RelNC">relateur non coordonnant</value>
+#  <value name="Rfc">réfléchi</value>
+#  <value name="Rfx">réfléxif renforcé</value>
+#  <value name="SjImp">sujet impersonnel</value>
+#  <value name="SjPer">sujet personnel</value>
+#  <value name="SjPer_RelNC">sujet personnel pronom relatif</value>
+#  <value name="Snt">phrase</value>
+#  <value name="ROOT">phrase</value>
+#  <value name="StructureMaximale">structure maximale</value>
+#  <value name="VFin">verbe fini</value>
+#  <value name="VInf">verbe infinitif</value>
+#  <value name="nMax">structure non-maximale</value>
+#  <value name="nSnt">non-phrase</value>
+#</feature>
+#<feature name="coord" domain="NT" ></feature>
+#<feature name="dom" domain="NT" ></feature>
+#<feature name="type" domain="NT" >
+#  <value name="nV">élément non-verbal</value>
+#  <value name="VFin">verbe fini</value>
+#  <value name="VInf">verbe infinitif</value>
+#  <value name="VPar">verbe participial</value>
+#  <value name="--">nil</value>
+#</feature>
+#<feature name="vform" domain="NT"></feature>
+#<feature name="vlemma" domain="NT"></feature>
+#<feature name="note" domain="NT"></feature>
+#<feature name="snr" domain="NT"></feature>
+#';
+
+  printf MASTER '<annotation>
+<feature name="word" domain="T" ></feature>
+<feature name="pos" domain="T" ></feature>
+<feature name="mor" domain="T" ></feature>
+<feature name="lemma" domain="T" ></feature>
+<feature name="textid" domain="T" ></feature>
+<feature name="editionId" domain="T" ></feature>
+<feature name="cat" domain="NT" >
+  <value name="__UNDEF__">UNDEFINED !!!</value>
+  <value name="acl:adv">acl:adv</value> <!-- Ukrainian -->
+  <value name="acl:attr">acl:attr</value> <!-- Chukchi -->
+  <value name="acl:cleft">acl:cleft</value> <!-- Norwegian, Swedish -->
+  <value name="acl:fixed">acl:fixed</value> <!-- Beja -->
+  <value name="acl:inf">acl:inf</value> <!-- Portuguese -->
+  <value name="acl:relat">acl:relat</value> <!-- Chukchi -->
+  <value name="acl:relcl">relative clause modifier</value> <!-- Akkadian, Albanian, Apurina, Arabic, Armenian, Assyrian, Beja, Belarusian, Breton, Bulgarian, Chinese, Czech, Danish, Dutch, English, Erzya, Estonian, Faroese, Finnish, French, German, Greek, Hebrew, Hindi, Hindi English, Icelandic, Indonesian, Irish, Italian, Karelian, Kazakh, Komi Permyak, Komi Zyrian, Korean, Latin, Lithuanian, Livvi, Manx, Marathi, Moksha, Naija, North Sami, Norwegian, Old East Slavic, Old French, Persian, Polish, Portuguese, Russian, Sanskrit, Scottish Gaelic, Slovak, Spanish, Swedish, Swedish Sign Language, Swiss German, Tagalog, Tamil, Telugu, Thai, Ukrainian, Urdu, Welsh, Western Armenian, Wolof -->
+  <value name="acl">clausal modifier of noun (adnominal clause)</value>
+  <value name="advcl:abs">advcl:abs</value> <!-- Latin -->
+  <value name="advcl:cau">advcl:cau</value> <!-- Moksha -->
+  <value name="advcl:cleft">advcl:cleft</value> <!-- French, Naija -->
+  <value name="advcl:cmpr">advcl:cmpr</value> <!-- Latin, Polish -->
+  <value name="advcl:cond">advcl:cond</value> <!-- Tamil, Telugu, Uyghur -->
+  <value name="advcl:coverb">advcl:coverb</value> <!-- Cantonese -->
+  <value name="advcl:eval">advcl:eval</value> <!-- Komi Zyrian -->
+  <value name="advcl:lcl">advcl:lcl</value> <!-- Komi Permyak -->
+  <value name="advcl:lto">advcl:lto</value> <!-- Komi Zyrian -->
+  <value name="advcl:mcl">advcl:mcl</value> <!-- Komi Permyak -->
+  <value name="advcl:pred">advcl:pred</value> <!-- Latin -->
+  <value name="advcl:relcl">advcl:relcl</value> <!-- Polish, Western Armenian -->
+  <value name="advcl:sp">advcl:sp</value> <!-- Ukrainian -->
+  <value name="advcl:svc">advcl:svc</value> <!-- Ukrainian -->
+  <value name="advcl:tcl">advcl:tcl</value> <!-- Apurina, Erzya, Komi Permyak, Komi Zyrian, Moksha, Romanian, Skolt Sami -->
+  <value name="advcl">adverbial clause modifier</value>
+  <value name="advmod:arg">advmod:arg</value> <!-- Polish -->
+  <value name="advmod:cau">advmod:cau</value> <!-- Erzya, Komi Zyrian, Moksha -->
+  <value name="advmod:comp">advmod:comp</value> <!-- Erzya -->
+  <value name="advmod:deg">advmod:deg</value> <!-- Erzya, Komi Permyak, Komi Zyrian, Moksha, Skolt Sami -->
+  <value name="advmod:det">advmod:det</value> <!-- Ukrainian -->
+  <value name="advmod:df">advmod:df</value> <!-- Cantonese, Chinese -->
+  <value name="advmod:emph">emphasizing word, intensifier</value> <!-- Akkadian, Arabic, Armenian, Catalan, Chukchi, Croatian, Czech, Indonesian, Komi Zyrian, Latin, Lithuanian, Polish, Sanskrit, Slovak, South Levantine Arabic, Tamil, Turkish, Turkish German, Upper Sorbian, Uyghur, Western Armenian -->
+  <value name="advmod:eval">advmod:eval</value> <!-- Erzya, Komi Zyrian, Moksha, Skolt Sami -->
+  <value name="advmod:fixed">advmod:fixed</value> <!-- Beja -->
+  <value name="advmod:foc">advmod:foc</value> <!-- Erzya, Komi Zyrian, Moksha, Skolt Sami -->
+  <value name="advmod:freq">advmod:freq</value> <!-- Komi Zyrian, Moksha -->
+  <value name="advmod:lfrom">advmod:lfrom</value> <!-- Erzya, Komi Zyrian, Moksha -->
+  <value name="advmod:lmod">locative adverbial modifier</value> <!-- Apurina, Danish, Erzya, Komi Permyak, Komi Zyrian, Moksha, Skolt Sami -->
+  <value name="advmod:lmp">advmod:lmp</value> <!-- Erzya, Komi Zyrian -->
+  <value name="advmod:locy">advmod:locy</value> <!-- Hungarian -->
+  <value name="advmod:lto">advmod:lto</value> <!-- Erzya, Komi Zyrian, Moksha -->
+  <value name="advmod:mmod">advmod:mmod</value> <!-- Erzya, Komi Permyak, Komi Zyrian, Moksha, Skolt Sami -->
+  <value name="advmod:mode">advmod:mode</value> <!-- Hungarian -->
+  <value name="advmod:neg">advmod:neg</value> <!-- Apurina, Buryat, Kiche, Kurmanji, Latin, Maltese, Polish, Skolt Sami -->
+  <value name="advmod:obl">adverbial modifier + oblique nominal</value> <!-- Old French -->
+  <value name="advmod:que">advmod:que</value> <!-- Hungarian -->
+  <value name="advmod:tfrom">advmod:tfrom</value> <!-- Hungarian -->
+  <value name="advmod:tlocy">advmod:tlocy</value> <!-- Hungarian -->
+  <value name="advmod:tmod">advmod:tmod</value> <!-- Apurina, Erzya, Komi Permyak, Komi Zyrian, Moksha, Romanian, Skolt Sami -->
+  <value name="advmod:to">advmod:to</value> <!-- Hungarian -->
+  <value name="advmod:tto">advmod:tto</value> <!-- Hungarian -->
+  <value name="advmod">adverbial modifier</value>
+  <value name="amod:att">amod:att</value> <!-- Hungarian -->
+  <value name="amod:attlvc">amod:attlvc</value> <!-- Hungarian -->
+  <value name="amod:flat">amod:flat</value> <!-- Polish -->
+  <value name="amod">adjectival modifier</value>
+  <value name="appos:trans">appos:trans</value> <!-- Turkish German -->
+  <value name="appos">appositional modifier</value>
+  <value name="aux:aff">aux:aff</value> <!-- Beja -->
+  <value name="aux:aspect">aux:aspect</value> <!-- Komi Zyrian -->
+  <value name="aux:caus">aux:caus</value> <!-- Armenian, French, Western Armenian -->
+  <value name="aux:clitic">aux:clitic</value> <!-- Polish -->
+  <value name="aux:cnd">aux:cnd</value> <!-- Erzya, Komi Permyak, Komi Zyrian, Polish -->
+  <value name="aux:ex">aux:ex</value> <!-- Armenian, Western Armenian -->
+  <value name="aux:imp">aux:imp</value> <!-- Erzya, Polish -->
+  <value name="aux:nec">aux:nec</value> <!-- Komi Zyrian, Moksha, Skolt Sami -->
+  <value name="aux:neg">aux:neg</value> <!-- Chukchi, Erzya, Komi Permyak, Komi Zyrian, Maltese, Moksha, North Sami, Skolt Sami, Tamil -->
+  <value name="aux:opt">aux:opt</value> <!-- Erzya, Moksha -->
+  <value name="aux:part">aux:part</value> <!-- Maltese -->
+  <value name="aux:pass">passive auxilary</value> <!-- Afrikaans, Ancient Greek, Arabic, Assyrian, Belarusian, Bhojpuri, Breton, Bulgarian, Buryat, Chinese, Czech, Dutch, English, Faroese, Finnish, French, Frisian Dutch, Galician, German, Hindi, Italian, Kangri, Karelian, Latin, Latvian, Lithuanian, Maltese, Marathi, Norwegian, Old Church Slavonic, Old East Slavic, Old French, Persian, Polish, Portuguese, Romanian, Russian, Slovak, Spanish, Swedish, Swiss German, Tamil, Thai, Turkish German, Upper Sorbian, Vietnamese -->
+  <value name="aux:pot">aux:pot</value> <!-- Komi Zyrian -->
+  <value name="aux:q">aux:q</value> <!-- Erzya, Turkish, Turkish German -->
+  <value name="aux:tense">aux:tense</value> <!-- French, Komi Zyrian, Skolt Sami -->
+  <value name="aux">auxiliary</value>
+  <value name="case:acc">case:acc</value> <!-- Hebrew -->
+  <value name="case:adv">case:adv</value> <!-- Indonesian -->
+  <value name="case:aff">case:aff</value> <!-- Beja -->
+  <value name="case:det">preposition with determiner</value> <!-- Maltese, Old French -->
+  <value name="case:gen">case:gen</value> <!-- Hebrew -->
+  <value name="case:loc">case:loc</value> <!-- Armenian, Cantonese, Chinese, Western Armenian -->
+  <value name="case:pred">case:pred</value> <!-- Welsh -->
+  <value name="case:voc">case:voc</value> <!-- Irish, Scottish Gaelic -->
+  <value name="case">case marking</value>
+  <value name="cc:nc">cc:nc</value> <!-- Old French -->
+  <value name="cc:nc">Coordinated conjunct : non coordonant</value>
+  <value name="cc:preconj">cc:preconj</value> <!-- Arabic, English, Erzya, Estonian, Faroese, Finnish, German, Indonesian, Komi Permyak, Komi Zyrian, Moksha, North Sami, Persian, Polish, Portuguese, Romanian, Slovenian, Spanish, Thai, Turkish -->
+  <value name="cc:preconj">preconjunct</value>
+  <value name="cc">Coordinating conjunction</value>
+  <value name="cc">coordinating conjunction</value>
+  <value name="ccomp:cleft">ccomp:cleft</value> <!-- Polish -->
+  <value name="ccomp:obj">ccomp:obj</value> <!-- Hungarian, Polish -->
+  <value name="ccomp:obl">ccomp:obl</value> <!-- Hungarian -->
+  <value name="ccomp:pmod">ccomp:pmod</value> <!-- Romanian -->
+  <value name="ccomp:pred">ccomp:pred</value> <!-- Hungarian -->
+  <value name="ccomp">clausal complement</value>
+  <value name="clf">classifier</value>
+  <value name="compound:a">compound:a</value> <!-- Indonesian -->
+  <value name="compound:affix">compound:affix</value> <!-- Hebrew -->
+  <value name="compound:dir">compound:dir</value> <!-- Cantonese, Chinese -->
+  <value name="compound:ext">compound:ext</value> <!-- Cantonese, Chinese -->
+  <value name="compound:lvc">compound:lvc</value> <!-- Armenian, Hindi, Kazakh, Khunsari, Korean, Kurmanji, Marathi, Nayini, Persian, Soi, Tamil, Telugu, Turkish, Turkish German, Uyghur, Western Armenian -->
+  <value name="compound:lvc">light verb construction</value>
+  <value name="compound:nn">compound:nn</value> <!-- Finnish, Livvi, North Sami -->
+  <value name="compound:preverb">compound:preverb</value> <!-- Hungarian -->
+  <value name="compound:prt">compound:prt</value> <!-- Afrikaans, Arabic, Danish, Dutch, English, Erzya, Estonian, Faroese, Finnish, Frisian Dutch, German, Icelandic, Irish, Karelian, Komi Permyak, Naija, Norwegian, Persian, Spanish, Swedish, Swedish Sign Language, Swiss German, Tamil, Thai, Turkish German, Wolof, Yoruba -->
+  <value name="compound:prt">phrasal verb particle</value>
+  <value name="compound:quant">compound:quant</value> <!-- Cantonese -->
+  <value name="compound:redup">reduplicated compounds</value> <!-- Armenian, Bambara, Classical Chinese, Erzya, Hindi, Kurmanji, Marathi, Naija, Tagalog, Tamil, Telugu, Turkish, Turkish German, Uyghur, Welsh, Western Armenian -->
+  <value name="compound:smixut">compound:smixut</value> <!-- Hebrew -->
+  <value name="compound:svc">serial verb compounds</value> <!-- Amharic, Armenian, Marathi, Mbya Guarani, Naija, Swedish Sign Language, Telugu, Ukrainian, Western Armenian, Wolof, Yoruba -->
+  <value name="compound:vo">compound:vo</value> <!-- Cantonese, Chinese -->
+  <value name="compound:vv">compound:vv</value> <!-- Cantonese, Chinese -->
+  <value name="compound">compound</value>
+  <value name="conj:expl">conj:expl</value> <!-- Latin -->
+  <value name="conj:extend">conj:extend</value> <!-- Slovenian -->
+  <value name="conj:svc">conj:svc</value> <!-- Ukrainian -->
+  <value name="conj">conjunct</value>
+  <value name="cop:expl">cop:expl</value> <!-- Maltese -->
+  <value name="cop:locat">cop:locat</value> <!-- Polish -->
+  <value name="cop:own">cop:own</value> <!-- Finnish, Karelian, Livvi, Marathi -->
+  <value name="cop">copula</value>
+  <value name="csubj:cleft">csubj:cleft</value> <!-- Irish, Latin, Manx, Scottish Gaelic -->
+  <value name="csubj:cop">csubj:cop</value> <!-- Erzya, Estonian, Finnish, Irish, Komi Zyrian, Livvi, Manx, Moksha, Scottish Gaelic, Turkish -->
+  <value name="csubj:pass">clausal passive subject</value> <!-- Albanian, Amharic, Ancient Greek, Arabic, Armenian, Belarusian, Bulgarian, Catalan, Chinese, Classical Chinese, Czech, English, French, German, Gothic, Greek, Indonesian, Italian, Korean, Latin, Latvian, Lithuanian, Norwegian, Old Church Slavonic, Old East Slavic, Polish, Portuguese, Romanian, Russian, Sanskrit, Slovak, Spanish, Swedish, Western Armenian -->
+  <value name="csubj">clausal subject</value>
+  <value name="dep:aff">dep:aff</value> <!-- Beja -->
+  <value name="dep:agr">dep:agr</value> <!-- Kiche -->
+  <value name="dep:alt">dep:alt</value> <!-- Upper Sorbian -->
+  <value name="dep:ana">dep:ana</value> <!-- Yupik -->
+  <value name="dep:aux">dep:aux</value> <!-- Yupik -->
+  <value name="dep:comp">dep:comp</value> <!-- Beja, French -->
+  <value name="dep:conj">dep:conj</value> <!-- Beja -->
+  <value name="dep:cop">dep:cop</value> <!-- Yupik -->
+  <value name="dep:emo">dep:emo</value> <!-- Yupik -->
+  <value name="dep:infl">dep:infl</value> <!-- Yupik -->
+  <value name="dep:mark">dep:mark</value> <!-- Yupik -->
+  <value name="dep:mod">dep:mod</value> <!-- Mbya Guarani -->
+  <value name="dep:pos">dep:pos</value> <!-- Yupik -->
+  <value name="dep:redup">dep:redup</value> <!-- Beja -->
+  <value name="dep:ss">dep:ss</value> <!-- Kiche -->
+  <value name="dep">unspecified dependency</value>
+  <value name="det:adj">det:adj</value> <!-- Albanian -->
+  <value name="det:noun">det:noun</value> <!-- Albanian -->
+  <value name="det:numgov">pronominal quantifier governing the case of the noun</value> <!-- Czech, Polish, Serbian, Slovak, Ukrainian, Upper Sorbian -->
+  <value name="det:nummod">pronominal quantifier agreeing in case with the noun</value> <!-- Czech, Polish, Ukrainian -->
+  <value name="det:poss">possessive determiner</value> <!-- Akkadian, Armenian, German, Italian, Korean, Polish, Portuguese, Western Armenian -->
+  <value name="det:predet">det:predet</value> <!-- English, Italian, Persian -->
+  <value name="det:pron">det:pron</value> <!-- Albanian -->
+  <value name="det:rel">det:rel</value> <!-- Bambara -->
+  <value name="det">determiner</value>
+  <value name="discourse:emo">discourse:emo</value> <!-- Irish, Italian, Polish -->
+  <value name="discourse:filler">discourse:filler</value> <!-- Norwegian, Slovenian -->
+  <value name="discourse:intj">discourse:intj</value> <!-- Polish -->
+  <value name="discourse:sp">discourse:sp</value> <!-- Cantonese, Chinese, Classical Chinese -->
+  <value name="discourse">discourse element</value>
+  <value name="dislocated:cleft">dislocated:cleft</value> <!-- Mbya Guarani -->
+  <value name="dislocated:csubj">dislocated:csubj</value> <!-- Latin -->
+  <value name="dislocated:nsubj">dislocated:nsubj</value> <!-- Latin -->
+  <value name="dislocated:obj">dislocated:obj</value> <!-- Latin -->
+  <value name="dislocated:subj">dislocated:subj</value> <!-- Beja -->
+  <value name="dislocated">dislocated elements</value>
+  <value name="expl:comp">expl:comp</value> <!-- French -->
+  <value name="expl:impers">impersonal expletive</value> <!-- Italian, Polish, Romanian, Spanish -->
+  <value name="expl:pass">reflexive pronoun used in reflexive passive</value> <!-- Catalan, Czech, French, Italian, Latin, Portuguese, Romanian, Slovak, Spanish, Upper Sorbian -->
+  <value name="expl:poss">expl:poss</value> <!-- Romanian -->
+  <value name="expl:pv">reflexive clitic with an inherently reflexive verb</value> <!-- Czech, Dutch, German, Old East Slavic, Polish, Portuguese, Romanian, Slovak, Spanish, Turkish German, Upper Sorbian -->
+  <value name="expl:subj">expl:subj</value> <!-- French, Naija -->
+  <value name="expl">expletive</value>
+  <value name="fixed">fixed multiword expression</value>
+  <value name="flat:abs">flat:abs</value> <!-- Ukrainian -->
+  <value name="flat:dist">flat:dist</value> <!-- Western Armenian -->
+  <value name="flat:foreign">foreign words</value> <!-- Arabic, Belarusian, Buryat, Chinese, Chukchi, Croatian, Czech, English, Estonian, Faroese, Finnish, French, Galician, Icelandic, Indonesian, Irish, Italian, Komi Zyrian, Latin, Latvian, Lithuanian, Manx, Naija, Norwegian, Persian, Polish, Portuguese, Russian, Scottish Gaelic, Slovak, Slovenian, South Levantine Arabic, Ukrainian, Upper Sorbian -->
+  <value name="flat:name">names</value> <!-- Ancient Greek, Belarusian, Breton, Chinese, Chukchi, Erzya, Faroese, Finnish, French, Frisian Dutch, Galician, German, Gothic, Hebrew, Hindi, Hungarian, Icelandic, Indonesian, Irish, Italian, Karelian, Kazakh, Komi Permyak, Komi Zyrian, Korean, Latin, Latvian, Livvi, Maltese, Moksha, Norwegian, Old Church Slavonic, Old East Slavic, Persian, Portuguese, Russian, Scottish Gaelic, Skolt Sami, Slovenian, Spanish, Swedish, Thai, Ukrainian, Welsh, Western Armenian -->
+  <value name="flat:num">flat:num</value> <!-- Komi Zyrian, Persian -->
+  <value name="flat:range">flat:range</value> <!-- Ukrainian, Western Armenian -->
+  <value name="flat:repeat">flat:repeat</value> <!-- Ukrainian -->
+  <value name="flat:sibl">flat:sibl</value> <!-- Ukrainian -->
+  <value name="flat:title">flat:title</value> <!-- Ukrainian -->
+  <value name="flat:vv">flat:vv</value> <!-- Classical Chinese -->
+  <value name="flat">name multiword expression</value>
+  <value name="goeswith">goes with</value>
+  <value name="iobj:agent">iobj:agent</value> <!-- Armenian, French, Western Armenian -->
+  <value name="iobj:appl">iobj:appl</value> <!-- Wolof -->
+  <value name="iobj:patient">iobj:patient</value> <!-- Tagalog -->
+  <value name="iobj">indirect object</value>
+  <value name="list">list</value>
+  <value name="mark:adv">mark:adv</value> <!-- Cantonese, Chinese -->
+  <value name="mark:advmod">adverbial modifier confusable with a subordination marker</value> <!-- Old French -->
+  <value name="mark:aff">mark:aff</value> <!-- Beja -->
+  <value name="mark:obj">marker + object</value> <!--Old French, no doc -->
+  <value name="mark:obl">marker + oblique nominal</value> <!--Old French, no doc -->
+  <value name="mark:prt">mark:prt</value> <!-- Chinese, Irish, Scottish Gaelic -->
+  <value name="mark:q">mark:q</value> <!-- Hebrew -->
+  <value name="mark:rel">mark:rel</value> <!-- Cantonese, Chinese -->
+  <value name="mark">marker</value>
+  <value name="nmod:agent">nmod:agent</value> <!-- Welsh -->
+  <value name="nmod:appos">nmod:appos</value> <!-- French, Komi Zyrian, Moksha -->
+  <value name="nmod:arg">nmod:arg</value> <!-- Polish, Yupik -->
+  <value name="nmod:att">nmod:att</value> <!-- Hungarian -->
+  <value name="nmod:attlvc">nmod:attlvc</value> <!-- Hungarian -->
+  <value name="nmod:attr">nmod:attr</value> <!-- Chukchi -->
+  <value name="nmod:bahuv">nmod:bahuv</value> <!-- Moksha -->
+  <value name="nmod:cau">nmod:cau</value> <!-- Uyghur -->
+  <value name="nmod:comp">nmod:comp</value> <!-- Erzya, Komi Zyrian, Moksha, Turkish, Uyghur -->
+  <value name="nmod:flat">nmod:flat</value> <!-- Polish -->
+  <value name="nmod:gen">nmod:gen</value> <!-- Breton -->
+  <value name="nmod:gobj">nmod:gobj</value> <!-- Erzya, Finnish -->
+  <value name="nmod:gsubj">nmod:gsubj</value> <!-- Erzya, Finnish, Karelian -->
+  <value name="nmod:lfrom">nmod:lfrom</value> <!-- Komi Zyrian -->
+  <value name="nmod:lmod">nmod:lmod</value> <!-- Erzya, Indonesian, Komi Permyak, Komi Zyrian, Moksha -->
+  <value name="nmod:npmod">nmod:npmod</value> <!-- Armenian, English, Western Armenian -->
+  <value name="nmod:obj">nmod:obj</value> <!-- Komi Zyrian -->
+  <value name="nmod:obl">nmod:obl</value> <!-- Hungarian -->
+  <value name="nmod:part">nmod:part</value> <!-- Turkish, Uyghur -->
+  <value name="nmod:poss">possessive nominal modifier</value> <!-- Akkadian, Albanian, Apurina, Arabic, Armenian, Assyrian, Bambara, Beja, Breton, Chukchi, Danish, Dutch, English, Erzya, Faroese, Finnish, Frisian Dutch, German, Hebrew, Hindi, Icelandic, Indonesian, Irish, Karelian, Kazakh, Khunsari, Komi Permyak, Komi Zyrian, Korean, Kurmanji, Latin, Livvi, Maltese, Manx, Marathi, Moksha, Naija, Nayini, North Sami, Persian, Polish, Sanskrit, Scottish Gaelic, Skolt Sami, Soi, South Levantine Arabic, Swedish, Swedish Sign Language, Swiss German, Tagalog, Tamil, Telugu, Thai, Turkish, Uyghur, Warlpiri, Welsh, Western Armenian, Wolof -->
+  <value name="nmod:pred">nmod:pred</value> <!-- Polish -->
+  <value name="nmod:prp">nmod:prp</value> <!-- Komi Zyrian -->
+  <value name="nmod:redup">nmod:redup</value> <!-- Welsh -->
+  <value name="nmod:relat">nmod:relat</value> <!-- Chukchi -->
+  <value name="nmod:subj">nmod:subj</value> <!-- Komi Zyrian -->
+  <value name="nmod:tmod">temporal modifier</value> <!-- Chinese, English, Indonesian, Moksha, Romanian, Telugu, Uyghur -->
+  <value name="nmod">nominal modifier</value>
+  <value name="nsubj:advmod">fused subject pronoun and adverb</value> <!-- Old French -->
+  <value name="nsubj:aff">nsubj:aff</value> <!-- Beja -->
+  <value name="nsubj:bfoc">nsubj:bfoc</value> <!-- Tagalog -->
+  <value name="nsubj:caus">nsubj:caus</value> <!-- Armenian, French, Western Armenian -->
+  <value name="nsubj:cleft">nsubj:cleft</value> <!-- Latin -->
+  <value name="nsubj:cop">nsubj:cop</value> <!-- Apurina, Breton, Erzya, Estonian, Finnish, Hebrew, Karelian, Komi Permyak, Komi Zyrian, Livvi, Moksha, Sanskrit, Skolt Sami, Turkish -->
+  <value name="nsubj:ifoc">nsubj:ifoc</value> <!-- Tagalog -->
+  <value name="nsubj:lfoc">nsubj:lfoc</value> <!-- Tagalog -->
+  <value name="nsubj:lvc">nsubj:lvc</value> <!-- Hungarian -->
+  <value name="nsubj:nc">nsubj:nc</value> <!-- Persian, Tamil, Telugu -->
+  <value name="nsubj:obj">fused subject and object pronoun</value> <!-- Old French -->
+  <value name="nsubj:pass">passive nominal subject</value> <!-- Afrikaans, Amharic, Ancient Greek, Arabic, Armenian, Assyrian, Belarusian, Bulgarian, Buryat, Cantonese, Catalan, Chinese, Classical Chinese, Czech, Dutch, English, Faroese, French, Frisian Dutch, Galician, German, Gothic, Greek, Hindi, Indonesian, Italian, Korean, Latin, Latvian, Lithuanian, Maltese, Marathi, Moksha, Norwegian, Old Church Slavonic, Old East Slavic, Persian, Polish, Portuguese, Romanian, Russian, Sanskrit, Skolt Sami, Slovak, Spanish, Swedish, Swiss German, Tagalog, Tamil, Thai, Turkish German, Upper Sorbian, Western Armenian -->
+  <value name="nsubj:periph">nsubj:periph</value> <!-- Cantonese -->
+  <value name="nsubj">Nominal subject</value>
+  <value name="nummod:det">nummod:det</value> <!-- Beja -->
+  <value name="nummod:entity">numeric modifier governed by a noun</value> <!-- Russian -->
+  <value name="nummod:flat">nummod:flat</value> <!-- Polish -->
+  <value name="nummod:gov">numeric modifier governing the case of the noun</value> <!-- Belarusian, Czech, Lithuanian, Old East Slavic, Polish, Russian, Sanskrit, Serbian, Ukrainian, Upper Sorbian -->
+  <value name="nummod">numeric modifier</value>
+  <value name="obj:advmod">fused adverb and object pronoun</value> <!-- Old French -->
+  <value name="obj:advneg">fused negation and object pronoun</value> <!-- no doc for advneg -->
+  <value name="obj:agent">obj:agent</value> <!-- Apurina, French, Tagalog -->
+  <value name="obj:appl">obj:appl</value> <!-- Wolof -->
+  <value name="obj:caus">obj:caus</value> <!-- Wolof -->
+  <value name="obj:lvc">obj:lvc</value> <!-- French, Hungarian, Naija -->
+  <value name="obj:obl">fused oblique and object pronoun</value> <!-- Old French -->
+  <value name="obj:periph">obj:periph</value> <!-- Cantonese, Chinese -->
+  <value name="obj">object</value>
+  <value name="obl:advmod">adverbial modifier confusable with an oblique dependent</value> <!-- Old French -->
+  <value name="obl:agent">agent modifier</value> <!-- Ancient Greek, Armenian, Belarusian, Breton, Cantonese, Chinese, Czech, Dutch, Erzya, French, German, Gothic, Greek, Hindi, Indonesian, Italian, Komi Zyrian, Latin, Lithuanian, Maltese, Moksha, Naija, Old Church Slavonic, Old East Slavic, Polish, Portuguese, Romanian, Russian, Sanskrit, Skolt Sami, Swedish, Tamil, Turkish, Welsh, Western Armenian -->
+  <value name="obl:appl">obl:appl</value> <!-- Wolof -->
+  <value name="obl:arg">oblique argument</value> <!-- Arabic, Beja, Czech, French, German, Greek, Icelandic, Latin, Lithuanian, Maltese, Naija, Persian, Polish, Sanskrit, Slovak, South Levantine Arabic, Tamil -->
+  <value name="obl:cau">obl:cau</value> <!-- Erzya, Komi Zyrian, Moksha, Telugu -->
+  <value name="obl:cmp">obl:cmp</value> <!-- Telugu -->
+  <value name="obl:cmpr">obl:cmpr</value> <!-- Latin, Polish, Tamil -->
+  <value name="obl:comp">obl:comp</value> <!-- Moksha -->
+  <value name="obl:dat">obl:dat</value> <!-- Kurmanji -->
+  <value name="obl:freq">obl:freq</value> <!-- Moksha -->
+  <value name="obl:inst">obl:inst</value> <!-- Erzya, Moksha, Tamil -->
+  <value name="obl:lfrom">obl:lfrom</value> <!-- Erzya, Komi Zyrian, Moksha -->
+  <value name="obl:lmod">locative modifier</value> <!-- Apurina, Classical Chinese, Danish, Erzya, Komi Permyak, Komi Zyrian, Moksha, Skolt Sami, Tamil -->
+  <value name="obl:lmp">obl:lmp</value> <!-- Erzya, Komi Zyrian, Moksha -->
+  <value name="obl:lto">obl:lto</value> <!-- Erzya, Komi Zyrian, Moksha -->
+  <value name="obl:lvc">obl:lvc</value> <!-- Hungarian -->
+  <value name="obl:mcl">obl:mcl</value> <!-- Komi Zyrian -->
+  <value name="obl:mod"> oblique modifier</value> <!-- Beja, French, Naija, Yupik -->
+  <value name="obl:npmod">obl:npmod</value> <!-- Coptic, English -->
+  <value name="obl:orphan">obl:orphan</value> <!-- Polish -->
+  <value name="obl:own">obl:own</value> <!-- Kazakh -->
+  <value name="obl:patient">obl:patient</value> <!-- Cantonese, Chinese -->
+  <value name="obl:pmod">obl:pmod</value> <!-- Romanian, Tamil -->
+  <value name="obl:poss">obl:poss</value> <!-- Thai -->
+  <value name="obl:prep">obl:prep</value> <!-- Irish -->
+  <value name="obl:sentcon">obl:sentcon</value> <!-- Mbya Guarani -->
+  <value name="obl:smod">obl:smod</value> <!-- Scottish Gaelic -->
+  <value name="obl:tmod">obl:tmod</value> <!-- Apurina, Arabic, Cantonese, Chinese, Classical Chinese, Danish, English, Erzya, Frisian Dutch, German, Hindi, Indonesian, Irish, Italian, Komi Permyak, Komi Zyrian, Korean, Manx, Moksha, Portuguese, Scottish Gaelic, Skolt Sami, Spanish, Tamil, Telugu, Thai, Turkish, Uyghur, Warlpiri -->
+  <value name="obl:tmod">temporal modifier</value>
+  <value name="obl">oblique nominal</value>
+  <value name="orphan:missing">textual gap in the source</value> <!-- Latin -->
+  <value name="orphan">remnant in ellipsis</value>
+  <value name="parataxis:appos">parataxis:appos</value> <!-- Italian -->
+  <value name="parataxis:conj">parataxis:conj</value> <!-- Naija -->
+  <value name="parataxis:coord">parataxis:coord</value> <!-- Beja -->
+  <value name="parataxis:deletion">parataxis:deletion</value> <!-- Norwegian -->
+  <value name="parataxis:discourse">parataxis:discourse</value> <!-- Italian, Naija, Slovenian, Turkish German, Ukrainian -->
+  <value name="parataxis:dislocated">parataxis:dislocated</value> <!-- Naija -->
+  <value name="parataxis:hashtag">parataxis:hashtag</value> <!-- Irish, Italian -->
+  <value name="parataxis:insert">parataxis:insert</value> <!-- French, Italian, Polish -->
+  <value name="parataxis:mod">parataxis:mod</value> <!-- Beja -->
+  <value name="parataxis:newsent">parataxis:newsent</value> <!-- Ukrainian -->
+  <value name="parataxis:nsubj">parataxis:nsubj</value> <!-- Italian -->
+  <value name="parataxis:obj">parataxis:obj</value> <!-- Bambara, Italian, Polish -->
+  <value name="parataxis:parenth">parataxis:parenth</value> <!-- French, Naija -->
+  <value name="parataxis:rel">parataxis:rel</value> <!-- Ukrainian -->
+  <value name="parataxis:rep">parataxis:rep</value> <!-- Chukchi, Latin, Mbya Guarani -->
+  <value name="parataxis:restart">parataxis:restart</value> <!-- Slovenian -->
+  <value name="parataxis:rt">parataxis:rt</value> <!-- Irish -->
+  <value name="parataxis:sentence">parataxis:sentence</value> <!-- Irish -->
+  <value name="parataxis:trans">parataxis:trans</value> <!-- Turkish German -->
+  <value name="parataxis:url">parataxis:url</value> <!-- Irish -->
+  <value name="parataxis">parataxis</value>
+  <value name="punct">punctuation</value>
+  <value name="remnant">Remnant ?</value> <!-- no doc, replace with orphan? -->
+  <value name="reparandum">overridden disfluency</value>
+  <value name="root">root</value>
+  <value name="vocative:cl">vocative:cl</value> <!-- Ukrainian -->
+  <value name="vocative:mention">vocative:mention</value> <!-- Irish, Italian -->
+  <value name="vocative">vocative</value>
+  <value name="xcomp:cleft">xcomp:cleft</value> <!-- Polish -->
+  <value name="xcomp:ds">xcomp:ds</value> <!-- Erzya, Finnish, Karelian, Komi Permyak, Livvi -->
+  <value name="xcomp:obj">xcomp:obj</value> <!-- North Sami, Polish -->
+  <value name="xcomp:pred">xcomp:pred</value> <!-- Irish, Latin, Manx, North Sami, Polish, Scottish Gaelic -->
+  <value name="xcomp:sp">xcomp:sp</value> <!-- Ukrainian -->
+  <value name="xcomp:subj">xcomp:subj</value> <!-- Polish -->
+  <value name="xcomp">open clausal complement</value>
+</feature>
+<feature name="coord" domain="NT" ></feature>
+<feature name="dom" domain="NT" ></feature>
+<feature name="type" domain="NT" >
+  <value name="nV">élément non-verbal</value>
+  <value name="VFin">finite verb</value>
+  <value name="VInf">infinitive</value>
+  <value name="VPar">participle</value>
+  <value name="--">nil</value>
+</feature>
+<feature name="vform" domain="NT"></feature>
+<feature name="vlemma" domain="NT"></feature>
+<feature name="note" domain="NT"></feature>
+<feature name="snr" domain="NT"></feature>
+';
+
+
+
+  printf MASTER "$nt_features_header";
+
+  printf MASTER '
+<edgelabel>
+  <value name="D">dependency</value>
+  <value name="L">lexical</value>
+  <value name="R">relator</value>
+  <value name="*">not bound</value>
+</edgelabel>
+<secedgelabel>
+  <value name="cluster">between elements of GpCoo</value>
+  <value name="coord">between members of Coo</value>
+  <value name="dupl">between duplicated nodes</value>
+</secedgelabel>
+</annotation>
+</head>
+<body>
+';
+}
+
+#  <value name="M">main</value>
+#  <value name="P">part</value>
+
+
+sub write_master_footer {
+print MASTER '</body>
+</corpus>
+';
+}
+
+
+$TEMP='
+<feature name="nodom" domain="NT" ></feature>
+<feature name="headpos" domain="NT" ></feature>
+<feature name="annotationFile" domain="NT" ></feature>
+<feature name="annotationUri" domain="NT" ></feature>
+';
+
+
+sub define_cat_hashes {
+#  $abbrev2cat{"Apst"} = "Apostrophe";
+#  $abbrev2cat{"AtObj"} = "AttributObjet";
+#  $abbrev2cat{"AtRfc"} = "AttributReflechi";
+#  $abbrev2cat{"AtSj"} = "AttributSujet";
+#  $abbrev2cat{"AuxA"} = "Auxilie-Actif";
+#  $abbrev2cat{"AuxP"} = "Auxilie-Passif";
+#  $abbrev2cat{"Circ"} = "Circonstant";
+#  $abbrev2cat{"Cmpl"} = "Complement";
+#  $abbrev2cat{"GpCoo"} = "Coordonne";
+#  $abbrev2cat{"Coo"} = "Coordination";
+#  $abbrev2cat{"Det"} = "Determinant";
+#  $abbrev2cat{"NgPrt"} = "Forclusif";
+#  $abbrev2cat{"Insrt"} = "Incidente";
+#  $abbrev2cat{"Intj"} = "Interjection";
+#  $abbrev2cat{"ModA"} = "ModifieurAttache";
+#  $abbrev2cat{"ModD"} = "ModifieurDetache";
+#  $abbrev2cat{"Ng"} = "Negation";
+#  $abbrev2cat{"VInf"} = "NoeudVerbal-Infinitif";
+#  $abbrev2cat{"VPrt"} = "NoeudVerbal-Participe"; #?
+#  $abbrev2cat{"VFin"} = "NoeudVerbal-Personnel";
+#  $abbrev2cat{"nSnt"} = "NonPhrase";
+#  $abbrev2cat{"Obj"} = "Objet";
+#  $abbrev2cat{"Snt"} = "Phrase";
+#  $abbrev2cat{"Pon"} = "Ponctuation";
+#  $abbrev2cat{"Rfc"} = "Reflechi";
+#  $abbrev2cat{"Rfx"} = "ReflexifRenforce";
+#  $abbrev2cat{"RelC"} = "Relateur-Coordonnant";
+#  $abbrev2cat{"RelNC"} = "Relateur-NonCoordonnant";
+#  $abbrev2cat{"nMax"} = "StructureNonMaximale";
+#  $abbrev2cat{"SjImp"} = "SujetImpersonnel";
+#  $abbrev2cat{"SjPer"} = "SujetPersonnel";
+#  $abbrev2cat{"Lac"} = "Lacune";
+#  $abbrev2cat{"Aux"} = "Auxilie";
+#  $abbrev2cat{"Regim"} = "Regime";
+
+
+$abbrev2cat{"acl"} = "Clausal modifier of noun";
+$abbrev2cat{"advcl"} = "Adverbial clause modifier";
+$abbrev2cat{"advmod"} = "Adverbial modifier";
+$abbrev2cat{"amod"} = "Adjectival modifier";
+$abbrev2cat{"appos"} = "Appositional modifier";
+$abbrev2cat{"aux"} = "Auxiliary";
+$abbrev2cat{"cc-nc"} = "Coordinated conjunct : non coordonant";
+$abbrev2cat{"cc"} = "Coordinating conjunction";
+$abbrev2cat{"ccomp"} = "Clausal complement";
+$abbrev2cat{"conj"} = "Conjunct";
+$abbrev2cat{"cop"} = "Copula";
+$abbrev2cat{"csubj"} = "Clausal subject";
+$abbrev2cat{"det"} = "Determiner";
+$abbrev2cat{"dislocated"} = "Dislocated elements";
+$abbrev2cat{"expl"} = "Expletive";
+$abbrev2cat{"iobj"} = "Indirect object";
+$abbrev2cat{"mark"} = "Marker";
+$abbrev2cat{"nmod"} = "Nominal modifier";
+$abbrev2cat{"nsubj"} = "Nominal subject";
+$abbrev2cat{"nummod"} = "Numeric modifier";
+$abbrev2cat{"obj"} = "Object";
+$abbrev2cat{"obl"} = " Oblique nominal";
+$abbrev2cat{"orphan"} = "Remnant in ellipsis";
+$abbrev2cat{"remnant"} = "Remnant ?";
+$abbrev2cat{"vocative"} = "Vocative";
+$abbrev2cat{"xcomp"} = "Open clausal complement";
+}
+
+sub print_sentence {
+    for (my $q=0; $q<=$#words; $q++) {
+      print "$words[$q]\n";
+    }
+}
+
+sub write_nonterminals {
+  my $print_nt_features;
+  if($_[1] =~ /dupl/) {
+    $dupl = '_dupl';
+  } else {
+    $dupl = '';
+  }
+  if($nt_features ne '') {
+    $print_nt_features = $nt_empty_features;
+    if($_[0] =~ /$thisrootname/) {
+      $print_nt_features = $nt_features;
+    }
+  }
+  printf XML "      <nt id=\"n%d_%d%s\" cat=\"%s\" coord=\"--\" dom=\"%s\" type=\"%s\" vform=\"%s\" vlemma=\"%s\"%s note=\"%s\" snr=\"%d\">\n", $., $w, $dupl, $_[0], $dom, $type, $vform, $vlemma, $print_nt_features, notes("$._$w"), $.;
+  printf XML "        <edge idref=\"s%d_%d%s\" label=\"L\"/>\n", $., $w, $dupl;
+  # link duplicate with primary original node
+  if($_[1] =~ /dupl/) {
+    printf XML "        <secedge idref=\"s%d_%d\" label=\"dupl\"/>\n", $., $w;
+  }
+  # if node is not a duplicate: attach all the daughters
+  if($_[1] !~ /dupl/) {
+    for (my $d=0; $d<=$#daughters; $d++) {
+      $daughter = $daughters[$d];
+      if("$._$w" ne "$._$daughter") { # avoid cycles
+	printf XML "        <edge idref=\"n%d_%d%s\" label=\"%s\"/>\n", $., $daughter, $dupl, edge_label("$._$daughter");
+      }
+      # check if a duplicate of this node must be attached
+      if($duplicates{"$._$daughter"} == 1) {
+	printf XML "        <edge idref=\"n%d_%d_dupl\" label=\"%s\"/>\n", $., $daughter, edge_label("$._$daughter_dupl");
+      }
+    }
+  }
+  print XML "      </nt>\n";
+}
+
+# checks if node is stored as in hash of relators
+sub edge_label {
+  if($relators{$_[0]} == 1) {
+    return 'R';
+  }
+  return 'D';
+}
+
+# retrives notes for this node
+sub notes {
+  if($notes{$_[0]} ne '') {
+    return "$notes{$_[0]}";
+  }
+  return '--';
+}
+
+# conversions, bug fixes
+sub clean_data {
+    # conversions of values, some necessary some for convenience
+    $word =~ s/"/'/g;
+    $word =~ s/\&/(and)/g;
+    $word =~ s/<</«/g;
+    $word =~ s/>>/»/g;
+    $word =~ s/[<>]//g;
+    $pos =~ s/:/_/g;
+    $mor =~ s/\|/_/g;
+    $ppos =~ s/:/_/g;
+    $pmor =~ s/\|/_/g;
+    $lemma =~ s/\|/_/g;
+    $lemma =~ s/[<>]//g;
+    $lemma =~ s/"/'/g;
+    $lemma =~ s/\&/(and)/g;
+    $plemma =~ s/\|/_/g;
+    $plemma =~ s/[<>]//g;
+    $plemma =~ s/"/'/g;
+    $plemma =~ s/\&/(and)/g;
+
+    # clean categories
+    $cat =~ s/ROOT/$thisrootname/;  # top node, for compatibility with SRCMF
+#    $cat =~ s/Ponctuation/Pon/;
+    # correct some bugs in parse
+#    $cat =~ s/Sujet/SjPer/;
+#    $cat =~ s/Modifieur/ModA/;
+#    $cat =~ s/Parenthese/Insrt/;
+    $cat =~ s/\-/_/g;
+    $cat =~ s/RelNC_(.*)/$1_RelNC/;  # RelNC always 2nd node, for consistency in duplicates
+  return;
+}
+
+
Index: TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/conlluLoader.groovy
===================================================================
--- TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/conlluLoader.groovy	(revision 0)
+++ TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/conlluLoader.groovy	(revision 3300)
@@ -0,0 +1,57 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+// Lyon 2, University of Franche-Comté, University of Nice
+// Sophia Antipolis, University of Paris 3.
+//
+// The TXM platform is free software: you can redistribute it
+// and/or modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation,
+// either version 2 of the License, or (at your option) any
+// later version.
+//
+// The TXM platform is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied
+// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+// PURPOSE. See the GNU General Public License for more
+// details.
+//
+// You should have received a copy of the GNU General
+// Public License along with the TXM platform. If not, see
+// http://www.gnu.org/licenses.
+//
+//
+//
+// $LastChangedDate: 2015-06-03 15:04:53 +0200 (mer., 03 juin 2015) $
+// $LastChangedRevision: 2984 $
+// $LastChangedBy: mdecorde $
+//
+package org.txm.scripts.importer.conllu;
+
+import javax.xml.stream.*
+
+import org.txm.*
+import org.txm.metadatas.*
+import org.txm.objects.*
+import org.txm.importer.scripts.xmltxm.*
+import org.txm.utils.*
+import org.txm.utils.i18n.*
+import org.txm.importer.xtz.*
+
+String userDir = System.getProperty("user.home");
+
+def MONITOR;
+Project project;
+
+try {project=projectBinding;MONITOR=monitor} catch (Exception)
+{	}
+if (project == null) { println "no project set. Aborting"; return; }
+CoNLLUImport i = new CoNLLUImport(project);
+/*
+ * To customize the XTZ import, replace the importer, compiler, annotater or pager objects before calling process()
+		i.importer = new XTZImporter(i)
+		i.compiler = new XTZCompiler(i)
+		i.annotater = new TTAnnotater(i);
+		i.pager = new XTZPager(i)
+ */
+i.process();
+readyToLoad = i.isSuccessful && project.save()
Index: TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/CoNLLUImport.groovy
===================================================================
--- TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/CoNLLUImport.groovy	(revision 0)
+++ TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/CoNLLUImport.groovy	(revision 3300)
@@ -0,0 +1,76 @@
+package org.txm.scripts.importer.conllu;
+
+import java.io.File;
+import java.util.ArrayList;
+
+import ims.tiger.index.writer.*
+import ims.tiger.system.*
+
+import org.txm.Toolbox;
+import org.txm.importer.ApplyXsl2;
+import org.txm.importer.xtz.*
+import org.txm.objects.Project
+import org.txm.utils.BundleUtils;
+import org.txm.utils.io.FileCopy;
+import org.txm.utils.io.IOUtils
+import org.apache.log4j.BasicConfigurator;
+import org.txm.importer.xtz.*
+import org.txm.scripts.importer.xtz.*
+import org.txm.scripts.importer.tigersearch.TSImport
+import org.txm.utils.*
+import org.txm.searchengine.ts.TIGERSearchEngine
+
+class CoNLLUImport extends XTZImport {
+
+	public CoNLLUImport(Project params) {
+		super(params);
+	}
+
+	@Override
+	public void init(Project p) {
+		super.init(p);
+
+		importer = new CoNLLUImporter(this);
+		compiler = new XTZCompiler(this)
+		annotater = null; // no annotater step to do
+		pager = new XTZPager(this)
+	}
+	
+	/**
+	 * Do a XTZ Import then build the TIGERSearch indexes in the binary corpus "tiger" directory
+	 */
+	@Override
+	public void start() throws InterruptedException {
+		
+		super.start(); // call the usual XTZ import
+		
+		// build the TIGER-XML file
+		new CallUD2TigerPerlScript().convertCoNLLUFiles(this.sourceDirectory.getAbsolutePath(), this.binaryDirectory.getAbsolutePath())
+		
+		
+		File tigerXMLDirectory = new File(this.binaryDirectory, "tiger-xml")
+		
+		File xslfile1 = BundleUtils.getFile("org.txm.conllu.core", "groovy", "/org/txm/scripts/importer/conllu/", "tigerXml-commentOutLongSentences.xsl")
+		File xslfile2 = BundleUtils.getFile("org.txm.conllu.core", "groovy", "/org/txm/scripts/importer/conllu/", "tigerXml-sortBfmByDate.xsl")
+		
+		ApplyXsl2 a1 = new ApplyXsl2(xslfile1);
+		ApplyXsl2 a2 = new ApplyXsl2(xslfile2);
+		for (File xmlFile : tigerXMLDirectory.listFiles()) {
+			if (!xmlFile.getName().endsWith(".xml")) continue;
+			File xmlFileTmp = new File(xmlFile.getAbsolutePath()+".tmp")
+			if (!(a1.process(xmlFile, xmlFileTmp) && xmlFile.delete() && xmlFileTmp.renameTo(xmlFile))) {
+				println "Error while applying $xslfile1 to $xmlFile"
+			}
+			
+			if (!(a2.process(xmlFile, xmlFileTmp) && xmlFile.delete() && xmlFileTmp.renameTo(xmlFile))) {
+				println "Error while applying $xslfile2 to $xmlFile"
+			}
+		}
+		
+		// build TIGER indexes
+		if (isSuccessful) {
+			// read from the 'tiger-xml' and write to the 'tiger' directory
+			TIGERSearchEngine.buildTIGERCorpus(tigerXMLDirectory, this.binaryDirectory, corpusName);
+		}
+	}
+}
\ No newline at end of file
Index: TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/CallUD2TigerPerlScript.groovy
===================================================================
--- TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/CallUD2TigerPerlScript.groovy	(revision 0)
+++ TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/CallUD2TigerPerlScript.groovy	(revision 3300)
@@ -0,0 +1,52 @@
+package org.txm.scripts.importer.conllu
+
+import org.txm.utils.*
+
+def convertCoNLLUFiles(def input_directory_path, def output_directory) {
+	
+	def input_directory = new File(input_directory_path)
+	
+	if (input_directory_path.length() == 0 && input_directory.canRead()) {
+		println "** impossible to access directory $input_directory. Aborting."
+		return false
+	}
+	
+	def tigerXMLDirectory = new File(output_directory, "tiger-xml")
+	def conversionFile = new File(tigerXMLDirectory, "conversion.log")
+	def mainFullFile = new File(tigerXMLDirectory, "main-full.xml")
+	def mainFile = new File(tigerXMLDirectory, "main.xml")
+	def perlScript = BundleUtils.getFile("org.txm.conllu.core", "groovy", "/org/txm/scripts/importer/conllu/", "conll2tiger-ud.pl")
+	
+	tigerXMLDirectory.deleteDir()
+	//println "clean&mkdir $tigerXMLDirectory"
+	tigerXMLDirectory.mkdir()
+	
+	//println "Converting..."
+	
+	def subcorpusList = ""
+	for (def f : input_directory.listFiles()) {
+		
+		if (!f.getName().endsWith(".conllu")) {
+			continue
+		}
+		
+		try {
+			println "$f... "+"perl '$perlScript' -s 10000 -o '$tigerXMLDirectory' '$f'"
+			def p =  ["perl", "$perlScript", "-s", "10000", "-o", "$tigerXMLDirectory", "$f"].execute()
+			def sout = new StringBuilder(), serr = new StringBuilder()
+			p.consumeProcessOutput(sout, serr)
+			p.waitFor()
+			
+			subcorpusList += mainFile.readLines("UTF-8").findAll() {it.contains("<subcorpus ")}.join("\n") // tiger-xml/main.xml >> tiger-xml/subcorpus-list
+		} catch (Throwable t) { println "Error: $t" }
+	}
+	
+	//	println "subcorpus-list: "+subcorpusList
+	mainFullFile.setText(mainFile.getText().replaceAll("<subcorpus .+</subcorpus>", subcorpusList))
+	
+	conversionFile.delete()
+	mainFullFile.renameTo(mainFile)
+	
+	//println "Done."
+	return true
+}
Index: TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/tigerXml-commentOutLongSentences.xsl
===================================================================
--- TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/tigerXml-commentOutLongSentences.xsl	(revision 0)
+++ TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/tigerXml-commentOutLongSentences.xsl	(revision 3300)
@@ -0,0 +1,36 @@
+<!-- The Identity Transformation -->
+<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+  
+  <!-- This stylesheet comments out the sentences containing more than 100 terminal nodes in Tiger XML files.
+    To change the theshold, puse the maxLength parameter.
+  
+  Written by A. Lavrentiev, CNRS, UMR IHRIM 2021-07-16
+  Licence: GNU GPL v.3
+  -->
+  
+  <!-- Whenever you match any node or any attribute -->
+  <xsl:template match="node()|@*">
+    <!-- Copy the current node -->
+    <xsl:copy>
+      <!-- Including any attributes it has and any child nodes -->
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+  
+  <xsl:param name="maxLength" as="xs:integer">100</xsl:param>
+  
+  <xsl:template match="s">
+    <xsl:choose>
+      <xsl:when test="count(graph/terminals/t) gt $maxLength">
+        <xsl:comment>
+          Sentence too long (<xsl:value-of select="count(graph/terminals/t)"/> tokens) :
+          <xsl:for-each select="graph/terminals/t"><xsl:value-of select="@word"/><xsl:text> </xsl:text></xsl:for-each>
+        </xsl:comment>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:copy-of select="."/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  
+</xsl:stylesheet>

Property changes on: TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/tigerXml-commentOutLongSentences.xsl
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/CoNLLUImporter.groovy
===================================================================
--- TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/CoNLLUImporter.groovy	(revision 0)
+++ TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/CoNLLUImporter.groovy	(revision 3300)
@@ -0,0 +1,239 @@
+package org.txm.scripts.importer.conllu
+
+import org.txm.Toolbox
+import org.txm.importer.xtz.ImportModule;
+import org.txm.metadatas.Metadatas
+import org.txm.utils.io.FileCopy
+import org.txm.utils.io.IOUtils
+import org.txm.importer.xtz.*
+import org.txm.scripts.importer.xtz.*
+import org.txm.conllu.core.function.ImportCoNLLUAnnotations
+import org.txm.conllu.core.preferences.UDPreferences
+import org.txm.importer.ApplyXsl2;
+import javax.xml.stream.*
+import org.txm.utils.AsciiUtils
+import org.txm.utils.ConsoleProgressBar
+import org.txm.conllu.core.preferences.UDPreferences
+/**
+ * Only build the Metadatas object since all XML-TXM files already exists.
+ * Metadatas is used to build text order.
+ * 
+ * 
+ * @author mdecorde
+ *
+ */
+class CoNLLUImporter extends XTZImporter {
+	
+	public CoNLLUImporter(ImportModule module) {
+		super(module);
+	}
+	
+	@Override
+	public void process() {
+		
+		File srcDirectory = new File(outputDirectory.getParentFile().getParentFile(), "conllu2tei")
+		srcDirectory.deleteDir();
+		srcDirectory.mkdirs();
+		
+		println "Convert CoNLL-U to XML-TEI..."
+		convert(inputDirectory, srcDirectory, project)
+		
+		inputDirectory = srcDirectory // switch source directory
+		
+		super.process();
+	}
+	
+	public static def convert(File inputDirectory, File srcDirectory, def project) {
+		
+		def files = inputDirectory.listFiles()
+		
+		if (files == null) {
+			println "Aborting. No CONLL file found in $inputDirectory."
+			return false
+		}
+		
+		def content = new LinkedHashMap(); // /text/par/sent
+		
+		def properties = Arrays.asList(ImportCoNLLUAnnotations.UD_PROPERTY_NAMES)
+		
+		String prefix = UDPreferences.getInstance().getProjectPreferenceValue(project, UDPreferences.UDPREFIX, UDPreferences.getInstance().getString(UDPreferences.UDPREFIX));
+		
+		UDPreferences.getInstance().setProjectPreferenceValue(project, UDPreferences.UDPREFIX, prefix); // copy the current preference into the corpus preference
+		
+		boolean keepContractions =  UDPreferences.getInstance().getString(UDPreferences.KEEP_CONTRACTIONS)
+		
+		boolean usenewdocid =  UDPreferences.getInstance().getString(UDPreferences.IMPORT_USE_NEW_DOC_ID)
+		
+		def headPropertiesToProject = UDPreferences.getInstance().getString(UDPreferences.IMPORT_HEAD_TO_PROJECT).split(",") as Set
+		
+		def depsPropertiesToProject = UDPreferences.getInstance().getString(UDPreferences.IMPORT_DEPS_TO_PROJECT).split(",") as Set
+		
+		ConsoleProgressBar cpb_texts = new ConsoleProgressBar(files.size())
+		
+		def docToMaster = [:]
+		println "Parsing CoNLL-U files..."
+		for (File master : files) {
+			
+			cpb_texts.tick()
+			
+			if (!master.getName().endsWith(".conllu")) {
+				continue;
+			}
+			
+			String text_id = master.getName();
+			String sent_id = "";
+			String par_id = "1";
+			
+			master.eachLine("UTF-8") { line ->
+				if (usenewdocid && line.startsWith("# newdoc id = ")) {
+					text_id = line.substring("# newdoc id = ".length())
+					
+					if (!docToMaster.containsKey(text_id)) docToMaster[text_id] = new HashSet();
+					docToMaster[text_id].add(master.getName())
+					
+				} else if (line.startsWith("# sent_id = ")) {
+					sent_id = line.substring("# sent_id = ".length())
+				} else if (line.startsWith("# newpar id = ")) {
+					par_id = line.substring("# newpar id = ".length())
+				} else if (line.startsWith("#")) {
+					//sent_id = line.substring("# sent_id = ".length())
+				} else {
+					if (text_id != null && sent_id != null) {
+						if (!content.containsKey(text_id)) {
+							content[text_id] = new LinkedHashMap()
+						}
+						def text = content[text_id]
+						if (!text.containsKey(par_id)) {
+							text[par_id] = new LinkedHashMap()
+						}
+						if (!text[par_id].containsKey(sent_id)) {
+							LinkedHashMap<String, HashMap<String, String>> sentenceProperties = new LinkedHashMap<String, HashMap<String, String>>();
+							text[par_id][sent_id] = sentenceProperties
+						}
+						HashMap<String, String> wProperties = new HashMap<String, String>()
+						
+						def split = line.split("\t")
+						if (split.size() == properties.size()) {
+							String id = split[0]
+							for (int i = 0 ; i < split.size() ; i++) {
+								wProperties[properties[i]] = split[i]
+							}
+							
+							text[par_id][sent_id][id] = wProperties
+						}
+					}
+				}
+			}
+		}
+		cpb_texts.done()
+		
+		println "Writing XML files..."
+		cpb_texts = new ConsoleProgressBar(content.size())
+		for (def text_id2 : content.keySet()) {
+			
+			cpb_texts.tick()
+			
+			File xmlFile = new File(srcDirectory, text_id2+".xml")
+			// println "xmlFile=$xmlFile"
+			BufferedOutputStream output = new BufferedOutputStream(new FileOutputStream(xmlFile))
+			XMLOutputFactory factory = XMLOutputFactory.newInstance()
+			XMLStreamWriter writer = factory.createXMLStreamWriter(output, "UTF-8")
+			
+			writer.writeStartDocument("UTF-8","1.0")
+			writer.writeStartElement ("TEI")
+			writer.writeDefaultNamespace("http://www.tei-c.org/ns/1.0")
+			writer.writeNamespace("txm", "http://textometrie.org/1.0")
+			writer.writeCharacters("\n")
+			writer.writeStartElement ("teiHeader")
+			writer.writeEndElement()
+			writer.writeCharacters("\n")
+			writer.writeStartElement ("text")
+			if (docToMaster.containsKey(text_id2)) {
+				writer.writeAttribute ("filename", docToMaster[text_id2].join(", "))
+			}
+			writer.writeCharacters("\n")
+			
+			def text = content[text_id2]
+			for (def par_id2 : text.keySet()) { // for all paragraph of the current text
+				
+				writer.writeStartElement ("p");
+				writer.writeAttribute("id", par_id2)
+				writer.writeCharacters("\n")
+				
+				for (def sent_id2 : text[par_id2].keySet()) { // for all sentence of the current paragraph
+					
+					writer.writeStartElement ("s")
+					writer.writeAttribute("id", sent_id2)
+					writer.writeCharacters("\n")
+					
+					def sentence = text[par_id2][sent_id2]
+					
+					if (!keepContractions) { // merge properties in the "-" word and remove the parts
+						for (String wordid : sentence.keySet()) {
+							def word = sentence[wordid]
+							if (word == null) continue;
+							
+							String id = word[0]
+							
+							if (id.contains("-")) { // multi-word line
+								int index = id.indexOf("-")
+								String id1 = id.substring(0, id)
+								String id2 = id.substring(id+1)
+								def token1 = sentence[id1]
+								def token2 = sentence[id2]
+								
+								if (token1 == null || token2 == null) {
+									println "Error: text $text_id2 paragraph $par_id2 sent $sent_id2 word $id has wrong token ids $id1 and $id2 -> $token1 and $token2"
+									continue
+								}
+								
+								for (String p : properties) {
+									if (p == "id") continue // don't merge the form property
+										if (p == "form") continue // don't merge the form property
+										word[p] =  token1[p] + "+" + token2[p]
+								}
+								sentence.remove(id1) // remove the token
+								sentence.remove(id2) // remove the token
+							}
+						}
+					}
+					
+					if (headPropertiesToProject.size() > 0 || depsPropertiesToProject.size() > 0) {
+						ImportCoNLLUAnnotations.buildPropertiesProjections(sentence, headPropertiesToProject, depsPropertiesToProject)
+					}
+					
+					for (String wordid : sentence.keySet()) {
+						def word = sentence[wordid]
+						
+						def id = word["id"]
+						
+						writer.writeStartElement ("w")
+						for (String p : word.keySet()) {
+							if (p == "feats") word[p] = "|"+word[p]+"|"
+							//println "WORD="+word
+							writer.writeAttribute(prefix+p, word[p])
+						}
+						
+						writer.writeCharacters(word["form"])
+						writer.writeEndElement() // w
+						writer.writeCharacters(" ")
+					}
+					writer.writeCharacters("\n")
+					writer.writeEndElement() // s
+				}
+				writer.writeCharacters("\n")
+				writer.writeEndElement() // p
+			}
+			
+			writer.writeEndElement() // text
+			writer.writeCharacters("\n")
+			writer.writeEndElement() // TEI
+			writer.close()
+			output.close()
+		}
+		
+		cpb_texts.done()
+		
+		return true
+	}
+}
Index: TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/tigerXml-sortBfmByDate.xsl
===================================================================
--- TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/tigerXml-sortBfmByDate.xsl	(revision 0)
+++ TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/tigerXml-sortBfmByDate.xsl	(revision 3300)
@@ -0,0 +1,283 @@
+<!-- The Identity Transformation -->
+<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="#all">
+  
+  <!-- This stylesheet sorts the BFM texts by date in the main.xml file of TIGER Search indexes.
+  To use for other texts, replace the text-order variable. There must be a text element for every text file 
+  where the @id is the file name and @order is the sorting key.
+  
+  Written by A. Lavrentiev, CNRS, UMR IHRIM, 2021-07-16
+  GNU GPL v.3
+  -->
+  
+  
+  <!-- Whenever you match any node or any attribute -->
+  <xsl:template match="node()|@*">
+    <!-- Copy the current node -->
+    <xsl:copy>
+      <!-- Including any attributes it has and any child nodes -->
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+  
+  <xsl:output indent="yes"/>
+  
+  <xsl:template match="corpus">
+    <xsl:copy>
+      <xsl:apply-templates select="@*"/>
+      <xsl:apply-templates select="head"/>
+      <body>
+        <xsl:for-each select="$text-order/text">
+          <xsl:sort select="@order"/>
+          <xsl:variable name="text-id"><xsl:value-of select="@id"/></xsl:variable>
+          <xsl:for-each select="$text-list/text">
+            <xsl:if test="@id = $text-id">
+              <subcorpus name='{@id}-{@n}' external='file:{@id}-{@n}.xml'/>
+            </xsl:if>
+          </xsl:for-each>
+        </xsl:for-each>
+      </body>
+    </xsl:copy>
+  </xsl:template>
+  
+  
+  <xsl:variable name="text-list">
+    <xsl:for-each select="//subcorpus">
+      <text id="{replace(@name,'-\d+$','')}" n="{replace(@name,'^.+-(\d+)$','$1')}"></text>
+    </xsl:for-each>
+  </xsl:variable>
+  
+  <xsl:variable name="text-order">
+    <text id="strasbBfm" order="0842strasbBfm"/>
+    <text id="eulaliBfm" order="0883eulaliBfm"/>
+    <text id="jonas" order="0945jonas"/>
+    <text id="passion" order="1000passion"/>
+    <text id="slethgier" order="1000slethgier"/>
+    <text id="AlexisS2_Prologue" order="1050aAlexisS2_Prologue"/>
+    <text id="AlexisRaM" order="1050bAlexisRaM"/>
+    <text id="roland" order="1100roland"/>
+    <text id="leiswillelm" order="1112leiswillelm"/>
+    <text id="comput" order="1116comput"/>
+    <text id="EpreuveJudic" order="1117EpreuveJudic"/>
+    <text id="Lapidal" order="1117Lapidal"/>
+    <text id="oxfps" order="1125oxfps"/>
+    <text id="bestiaire" order="1128bestiaire"/>
+    <text id="gormont" order="1130gormont"/>
+    <text id="Juise" order="1137Juise"/>
+    <text id="DescrEngl" order="1140DescrEngl"/>
+    <text id="guill1" order="1140guill1"/>
+    <text id="Lapidfp" order="1150Lapidfp"/>
+    <text id="PsArundP" order="1150PsArundP"/>
+    <text id="PsOrne" order="1150PsOrne"/>
+    <text id="thebes1" order="1150thebes1"/>
+    <text id="thebes2" order="1150thebes2"/>
+    <text id="brut2" order="1155brut2"/>
+    <text id="ChronSMichelBo" order="1155ChronSMichelBo"/>
+    <text id="eneas1" order="1155eneas1"/>
+    <text id="eneas2" order="1155eneas2"/>
+    <text id="floire_jl" order="1155floire_jl"/>
+    <text id="cambps" order="1157cambps"/>
+    <text id="pyrame" order="1157pyrame"/>
+    <text id="mf" order="1160mf"/>
+    <text id="CommPsia1a" order="1164CommPsia1a"/>
+    <text id="ProvSerlo" order="1165ProvSerlo"/>
+    <text id="philomena" order="1167philomena"/>
+    <text id="ErecKu" order="1170ErecKu"/>
+    <text id="narcisse_lai" order="1170narcisse_lai"/>
+    <text id="rou1" order="1170rou1"/>
+    <text id="rou2" order="1170rou2"/>
+    <text id="becket" order="1173becket"/>
+    <text id="BenDuc1b" order="1174BenDuc1b"/>
+    <text id="Fantosme" order="1174Fantosme"/>
+    <text id="thomas" order="1174thomas"/>
+    <text id="MirNDOrl" order="1175MirNDOrl"/>
+    <text id="RecMedJute" order="1175RecMedJute"/>
+    <text id="CligesKu" order="1176CligesKu"/>
+    <text id="CharretteKu" order="1179CharretteKu"/>
+    <text id="YvainKu" order="1179YvainKu"/>
+    <text id="beroul" order="1180beroul"/>
+    <text id="eracle" order="1180eracle"/>
+    <text id="renart1" order="1180renart1"/>
+    <text id="adgar" order="1183adgar"/>
+    <text id="BrutCist" order="1183BrutCist"/>
+    <text id="DialGreg1" order="1183DialGreg1"/>
+    <text id="DialGreg2" order="1183DialGreg2"/>
+    <text id="EpMontDeu" order="1183EpMontDeu"/>
+    <text id="guingamor" order="1183guingamor"/>
+    <text id="orange" order="1183orange"/>
+    <text id="PercevalKu" order="1183PercevalKu"/>
+    <text id="RecCoulTit" order="1183RecCoulTit"/>
+    <text id="RegleSBenCotton" order="1183RegleSBenCotton"/>
+    <text id="SBernAn" order="1183SBernAn"/>
+    <text id="SermMadn" order="1183SermMadn"/>
+    <text id="cobe" order="1185cobe"/>
+    <text id="SBernCant" order="1187SBernCant"/>
+    <text id="graelent" order="1189graelent"/>
+    <text id="BlondNesle" order="1190BlondNesle"/>
+    <text id="espine" order="1190espine"/>
+    <text id="melion" order="1190melion"/>
+    <text id="qlr" order="1190qlr"/>
+    <text id="tydorel" order="1190tydorel"/>
+    <text id="vidame" order="1190vidame"/>
+    <text id="bodelnic" order="1195bodelnic"/>
+    <text id="amiamil" order="1200amiamil"/>
+    <text id="conttyr_a" order="1200conttyr_a"/>
+    <text id="DialAme" order="1200DialAme"/>
+    <text id="Elucidaireiii" order="1200Elucidaireiii"/>
+    <text id="SAgnesDob" order="1200SAgnesDob"/>
+    <text id="escoufle" order="1201escoufle"/>
+    <text id="desire" order="1205desire"/>
+    <text id="villehardouin1" order="1206villehardouin1"/>
+    <text id="villehardouin2" order="1206villehardouin2"/>
+    <text id="belinc" order="1207belinc"/>
+    <text id="lecheor" order="1209lecheor"/>
+    <text id="nabaret" order="1209nabaret"/>
+    <text id="clari" order="1210clari"/>
+    <text id="dole" order="1210dole"/>
+    <text id="trot" order="1210trot"/>
+    <text id="aucassin" order="1212aucassin"/>
+    <text id="galeran" order="1212galeran"/>
+    <text id="tyolet" order="1212tyolet"/>
+    <text id="doon" order="1215doon"/>
+    <text id="renart10" order="1216renart10"/>
+    <text id="renart11" order="1216renart11"/>
+    <text id="ombre" order="1220ombre"/>
+    <text id="bibleberze" order="1221bibleberze"/>
+    <text id="gcoin1" order="1222gcoin1"/>
+    <text id="gcoin2" order="1222gcoin2"/>
+    <text id="gcoin3" order="1222gcoin3"/>
+    <text id="gcoin4" order="1222gcoin4"/>
+    <text id="SEustPr1" order="1225SEustPr1"/>
+    <text id="tdechamp" order="1226tdechamp"/>
+    <text id="qgraal_cm" order="1227qgraal_cm"/>
+    <text id="rosel" order="1227rosel"/>
+    <text id="violette" order="1228violette"/>
+    <text id="fournival" order="1230fournival"/>
+    <text id="merlin_suite_litt" order="1232merlin_suite_litt"/>
+    <text id="jehan" order="1235jehan"/>
+    <text id="SLambert" order="1242SLambert"/>
+    <text id="edconfcambr" order="1245edconfcambr"/>
+    <text id="ImMondePrK" order="1246ImMondePrK"/>
+    <text id="sarrasin" order="1249sarrasin"/>
+    <text id="atrper" order="1250atrper"/>
+    <text id="bestam" order="1250bestam"/>
+    <text id="chartes_aube13" order="1250chartes_aube13"/>
+    <text id="chartes_hain13" order="1250chartes_hain13"/>
+    <text id="ChirAlbT" order="1250ChirAlbT"/>
+    <text id="OrnDamesR" order="1250OrnDamesR"/>
+    <text id="raoul" order="1250raoul"/>
+    <text id="vergy" order="1250vergy"/>
+    <text id="menreims" order="1260menreims"/>
+    <text id="MirNDChartr" order="1262MirNDChartr"/>
+    <text id="RutebZ" order="1267RutebZ"/>
+    <text id="mestiersparis" order="1268mestiersparis"/>
+    <text id="trispr" order="1270trispr"/>
+    <text id="rosem1" order="1274rosem1"/>
+    <text id="rosem2" order="1274rosem2"/>
+    <text id="rosem3" order="1274rosem3"/>
+    <text id="SBath1" order="1275SBath1"/>
+    <text id="SGenPr1" order="1275SGenPr1"/>
+    <text id="grchron1" order="1277grchron1"/>
+    <text id="roisin" order="1280roisin"/>
+    <text id="JAntInv" order="1282JAntInv"/>
+    <text id="JAntRect" order="1282JAntRect"/>
+    <text id="beauma1" order="1283beauma1"/>
+    <text id="SGenPr3" order="1287SGenPr3"/>
+    <text id="joinville" order="1307joinville"/>
+    <text id="fauvel" order="1310fauvel"/>
+    <text id="fouke" order="1317fouke"/>
+    <text id="passbonnes" order="1317passbonnes"/>
+    <text id="passpal" order="1317passpal"/>
+    <text id="plaidsmortemer" order="1320plaidsmortemer"/>
+    <text id="moree" order="1322moree"/>
+    <text id="sardos" order="1324sardos"/>
+    <text id="prunier" order="1325prunier"/>
+    <text id="SBath4" order="1335SBath4"/>
+    <text id="magloire3" order="1337magloire3"/>
+    <text id="grchron9" order="1340grchron9"/>
+    <text id="GuillMachFortuneH" order="1341GuillMachFortuneH"/>
+    <text id="GuillMachLyonH" order="1342GuillMachLyonH"/>
+    <text id="ChaceOisiiT" order="1350ChaceOisiiT"/>
+    <text id="GuillMachPlourH" order="1350GuillMachPlourH"/>
+    <text id="prov" order="1350prov"/>
+    <text id="hlanc" order="1354hlanc"/>
+    <text id="daudin" order="1365daudin"/>
+    <text id="SGenPr2" order="1367SGenPr2"/>
+    <text id="Berin1" order="1370Berin1"/>
+    <text id="Berin2" order="1370Berin2"/>
+    <text id="oresme" order="1370oresme"/>
+    <text id="grchron_j2c5" order="1381grchron_j2c5"/>
+    <text id="regcrim1" order="1390regcrim1"/>
+    <text id="regcrim2" order="1390regcrim2"/>
+    <text id="dictier" order="1392dictier"/>
+    <text id="melusine" order="1392melusine"/>
+    <text id="menagier" order="1393menagier"/>
+    <text id="griseld" order="1395griseld"/>
+    <text id="maniere1396" order="1396maniere1396"/>
+    <text id="anglure" order="1398anglure"/>
+    <text id="maniere1399" order="1399maniere1399"/>
+    <text id="dizsages" order="1400dizsages"/>
+    <text id="ponthus" order="1400ponthus"/>
+    <text id="QJoyesKa" order="1400QJoyesKa"/>
+    <text id="froissart1" order="1402froissart1"/>
+    <text id="gerson_trinite" order="1402gerson_trinite"/>
+    <text id="cdo_peche" order="1404cdo_peche"/>
+    <text id="CoutHector1" order="1404CoutHector1"/>
+    <text id="pizan_charlesv1" order="1404pizan_charlesv1"/>
+    <text id="pizan_charlesv2" order="1404pizan_charlesv2"/>
+    <text id="donait" order="1405donait"/>
+    <text id="CoutRoum" order="1407CoutRoum"/>
+    <text id="baye1" order="1409baye1"/>
+    <text id="baye2" order="1409baye2"/>
+    <text id="LaurPremCas2_l6" order="1409LaurPremCas2_l6"/>
+    <text id="DocSMichel_a" order="1411DocSMichel_a"/>
+    <text id="cdo_retenue" order="1414cdo_retenue"/>
+    <text id="cdo_ballades" order="1415cdo_ballades"/>
+    <text id="maniere1415" order="1415maniere1415"/>
+    <text id="SBath3" order="1417SBath3"/>
+    <text id="quadrilogue" order="1422quadrilogue"/>
+    <text id="parlangl" order="1425parlangl"/>
+    <text id="morchesne" order="1426morchesne"/>
+    <text id="cdo_complaintes" order="1433cdo_complaintes"/>
+    <text id="SGenPr4" order="1433SGenPr4"/>
+    <text id="cdo_songe" order="1437cdo_songe"/>
+    <text id="ursins" order="1438ursins"/>
+    <text id="cdo_rondeaux" order="1443cdo_rondeaux"/>
+    <text id="monstre" order="1443monstre"/>
+    <text id="VidPierrePetit" order="1444VidPierrePetit"/>
+    <text id="louis11_215" order="1450louis11_215"/>
+    <text id="SBath2" order="1450SBath2"/>
+    <text id="SGenPr5" order="1450SGenPr5"/>
+    <text id="coutpoit_a" order="1451coutpoit_a"/>
+    <text id="saintre" order="1456saintre"/>
+    <text id="artois" order="1460artois"/>
+    <text id="jouvencel1" order="1461jouvencel1"/>
+    <text id="jouvencel2" order="1461jouvencel2"/>
+    <text id="villon" order="1461villon"/>
+    <text id="cnn" order="1462cnn"/>
+    <text id="pathelin" order="1462pathelin"/>
+    <text id="louis11_223" order="1463louis11_223"/>
+    <text id="louis11_234" order="1467louis11_234"/>
+    <text id="quenouilles1" order="1468quenouilles1"/>
+    <text id="louis11_248" order="1470louis11_248"/>
+    <text id="quenouilles2" order="1470quenouilles2"/>
+    <text id="passauv" order="1477passauv"/>
+    <text id="archier" order="1479archier"/>
+    <text id="theologie" order="1479theologie"/>
+    <text id="tringant" order="1480tringant"/>
+    <text id="mirsnicjuif" order="1483mirsnicjuif"/>
+    <text id="molinet1" order="1490molinet1"/>
+    <text id="jehpar" order="1494jehpar"/>
+    <text id="ressource" order="1494ressource"/>
+    <text id="phares" order="1496phares"/>
+    <text id="commyn1" order="1497commyn1"/>
+    <text id="commyn2" order="1497commyn2"/>
+    <text id="commyn3" order="1497commyn3"/>
+    <text id="commyn4" order="1497commyn4"/>
+    <text id="commyn5" order="1497commyn5"/>
+    <text id="commyn6" order="1497commyn6"/>
+    <text id="commyn7" order="1497commyn7"/>
+    <text id="commyn8" order="1497commyn8"/>
+    <text id="vigneulles" order="1510vigneulles"/>
+  </xsl:variable>
+  
+</xsl:stylesheet>

Property changes on: TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/tigerXml-sortBfmByDate.xsl
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/InstallGroovyCoNLLUFiles.java
===================================================================
--- TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/InstallGroovyCoNLLUFiles.java	(revision 0)
+++ TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/InstallGroovyCoNLLUFiles.java	(revision 3300)
@@ -0,0 +1,53 @@
+package org.txm.conllu.core;
+
+import java.io.File;
+
+import org.txm.PostTXMHOMEInstallationStep;
+import org.txm.Toolbox;
+import org.txm.objects.Workspace;
+import org.txm.utils.BundleUtils;
+
+public class InstallGroovyCoNLLUFiles extends PostTXMHOMEInstallationStep {
+
+	final static String createfolders[] = {"scripts/groovy/lib", "scripts/groovy/user", "scripts/groovy/system"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+	
+	@Override
+	public boolean do_install(Workspace workspace) {
+		File txmhomedir = new File(Toolbox.getTxmHomePath());
+		
+		for (String folder : createfolders) {
+			new File(txmhomedir, folder).mkdirs();
+		}
+		File scriptsDirectory = new File(txmhomedir, "scripts/groovy");
+		File userDirectory = new File(scriptsDirectory, "user");
+		File systemDirectory = new File(scriptsDirectory, "system");
+		
+		String bundle_id = "org.txm.conllu.core";
+		File scriptsPackageDirectory = new File(userDirectory, "org/txm/scripts/importer");
+		File scriptsPackageDirectory2 = new File(systemDirectory, "org/txm/scripts/importer");
+		scriptsPackageDirectory.mkdirs();
+		scriptsPackageDirectory2.mkdirs();
+		BundleUtils.copyFiles(bundle_id, "groovy", "org/txm/scripts/importer", "", scriptsPackageDirectory, true);
+		BundleUtils.copyFiles(bundle_id, "groovy", "org/txm/scripts/importer", "", scriptsPackageDirectory2, true);
+	
+		return scriptsDirectory.exists();
+	}
+
+	@Override
+	public String getName() {
+		return "UD (org.txm.conllu.core)";
+	}
+	
+	@Override
+	public boolean needsReinstall(Workspace workspace) {
+		File txmhomedir = new File(Toolbox.getTxmHomePath());
+		for (String folder : createfolders) {
+			if (!new File(txmhomedir, folder).exists()) {
+				return true;
+			}
+		}
+		
+		
+		return false;
+	}
+}

Property changes on: TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/InstallGroovyCoNLLUFiles.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/preferences/UDPreferences.java
===================================================================
--- TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/preferences/UDPreferences.java	(revision 0)
+++ TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/preferences/UDPreferences.java	(revision 3300)
@@ -0,0 +1,52 @@
+package org.txm.conllu.core.preferences;
+
+
+import org.osgi.service.prefs.Preferences;
+import org.txm.core.preferences.TXMPreferences;
+
+/**
+ * Preferences initializer and manager.
+ * 
+ * @author mdecorde
+ *
+ */
+public class UDPreferences extends TXMPreferences {
+	
+	
+	public static String VERSION = "version";
+	
+	public static String UDPREFIX = "ud_prefix";
+	
+	public static String KEEP_CONTRACTIONS = "import_keep_contractions";
+	
+	public static String IMPORT_USE_NEW_DOC_ID = "import_use_new_doc_id";
+	
+	public static String IMPORT_HEAD_TO_PROJECT = "import_head_to_project";
+	
+	public static String IMPORT_DEPS_TO_PROJECT = "import_deps_to_project";
+	
+	/**
+	 * Gets the instance.
+	 * 
+	 * @return the instance
+	 */
+	public static TXMPreferences getInstance() {
+		if (!TXMPreferences.instances.containsKey(UDPreferences.class)) {
+			new UDPreferences();
+		}
+		return TXMPreferences.instances.get(UDPreferences.class);
+	}
+	
+	
+	@Override
+	public void initializeDefaultPreferences() {
+		super.initializeDefaultPreferences();
+		
+		Preferences preferences = this.getDefaultPreferencesNode();
+		preferences.put(UDPREFIX, "ud-");
+		preferences.put(IMPORT_HEAD_TO_PROJECT, "upos,deprel");
+		preferences.put(IMPORT_DEPS_TO_PROJECT, "upos,deprel");
+		preferences.putBoolean(KEEP_CONTRACTIONS, true);
+		preferences.putBoolean(IMPORT_USE_NEW_DOC_ID, true);
+	}
+}

Property changes on: TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/preferences/UDPreferences.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/function/ImportCoNLLUAnnotations.java
===================================================================
--- TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/function/ImportCoNLLUAnnotations.java	(revision 0)
+++ TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/function/ImportCoNLLUAnnotations.java	(revision 3300)
@@ -0,0 +1,275 @@
+package org.txm.conllu.core.function;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Set;
+
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.commons.lang.StringUtils;
+import org.txm.objects.Text;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+import org.txm.utils.AsciiUtils;
+import org.txm.utils.io.FileCopy;
+import org.txm.utils.io.IOUtils;
+import org.txm.utils.logger.Log;
+import org.txm.xml.xmltxm.XMLTXMWordPropertiesInjection;
+
+public class ImportCoNLLUAnnotations {
+	
+	public static final String[] UD_PROPERTY_NAMES = { "id", "form", "lemma", "upos", "xpos", "feats", "head", "deprel", "deps", "misc" };
+	
+	public static int _importAnnotations(File coonluFile, MainCorpus mainCorpus, String propertiesPrefix, String textId, Boolean normalize_word_ids, Set<String> headPropertiesToProject, Set<String> depsPropertiesToProject, Set<String> udPropertiesToImport) throws IOException, XMLStreamException {
+		
+		if (textId == null || textId.length() == 0) { // no text id provided, using the conllu file name
+			textId = coonluFile.getName().substring(0, coonluFile.getName().length() - 7);
+		}
+		
+		Log.info("** processing text: " + textId);
+		Text text = mainCorpus.getProject().getText(textId);
+		if (text == null) {
+			Log.warning("No text found with ID=" + textId);
+			return 0;
+		}
+		File xmltxmFile = mainCorpus.getProject().getText(textId).getXMLTXMFile();
+		File xmltxmUpdatedFile = new File(System.getProperty("java.io.tmpdir"), xmltxmFile.getName());
+		
+		XMLTXMWordPropertiesInjection processor = new XMLTXMWordPropertiesInjection(xmltxmFile);
+		HashMap<String, HashMap<String, String>> rules = new HashMap<>();
+		processor.setProperties(rules);
+		
+		BufferedReader reader = IOUtils.getReader(coonluFile);
+		String line = reader.readLine();
+		
+		int nWords2 = 0;
+		int nLine = 0;
+		String sent_id = null;
+		String newpar_id = null;
+		String newdoc_id = null;
+		LinkedHashMap<String, HashMap<String, String>> sentenceProperties = new LinkedHashMap<String, HashMap<String, String>>();
+		while (line != null) {
+			nLine++;
+			if (line.length() == 0) {
+				line = reader.readLine();
+				continue; // comment
+			}
+			
+			if (line.startsWith("#")) {
+				if (line.startsWith("# sent_id = ")) {
+					
+					// write previous sentence word properties
+					if (sentenceProperties.size() > 0) {
+						storeSentenceProperties(sentenceProperties, processor, propertiesPrefix, headPropertiesToProject, depsPropertiesToProject);
+					}
+					
+					sent_id = line.substring(12).trim();
+					
+				}
+				else if (line.startsWith("# newdoc id = ")) {
+					newdoc_id = line.substring(14).trim();
+				}
+				else if (line.startsWith("# newpar id = ")) {
+					newpar_id = line.substring(14).trim();
+				}
+				else {
+					// nothing for now
+				}
+				
+				line = reader.readLine();
+				continue; // comment
+			}
+			
+			String[] split = line.split("\t", 10);
+			if (split.length < 10) {
+				Log.warning("Error: line " + nLine + " : " + line + " -> " + Arrays.toString(split) + " len=" + split.length);
+				line = reader.readLine();
+				continue; // comment
+			}
+			
+			String misc = split[9];
+			String[] miscValues = misc.split("\\|");
+			String wId = null;
+			for (String miscValue : miscValues) {
+				if (miscValue.startsWith("XmlId=")) {
+					wId = miscValue.substring(6);
+				}
+			}
+			
+			HashMap<String, String> properties = new HashMap<>();
+			for (int i = 0; i < split.length; i++) {
+				properties.put(UD_PROPERTY_NAMES[i], split[i]); // add the property name using the prefix ; XML-TXM types are prefixed with '#'
+			}
+			
+			if (sent_id != null) {
+				properties.put("#"+propertiesPrefix+"sentid", sent_id);
+				sent_id = ""; // reset value for next sentence
+			}
+			else {
+				properties.put("#"+propertiesPrefix+"sentid", "");
+			}
+			
+			if (newdoc_id != null) {
+				properties.put("#"+propertiesPrefix+"newdocid", newdoc_id);
+				newdoc_id = null; // reset value for next sentence
+			}
+			else {
+				properties.put("#"+propertiesPrefix+"newdocid", "");
+			}
+			
+			if (newpar_id != null) {
+				properties.put("#"+propertiesPrefix+"newparid", newpar_id);
+				newpar_id = null; // reset value for next sentence
+			}
+			else {
+				properties.put("#"+propertiesPrefix+"newparid", "");
+			}
+			
+			if (wId == null) {
+				Log.warning("No 'XmlId=' found for UD line: " + line);
+			}
+			else {
+				
+				if (normalize_word_ids) {
+					if (!wId.startsWith("w_")) {
+						wId = "w_" + wId.substring(1);
+					}
+					wId = AsciiUtils.buildWordId(wId);
+				}
+				
+				sentenceProperties.put(wId, properties);
+				nWords2++;
+			}
+			line = reader.readLine();
+		}
+		reader.close();
+		
+		// IF ANY write previous sentence word properties 
+		if (sentenceProperties.size() > 0) {
+			storeSentenceProperties(sentenceProperties, processor, propertiesPrefix, headPropertiesToProject, depsPropertiesToProject);
+		}
+		
+		if (nWords2 == 0) {
+			Log.warning("** No annotation to import in " + coonluFile);
+			return 0;
+		}
+		
+		Log.info("** Loading annotations from : " + coonluFile+" "+processor.getRules().size()+" injections to do.");
+		if (processor.process(xmltxmUpdatedFile)) {
+			if (xmltxmFile.delete() && FileCopy.copy(xmltxmUpdatedFile, xmltxmFile)) {
+				if (processor.getNonActivatedRules().size() > 0) {
+					Log.warning("Warning: some words were not imported: " + StringUtils.join(processor.getNonActivatedRules(), ", "));
+				}
+			}
+			else {
+				Log.warning("** Warning: annotation import failed for replace the corpus XML-TXM file: " + xmltxmFile + ". TEMP file: " + xmltxmUpdatedFile);
+				return 0;
+			}
+		}
+		else {
+			Log.warning("** Warning: annotation import failed for text: " + textId);
+			return 0;
+		}
+		
+		if (processor.getNInsertions() == 0) {
+			Log.warning("** No annotation imported in " + textId);
+		}
+		
+		return processor.getNInsertions();
+	}
+
+	public static void buildPropertiesProjections(LinkedHashMap<String, HashMap<String, String>> sentenceProperties, Set<String> headPropertiesToProject, Set<String> depsPropertiesToProject) throws IOException, XMLStreamException {
+		
+		//System.out.println("Building "+headPropertiesToProject+" and "+depsPropertiesToProject+" in "+sentenceProperties);
+		if (headPropertiesToProject.size() > 0) {
+			
+			for (String wId : sentenceProperties.keySet()) {
+				
+				HashMap<String, String> properties = sentenceProperties.get(wId); 
+				
+				for (String wheadid : sentenceProperties.keySet()) { // find the word head properties
+					
+					HashMap<String, String> headProperties = sentenceProperties.get(wheadid); 
+
+					if (headProperties.get("id").equals(properties.get("head"))) { // a word which head is the current word id
+						// { "form", "lemma", "upos", "xpos", "feats", "deprel", "deps", "misc" };
+						if (headPropertiesToProject.contains("form")) properties.put("head-form", headProperties.get("form"));
+						if (headPropertiesToProject.contains("lemma")) properties.put("head-lemma", headProperties.get("lemma"));
+						if (headPropertiesToProject.contains("upos")) properties.put("head-upos", headProperties.get("upos"));
+						if (headPropertiesToProject.contains("xpos")) properties.put("head-xpos", headProperties.get("xpos"));
+						if (headPropertiesToProject.contains("feats")) properties.put("head-feats", headProperties.get("feats"));
+						if (headPropertiesToProject.contains("deprel")) properties.put("head-deprel", headProperties.get("deprel"));
+						if (headPropertiesToProject.contains("deps")) properties.put("head-deps", headProperties.get("deps"));
+						if (headPropertiesToProject.contains("misc")) properties.put("head-misc", headProperties.get("misc"));
+						break; // the is only one head per word
+					}
+				}
+			}
+		}
+		
+		if (depsPropertiesToProject.size() > 0) {
+			
+			for (String wId : sentenceProperties.keySet()) {
+				
+				HashMap<String, String> properties = sentenceProperties.get(wId); 
+				HashMap<String, String> newProperties = new HashMap<String, String>();
+				if (depsPropertiesToProject.contains("id")) newProperties.put("dep-id", "|");
+				if (depsPropertiesToProject.contains("form")) newProperties.put("dep-form", "|");
+				if (depsPropertiesToProject.contains("lemma")) newProperties.put("dep-lemma", "|");
+				if (depsPropertiesToProject.contains("upos")) newProperties.put("dep-upos", "|");
+				if (depsPropertiesToProject.contains("xpos")) newProperties.put("dep-xpos", "|");
+				if (depsPropertiesToProject.contains("deprel")) newProperties.put("dep-deprel", "|");
+				if (depsPropertiesToProject.contains("deps")) newProperties.put("dep-deps", "|");
+				if (depsPropertiesToProject.contains("misc")) newProperties.put("dep-misc", "|");
+				
+				// browse each dep properties to build the depXYZ properties
+				for (String wdepid : sentenceProperties.keySet()) {
+					
+					HashMap<String, String> depProperties = sentenceProperties.get(wdepid); 
+					if (depProperties.get("head").equals(properties.get("id"))) { // a word which head is the current word id
+						
+						if (depsPropertiesToProject.contains("id")) newProperties.put("dep-id", newProperties.get("dep-id")+depProperties.get("id")+"|");
+						if (depsPropertiesToProject.contains("form")) newProperties.put("dep-form", newProperties.get("dep-form")+depProperties.get("form")+"|");
+						if (depsPropertiesToProject.contains("lemma")) newProperties.put("dep-lemma", newProperties.get("dep-lemma")+depProperties.get("lemma")+"|");
+						if (depsPropertiesToProject.contains("upos")) newProperties.put("dep-upos", newProperties.get("dep-upos")+depProperties.get("upos")+"|");
+						if (depsPropertiesToProject.contains("xpos")) newProperties.put("dep-xpos", newProperties.get("dep-xpos")+depProperties.get("xpos")+"|");
+						if (depsPropertiesToProject.contains("deprel")) newProperties.put("dep-deprel", newProperties.get("dep-deprel")+depProperties.get("deprel")+"|");
+						if (depsPropertiesToProject.contains("deps")) newProperties.put("dep-deps", newProperties.get("dep-deps")+depProperties.get("deps")+"|");
+						if (depsPropertiesToProject.contains("misc")) properties.put("dep-misc", newProperties.get("dep-misc")+depProperties.get("misc")+"|");
+					}
+				}
+				
+				for (String newProp : newProperties.keySet()) {
+					properties.put(newProp, newProperties.get(newProp));
+				}
+			}
+		}
+		//System.out.println("Result "+sentenceProperties);
+	}
+	
+	private static void storeSentenceProperties(LinkedHashMap<String, HashMap<String, String>> sentenceProperties, XMLTXMWordPropertiesInjection processor, String propertiesPrefix, Set<String> headPropertiesToProject, Set<String> depsPropertiesToProject) throws IOException, XMLStreamException {
+		
+		buildPropertiesProjections(sentenceProperties, headPropertiesToProject, depsPropertiesToProject);
+		
+		for (String id : sentenceProperties.keySet()) {
+			HashMap<String, String> properties = sentenceProperties.get(id);
+			ArrayList<String> propertyNames = new ArrayList<String>(properties.keySet());
+			
+			for (String p : propertyNames) {
+				
+				if (p.startsWith("#")) continue; //property already prefixed with #, do not add the prefix
+				
+				String value = properties.get(p);
+				properties.remove(p);
+				properties.put("#"+propertiesPrefix+p, value);
+			}
+			processor.addProperty(id, properties);
+		}
+		
+		sentenceProperties.clear();
+	}
+}

Property changes on: TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/function/ImportCoNLLUAnnotations.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/function/UDTreeSearchSelector.java
===================================================================
--- TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/function/UDTreeSearchSelector.java	(revision 0)
+++ TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/function/UDTreeSearchSelector.java	(revision 3300)
@@ -0,0 +1,37 @@
+package org.txm.conllu.core.function;
+
+import org.txm.searchengine.core.Query;
+import org.txm.searchengine.cqp.corpus.CQPCorpus;
+import org.txm.searchengine.cqp.corpus.query.CQLQuery;
+import org.txm.treesearch.function.TreeSearch;
+import org.txm.treesearch.function.TreeSearchSelector;
+
+
+public class UDTreeSearchSelector extends TreeSearchSelector {
+	
+	public static String UD = "UD";
+	
+	@Override
+	public String getEngine() {
+		
+		return UD;
+	}
+	
+	@Override
+	public boolean canComputeWith(CQPCorpus corpus) {
+		
+		return UDUSearch.hasUDProperties(corpus);
+	}
+	
+	@Override
+	public TreeSearch getTreeSearch(CQPCorpus corpus) {
+		
+		return new UDUSearch(corpus);
+	}
+
+	@Override
+	public Class<? extends Query> getQueryClass() {
+		
+		return CQLQuery.class;
+	}
+}

Property changes on: TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/function/UDTreeSearchSelector.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/function/UDUSearch.java
===================================================================
--- TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/function/UDUSearch.java	(revision 0)
+++ TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/function/UDUSearch.java	(revision 3300)
@@ -0,0 +1,328 @@
+package org.txm.conllu.core.function;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import org.apache.commons.lang.StringUtils;
+import org.txm.conllu.core.preferences.UDPreferences;
+import org.txm.core.results.TXMParameters;
+import org.txm.libs.deptreeviz.UDPrintTree;
+import org.txm.searchengine.cqp.CQPSearchEngine;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.CQPCorpus;
+import org.txm.searchengine.cqp.corpus.QueryResult;
+import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
+import org.txm.searchengine.cqp.corpus.WordProperty;
+import org.txm.searchengine.cqp.corpus.query.CQLQuery;
+import org.txm.searchengine.cqp.corpus.query.Match;
+import org.txm.treesearch.function.TreeSearch;
+import org.txm.treesearch.function.TreeSearchSelector;
+import org.txm.utils.TXMProgressMonitor;
+import org.txm.utils.logger.Log;
+
+public class UDUSearch extends TreeSearch {
+	
+	protected boolean ready = false;
+	
+	CQPCorpus udSentences;
+
+	private QueryResult matches;
+	
+	public UDUSearch(CQPCorpus corpus) {
+		this(null, corpus);
+	}
+	
+	public UDUSearch(String parentNodePath, CQPCorpus corpus) {
+		super(parentNodePath, corpus);
+		
+		this.corpus = getParent();
+		
+		ready = hasUDProperties(corpus, UDPreferences.getInstance().getProjectPreferenceValue(corpus.getProject(), UDPreferences.UDPREFIX, UDPreferences.getInstance().getString(UDPreferences.UDPREFIX)));
+	}
+	
+	public UDUSearch(String parentNodePath) {
+		this(parentNodePath, null);
+	}
+	
+	public boolean isComputed() {
+		return matches != null;
+	}
+	
+	public boolean isDrawn() {
+		return matches != null;
+	}
+	
+	public boolean toSVG(File svgFile, int sent, int sub, String T, String NT) {
+		if (!isDrawn()) return false; // no result
+		try {
+			//File file = File.createTempFile("txm", ".svg", new File(Toolbox.getTxmHomePath(), "results"));
+			
+			Match match = this.matches.getMatches().get(sent);
+			Match sentence = null;
+			for (Match s : udSentences.getMatches()) {
+				if (s.getStart() <= match.getStart() && match.getEnd() <= s.getEnd()) {
+					sentence = s;
+					break;
+				}
+			}
+			
+			if (sentence == null) {
+				Log.warning("Error: match positions not found in sentences positions");
+				return false;
+			}
+			
+			int[] positions = new int[sentence.size()];
+			for (int i = 0 ; i < sentence.size() ; i++) positions[i] = sentence.getStart()+i;
+			
+			String prefix = UDPreferences.getInstance().getProjectPreferenceValue(corpus.getProject(), UDPreferences.UDPREFIX, UDPreferences.getInstance().getString(UDPreferences.UDPREFIX));
+			
+			HashMap<String, String[]> values = new HashMap<>();
+			for (String p : ImportCoNLLUAnnotations.UD_PROPERTY_NAMES) {
+				values.put(prefix+p, corpus.getProperty(prefix+p).cpos2Str(positions));
+			}
+			
+			ArrayList<String> conll = new ArrayList<String>();
+			
+			for (int p = 0 ; p < positions.length ; p++) {
+				StringBuilder buffer = new StringBuilder();
+				for (String prop : ImportCoNLLUAnnotations.UD_PROPERTY_NAMES) {
+					if (buffer.length() > 0) buffer.append("\t");
+					buffer.append(values.get(prefix+prop)[p]);
+				}
+				
+				conll.add(buffer.toString());
+			}
+			Log.info("CoNLL-U:");
+			for (String l : conll) {
+				Log.info(l);
+			}
+			return UDPrintTree.print(svgFile, conll) != null;
+		}
+		catch (Throwable e) {
+			Log.warning("Error while drawing SVG: "+e+ " at "+e.getStackTrace()[0]);
+			Log.printStackTrace(e);
+			return false;
+		}
+	}
+	
+	public String[] getAvailableTProperties() {
+		
+		String prefix = UDPreferences.getInstance().getProjectPreferenceValue(corpus.getProject(), UDPreferences.UDPREFIX, UDPreferences.getInstance().getString(UDPreferences.UDPREFIX));
+		
+		String[] properties = new String[ImportCoNLLUAnnotations.UD_PROPERTY_NAMES.length];
+		for (int p = 0 ; p < ImportCoNLLUAnnotations.UD_PROPERTY_NAMES.length ; p++) {
+			properties[p] = prefix+ImportCoNLLUAnnotations.UD_PROPERTY_NAMES[p];
+		}
+		return properties;
+	}
+	
+	public String[] getAvailableNTProperties() {
+		return getAvailableTProperties();
+	}
+	
+	@Override
+	public CQPCorpus getParent() {
+		return (CQPCorpus) super.getParent();
+	}
+	
+	public boolean isReady() {
+		return ready;
+	}
+	
+	public String getT() {
+		return T;
+	}
+	
+	public String getNT() {
+		return NT;
+	}
+	
+	public int getNSentences() {
+		if (matches == null) return 0;
+		
+			try {
+				return matches.getMatches().size();
+			}
+			catch (CqiClientException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+				return 0;
+			}//getNMatch();
+	}
+	
+	public int getNSubGraph(int matchNo) {
+		
+		return 1;
+	}
+	
+	public int getSub(int matchNo) {
+		
+		return 1;
+	}
+	
+	/**
+	 * @return the query or the generic one
+	 */
+	public String getQuery() {
+		
+		String prefix = UDPreferences.getInstance().getProjectPreferenceValue(corpus.getProject(), UDPreferences.UDPREFIX, UDPreferences.getInstance().getString(UDPreferences.UDPREFIX));
+		
+		if (pQuery == null || pQuery.getQueryString().length() ==0) {
+			return "["+prefix+"id=\"1\"]";
+		} else {
+			return pQuery.getQueryString();
+		}
+	}
+	
+	@Override
+	public String toString() {
+		if (pQuery != null) {
+			return pQuery.getQueryString().substring(0, Math.min(20, pQuery.getQueryString().length()));
+		}
+		return "" + corpus;
+	}
+	
+	@Override
+	public boolean _toTxt(File outfile, String encoding, String colseparator, String txtseparator) throws Exception {
+		return false;
+	}
+	
+	@Override
+	public void clean() {
+		
+	}
+	
+	/**
+	 * 
+	 * @return the array of extensions to show in the FileDialog SWT widget
+	 */
+	@Override
+	public String[] getExportTXTExtensions() {
+		return new String[] { "*.xml" };
+	}
+	
+	@Override
+	public boolean canCompute() {
+		return corpus != null; // && pQuery != null && pQuery.length() > 0; // if pQuery is empty/null set a default query
+	}
+	
+	@Override
+	public boolean setParameters(TXMParameters parameters) {
+		if (parameters.getString("query") != null) {
+			this.pQuery = new CQLQuery(parameters.getString("query"));
+		}
+		return true;
+	}
+	
+	@Override
+	public boolean saveParameters() throws Exception {
+		return true;
+	}
+	
+	@Override
+	public boolean loadParameters() throws Exception {
+		return true;
+	}
+	
+	@Override
+	protected boolean _compute(TXMProgressMonitor monitor) throws Exception {
+		
+		String prefix = UDPreferences.getInstance().getProjectPreferenceValue(corpus.getProject(), UDPreferences.UDPREFIX, UDPreferences.getInstance().getString(UDPreferences.UDPREFIX));
+		
+		
+		if (pQuery == null || pQuery.getQueryString().length() == 0) {
+			pQuery = new CQLQuery("["+prefix+"id=\"1\"]");
+		}
+		
+		udSentences = corpus.getSubcorpusByName(corpus.getName()+"/ud-sentences");
+		if (udSentences != null) udSentences.compute();
+		
+		if (udSentences == null) {
+			udSentences = corpus.createSubcorpus(new CQLQuery("["+prefix+"id=\"1\"] ["+prefix+"id !=\"1\"]+ [:"+prefix+"id=\"1|__UNDEF__\":]"), "ud-sentences");
+			udSentences.setVisible(false);
+		}
+		
+		matches = udSentences.query((CQLQuery)pQuery, "matches", false);
+		
+		return matches.getNMatch() > 0;
+	}
+	
+	@Override
+	public String getResultType() {
+		return "UD search";
+	}
+	
+	public void setIndexAndSubIndex(int sent, int sub) {
+		this.index = sent;
+		this.subIndex = sub;
+	}
+	
+	@Override
+	public boolean hasSubMatchesStrategy() {
+		
+		return false;
+	}
+	
+	public static boolean hasUDProperties(CQPCorpus corpus) {
+		return hasUDProperties(corpus, UDPreferences.getInstance().getProjectPreferenceValue(corpus.getProject(), UDPreferences.UDPREFIX, UDPreferences.getInstance().getString(UDPreferences.UDPREFIX)));
+	}
+	
+	public static boolean hasUDProperties(CQPCorpus corpus, String prefix) {
+		
+		for (String prop : ImportCoNLLUAnnotations.UD_PROPERTY_NAMES) {
+			try {
+				if (corpus.getProperty(prefix+prop) == null) return false;
+			}
+			catch (CqiClientException e) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	@Override
+	public String getEngine() {
+		
+		return UDTreeSearchSelector.UD;
+	}
+
+	@Override
+	public TreeSearchSelector getSelector() {
+		
+		return new UDTreeSearchSelector();
+	}
+
+	@Override
+	public String[] getTextAndWordIDSOfCurrentSentence() throws Exception {
+		
+		String[] textAndWord = new String[2];
+		
+		WordProperty pid = corpus.getProperty("id");
+		StructuralUnitProperty ptextid = corpus.getStructuralUnitProperty("text_id");
+		
+		Match match = this.udSentences.getMatches().get(this.index);
+		int[] positions = new int[match.size()];
+		for (int i = 0 ; i < match.size() ; i++) {
+			positions[i] = match.getStart() + i;
+		}
+		
+		List<String> idvalues = CQPSearchEngine.getEngine().getValuesForProperty(positions, pid);
+		
+		int[] structid = CQPSearchEngine.getCqiClient().cpos2Struc(ptextid.getQualifiedName(), positions);
+		String[] values = CQPSearchEngine.getCqiClient().struc2Str(ptextid.getQualifiedName(), structid);
+		
+		textAndWord[0] = values[0];
+		textAndWord[1] = StringUtils.join(idvalues, ",");
+		
+		return textAndWord;
+	}
+
+	@Override
+	public String getIconPath() {
+		
+		return "platform:/plugin/org.txm.conllu.core/icons/functions/UD.png";
+	}
+
+}

Property changes on: TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/function/UDUSearch.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.connlu.core/build.properties
===================================================================
--- TXM/trunk/org.txm.connlu.core/build.properties	(revision 3299)
+++ TXM/trunk/org.txm.connlu.core/build.properties	(revision 3300)
@@ -3,5 +3,6 @@
 bin.includes = META-INF/,\
                .,\
                groovy/,\
-               plugin.xml
+               plugin.xml,\
+               icons/
 #qualifier=svn
Index: TXM/trunk/org.txm.connlu.core/icons/functions/UDplus.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: TXM/trunk/org.txm.connlu.core/icons/functions/UDplus.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: TXM/trunk/org.txm.connlu.core/icons/functions/UD.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: TXM/trunk/org.txm.connlu.core/icons/functions/UD.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: TXM/trunk/org.txm.connlu.core/plugin.xml
===================================================================
--- TXM/trunk/org.txm.connlu.core/plugin.xml	(revision 3299)
+++ TXM/trunk/org.txm.connlu.core/plugin.xml	(revision 3300)
@@ -4,21 +4,21 @@
    <extension
          point="org.txm.PostTXMHOMEInstallationStep">
       <PostTXMHOMEInstallationStep
-            class="org.txm.ud.core.InstallGroovyUDFiles"
+            class="org.txm.conllu.core.InstallGroovyCoNLLUFiles"
             description="copy scripts for import module"
-            name="UDFiles">
+            name="CoNLLUFiles">
       </PostTXMHOMEInstallationStep>
    </extension>
    <extension
          point="org.txm.treesearch.TreeSearchSelector">
       <TreeSearchSelector
-            class="org.txm.ud.function.UDTreeSearchSelector">
+            class="org.txm.conllu.core.function.UDTreeSearchSelector">
       </TreeSearchSelector>
    </extension>
    <extension
          point="org.eclipse.core.runtime.preferences">
       <initializer
-            class="org.txm.ud.preferences.UDPreferences">
+            class="org.txm.conllu.core.preferences.UDPreferences">
       </initializer>
    </extension>
 
Index: TXM/trunk/org.txm.imports.metopes/src/org/txm/imports/metopes/DoInstallStep.java
===================================================================
--- TXM/trunk/org.txm.imports.metopes/src/org/txm/imports/metopes/DoInstallStep.java	(revision 3299)
+++ TXM/trunk/org.txm.imports.metopes/src/org/txm/imports/metopes/DoInstallStep.java	(revision 3300)
@@ -43,21 +43,21 @@
 		
 		File macroDirectory = new File(Toolbox.getTxmHomePath(), "scripts/macro/org/txm/macro");
 		macroDirectory.mkdirs();
-		if (!BundleUtils.copyFiles("org.txm.imports.metopes", "src", "org/txm/macro/", "metopes", macroDirectory)) {
+		if (!BundleUtils.copyFiles("org.txm.imports.metopes", "src", "org/txm/macro/", "metopes", macroDirectory, true)) {
 			Log.severe("Error while coping Metopes org/txm/macro/metopes in "+macroDirectory.getAbsolutePath());
 			return;
 		}
 		
 		File importDirectory = new File(Toolbox.getTxmHomePath(), "scripts/import");
 		importDirectory.mkdirs();
-		if (!BundleUtils.copyFiles("org.txm.imports.metopes", "src", "org/txm/importer/metopes", "metopesLoader.groovy", importDirectory)) {
+		if (!BundleUtils.copyFiles("org.txm.imports.metopes", "src", "org/txm/importer/metopes", "metopesLoader.groovy", importDirectory, true)) {
 			Log.severe("Error while coping Metopes org/txm/importer/metopes in "+importDirectory.getAbsolutePath());
 			return;
 		}
 		
 		File xslDirectory = new File(Toolbox.getTxmHomePath(), "xsl");
 		xslDirectory.mkdirs();
-		if (!BundleUtils.copyFiles("org.txm.imports.metopes", "res", "org/txm/xml/xsl", "metopes", xslDirectory)) {
+		if (!BundleUtils.copyFiles("org.txm.imports.metopes", "res", "org/txm/xml/xsl", "metopes", xslDirectory, true)) {
 			Log.severe("Error while coping Metopes org/txm/xml/xsl/metopes in "+xslDirectory.getAbsolutePath());
 			return;
 		}
Index: TXM/trunk/org.txm.core/src/java/org/txm/utils/BundleUtils.java
===================================================================
--- TXM/trunk/org.txm.core/src/java/org/txm/utils/BundleUtils.java	(revision 3299)
+++ TXM/trunk/org.txm.core/src/java/org/txm/utils/BundleUtils.java	(revision 3300)
@@ -146,6 +146,10 @@
 	// return bundleDir;
 	// }
 	
+	public static boolean copyFiles(String bundle_id, String source_relative_directory, String file_path, String file_name, File outputDirectory) {
+		return copyFiles(bundle_id, source_relative_directory, file_path, file_name, outputDirectory, true);
+	}
+	
 	/**
 	 * Copy a file from the bundle directory or Jar to @outputDirectory
 	 * 
@@ -158,7 +162,7 @@
 	 * @param outputDirectory
 	 * @return true if success
 	 */
-	public static boolean copyFiles(String bundle_id, String source_relative_directory, String file_path, String file_name, File outputDirectory) {
+	public static boolean copyFiles(String bundle_id, String source_relative_directory, String file_path, String file_name, File outputDirectory, boolean replace) {
 		
 		if (source_relative_directory.length() > 0 && !source_relative_directory.endsWith("/")) source_relative_directory += "/";
 		if (file_path.length() > 0 && !file_path.endsWith("/")) file_path += "/";
@@ -173,9 +177,10 @@
 			}
 			try {
 				if (fileInToolbox.isDirectory())
-					FileCopy.copyFiles(fileInToolbox, outfile);
-				else
-					FileCopy.copy(fileInToolbox, outfile);
+					FileCopy.copyFiles(fileInToolbox, outfile, replace);
+				else {
+					FileCopy.copy(fileInToolbox, outfile, replace);
+				}
 			}
 			catch (IOException e) {
 				System.out.println("Copy of ressource script failed: " + e);
Index: TXM/trunk/org.txm.core/src/java/org/txm/core/engines/EnginesManager.java
===================================================================
--- TXM/trunk/org.txm.core/src/java/org/txm/core/engines/EnginesManager.java	(revision 3299)
+++ TXM/trunk/org.txm.core/src/java/org/txm/core/engines/EnginesManager.java	(revision 3300)
@@ -2,7 +2,9 @@
 
 import java.util.HashMap;
 
+import org.eclipse.core.internal.registry.ConfigurationElementHandle;
 import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IContributor;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.RegistryFactory;
 import org.txm.core.messages.TXMCoreMessages;
Index: TXM/trunk/org.txm.tigersearch.feature/feature.xml
===================================================================
--- TXM/trunk/org.txm.tigersearch.feature/feature.xml	(revision 3299)
+++ TXM/trunk/org.txm.tigersearch.feature/feature.xml	(revision 3300)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <feature
-      id="org.txm.tigersearch.feature"
-      label="TIGERSearch"
+      id="org.txm.treesearch.feature"
+      label="Syntatic Tree"
       version="1.0.0.qualifier"
       license-feature="org.txm.rcp.feature"
       license-feature-version="0.8.2.qualifier">
@@ -38,6 +38,18 @@
 
    <requires>
       <import plugin="org.txm.index.rcp" version="1.0.0" match="greaterOrEqual"/>
+      <import plugin="org.txm.groovy.core" version="1.0.0" match="greaterOrEqual"/>
+      <import plugin="org.txm.searchengine.core"/>
+      <import plugin="org.txm.libs.deptreeviz" version="0.3.0" match="greaterOrEqual"/>
+      <import plugin="org.txm.tigersearch.core" version="1.0.0" match="greaterOrEqual"/>
+      <import plugin="org.txm.treesearch.rcp" version="1.0.0" match="greaterOrEqual"/>
+      <import plugin="org.txm.core"/>
+      <import plugin="org.txm.treesearch.core" version="1.0.0" match="greaterOrEqual"/>
+      <import plugin="org.txm.core" version="0.8.2" match="greaterOrEqual"/>
+      <import plugin="org.txm.searchengine.cqp.core" version="1.1.0" match="greaterOrEqual"/>
+      <import plugin="org.txm.rcp" version="0.8.2" match="greaterOrEqual"/>
+      <import plugin="org.txm.edition.rcp" version="1.0.0" match="greaterOrEqual"/>
+      <import plugin="org.apache.xerces" version="2.9.0" match="greaterOrEqual"/>
    </requires>
 
    <plugin
@@ -53,4 +65,41 @@
          version="0.0.0"
          unpack="false"/>
 
+   <plugin
+         id="org.txm.tigersearch.core"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"/>
+
+   <plugin
+         id="org.txm.conllu.core"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"/>
+
+   <plugin
+         id="org.txm.conllu.rcp"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"/>
+
+   <plugin
+         id="org.txm.treesearch.core"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"/>
+
+   <plugin
+         id="org.txm.treesearch.rcp"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"/>
+
+   <plugin
+         id="org.txm.libs.batik"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
 </feature>
Index: TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/commands/DoInstallStep.java
===================================================================
--- TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/commands/DoInstallStep.java	(revision 3299)
+++ TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/commands/DoInstallStep.java	(revision 3300)
@@ -59,7 +59,7 @@
 		}
 		
 		File macroDirectory = new File(Toolbox.getTxmHomePath(), "scripts/groovy/user/org/txm/macro/analec"); //$NON-NLS-1$
-		if (!BundleUtils.copyFiles("org.txm.annotation.urs.rcp", "src", "org/txm/macro/", "urs", macroDirectory)) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		if (!BundleUtils.copyFiles("org.txm.annotation.urs.rcp", "src", "org/txm/macro/", "urs", macroDirectory, true)) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 			System.out.println(NLS.bind(Messages.DoInstallStep_17, macroDirectory.getAbsolutePath()));
 			return;
 		}
Index: TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/InstallURSFiles.java
===================================================================
--- TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/InstallURSFiles.java	(revision 3299)
+++ TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/InstallURSFiles.java	(revision 3300)
@@ -59,7 +59,7 @@
 		}
 
 		String bundle_id = "org.txm.annotation.urs.rcp";
-		BundleUtils.copyFiles(bundle_id, "src/", "org/txm/macro", "urs", macroDirectory);
+		BundleUtils.copyFiles(bundle_id, "src/", "org/txm/macro", "urs", macroDirectory, true);
 
 		// saving current version
 //		URSPreferences.getInstance().put(URSPreferences.VERSION, currentVersion.toString());
Index: TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/search/URSSearchEngine.java
===================================================================
--- TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/search/URSSearchEngine.java	(revision 3299)
+++ TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/search/URSSearchEngine.java	(revision 3300)
@@ -104,7 +104,7 @@
 	static ArrayList<Element> findAllInCorpus(int debug, Corpus analecCorpus, CorpusBuild corpus, String URSQL) {
 		String[] params = getFilterParameters(URSQL);
 		if (debug >= 2) Log.finer("PARAMS=$params");
-		return findAllInCorpus(debug, analecCorpus, corpus, params[0], params[1], params[2], Boolean.parseBoolean(params[3]), params[4]);
+		return findAllInCorpus(debug, analecCorpus, corpus, params[0], params[1], params[3], Boolean.parseBoolean(params[2]), params[4]);
 	}
 	
 	static ArrayList<Element> findAllInCorpus(int debug, Corpus analecCorpus, CorpusBuild corpus, String clazzString, String typeRegex, String propName, boolean valueMustMatch, String valueRegex) {
Index: TXM/trunk/org.txm.tigersearch.rcp/groovy/org/txm/macro/ud/UD2TigerXMLMacro.groovy
===================================================================
--- TXM/trunk/org.txm.tigersearch.rcp/groovy/org/txm/macro/ud/UD2TigerXMLMacro.groovy	(revision 3299)
+++ TXM/trunk/org.txm.tigersearch.rcp/groovy/org/txm/macro/ud/UD2TigerXMLMacro.groovy	(revision 3300)
@@ -48,7 +48,7 @@
 // for Profiterole project (2019-2021)
 
 // 2019-09-25
-// - updated default column numbers for CONNL-U SRCMF format
+// - updated default column numbers for CONLL-U SRCMF format
 // - added processing for comment lines
 // - added @textid to terminal nodes
 // - deleted ppos, pmor et plemma (predicted tags and lemmas)
Index: TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/test/DrawTSSVG.java
===================================================================
--- TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/test/DrawTSSVG.java	(revision 3299)
+++ TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/test/DrawTSSVG.java	(revision 3300)
@@ -1,6 +1,7 @@
 package org.txm.test;
 
 import java.io.File;
+import java.util.ArrayList;
 import java.util.Arrays;
 
 import org.txm.searchengine.ts.TSCorpus;
@@ -32,7 +33,7 @@
 
 			TSResult result = corpus.query(query);
 
-			result.setDisplayProperties(Arrays.asList("word", "pos", "form"), "type");
+			result.setDisplayProperties(new ArrayList<>(Arrays.asList("word", "pos", "form")), "type");
 
 			TSMatch first = result.getFirst();
 			System.out.println("First: nb of sub graph: "+first.getNumberOfSubGraph());
Index: TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/tigersearch/commands/DoInstall.java
===================================================================
--- TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/tigersearch/commands/DoInstall.java	(revision 3299)
+++ TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/tigersearch/commands/DoInstall.java	(revision 3300)
@@ -1,19 +0,0 @@
-package org.txm.tigersearch.commands;
-
-import java.io.File;
-
-import org.txm.PostInstallationStep;
-import org.txm.Toolbox;
-import org.txm.utils.BundleUtils;
-
-public class DoInstall extends PostInstallationStep {
-	
-	protected String name = "TIGERSearch"; //$NON-NLS-1$
-	
-	public void install()
-	{
-		File outputDirectory = new File(Toolbox.getTxmHomePath(), "scripts/import");
-		outputDirectory.mkdirs();
-		BundleUtils.copyFiles("org.txm.tigersearch.rcp", "groovy", "org/txm/importer/tigersearch", "tigersearchLoader.groovy", outputDirectory);
-	}
-}
Index: TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/tigersearch/rcp/InstallGroovyTIGERFiles.java
===================================================================
--- TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/tigersearch/rcp/InstallGroovyTIGERFiles.java	(revision 3299)
+++ TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/tigersearch/rcp/InstallGroovyTIGERFiles.java	(revision 3300)
@@ -41,11 +41,10 @@
 		
 		scriptsPackageDirectory.mkdirs();
 		scriptsPackageDirectory2.mkdirs();
-		BundleUtils.copyFiles(bundle_id, "groovy", "org/txm/scripts/importer", "", scriptsPackageDirectory);
-		BundleUtils.copyFiles(bundle_id, "groovy", "org/txm/scripts/importer", "", scriptsPackageDirectory2);
+		BundleUtils.copyFiles(bundle_id, "groovy", "org/txm/scripts/importer", "", scriptsPackageDirectory, true);
+		BundleUtils.copyFiles(bundle_id, "groovy", "org/txm/scripts/importer", "", scriptsPackageDirectory2, true);
 		
 		// MACROS
-		
 		scriptsPackageDirectory = new File(userDirectory, "org/txm/macro/tiger");
 		scriptsPackageDirectory2 = new File(systemDirectory, "org/txm/macro/tiger");
 		
@@ -58,8 +57,8 @@
 		
 		scriptsPackageDirectory.mkdirs();
 		scriptsPackageDirectory2.mkdirs();
-		BundleUtils.copyFiles(bundle_id, "groovy", "org/txm/macro/tiger", "", scriptsPackageDirectory);
-		BundleUtils.copyFiles(bundle_id, "groovy", "org/txm/macro/tiger", "", scriptsPackageDirectory2);
+		BundleUtils.copyFiles(bundle_id, "groovy", "org/txm/macro/tiger", "", scriptsPackageDirectory, true);
+		BundleUtils.copyFiles(bundle_id, "groovy", "org/txm/macro/tiger", "", scriptsPackageDirectory2, true);
 		
 		return scriptsPackageDirectory.exists();
 	}
Index: TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/tigersearch/imports/TIGERImportSectionConfigurator.java
===================================================================
--- TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/tigersearch/imports/TIGERImportSectionConfigurator.java	(revision 0)
+++ TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/tigersearch/imports/TIGERImportSectionConfigurator.java	(revision 3300)
@@ -0,0 +1,15 @@
+package org.txm.tigersearch.imports;
+
+
+import org.txm.rcp.editors.imports.ImportEditorSectionConfigurator;
+import org.txm.rcp.editors.imports.ImportModuleCustomization;
+
+
+public class TIGERImportSectionConfigurator extends ImportEditorSectionConfigurator {
+	
+	@Override
+	public void installSections() {
+		
+		ImportModuleCustomization.additionalSections.put("tigersearchLoader.groovy", TIGERSection.class);
+	}
+}

Property changes on: TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/tigersearch/imports/TIGERImportSectionConfigurator.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/tigersearch/imports/TIGERSection.java
===================================================================
--- TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/tigersearch/imports/TIGERSection.java	(revision 0)
+++ TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/tigersearch/imports/TIGERSection.java	(revision 3300)
@@ -0,0 +1,99 @@
+package org.txm.tigersearch.imports;
+
+
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.events.ExpansionAdapter;
+import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+import org.osgi.service.prefs.Preferences;
+import org.txm.objects.Project;
+import org.txm.rcp.editors.imports.sections.ImportEditorSection;
+
+public class TIGERSection extends ImportEditorSection {
+	
+	String ID = TIGERSection.class.getSimpleName();
+	
+	private static final int SECTION_SIZE = 1;
+		
+	/**
+	 * 
+	 * @param toolkit2
+	 * @param form2
+	 * @param parent
+	 * @param stylesave
+	 * 
+	 * @param moduleParams
+	 * @param scriptName temporary parameter to detect if import module is xtzLoader.groovy
+	 */
+	public TIGERSection(FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style) {
+		
+		super(toolkit2, form2, parent, style, "TIGERSearch");
+		
+		TableWrapLayout layout = new TableWrapLayout();
+		layout.makeColumnsEqualWidth = true;
+		layout.numColumns = 1;
+		this.section.setLayout(layout);
+		this.section.setLayoutData(getSectionGridData(SECTION_SIZE));
+		this.section.setEnabled(false);
+		
+		this.section.addExpansionListener(new ExpansionAdapter() {
+			
+			@Override
+			public void expansionStateChanged(ExpansionEvent e) {
+				form.layout(true);
+			}
+		});
+		
+		// filesection.setDescription("Select how to find source files");
+		Composite sectionClient = toolkit.createComposite(this.section);
+		TableWrapLayout slayout = new TableWrapLayout();
+		slayout.numColumns = 4;
+		sectionClient.setLayout(slayout);
+		this.section.setClient(sectionClient);
+		
+//		headPropertiesText = toolkit.createText(sectionClient, "UD head properties to project (comma separated list)", SWT.CHECK);
+//		gdata2 = getButtonLayoutData();
+//		gdata2.colspan = 4; // one line
+//		headPropertiesText.setLayoutData(gdata2);
+//		
+//		// build text edition or not button
+//		depsPropertiesText = toolkit.createText(sectionClient, "UD deps properties to project (comma separated list)", SWT.CHECK);
+//		gdata2 = getButtonLayoutData();
+//		gdata2.colspan = 4; // one line
+//		depsPropertiesText.setLayoutData(gdata2);
+	}
+	
+	@Override
+	public void updateFields(Project project) {
+		if (this.section.isDisposed()) return;
+		if (project == null) return;
+		
+		Preferences customNode = project.getImportParameters().node("tigersearch");
+//		createPagesForSectionsButton.setSelection(customNode.getBoolean("create_section_pages", true)); //$NON-NLS-1$
+//		indexTranscriberMetadataButton.setSelection(customNode.getBoolean("ignoreTranscriberMetadata", true)); //$NON-NLS-1$
+	}
+	
+	@Override
+	public boolean saveFields(Project project) {
+		if (this.section != null && !this.section.isDisposed()) {
+			
+			Preferences customNode = project.getImportParameters().node("tigersearch");
+//			customNode.putBoolean("create_section_pages", createPagesForSectionsButton.getSelection()); //$NON-NLS-1$
+//			customNode.putBoolean("ignoreTranscriberMetadata", indexTranscriberMetadataButton.getSelection()); //$NON-NLS-1$
+		}
+		return true;
+	}
+	
+	@Override
+	public boolean checkFields() {
+		return true;
+	}
+	
+	@Override
+	public int getSectionSize() {
+		return SECTION_SIZE;
+	}
+}

Property changes on: TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/tigersearch/imports/TIGERSection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/function/tigersearch/TIGERSearch.java
===================================================================
--- TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/function/tigersearch/TIGERSearch.java	(revision 3299)
+++ TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/function/tigersearch/TIGERSearch.java	(revision 3300)
@@ -2,6 +2,7 @@
 
 import java.io.File;
 import java.nio.MappedByteBuffer;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
@@ -97,7 +98,7 @@
 		
 		if (tsresult.getNumberOfMatch() == 0) return false;
 		
-		tsresult.setDisplayProperties(Arrays.asList(T), NT);
+		tsresult.setDisplayProperties(new ArrayList<>(Arrays.asList(T)), NT);
 		
 		try {
 			// iterate to the sub th subgraph
@@ -117,12 +118,14 @@
 	}
 	
 	public String[] getAvailableTProperties() {
+		
 		if (tscorpus == null) return new String[0];
 		List<String> tFeatures = tscorpus.getTFeatures();
 		return tFeatures.toArray(new String[tFeatures.size()]);
 	}
 	
 	public String[] getAvailableNTProperties() {
+		
 		if (tscorpus == null) return new String[0];
 		List<String> ntFeatures = tscorpus.getNTFeatures();
 		return ntFeatures.toArray(new String[ntFeatures.size()]);
@@ -319,4 +322,10 @@
 		
 		return textAndWord;
 	}
+
+	@Override
+	public String getIconPath() {
+		
+		return "platform:/plugin/org.txm.tigersearch.rcp/icons/functions/TS.png";
+	}
 }
Index: TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/searchengine/ts/TSResult.java
===================================================================
--- TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/searchengine/ts/TSResult.java	(revision 3299)
+++ TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/searchengine/ts/TSResult.java	(revision 3300)
@@ -186,7 +186,7 @@
 		return matches[matchNo];
 	}
 	
-	public void setDisplayProperties(List<String> tprops, String feature) {
+	public void setDisplayProperties(ArrayList<String> tprops, String feature) {
 		tsCorpus.setDisplayProperties(this.header, tprops, feature);
 	}
 	
Index: TXM/trunk/org.txm.tigersearch.rcp/plugin.xml
===================================================================
--- TXM/trunk/org.txm.tigersearch.rcp/plugin.xml	(revision 3299)
+++ TXM/trunk/org.txm.tigersearch.rcp/plugin.xml	(revision 3300)
@@ -139,9 +139,9 @@
    <extension
          point="org.eclipse.ui.preferencePages">
       <page
-            category="org.txm.rcp.preferences.UserPreferencePage"
+            category="org.txm.treesearch.preferences.TreeSearchPreferencePage"
             class="org.txm.tigersearch.rcp.preferences.TigerSearchPreferencePage"
-            id="org.txm.tigersearch.rcp.preferences.TreeSearchPreferencePage"
+            id="org.txm.tigersearch.rcp.preferences.TigerSearchPreferencePage"
             name="TIGERSearch">
       </page>
    </extension>
Index: TXM/trunk/org.txm.conllu.feature/feature.xml
===================================================================
--- TXM/trunk/org.txm.conllu.feature/feature.xml	(revision 3299)
+++ TXM/trunk/org.txm.conllu.feature/feature.xml	(revision 3300)
@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <feature
       id="org.txm.conllu.feature"
-      label="CONLL UD"
+      label="org.txm.conllu.feature"
       version="1.0.0.qualifier">
 
    <description url="http://www.example.com/description">
-      [Enter Feature Description here.]
+      CoNLL-U tools
    </description>
 
    <copyright url="http://www.example.com/copyright">
@@ -16,6 +16,15 @@
       [Enter License Description here.]
    </license>
 
+   <requires>
+      <import plugin="org.txm.core"/>
+      <import plugin="org.txm.groovy.core" version="1.0.0" match="greaterOrEqual"/>
+      <import plugin="org.txm.treesearch.core" version="1.0.0" match="greaterOrEqual"/>
+      <import plugin="org.txm.libs.deptreeviz" version="0.3.0" match="greaterOrEqual"/>
+      <import plugin="org.txm.tigersearch.core" version="1.0.0" match="greaterOrEqual"/>
+      <import plugin="org.txm.treesearch.rcp" version="1.0.0" match="greaterOrEqual"/>
+   </requires>
+
    <plugin
          id="org.txm.conllu.core"
          download-size="0"
@@ -23,4 +32,11 @@
          version="0.0.0"
          unpack="false"/>
 
+   <plugin
+         id="org.txm.conllu.rcp"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
 </feature>
