Index: TXM/trunk/org.txm.python.core/src/org/txm/python/core/PythonScriptEngine.java
===================================================================
--- TXM/trunk/org.txm.python.core/src/org/txm/python/core/PythonScriptEngine.java	(revision 3515)
+++ TXM/trunk/org.txm.python.core/src/org/txm/python/core/PythonScriptEngine.java	(revision 3516)
@@ -6,6 +6,7 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
+import java.util.List;
 
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
@@ -44,7 +45,7 @@
 	}
 
 	@Override
-	public IStatus executeScript(File script, HashMap<String, Object> env, String stringArgs) {
+	public IStatus executeScript(File script, HashMap<String, Object> env, List<String> stringArgs) {
 		ArrayList<String> cmd = new ArrayList<String>();
 		cmd.add(script.getAbsolutePath());
 
Index: TXM/trunk/org.txm.groovy.core/src/java/org/txm/groovy/core/TXMGroovyScriptEngine.java
===================================================================
--- TXM/trunk/org.txm.groovy.core/src/java/org/txm/groovy/core/TXMGroovyScriptEngine.java	(revision 3515)
+++ TXM/trunk/org.txm.groovy.core/src/java/org/txm/groovy/core/TXMGroovyScriptEngine.java	(revision 3516)
@@ -1,7 +1,9 @@
 package org.txm.groovy.core;
 
 import java.io.File;
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
@@ -36,7 +38,7 @@
 	}
 	
 	@Override
-	public IStatus executeScript(File script, HashMap<String, Object> env, String stringArgs) {
+	public IStatus executeScript(File script, HashMap<String, Object> env, List<String> stringArgs) {
 		// move Job code in the ExecuteGroovyScript here
 		return Status.CANCEL_STATUS;
 	}
Index: TXM/trunk/org.txm.perl.core/src/org/txm/perl/core/PerlScriptEngine.java
===================================================================
--- TXM/trunk/org.txm.perl.core/src/org/txm/perl/core/PerlScriptEngine.java	(revision 3515)
+++ TXM/trunk/org.txm.perl.core/src/org/txm/perl/core/PerlScriptEngine.java	(revision 3516)
@@ -7,11 +7,13 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
+import java.util.List;
 
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.txm.core.engines.ScriptEngine;
+import org.txm.utils.logger.Log;
 /**
  * 
  * @author mdecorde
@@ -44,10 +46,10 @@
 	}
 
 	@Override
-	public IStatus executeScript(File script, HashMap<String, Object> env, String stringArgs) {
+	public IStatus executeScript(File script, HashMap<String, Object> env, List<String> args) {
 		ArrayList<String> cmd = new ArrayList<String>();
 		cmd.add(script.getAbsolutePath());
-
+		cmd.addAll(args);
 		System.out.println("Running perl script...");
 		return runPerl(cmd, env);
 	}
@@ -72,9 +74,7 @@
 	private static IStatus runPerl(ArrayList<String> cmd, HashMap<String, Object> env) {
 		
 		try {
-			ArrayList<String> tmp = new ArrayList<String>();
-			tmp.addAll(cmd);
-			cmd = tmp;
+			cmd = new ArrayList<String>(cmd);
 			
 			String additionalParametersString = PerlPreferences.getInstance().getString(PerlPreferences.ADDITIONAL_PARAMETERS);
 			String[] additionalParameters = additionalParametersString.split("\t");
@@ -103,17 +103,16 @@
 				}
 //			}
 			
-			ProcessBuilder pb = new ProcessBuilder(new ArrayList<String>(cmd));
+			ProcessBuilder pb = new ProcessBuilder(cmd);
 			pb.redirectErrorStream(true);
 
-			// new org.txm.utils.StreamHog(p.getInputStream(), true).setName("perl");
 			Process process = pb.start();
 			if (process != null) {
 				BufferedReader bfr = new BufferedReader(new InputStreamReader(process.getInputStream()));
 				String line = "";
 				while ((line = bfr.readLine()) != null) {
 					// display each output line form perl script
-					System.out.println(line);
+					Log.info(line);
 				}
 				int e = process.waitFor();
 				if (e != 0) {
Index: TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/commands/URSToolsMenuContribution.java
===================================================================
--- TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/commands/URSToolsMenuContribution.java	(revision 3515)
+++ TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/commands/URSToolsMenuContribution.java	(revision 3516)
@@ -139,7 +139,7 @@
 		public void widgetSelected(SelectionEvent e) {
 			IWorkbenchWindow acWindow = TXMWindows.getActiveWindow();
 			IWorkbenchPart page = acWindow.getActivePage().getActivePart();
-			ExecuteGroovyMacro.execute(macro.getAbsolutePath(), page, CorporaView.getInstance().getTreeViewer().getSelection(), "", null, null);
+			ExecuteGroovyMacro.execute(macro.getAbsolutePath(), page, CorporaView.getInstance().getTreeViewer().getSelection(), null, null, null);
 		}
 	}
 
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/WordPropertiestoTable.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/WordPropertiestoTable.java	(revision 3515)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/WordPropertiestoTable.java	(revision 3516)
@@ -39,7 +39,7 @@
 		defaultParameters.put("properties", "frpos,frlemma"); //$NON-NLS-1$ //$NON-NLS-2$
 		defaultParameters.put("tsvFile", corpus.getName()+"_annotations.tsv"); //$NON-NLS-1$ //$NON-NLS-2$
 		
-		ExecuteGroovyMacro.execute(script.getAbsolutePath(), part, selection, "", parameters, defaultParameters); //$NON-NLS-1$
+		ExecuteGroovyMacro.execute(script.getAbsolutePath(), part, selection, null, parameters, defaultParameters); //$NON-NLS-1$
 		return null;
 	}
 }
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/WordPropertiesFromTable.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/WordPropertiesFromTable.java	(revision 3515)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/WordPropertiesFromTable.java	(revision 3516)
@@ -37,7 +37,7 @@
 		defaultParameters.put("properties", "frpos,frlemma"); //$NON-NLS-1$ //$NON-NLS-2$
 		defaultParameters.put("tsvFile", corpus.getName()+"_annotations.tsv"); //$NON-NLS-1$ //$NON-NLS-2$
 		
-		ExecuteGroovyMacro.execute(script.getAbsolutePath(), part, selection, "", null, defaultParameters); //$NON-NLS-1$
+		ExecuteGroovyMacro.execute(script.getAbsolutePath(), part, selection, null, null, defaultParameters); //$NON-NLS-1$
 		return null;
 	}
 	
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/MacroExplorer.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/MacroExplorer.java	(revision 3515)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/MacroExplorer.java	(revision 3516)
@@ -272,7 +272,7 @@
 					IWorkbenchPart page = acWindow.getActivePage().getActivePart();
 					
 					if (selectedItem.getName().toLowerCase().endsWith(".groovy")) {
-						ExecuteGroovyMacro.execute(selectedItem.getAbsolutePath(), page, selection, "", null, null);
+						ExecuteGroovyMacro.execute(selectedItem.getAbsolutePath(), page, selection, null, null, null);
 					}
 					else {
 						String ext = FileUtils.getExtension(selectedItem);
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteLastGroovyScript.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteLastGroovyScript.java	(revision 3515)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteLastGroovyScript.java	(revision 3516)
@@ -90,6 +90,6 @@
 			return;
 		}
 		
-		ExecuteGroovyScript.executeScript(currentRootDir, lastScript.getAbsolutePath(), page, selection, false, "", null, null); //$NON-NLS-1$
+		ExecuteGroovyScript.executeScript(currentRootDir, lastScript.getAbsolutePath(), page, selection, false, null, null, null); //$NON-NLS-1$
 	}
 }
\ No newline at end of file
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteScript.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteScript.java	(revision 3515)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteScript.java	(revision 3516)
@@ -28,8 +28,10 @@
 package org.txm.rcp.handlers.scripts;
 
 import java.io.File;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.List;
 
 import org.apache.commons.collections.map.HashedMap;
 import org.eclipse.core.commands.AbstractHandler;
@@ -184,7 +186,7 @@
 	 *
 	 * @param scriptpath the scriptfile
 	 */
-	public static IStatus executeScript(String scriptpath, final  IWorkbenchPart page, final ISelection selection, String stringArgs) {
+	public static IStatus executeScript(String scriptpath, final  IWorkbenchPart page, final ISelection selection, List<String> stringArgs) {
 		if (scriptpath == null) return Status.CANCEL_STATUS;
 		File script = new File(scriptpath);
 		if (!script.exists()) return Status.CANCEL_STATUS;
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteGroovyMacro.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteGroovyMacro.java	(revision 3515)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteGroovyMacro.java	(revision 3516)
@@ -28,9 +28,13 @@
 package org.txm.rcp.handlers.scripts;
 
 import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.List;
 
+import org.apache.commons.lang.StringUtils;
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
@@ -62,7 +66,7 @@
 	public Object execute(ExecutionEvent event) throws ExecutionException {
 
 		String filenameParameter = event.getParameter("org.txm.rcp.command.parameter.file"); //$NON-NLS-1$
-		String stringArgs = event.getParameter("args"); //$NON-NLS-1$
+		List<String> stringArgs = Arrays.asList(event.getParameter("args").split("\t")); //$NON-NLS-1$
 		
 		// the file to execute
 		String result = ""; //$NON-NLS-1$
@@ -116,15 +120,15 @@
 		return execute(result, page, selection, stringArgs, null, null);
 	}
 	
-	public static IStatus execute(String scriptpath, IWorkbenchPart page, ISelection selection, String stringArgs, HashMap<String, Object> parameters, HashMap<String, Object> defaultParameters) {
+	public static IStatus execute(String scriptpath, IWorkbenchPart page, ISelection selection, List<String> args, HashMap<String, Object> parameters, HashMap<String, Object> defaultParameters) {
 		//IPreferencesService service = Platform.getPreferencesService();
 		String scriptRootDir = Toolbox.getTxmHomePath() + "/scripts"; //$NON-NLS-1$
 		File currentRootDir = new File(scriptRootDir, "groovy/user"); //$NON-NLS-1$
 		
 		if (scriptpath.endsWith(".groovy")) { //$NON-NLS-1$
-			return ExecuteGroovyScript.executeScript(currentRootDir, scriptpath, page, selection, false, stringArgs, parameters, defaultParameters);
+			return ExecuteGroovyScript.executeScript(currentRootDir, scriptpath, page, selection, false, args, parameters, defaultParameters);
 		} else {
-			return ExecuteScript.executeScript(scriptpath, page, selection, stringArgs);
+			return ExecuteScript.executeScript(scriptpath, page, selection, args);
 		}
 	}
 }
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteGroovyScript.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteGroovyScript.java	(revision 3515)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteGroovyScript.java	(revision 3516)
@@ -28,6 +28,7 @@
 package org.txm.rcp.handlers.scripts;
 
 import java.io.File;
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -164,7 +165,7 @@
 		String scriptRootDir = Toolbox.getTxmHomePath() + "/scripts"; //$NON-NLS-1$
 		File currentRootDir = new File(scriptRootDir, "groovy/user"); //$NON-NLS-1$
 
-		return executeScript(currentRootDir, scriptpath, page, selection, modal, stringArgs, null, null);
+		return executeScript(currentRootDir, scriptpath, page, selection, modal, Arrays.asList(stringArgs.split("\t")), null, null);
 	}
 
 	/**
@@ -196,7 +197,7 @@
 	 * @param page current active page, might be null
 	 * @param sel current selection, might be null
 	 */
-	public static IStatus executeScript(final File currentRootDir, String scriptpath, final  IWorkbenchPart page, final ISelection sel, final boolean modal, final String stringArgs, HashMap<String, Object> parameters, HashMap<String, Object> defaultParameters) {
+	public static IStatus executeScript(final File currentRootDir, String scriptpath, final  IWorkbenchPart page, final ISelection sel, final boolean modal, final List<String> stringArgs, HashMap<String, Object> parameters, HashMap<String, Object> defaultParameters) {
 		// check script
 		final File scriptfile = new File(scriptpath);
 		if (!scriptfile.exists()) {
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/menu/MacrosMenuContribution.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/menu/MacrosMenuContribution.java	(revision 3515)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/menu/MacrosMenuContribution.java	(revision 3516)
@@ -151,7 +151,7 @@
 		public void widgetSelected(SelectionEvent e) {
 			IWorkbenchWindow acWindow = TXMWindows.getActiveWindow();
 			IWorkbenchPart page = acWindow.getActivePage().getActivePart();
-			ExecuteGroovyMacro.execute(macro.getAbsolutePath(), page, CorporaView.getInstance().getTreeViewer().getSelection(), "", null, null); //$NON-NLS-1$
+			ExecuteGroovyMacro.execute(macro.getAbsolutePath(), page, CorporaView.getInstance().getTreeViewer().getSelection(), null, null, null); //$NON-NLS-1$
 		}
 	}
 	
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java	(revision 3515)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java	(revision 3516)
@@ -992,7 +992,7 @@
 					notifyExtensions("notifyStartOfCompute"); //$NON-NLS-1$
 					
 					if (!TXMEditor.this.getResult().compute(subMonitor.split(50))) {
-						Log.fine("TXMEditor.compute(): " + TXMEditor.this.getClass().getSimpleName() + ": computing failed."); //$NON-NLS-1$ //$NON-NLS-2$
+						Log.info("TXMEditor.compute(): " + TXMEditor.this.getClass().getSimpleName() + ": computing failed."); //$NON-NLS-1$ //$NON-NLS-2$
 					}
 					
 					notifyExtensions("notifyEndOfCompute"); //$NON-NLS-1$
Index: TXM/trunk/org.txm.ruby.core/src/org/txm/ruby/core/RubyScriptEngine.java
===================================================================
--- TXM/trunk/org.txm.ruby.core/src/org/txm/ruby/core/RubyScriptEngine.java	(revision 3515)
+++ TXM/trunk/org.txm.ruby.core/src/org/txm/ruby/core/RubyScriptEngine.java	(revision 3516)
@@ -4,7 +4,9 @@
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 
 import javax.script.ScriptEngineManager;
 import javax.script.ScriptException;
@@ -61,7 +63,7 @@
 	}
 	
 	@Override
-	public IStatus executeScript(File script, HashMap<String, Object> env, String stringArgs) {
+	public IStatus executeScript(File script, HashMap<String, Object> env, List<String> stringArgs) {
 		BufferedReader r = null;
 		try {
 			SimpleBindings bindings = new SimpleBindings();
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 3515)
+++ TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/function/tigersearch/TIGERSearch.java	(revision 3516)
@@ -250,7 +250,7 @@
 		tsresult = tscorpus.query(pQuery.getQueryString());
 		tsresult.getFirst();
 		
-		return tsresult.getNumberOfMatch() > 0;
+		return true;
 	}
 	
 	@Override
Index: TXM/trunk/org.txm.core/src/java/org/txm/core/engines/ScriptEngine.java
===================================================================
--- TXM/trunk/org.txm.core/src/java/org/txm/core/engines/ScriptEngine.java	(revision 3515)
+++ TXM/trunk/org.txm.core/src/java/org/txm/core/engines/ScriptEngine.java	(revision 3516)
@@ -1,7 +1,10 @@
 package org.txm.core.engines;
 
 import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashMap;
+import java.util.List;
 
 import org.eclipse.core.runtime.IStatus;
 import org.txm.core.results.TXMResult;
@@ -40,9 +43,9 @@
 	public IStatus executeScript(File script, HashMap<String, Object> env) {
 		return executeScript(script, env, null);
 	}
+
+	public abstract IStatus executeScript(File script, HashMap<String, Object> env, List<String> args);
 	
-	public abstract IStatus executeScript(File script, HashMap<String, Object> env, String stringArgs);
-	
 	public IStatus executeText(String text) {
 		return executeText(text);
 	}
@@ -66,4 +69,8 @@
 	public String getDetails() {
 		return this.getClass()+ " "+this.toString();
 	}
+
+	public IStatus executeScript(File perlScript, List<String> args) {
+		return executeScript(perlScript, null, args);		
+	}
 }
Index: TXM/trunk/org.txm.treesearch.rcp/src/org/txm/treesearch/editor/TreeSearchEditor.java
===================================================================
--- TXM/trunk/org.txm.treesearch.rcp/src/org/txm/treesearch/editor/TreeSearchEditor.java	(revision 3515)
+++ TXM/trunk/org.txm.treesearch.rcp/src/org/txm/treesearch/editor/TreeSearchEditor.java	(revision 3516)
@@ -291,7 +291,9 @@
 		if (ts.isComputed()) {
 			queryArea.setText(ts.getQuery());
 			sentCounterLabel.setText("/" + ts.getNSentences()); //$NON-NLS-1$
-			subCounterLabel.setText("/" + ts.getNSubGraph(0)); //$NON-NLS-1$
+			if (ts.getNSentences() > 0) {
+				subCounterLabel.setText("/" + ts.getNSubGraph(0)); //$NON-NLS-1$
+			}
 		}
 		else {
 			sentCounterLabel.setText(Messages.NoSentence);
Index: TXM/trunk/org.txm.ocaml.core/src/org/txm/ocaml/core/OcamlScriptEngine.java
===================================================================
--- TXM/trunk/org.txm.ocaml.core/src/org/txm/ocaml/core/OcamlScriptEngine.java	(revision 3515)
+++ TXM/trunk/org.txm.ocaml.core/src/org/txm/ocaml/core/OcamlScriptEngine.java	(revision 3516)
@@ -4,6 +4,7 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 
 import javax.script.ScriptContext;
 import javax.script.ScriptEngineManager;
@@ -43,12 +44,11 @@
 	}
 
 	@Override
-	public IStatus executeScript(File script, HashMap<String, Object> env, String stringArgs) {
+	public IStatus executeScript(File script, HashMap<String, Object> env, List<String> stringArgs) {
 		String cmd;
 		try {
 			cmd = IOUtils.getText(script, "UTF-8");
-			if (stringArgs == null) stringArgs = "";
-			return executeText(cmd+stringArgs, env);
+			return executeText(cmd, env);
 		} catch (IOException e) {
 			e.printStackTrace();
 			return Status.CANCEL_STATUS;
Index: TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/CallUD2TigerPerlScript.java
===================================================================
--- TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/CallUD2TigerPerlScript.java	(revision 0)
+++ TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/CallUD2TigerPerlScript.java	(revision 3516)
@@ -0,0 +1,77 @@
+package org.txm.conllu.core;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import org.eclipse.core.runtime.IStatus;
+import org.txm.core.engines.ScriptEngine;
+import org.txm.core.engines.ScriptEnginesManager;
+import org.txm.tigersearch.preferences.TigerSearchPreferences;
+import org.txm.utils.*;
+import org.txm.utils.io.IOUtils;
+
+public class CallUD2TigerPerlScript {
+	
+	public boolean convertCoNLLUFiles(String input_directory_path, String output_directory) throws IOException {
+		
+		File input_directory = new File(input_directory_path);
+		
+		if (input_directory_path.length() == 0 && input_directory.canRead()) {
+			System.out.println("** impossible to access directory $input_directory. Aborting.");
+			return false;
+		}
+		
+		File tigerXMLDirectory = new File(output_directory, "tiger-xml");
+		File conversionFile = new File(tigerXMLDirectory, "conversion.log");
+		
+		String driverFilename = TigerSearchPreferences.getInstance().getString(TigerSearchPreferences.DRIVER_FILENAME);
+		File mainFullFile = new File(tigerXMLDirectory, driverFilename);
+		
+		File mainFile = new File(tigerXMLDirectory, "main.xml");
+		File perlScript = BundleUtils.getFile("org.txm.conllu.core", "groovy", "/org/txm/scripts/importer/conllu/", "conll2tiger-ud.pl");
+		
+		DeleteDir.deleteDirectory(tigerXMLDirectory);
+		//println "clean&mkdir $tigerXMLDirectory"
+		tigerXMLDirectory.mkdir();
+		
+		//println "Converting..."
+		
+		String subcorpusList = "";
+		for (File f : input_directory.listFiles()) {
+			
+			if (!f.getName().endsWith(".conllu")) {
+				continue;
+			}
+			
+			try {
+				//System.out.println("$f... "+"perl '$perlScript' -s 10000 -o '$tigerXMLDirectory' '$f'");
+				ScriptEngine engine = ScriptEnginesManager.getPerlEngine();
+				if (!engine.canExecute(perlScript)) {
+					System.out.println("Error: Perl engine not correctly set to run $perlScript");
+					return false;
+				}
+				ArrayList<String> cmd = new ArrayList<String>();
+				cmd.addAll(Arrays.asList("-s", "10000", "-o", tigerXMLDirectory.getAbsolutePath(), f.getAbsolutePath()));
+				System.out.println("calling perl with: "+cmd);
+				IStatus status = engine.executeScript(perlScript, cmd);
+				for (String line : IOUtils.getLines(mainFile, "UTF-8")) {
+					if (line.contains("<subcorpus ")) subcorpusList += line+"\n";
+				}
+			} catch (Throwable t) { System.out.println("Error: $t"); }
+		}
+		
+		//	println "subcorpus-list: "+subcorpusList
+		String content = IOUtils.getText(mainFile, "UTF-8");
+		content = content.replaceAll("<subcorpus .+/>", subcorpusList+"\n<body/>"); // get the last main.xml content and patch it with the subcorpus tags
+		IOUtils.setText(mainFullFile, content, "UTF-8");
+		//mainFullFile.setText(mainFile.getText().replaceAll("<body/>", subcorpusList+"\n<body/>"));
+		
+		conversionFile.delete();
+		mainFile.delete();
+		
+		//println "Done."
+		return true;
+	}
+}
\ No newline at end of file

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

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 3515)
+++ TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/CallUD2TigerPerlScript.groovy	(revision 3516)
@@ -1,56 +0,0 @@
-package org.txm.scripts.importer.conllu
-
-import org.txm.core.engines.ScriptEnginesManager
-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 engine = ScriptEnginesManager.getPerlEngine();
-			if (!engine.canExecute(perlScript)) {
-				println "Error: Perl engine not correctly set to run $perlScript"
-				return false;
-			}
-			def cmd = new ArrayList()
-			cmd.addAll(["$perlScript", "-s", "10000", "-o", "$tigerXMLDirectory", "$f"])
-			def status = engine.runPerl(cmd, null)
-			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/CoNLLUImport.groovy
===================================================================
--- TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/CoNLLUImport.groovy	(revision 3515)
+++ TXM/trunk/org.txm.connlu.core/groovy/org/txm/scripts/importer/conllu/CoNLLUImport.groovy	(revision 3516)
@@ -19,6 +19,7 @@
 import org.txm.scripts.importer.tigersearch.TSImport
 import org.txm.utils.*
 import org.txm.searchengine.ts.TIGERSearchEngine
+import org.txm.conllu.core.CallUD2TigerPerlScript
 
 class CoNLLUImport extends XTZImport {
 
@@ -47,7 +48,6 @@
 		// 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")
Index: TXM/trunk/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RScriptEngine.java
===================================================================
--- TXM/trunk/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RScriptEngine.java	(revision 3515)
+++ TXM/trunk/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RScriptEngine.java	(revision 3516)
@@ -3,7 +3,9 @@
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileReader;
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
@@ -89,7 +91,7 @@
 	 * @param scriptfile the scriptfile
 	 */
 	// FIXME: this method should call the method above : executeText();
-	public IStatus executeScript(File rFile, HashMap<String, Object> env, String stringArgs) {
+	public IStatus executeScript(File rFile, HashMap<String, Object> env, List<String> stringArgs) {
 		if (!rFile.exists()) {
 			System.err.println(NLS.bind(RCoreMessages.p0RScriptDoesntExist, rFile));
 			return Status.CANCEL_STATUS;
