Index: tmp/org.txm.udpipe.core/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- tmp/org.txm.udpipe.core/.settings/org.eclipse.jdt.core.prefs	(revision 0)
+++ tmp/org.txm.udpipe.core/.settings/org.eclipse.jdt.core.prefs	(revision 3120)
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8

Property changes on: tmp/org.txm.udpipe.core/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.core/.classpath
===================================================================
--- tmp/org.txm.udpipe.core/.classpath	(revision 0)
+++ tmp/org.txm.udpipe.core/.classpath	(revision 3120)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
+		<accessrules>
+			<accessrule kind="accessible" pattern="**"/>
+		</accessrules>
+	</classpathentry>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Property changes on: tmp/org.txm.udpipe.core/.classpath
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.core/META-INF/MANIFEST.MF
===================================================================
--- tmp/org.txm.udpipe.core/META-INF/MANIFEST.MF	(revision 0)
+++ tmp/org.txm.udpipe.core/META-INF/MANIFEST.MF	(revision 3120)
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.txm.udpipe.core
+Bundle-SymbolicName: org.txm.udpipe.core;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.txm.udpipe.core.Activator
+Require-Bundle: org.eclipse.core.runtime;visibility:=reexport,
+ org.txm.libs.udpipe;bundle-version="1.0.0";visibility:=reexport,
+ org.txm.annotation.core;bundle-version="1.0.0";visibility:=reexport
+BBundle-RequiredExecutionEnvironment: JavaSE-10
+Automatic-Module-Name: org.txm.udpipe.core
+Bundle-ActivationPolicy: lazy
+Export-Package: org.txm.udpipe.core

Property changes on: tmp/org.txm.udpipe.core/META-INF/MANIFEST.MF
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.core/.project
===================================================================
--- tmp/org.txm.udpipe.core/.project	(revision 0)
+++ tmp/org.txm.udpipe.core/.project	(revision 3120)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.txm.udpipe.core</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Property changes on: tmp/org.txm.udpipe.core/.project
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/HookedStaxIdentityParser.java
===================================================================
--- tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/HookedStaxIdentityParser.java	(revision 0)
+++ tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/HookedStaxIdentityParser.java	(revision 3120)
@@ -0,0 +1,103 @@
+package org.txm.udpipe.core;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+
+import javax.xml.stream.XMLStreamException;
+
+import org.txm.importer.StaxIdentityParser;
+
+public class HookedStaxIdentityParser extends StaxIdentityParser {
+	
+	Hook activeHook = null;
+	
+	LinkedHashMap<String, Hook> hooks = new LinkedHashMap<>();
+	
+	public HookedStaxIdentityParser(File xmlFile, ArrayList<Hook> hooks) throws IOException, XMLStreamException {
+		super(xmlFile);
+	}
+	
+	@Override
+	protected void processNamespace() throws XMLStreamException {
+		
+		super.processNamespace();
+	}
+	
+	
+	@Override
+	protected void processStartElement() throws XMLStreamException, IOException {
+		super.processStartElement();
+	}
+	
+	@Override
+	protected void processCharacters() throws XMLStreamException {
+		super.processCharacters();
+	}
+	
+	@Override
+	protected void processProcessingInstruction() throws XMLStreamException {
+		super.processProcessingInstruction();
+	}
+	
+	@Override
+	protected void processDTD() throws XMLStreamException {
+		super.processDTD();
+	}
+	
+	@Override
+	protected void processCDATA() throws XMLStreamException {
+		super.processCDATA();
+	}
+	
+	@Override
+	protected void processComment() throws XMLStreamException {
+		super.processComment();
+	}
+	
+	@Override
+	protected void processEndElement() throws XMLStreamException {
+		super.processEndElement();
+	}
+	
+	@Override
+	protected void processEndDocument() throws XMLStreamException {
+		super.processEndDocument();
+	}
+	
+	@Override
+	protected void processEntityReference() throws XMLStreamException {
+		super.processEntityReference();
+	}
+	
+	public static class Hook {
+		
+		String name;
+		
+		HookedStaxIdentityParser parser;
+		
+		public Hook(HookedStaxIdentityParser parser, String name) {
+			this.parser = parser;
+			this.name = name;
+		}
+		
+		@Override
+		public String toString() {
+			return this.getClass().toString() + ":" + name;
+		}
+		
+		/**
+		 * 
+		 * @return true if the hook must be activated
+		 */
+		public boolean activate() {
+			return false;
+		}
+		
+		public boolean desactivate() {
+			return false;
+		}
+	}
+}

Property changes on: tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/HookedStaxIdentityParser.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/XMLTXMToUDPipeXMLParser.java
===================================================================
--- tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/XMLTXMToUDPipeXMLParser.java	(revision 0)
+++ tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/XMLTXMToUDPipeXMLParser.java	(revision 3120)
@@ -0,0 +1,230 @@
+// 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: 2017-01-24 18:11:42 +0100 (mar. 24 janv. 2017) $
+// $LastChangedRevision: 3400 $
+// $LastChangedBy: mdecorde $
+//
+package org.txm.udpipe.core;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStreamWriter;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import cz.cuni.mff.ufal.udpipe.Sentence;
+import cz.cuni.mff.ufal.udpipe.Sentences;
+import cz.cuni.mff.ufal.udpipe.Word;
+import cz.cuni.mff.ufal.udpipe.Words;
+
+
+/**
+ * The Class BuildTTSrc.
+ *
+ * @author mdecorde
+ *         build the UDPipe source
+ */
+
+public class XMLTXMToUDPipeXMLParser {
+	
+	/** The url. */
+	private URL url;
+	
+	/** The input data. */
+	private InputStream inputData;
+	
+	/** The factory. */
+	private XMLInputFactory factory;
+	
+	/** The parser. */
+	private XMLStreamReader parser;
+	
+	private Sentences sentences;
+	
+	private Sentence sentence;
+	
+	/**
+	 * Instantiates a new builds the tt src.
+	 * uses XML-TXM V2
+	 *
+	 * @param url the url of the file to process
+	 */
+	public XMLTXMToUDPipeXMLParser(URL url) {
+		try {
+			this.url = url;
+			inputData = url.openStream();
+			factory = XMLInputFactory.newInstance();
+			parser = factory.createXMLStreamReader(inputData);
+			sentences = new Sentences();
+			sentence = new Sentence();
+		}
+		catch (XMLStreamException ex) {
+			System.out.println(ex);
+		}
+		catch (IOException ex) {
+			System.out.println("IOException while parsing ");
+		}
+	}
+	
+	/**
+	 * Process.
+	 *
+	 * @param outfile the outfile
+	 * @param formtype, if multiple form, use this param to choose the correct one, if null takes the first form found
+	 * @return true, if successful
+	 */
+	public boolean process(String formtype) {
+		
+		boolean inW = false;
+		String wordId = "";
+		boolean flagform = false; // to catch the content of the form tag
+		boolean firstform = false; // to know if its the first form of the w element
+		String form = ""; // the content of the form tag
+		String lastopenlocalname = "";
+		String localname = "";
+		try {
+			for (int event = parser.next(); event != XMLStreamConstants.END_DOCUMENT; event = parser.next()) {
+				switch (event) {
+					case XMLStreamConstants.START_ELEMENT:
+						localname = parser.getLocalName();
+						
+						switch (localname) {
+							case "w":
+								// firstform = true;
+								inW = true;
+								wordId = parser.getAttributeValue(null, "id");
+								break;
+							case "form":
+								if (inW) {
+									// if (firstform) {
+									// if (formtype != null) {
+									// if(parser.getAttributeCount() > 0
+									// && parser.getAttributeValue(0).equals(formtype)) // only one attribute in form, type
+									// flagform = true;
+									// }
+									// else
+									flagform = true;
+									form = "";
+									firstform = false;
+									// }
+								}
+								break;
+							case "s": // TreeTagger can use s tags
+								if (sentence != null && sentence.getWords().size() > 0) {
+									sentences.add(sentence);
+								}
+								sentence = new Sentence();
+								break;
+						}
+						break;
+					case XMLStreamConstants.END_ELEMENT:
+						localname = parser.getLocalName();
+						switch (localname) {
+							case "w":
+								inW = false;
+								break;
+							case "form":
+								if (inW) { // ensure to process a form inside a w
+									flagform = false;
+									form = form.trim();
+									form = form.replace("\n", "").replace("<", "&lt;");
+									Word word = new Word();
+									word.setForm(form);
+									word.setMisc(UDPipeEngine.XMLIDMISC + wordId);
+									sentence.getWords().add(word);
+								}
+								break;
+							
+							case "s":
+								break;
+						}
+						break;
+					
+					case XMLStreamConstants.CHARACTERS:
+						if (flagform) {
+							if (parser.getText().length() > 0)
+								form += parser.getText();
+						}
+						break;
+				}
+			}
+			
+			if (sentence != null && sentence.getWords().size() > 0) {
+				sentences.add(sentence);
+			}
+			
+			parser.close();
+			inputData.close();
+		}
+		catch (Exception ex) {
+			System.out.println(ex);
+			return false;
+		}
+		
+		return true;
+	}
+	
+	/**
+	 * The main method.
+	 *
+	 * @param args the arguments
+	 * @throws MalformedURLException
+	 */
+	public static void main(String[] args) throws MalformedURLException {
+		
+		String rootDir = "~/xml/rgaqcj/";
+		// new File(rootDir+"/identity/").mkdir();
+		
+		ArrayList<String> milestones = new ArrayList<>();// the tags who
+		// you want them
+		// to stay
+		// milestones
+		milestones.add("tagUsage");
+		milestones.add("pb");
+		milestones.add("lb");
+		milestones.add("catRef");
+		
+		File srcfile = new File(rootDir + "anainline/", "roland-p5.xml");
+		File resultfile = new File(rootDir + "ttsrc/", "roland-p5.tt");
+		System.out.println("build ttsrc file : " + srcfile + " to : " + resultfile);
+		
+		XMLTXMToUDPipeXMLParser builder = new XMLTXMToUDPipeXMLParser(srcfile.toURI().toURL());
+		builder.process(null);
+		builder.getSentences();
+		return;
+	}
+	
+	public Sentences getSentences() {
+		return sentences;
+	}
+}

Property changes on: tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/XMLTXMToUDPipeXMLParser.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/UDPipeClientUtils.java
===================================================================
--- tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/UDPipeClientUtils.java	(revision 0)
+++ tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/UDPipeClientUtils.java	(revision 3120)
@@ -0,0 +1,277 @@
+package org.txm.udpipe.core;
+
+import java.io.File;
+import java.io.IOException;
+
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.client.WebTarget;
+import javax.ws.rs.core.Form;
+import javax.ws.rs.core.MediaType;
+import javax.xml.stream.XMLStreamException;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.txm.importer.StaxIdentityParser;
+import org.txm.utils.io.IOUtils;
+
+public class UDPipeClientUtils {
+	
+	public static void printAll(WebTarget target, String string) {
+		String r = target.path("models").request().accept(MediaType.TEXT_XML).get(String.class);
+		System.out.println(r);
+		
+		JSONObject obj;
+		try {
+			JSONObject models = new JSONObject(r);
+			JSONArray names = models.getJSONObject("models").names();
+			for (int i = 0; i < names.length(); i++) {
+				System.out.println(names.get(i));
+				
+				System.out.println(process(target, names.get(i).toString(), string));
+			}
+		}
+		catch (JSONException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+	
+	public static String process(WebTarget target, String model, String text) throws JSONException {
+		Form form = new Form();
+		form.param("data", text);
+		form.param("model", model);
+		form.param("tokenizer", "");
+		form.param("tagger", "");
+		form.param("parser", "");
+		
+		String r = target.path("process").request().accept(MediaType.TEXT_XML).post(Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE), String.class);
+		// System.out.println(r.toString());
+		JSONObject obj;
+		obj = new JSONObject(r);
+		
+		return obj.getString("result");
+	}
+	
+	
+	public static boolean processXMLTEI(final WebTarget target, final String model, File xmlFile, File outFile) throws JSONException, IOException, XMLStreamException {
+		
+		StaxIdentityParser parser = new StaxIdentityParser(xmlFile) {
+			
+			StringBuilder toProcess = new StringBuilder();
+			
+			boolean doProcess = false;
+			
+			int s_n = 1;
+			
+			@Override
+			protected void processCharacters() throws XMLStreamException {
+				if (doProcess) {
+					String text = parser.getText();
+					toProcess.append(text);
+				}
+				else {
+					super.processCharacters();
+				}
+			}
+			
+			@Override
+			protected void processStartElement() throws XMLStreamException, IOException {
+				tokenizeAndWrite();
+				super.processStartElement();
+				
+				if (parser.getLocalName().equals("text")) doProcess = true;
+			}
+			
+			@Override
+			protected void processEndElement() throws XMLStreamException {
+				tokenizeAndWrite();
+				super.processEndElement();
+				
+				if (parser.getLocalName().equals("text")) doProcess = false;
+			}
+			
+			protected void tokenizeAndWrite() throws XMLStreamException {
+				if (!doProcess) {
+					toProcess.setLength(0);
+					return;
+				}
+				if (toProcess.length() == 0) {
+					toProcess.setLength(0);
+					return;
+				}
+				String str = toProcess.toString().trim();
+				if (str.length() == 0) {
+					toProcess.setLength(0);
+					return;
+				}
+				try {
+					String connlu = UDPipeClientUtils.process(target, model, str);
+					// System.out.println(connlu);
+					
+					String lines[] = connlu.split("\n");
+					boolean sopen = false;
+					for (String line : lines) {
+						// System.out.println(line);
+						
+						if (line.startsWith("# newdoc")) {
+							
+						}
+						else if (line.startsWith("# newpar")) {
+							
+						}
+						else if (line.startsWith("# text")) {
+							
+						}
+						else if (line.startsWith("# sent_id")) {
+							if (sopen) {
+								writer.writeEndElement(); // s
+								writer.writeCharacters("\n");
+							}
+							writer.writeStartElement("s");
+							writer.writeAttribute("n", "" + s_n++);
+							writer.writeCharacters("\n");
+							sopen = true;
+						}
+						else {
+							
+							String[] cols = line.split("\t");
+							if (cols.length <= 5) continue;
+							
+							writer.writeStartElement("w");
+							writer.writeAttribute("n", cols[0]);
+							writer.writeAttribute(model + "-lemma", cols[2]);
+							writer.writeAttribute(model + "-pos", cols[3]);
+							writer.writeAttribute(model + "-syntax", cols[7]);
+							writer.writeCharacters(cols[1]);
+							writer.writeEndElement();
+							writer.writeCharacters("\n");
+						}
+					}
+					
+					if (sopen) {
+						writer.writeEndElement(); // s
+						writer.writeCharacters("\n");
+					}
+					toProcess.setLength(0);
+				}
+				catch (JSONException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+			}
+		};
+		
+		return parser.process(outFile);
+	}
+	
+	public static boolean processXML(final WebTarget target, final String model, File xmlFile) throws JSONException, IOException, XMLStreamException {
+		
+		StaxIdentityParser parser = new StaxIdentityParser(xmlFile) {
+			
+			StringBuilder toProcess = new StringBuilder();
+			
+			@Override
+			protected void processCharacters() throws XMLStreamException {
+				String text = parser.getText();
+				toProcess.append(text);
+			}
+			
+			@Override
+			protected void processStartElement() throws XMLStreamException, IOException {
+				tokenizeAndWrite();
+				super.processStartElement();
+			}
+			
+			@Override
+			protected void processEndElement() throws XMLStreamException {
+				tokenizeAndWrite();
+				super.processEndElement();
+			}
+			
+			protected void tokenizeAndWrite() throws XMLStreamException {
+				if (toProcess.length() == 0) {
+					toProcess.setLength(0);
+					return;
+				}
+				String str = toProcess.toString().trim();
+				if (str.length() == 0) {
+					toProcess.setLength(0);
+					return;
+				}
+				try {
+					String connlu = UDPipeClientUtils.process(target, model, str);
+					// System.out.println(connlu);
+					
+					String lines[] = connlu.split("\n");
+					boolean sopen = false;
+					for (String line : lines) {
+						// System.out.println(line);
+						
+						if (line.startsWith("# newdoc")) {
+							
+						}
+						else if (line.startsWith("# newpar")) {
+							
+						}
+						else if (line.startsWith("# text")) {
+							
+						}
+						else if (line.startsWith("# sent_id")) {
+							if (sopen) {
+								writer.writeEndElement(); // s
+								writer.writeCharacters("\n");
+							}
+							writer.writeStartElement("s");
+							writer.writeAttribute("n", line.substring("# sent_id".length() + 1));
+							writer.writeCharacters("\n");
+							sopen = true;
+						}
+						else {
+							
+							String[] cols = line.split("\t");
+							if (cols.length <= 5) continue;
+							
+							writer.writeStartElement("w");
+							writer.writeAttribute("n", cols[0]);
+							writer.writeAttribute(model + "lemma", cols[2]);
+							writer.writeAttribute(model + "pos", cols[3]);
+							writer.writeAttribute(model + "syntax", cols[7]);
+							writer.writeCharacters(cols[1]);
+							writer.writeEndElement();
+							writer.writeCharacters("\n");
+						}
+					}
+					
+					if (sopen) {
+						writer.writeEndElement(); // s
+						writer.writeCharacters("\n");
+					}
+					toProcess.setLength(0);
+				}
+				catch (JSONException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+			}
+		};
+		
+		return parser.process(new File(xmlFile.getParentFile(), "out.xml"));
+	}
+	
+	public static void processTXT(WebTarget target, String model, File txtFile) throws JSONException, IOException {
+		Form form = new Form();
+		form.param("data", IOUtils.getText(txtFile));
+		form.param("model", model);
+		form.param("tokenizer", "");
+		form.param("tagger", "");
+		form.param("parser", "");
+		
+		String r = target.path("process").request().accept(MediaType.TEXT_XML).post(Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE), String.class);
+		// System.out.println(r.toString());
+		JSONObject obj;
+		obj = new JSONObject(r);
+		String result = obj.getString("result");
+		System.out.println(result);
+	}
+}

Property changes on: tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/UDPipeClientUtils.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/UDPipeProcessor.java
===================================================================
--- tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/UDPipeProcessor.java	(revision 0)
+++ tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/UDPipeProcessor.java	(revision 3120)
@@ -0,0 +1,313 @@
+package org.txm.udpipe.core;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.ClientBuilder;
+import javax.ws.rs.client.WebTarget;
+import javax.ws.rs.core.UriBuilder;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.poi.util.StringUtil;
+import org.glassfish.jersey.client.ClientConfig;
+import org.json.JSONException;
+import org.txm.utils.io.IOUtils;
+import org.txm.xml.DOMIdentityHook;
+import org.txm.xml.LocalNamesHookActivator;
+import org.txm.xml.SimpleHook;
+import org.txm.xml.XMLParser;
+import org.txm.xml.XMLProcessor;
+import org.txm.xml.XPathsHookActivator;
+
+public class UDPipeProcessor {
+	
+	// REST
+	private ClientConfig config;
+	
+	private Client client;
+	
+	private WebTarget target;
+	
+	// 1- prepare source
+	StringBuilder srcContent = new StringBuilder(); // final SRC content for UDPipe
+	
+	ArrayList<String> blockPaths = new ArrayList<>(); // stores the block starting paths -> for further processing
+	
+	// 2- store result
+	private String[] newpars;
+	
+	// 3- reinsject result
+	
+	public UDPipeProcessor() {
+		this(getBaseURI());
+	}
+	
+	public UDPipeProcessor(URI adress) {
+		config = new ClientConfig();
+		client = ClientBuilder.newClient(config);
+		target = client.target(getBaseURI());
+	}
+	
+	public WebTarget getTarget() {
+		return target;
+	}
+	
+	public boolean buildSRC(File xmlFile, List<String> limits) throws IOException, XMLStreamException {
+		XMLParser blocksConstructor = new XMLParser(xmlFile);
+		
+		LocalNamesHookActivator activator = new LocalNamesHookActivator(null, limits);
+		
+		new SimpleHook<XMLParser>("src builder", activator, blocksConstructor) {
+			
+			StringBuilder toProcess = new StringBuilder(); // temporally stores text to build blocks
+			
+			private String startingPath;
+			
+			@Override
+			protected void processStartElement() {}
+			
+			@Override
+			protected void processEndElement() {}
+			
+			@Override
+			protected void processCharacters() {
+				String text = this.parser.getText();
+				toProcess.append(text);
+			}
+			
+			@Override
+			public boolean deactivate() {
+				
+				if (toProcess.length() == 0) {
+					toProcess.setLength(0);
+					return true; // nothing was done
+				}
+				String str = toProcess.toString().trim();
+				if (str.length() == 0) {
+					toProcess.setLength(0);
+					return true; // really nothing was done
+				}
+				
+				blockPaths.add(startingPath);
+				srcContent.append(str.replaceAll("[\n]++", " ") + "\n\n"); // add content
+				
+				toProcess.setLength(0); // reset the buffer
+				return true;
+			}
+			
+			@Override
+			public boolean _activate() {
+				startingPath = parentParser.getCurrentPath();
+				return true;
+			}
+		};
+		
+		if (blocksConstructor.process()) {
+			System.out.println("N blocks: " + blockPaths.size());
+			IOUtils.write(new File("/home/mdecorde/TEMP/src.txt"), srcContent.toString());
+			return true;
+		}
+		else {
+			return false;
+		}
+	}
+	
+	public boolean apply(String model) throws JSONException {
+		System.out.println("APPLYING UDPIPE...");
+		String connlu = UDPipeJavaUtils.toConnluString(new File(model), srcContent.toString());
+		
+		try {
+			IOUtils.write(new File("/home/mdecorde/TEMP/applyraw.txt"), connlu);
+		}
+		catch (Exception e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+		newpars = connlu.split("# newpar");
+		System.out.println("N newpars: " + newpars.length);
+		
+		String[] newpars2 = new String[newpars.length - 1];
+		System.arraycopy(newpars, 1, newpars2, 0, newpars.length - 1); // the first newpar is empty (contains only #newdoc)
+		newpars = newpars2;
+		System.out.println("N newpars: " + newpars.length);
+		try {
+			IOUtils.write(new File("/home/mdecorde/TEMP/apply.txt"), StringUtil.join(newpars, "\n\n\n"));
+			IOUtils.write(new File("/home/mdecorde/TEMP/apply0.txt"), newpars[0]);
+			IOUtils.write(new File("/home/mdecorde/TEMP/apply1.txt"), newpars[newpars.length - 1]);
+		}
+		catch (Exception e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		return true;
+	}
+	
+	// Arrays.asList("text", "div", "ab", "p", "lg")
+	public boolean inject(File xmlFile, File outFile) throws JSONException, IOException, XMLStreamException {
+		
+		XMLProcessor injector = new XMLProcessor(xmlFile);
+		XPathsHookActivator activator = new XPathsHookActivator(null, blockPaths);
+		DOMIdentityHook hook = new DOMIdentityHook("injector", activator, injector) {
+			
+			int n = 0;
+			
+			@Override
+			public void processDom() {
+				// System.out.println("" + n + ": injecting " + newpars[n++] + " in words");
+			}
+		};
+		
+		return injector.process(outFile);
+	}
+	// System.out.println("INJECTING ANNOTATIONS...");
+	// StaxIdentityParser finalParser = new StaxIdentityParser(xmlFile) {
+	//
+	// StringBuilder toProcess = new StringBuilder();
+	//
+	// boolean doProcess = false;
+	//
+	// int n = 1;
+	//
+	// int s_n = 1;
+	//
+	// @Override
+	// protected void processCharacters() throws XMLStreamException {
+	// if (doProcess) {
+	// String text = parser.getText();
+	// toProcess.append(text);
+	// }
+	// else {
+	// super.processCharacters();
+	// }
+	// }
+	//
+	// @Override
+	// protected void processStartElement() throws XMLStreamException, IOException {
+	// if (divTags == null || divTags.size() == 0 || divTags.contains(parser.getLocalName())) tokenizeAndWrite();
+	// super.processStartElement();
+	//
+	// if (parser.getLocalName().equals("text")) doProcess = true;
+	// }
+	//
+	// @Override
+	// protected void processEndElement() throws XMLStreamException {
+	// if (divTags == null || divTags.size() == 0 || divTags.contains(parser.getLocalName())) tokenizeAndWrite();
+	// super.processEndElement();
+	//
+	// if (parser.getLocalName().equals("text")) doProcess = false;
+	// }
+	//
+	// protected void tokenizeAndWrite() throws XMLStreamException {
+	// if (!doProcess) {
+	// toProcess.setLength(0);
+	// return;
+	// }
+	// if (toProcess.length() == 0) {
+	// toProcess.setLength(0);
+	// return;
+	// }
+	// String str = toProcess.toString().trim();
+	// if (str.length() == 0) {
+	// toProcess.setLength(0);
+	// return;
+	// }
+	//
+	// String connlu = newpars[n++];
+	// // System.out.println(connlu);
+	//
+	// String lines[] = connlu.split("\n");
+	// boolean sopen = false;
+	// for (String line : lines) {
+	// // System.out.println(line);
+	//
+	// if (line.startsWith("# newdoc")) {
+	//
+	// }
+	// else if (line.startsWith("# newpar")) {
+	//
+	// }
+	// else if (line.startsWith("# text")) {
+	//
+	// }
+	// else if (line.startsWith("# sent_id")) {
+	// if (sopen) {
+	// writer.writeEndElement(); // s
+	// writer.writeCharacters("\n");
+	// }
+	// writer.writeStartElement("s");
+	// writer.writeAttribute("n", "" + s_n++);
+	// writer.writeCharacters("\n");
+	// sopen = true;
+	// }
+	// else {
+	// String[] cols = line.split("\t");
+	// if (cols.length <= 5) continue;
+	//
+	// writer.writeStartElement("w");
+	// writer.writeAttribute("n", cols[0]);
+	// writer.writeAttribute(model + "-lemma", cols[2]);
+	// writer.writeAttribute(model + "-pos", cols[3]);
+	// writer.writeAttribute(model + "-syntax", cols[7]);
+	// writer.writeCharacters(cols[1]);
+	// writer.writeEndElement();
+	// writer.writeCharacters("\n");
+	// }
+	// }
+	//
+	// if (sopen) {
+	// writer.writeEndElement(); // s
+	// writer.writeCharacters("\n");
+	// }
+	// toProcess.setLength(0);
+	// }
+	// };
+	//
+	// return finalParser.process(outFile);
+	// }
+	
+	public static void main(String[] args) throws JSONException, IOException, XMLStreamException {
+		
+		File i = new File("/home/mdecorde/xml/tdm80j/tdm80j.xml");
+		File o = new File("/home/mdecorde/xml/tdm80j/tdm80j-out.xml");
+		
+		UDPipeProcessor upp = new UDPipeProcessor();
+		
+		// UDPipeUtils.printAll(upp.getTarget(), "un test");
+		
+		System.out.println("PREPARE: " + upp.buildSRC(i, Arrays.asList("div", "ab", "p", "lg")));
+		
+		System.out.println("APPLY: " + upp.apply("fr-sequoia"));
+		
+		System.out.println("INJECTION: " + upp.inject(i, o));
+		
+		// System.out.println(process(target, "fr-gsd", "un test simple"));
+		
+		// printAll(target, "un test simple");
+		
+		// processTXT(target, "fr-sequoia", new File("/home/mdecorde/xml/voeuxtxt/0001.txt"));
+		
+		// long time = System.currentTimeMillis();
+		// processXMLTEI(target, "fr-sequoia", new File("/home/mdecorde/xml/tdm80j/tdm80j.xml"), new File("/home/mdecorde/xml/tdm80j/tdm80j-out.xml"));
+		// System.out.println("TIME1= " + (System.currentTimeMillis() - time));
+		//
+		// long time2 = System.currentTimeMillis();
+		// processXMLTEIOpti(target, "fr-sequoia", new File("/home/mdecorde/xml/tdm80j/tdm80j.xml"), new File("/home/mdecorde/xml/tdm80j/tdm80j-out-opti.xml"));
+		// System.out.println("TIME2= " + (System.currentTimeMillis() - time2));
+	}
+	
+	/**
+	 * to use if udpipe server was started with :
+	 * ./udpipe_server 7878 fr-sequoia fr-sequoia french-sequoia-ud-2.4-190531.udpipe ""
+	 * 
+	 * @return default UDPipe URL
+	 */
+	private static URI getBaseURI() {
+		return UriBuilder.fromUri("http://localhost:7878").build();
+	}
+}

Property changes on: tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/UDPipeProcessor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/UDPipePreferences.java
===================================================================
--- tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/UDPipePreferences.java	(revision 0)
+++ tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/UDPipePreferences.java	(revision 3120)
@@ -0,0 +1,144 @@
+package org.txm.udpipe.core;
+
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.util.Properties;
+
+import org.osgi.framework.Version;
+import org.osgi.service.prefs.Preferences;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TXMPreferences;
+import org.txm.utils.BundleUtils;
+import org.txm.utils.io.FileCopy;
+import org.txm.utils.io.IOUtils;
+import org.txm.utils.logger.Log;
+
+/**
+ * UDPipe preferences initializer.
+ * 
+ * @author mdecorde
+ *
+ */
+public class UDPipePreferences extends TXMPreferences {
+	
+	/**
+	 * contains the last bundle version setting the TreeTagger models directory
+	 */
+	public static final String INSTALLED_MODELS_VERSION = "installed_models_version"; //$NON-NLS-1$
+	
+	/**
+	 * Models path.
+	 */
+	public static final String MODELS_PATH = "models_path"; //$NON-NLS-1$
+	
+	/**
+	 * Gets the instance.
+	 * 
+	 * @return the instance
+	 */
+	public static TXMPreferences getInstance() {
+		if (!TXMPreferences.instances.containsKey(UDPipePreferences.class)) {
+			new UDPipePreferences();
+		}
+		return TXMPreferences.instances.get(UDPipePreferences.class);
+	}
+	
+	
+	@Override
+	public void initializeDefaultPreferences() {
+		super.initializeDefaultPreferences();
+		
+		// FIXME: SJ: some code in this method should only be done at first run or update (eg. modifying chmod, etc.)
+		
+		// Default preferences if no org.txm.udpipe.core fragment is found
+		Preferences preferences = this.getDefaultPreferencesNode();
+		
+		// FIXME: SJ: became useless since we embed it in fragments?
+		String installPath = "/usr/lib/UDPipe"; // "System.getProperty("osgi.user.area") + "/TXM/udpipe"; //$NON-NLS-1$
+		if (System.getProperty("os.name").contains("Windows")) {
+			installPath = "C:/Program Files/UDPipe";
+		}
+		else if (System.getProperty("os.name").contains("Mac")) {
+			installPath = "/Applications/UDPipe";
+		}
+		
+		preferences.put(MODELS_PATH, installPath + "/models"); //$NON-NLS-1$
+		
+		// FIXME: need to validate this code + need to check if it's still useful
+		String mversion = UDPipePreferences.getInstance().getString(INSTALLED_MODELS_VERSION);
+		
+		// if TXM is launch for the first time bversion and mversion valus are empty
+		if (mversion == null || mversion.equals("")) {
+			
+			// Restore previous TreeTagger preferences
+			File previousPreferenceFile = new File(System.getProperty("java.io.tmpdir"), "org.txm.rcp.prefs"); //$NON-NLS-1$ //$NON-NLS-2$
+			
+			if (System.getProperty("os.name").indexOf("Mac") >= 0) { //$NON-NLS-1$ //$NON-NLS-2$
+				previousPreferenceFile = new File("/tmp/org.txm.rcp.prefs"); //$NON-NLS-1$
+			}
+			
+			if (previousPreferenceFile.exists()) {
+				try {
+					System.out.println("Restoring preferences (from " + previousPreferenceFile + ")."); //$NON-NLS-1$ //$NON-NLS-2$
+					Properties previousProperties = new Properties();
+					BufferedReader reader = IOUtils.getReader(previousPreferenceFile, "ISO-8859-1"); //$NON-NLS-1$
+					previousProperties.load(reader);
+					
+					String[] keys = { MODELS_PATH };
+					for (String k : keys) {
+						if (previousProperties.getProperty(previousProperties.getProperty(k)) != null) {
+							preferences.put(k, installPath);
+							UDPipePreferences.getInstance().put(k, previousProperties.getProperty(k));
+						}
+					}
+				}
+				catch (Exception e) {
+					e.printStackTrace();
+				}
+			}
+			
+			UDPipePreferences.getInstance().put(INSTALLED_MODELS_VERSION, "0.0.0");
+			
+			mversion = UDPipePreferences.getInstance().getString(INSTALLED_MODELS_VERSION);
+		}
+		
+		// look for org.txm.udpipe.core.<osname> fragment
+		String mfragmentid = "org.txm.udpipe.core.models";
+		String bfragmentid = "org.txm.udpipe.core";
+		String osname = System.getProperty("os.name").toLowerCase();
+		if (osname.contains("windows")) {
+			osname = "win32";
+		}
+		else if (osname.contains("mac os x")) {
+			osname = "macosx";
+		}
+		else {
+			osname = "linux";
+		}
+		bfragmentid += "." + osname;
+		
+		Version currentMVersion = new Version(mversion);
+		
+		Version modelsFragmentVersion = BundleUtils.getBundleVersion(mfragmentid);
+		if (modelsFragmentVersion != null && modelsFragmentVersion.compareTo(currentMVersion) >= 0) { // udpate models path!
+			Log.fine("Updating TreeTagger models path..."); //$NON-NLS-1$
+			File path = BundleUtils.getBundleFile(mfragmentid);
+			
+			File installModelsDir = new File(path, "res/models"); //$NON-NLS-1$
+			File modelsDir = new File(Toolbox.getTxmHomePath(), "udpipe-models"); //$NON-NLS-1$
+			modelsDir.mkdirs();
+			try {
+				FileCopy.copyFiles(installModelsDir, modelsDir);
+				preferences.put(MODELS_PATH, modelsDir.getAbsolutePath());
+				UDPipePreferences.getInstance().put(INSTALLED_MODELS_VERSION, modelsFragmentVersion.toString());
+				Log.fine("Done."); //$NON-NLS-1$
+			}
+			catch (IOException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+		}
+	}
+}

Property changes on: tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/UDPipePreferences.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/UDPipeJavaUtils.java
===================================================================
--- tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/UDPipeJavaUtils.java	(revision 0)
+++ tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/UDPipeJavaUtils.java	(revision 3120)
@@ -0,0 +1,171 @@
+package org.txm.udpipe.core;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
+import java.util.HashMap;
+
+import org.txm.utils.io.IOUtils;
+
+import cz.cuni.mff.ufal.udpipe.InputFormat;
+import cz.cuni.mff.ufal.udpipe.Model;
+import cz.cuni.mff.ufal.udpipe.OutputFormat;
+import cz.cuni.mff.ufal.udpipe.Sentence;
+import cz.cuni.mff.ufal.udpipe.Sentences;
+import cz.cuni.mff.ufal.udpipe.Word;
+import cz.cuni.mff.ufal.udpipe.Words;
+
+public class UDPipeJavaUtils {
+	
+	public static Sentences process(String modelPath, String... strings) {
+		
+		Model model = Model.load(modelPath);
+		
+		InputFormat tokenizer = model.newTokenizer("");
+		
+		// parse(sentence& s, const string& options, string& error)
+		
+		Sentences sentences = new Sentences();
+		Sentence tmp = new Sentence();
+		for (String string : strings) {
+			tokenizer.setText(string);
+			while (tokenizer.nextSentence(tmp)) {
+				sentences.add(tmp);
+				tmp = new Sentence();
+			}
+		}
+		
+		for (int iSentence = 0; iSentence < sentences.size(); iSentence++) {
+			Sentence sent = sentences.get(iSentence);
+			model.tag(sent, "");
+			model.parse(sent, "");
+		}
+		
+		return sentences;
+	}
+	
+	public static String toString(Sentences sentences) {
+		StringBuilder buffer = new StringBuilder();
+		for (int iSentence = 0; iSentence < sentences.size(); iSentence++) {
+			if (iSentence > 0) buffer.append("\n");
+			buffer.append(toString(sentences.get(iSentence)));
+		}
+		return buffer.toString();
+	}
+	
+	public static String toString(Sentence sent) {
+		StringBuilder buffer = new StringBuilder();
+		Words words = sent.getWords();
+		for (int i = 0; i < words.size(); i++) {
+			Word w = words.get(i);
+			if (i > 0) buffer.append(" ");
+			
+			buffer.append(w.getForm());
+			buffer.append("/" + w.getLemma());
+			buffer.append("/" + w.getUpostag());
+			buffer.append("/" + w.getXpostag());
+			buffer.append("/" + w.getFeats());
+			buffer.append("/" + w.getDeps());
+			buffer.append("/" + w.getDeprel());
+			buffer.append("/" + w.getHead());
+			buffer.append("/" + w.getMisc());
+		}
+		return buffer.toString();
+	}
+	
+	public static void toConnluFile(File resultConnluFile, File model, String string) throws UnsupportedEncodingException, FileNotFoundException {
+		Sentences sentences = process(model.getAbsolutePath(), string);
+		OutputFormat of = OutputFormat.newConlluOutputFormat();
+		
+		PrintWriter writer = IOUtils.getWriter(resultConnluFile);
+		
+		for (int iSentence = 0; iSentence < sentences.size(); iSentence++) {
+			Sentence sent = sentences.get(iSentence);
+			String content = of.writeSentence(sent);
+			writer.println(content);
+		}
+		
+		writer.println(of.finishDocument());
+		writer.close();
+	}
+	
+	public static String toString(Word w) {
+		StringBuilder buffer = new StringBuilder();
+		buffer.append(w.getForm());
+		buffer.append("/" + w.getLemma());
+		buffer.append("/" + w.getUpostag());
+		buffer.append("/" + w.getXpostag());
+		buffer.append("/" + w.getFeats());
+		buffer.append("/" + w.getDeps());
+		buffer.append("/" + w.getDeprel());
+		buffer.append("/" + w.getHead());
+		buffer.append("/" + w.getMisc());
+		return buffer.toString();
+	}
+	
+	public static String toConnluString(File model, String string) {
+		Sentences sentences = process(model.getAbsolutePath(), string);
+		OutputFormat of = OutputFormat.newConlluOutputFormat();
+		
+		StringBuilder sb = new StringBuilder();
+		
+		for (int iSentence = 0; iSentence < sentences.size(); iSentence++) {
+			Sentence sent = sentences.get(iSentence);
+			String content = of.writeSentence(sent);
+			sb.append(content);
+			sb.append("\n");
+		}
+		
+		sb.append(of.finishDocument());
+		
+		return sb.toString();
+	}
+	
+	public static void main(String[] args) {
+		try {
+			toConnluFile(new File("/tmp/result.connlu"), new File("/home/mdecorde/SOFTWARE/udpipe-1.2.0-bin/bin-linux64/french-gsd-ud-2.4-190531.udpipe"),
+					"Et un petit test... En deux phrases ? ou trois.");
+		}
+		catch (UnsupportedEncodingException | FileNotFoundException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+	
+	public static void processSentences(String modelPath, Sentences sentences) {
+		processSentences(Model.load(modelPath), sentences);
+	}
+	
+	public static void processSentences(Model model, Sentences sentences) {
+		System.out.println("Model: " + model);
+		for (int iSentence = 0; iSentence < sentences.size(); iSentence++) {
+			Sentence sent = sentences.get(iSentence);
+			System.out.println(sent.getWords().size());
+			// model.tag(sent, "");
+		}
+	}
+	
+	/**
+	 * fill a map with values of "id", "form", "lemma", "upos", "xpos", "feats", "head", "deprel", "deps", "misc"
+	 * 
+	 * @param word
+	 * @param prefix
+	 * @return
+	 */
+	public static HashMap<String, String> wordToHashMap(Word word, String prefix) {
+		if (prefix == null) prefix = "";
+		HashMap<String, String> properties = new HashMap<>();
+		properties.put(prefix + "id", Integer.toString(word.getId()));
+		properties.put(prefix + "form", word.getForm());
+		properties.put(prefix + "lemma", word.getLemma());
+		properties.put(prefix + "upos", word.getUpostag());
+		properties.put(prefix + "xpos", word.getXpostag());
+		properties.put(prefix + "feats", word.getFeats());
+		properties.put(prefix + "head", Integer.toString(word.getHead()));
+		properties.put(prefix + "deprel", word.getDeprel());
+		properties.put(prefix + "deps", word.getDeps());
+		properties.put(prefix + "misc", word.getMisc());
+		return null;
+	}
+}

Property changes on: tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/UDPipeJavaUtils.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/UDStringTokenizer.java
===================================================================
--- tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/UDStringTokenizer.java	(revision 0)
+++ tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/UDStringTokenizer.java	(revision 3120)
@@ -0,0 +1,48 @@
+package org.txm.udpipe.core;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.txm.tokenizer.StringTokenizer;
+
+import cz.cuni.mff.ufal.udpipe.InputFormat;
+import cz.cuni.mff.ufal.udpipe.Model;
+import cz.cuni.mff.ufal.udpipe.Sentence;
+import cz.cuni.mff.ufal.udpipe.Words;
+
+
+public class UDStringTokenizer implements StringTokenizer {
+	
+	protected Model model;
+	
+	protected InputFormat tokenizer;
+	
+	public UDStringTokenizer(String lang) {
+		File modelsDirectory = new File(UDPipePreferences.getInstance().getString(UDPipePreferences.MODELS_PATH)); // default models directory is set in the Toolbox
+		File modelFile = new File(modelsDirectory, lang + ".udpipe");
+		model = Model.load(modelFile.getAbsolutePath());
+		if (model == null) {
+			throw new IllegalStateException("Model not constructed for file: " + modelFile);
+		}
+		tokenizer = model.newTokenizer("");
+	}
+	
+	@Override
+	public List<String> processText(String text) {
+		ArrayList<String> result = new ArrayList<>();
+		
+		tokenizer.setText(text);
+		Sentence sent = new Sentence();
+		while (tokenizer.nextSentence(sent)) {
+			Words words = sent.getWords();
+			for (int iWord = 0; iWord < words.size(); iWord++) {
+				result.add(words.get(iWord).getForm());
+			}
+		}
+		if (result.size() > 0) {
+			result.remove(0); // remove the <root> element
+		}
+		return result;
+	}
+}

Property changes on: tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/UDStringTokenizer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/Activator.java
===================================================================
--- tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/Activator.java	(revision 0)
+++ tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/Activator.java	(revision 3120)
@@ -0,0 +1,30 @@
+package org.txm.udpipe.core;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+	private static BundleContext context;
+
+	static BundleContext getContext() {
+		return context;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext bundleContext) throws Exception {
+		Activator.context = bundleContext;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext bundleContext) throws Exception {
+		Activator.context = null;
+	}
+
+}

Property changes on: tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/Activator.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/UDPipeEngine.java
===================================================================
--- tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/UDPipeEngine.java	(revision 0)
+++ tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/UDPipeEngine.java	(revision 3120)
@@ -0,0 +1,220 @@
+package org.txm.udpipe.core;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.stream.XMLStreamException;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.Bundle;
+import org.txm.annotation.core.AnnotationEngine;
+import org.txm.core.results.TXMResult;
+import org.txm.objects.CorpusBuild;
+import org.txm.tokenizer.StringTokenizer;
+import org.txm.utils.BundleUtils;
+import org.txm.utils.OSDetector;
+import org.txm.utils.logger.Log;
+import org.txm.xml.xmltxm.XMLTXMWordPropertiesInjection;
+
+import cz.cuni.mff.ufal.udpipe.Sentence;
+import cz.cuni.mff.ufal.udpipe.Sentences;
+import cz.cuni.mff.ufal.udpipe.Version;
+import cz.cuni.mff.ufal.udpipe.Word;
+import cz.cuni.mff.ufal.udpipe.Words;
+import cz.cuni.mff.ufal.udpipe.udpipe_java;
+
+
+public class UDPipeEngine extends AnnotationEngine {
+	
+	public static final String XMLIDMISC = "XmlID=";
+	
+	private File libFile;
+	
+	@Override
+	public boolean isRunning() {
+		return true;
+	}
+	
+	@Override
+	public boolean initialize() throws Exception {
+		
+		Bundle bundle = BundleUtils.getBundle("org.txm.libs.udpipe");
+		File bundleDir = BundleUtils.getBundleFile("org.txm.libs.udpipe");
+		if (bundleDir.isDirectory()) {
+			if (OSDetector.isFamilyWindows()) {
+				libFile = new File(bundleDir, "lib/libudpipe_java.dll");
+			}
+			else if (OSDetector.isFamilyMac()) {
+				libFile = new File(bundleDir, "lib/libudpipe_java.dylib");
+			}
+			else if (OSDetector.isFamilyUnix()) {
+				libFile = new File(bundleDir, "lib/libudpipe_java.so");
+			}
+			udpipe_java.setLibraryPath(libFile.getAbsolutePath());
+		}
+		else {
+			URL entry = bundle.getEntry("lib/libudpipe_java.so");
+			libFile = new File(entry.toURI().getPath());
+			udpipe_java.setLibraryPath(entry.toString());
+		}
+		return getDetails() != null;
+	}
+	
+	@Override
+	public StringTokenizer getStringTokenizer(String lang) throws Exception {
+		return new UDStringTokenizer(lang);
+	}
+	
+	@Override
+	public boolean start(IProgressMonitor monitor) throws Exception {
+		return Version.current() != null;
+	}
+	
+	@Override
+	public boolean stop() throws Exception {
+		return true;
+	}
+	
+	@Override
+	public void notify(TXMResult r, String state) {
+		// TODO Auto-generated method stub
+		
+	}
+	
+	@Override
+	public String getDetails() {
+		return "UDPipe - " + Version.current().toString();
+	}
+	
+	@Override
+	public String getName() {
+		return "UDPipe";
+	}
+	
+	@Override
+	public boolean isAutomatic() {
+		return true;
+	}
+	
+	@Override
+	public boolean hasAnnotationsToSave(CorpusBuild corpus) {
+		return false;
+	}
+	
+	/**
+	 * the UD property suffixes, will be used to create the CQP properties like propertiesPrefix + suffix
+	 */
+	public static String[] propNames = { "id", "form", "lemma", "upos", "xpos", "feats", "head", "deprel", "deps", "misc" };
+	
+	
+	@Override
+	public boolean processFile(File xmlFile, File binaryCorpusDirectory, HashMap<String, Object> parameters) {
+		if (!isRunning()) return false;
+		
+		String lang = null;
+		Object ps = parameters.get("langs");
+		Object p = parameters.get("lang");
+		
+		if (p == null && ps == null) {
+			Log.warning("Warning: can't annotate. No 'lang' (String) or 'langs' (Map<String, String>) parameter specified in " + parameters);
+			return false;
+		}
+		
+		if (ps != null && ps instanceof Map) {
+			Map<?, ?> map = (Map<?, ?>) ps;
+			String text_id = xmlFile.getName();
+			if (map.get(text_id) != null) {
+				lang = map.get(text_id).toString().toLowerCase();
+				if (!canAnnotateLang(lang)) {
+					Log.warning("Warning: can't annotate text_id=${text_id} with $lang, will use the default lang=$p");
+					return false;
+				}
+			}
+		}
+		
+		if (lang == null && p == null) {
+			System.out.println(NLS.bind("** Error: no 'lang' parameter given: {0}. Aborting TreeTagger annotation.", parameters));
+			return false;
+		}
+		else {
+			lang = p.toString();
+		}
+		
+		if (!canAnnotateLang(lang)) {
+			return false;
+		}
+		
+		File modelsDirectory = new File(UDPipePreferences.getInstance().getString(UDPipePreferences.MODELS_PATH)); // default models directory is set in the Toolbox
+		File modelFile = new File(modelsDirectory, lang + ".udpipe");
+		
+		try {
+			// get words
+			XMLTXMToUDPipeXMLParser wparser = new XMLTXMToUDPipeXMLParser(xmlFile.toURI().toURL());
+			if (!wparser.process(null)) {
+				Log.warning("Error while parsing: " + xmlFile);
+				return false;
+			}
+			
+			Sentences sentences = wparser.getSentences();
+			// System.out.println("SENTENCES PARSED: " + UDPipeJavaUtils.toString(sentences));
+			// tag
+			UDPipeJavaUtils.processSentences(modelFile.getAbsolutePath(), sentences);
+			
+			// System.out.println("SENTENCES RESULT: " + UDPipeJavaUtils.toString(sentences));
+			
+			// update XML-TXM files
+			XMLTXMWordPropertiesInjection injector = new XMLTXMWordPropertiesInjection(xmlFile);
+			for (int iSentence = 0; iSentence < sentences.size(); iSentence++) {
+				Sentence sentence = sentences.get(iSentence);
+				Words words = sentence.getWords();
+				for (int iWord = 0; iWord < words.size(); iWord++) {
+					Word word = words.get(iWord);
+					String form = word.getForm();
+					if ("<root>".equals(form)) continue;
+					
+					String misc = word.getMisc();
+					int idx = misc.indexOf(XMLIDMISC);
+					int idx2 = misc.indexOf("|", idx + 6);
+					if (idx2 < 0) idx2 = misc.length();
+					String id = misc.substring(idx + 6, idx2);
+					HashMap<String, String> properties = UDPipeJavaUtils.wordToHashMap(word, "ud-");
+					injector.addProperty(id, properties);
+				}
+			}
+			File outFile = new File(binaryCorpusDirectory, xmlFile.getName() + ".tmp");
+			if (injector.process(outFile) && outFile.exists()) {
+				xmlFile.delete();
+				outFile.renameTo(xmlFile);
+			}
+			else {
+				Log.warning("Error while processing: " + xmlFile);
+			}
+		}
+		catch (IOException | XMLStreamException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+		// update xml-txm files
+		return true;
+	}
+	
+	public static boolean canAnnotateLang(String lang) {
+		if (lang == null) {
+			Log.warning("** Error: not lang given (null)");
+			return false;
+		}
+		
+		File modelsDirectory = new File(UDPipePreferences.getInstance().getString(UDPipePreferences.MODELS_PATH)); // default models directory is set in the Toolbox
+		File modelfile = new File(modelsDirectory, lang + ".udpipe");
+		if (!"??".equals(lang) && !modelfile.exists()) {
+			Log.warning(NLS.bind("** Error: no {0} model file found for the {1} lang.", modelfile, lang));
+			return false;
+		}
+		return true;
+	}
+}

Property changes on: tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/UDPipeEngine.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/TestREST.java
===================================================================
--- tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/TestREST.java	(revision 0)
+++ tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/TestREST.java	(revision 3120)
@@ -0,0 +1,511 @@
+package org.txm.udpipe.core;
+
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.ClientBuilder;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.client.WebTarget;
+import javax.ws.rs.core.Form;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.UriBuilder;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.stream.XMLStreamException;
+
+import org.glassfish.jersey.client.ClientConfig;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.txm.importer.StaxIdentityParser;
+import org.txm.scripts.importer.StaxParser;
+import org.txm.utils.io.IOUtils;
+import org.txm.utils.xml.DomUtils;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+public class TestREST {
+	
+	public void workflow(File xmlFile) {
+		/*
+		 * buildSRC()
+		 * --> list of path
+		 */
+	}
+	
+	public static boolean processXMLTEIOpti(final WebTarget target, final String model, File xmlFile, File outFile) throws JSONException, IOException, XMLStreamException,
+			ParserConfigurationException {
+		
+		StringBuilder srcContent = new StringBuilder();
+		ArrayList<String> limits = new ArrayList<>();
+		
+		HashSet<String> divTags = new HashSet<>();
+		divTags.addAll(Arrays.asList("text", "div", "ab", "p", "lg"));
+		
+		StaxParser parser = new StaxParser(xmlFile) {
+			
+			StringBuilder toProcess = new StringBuilder();
+			
+			StringBuilder currentXPath = new StringBuilder();
+			
+			boolean doProcess = false;
+			
+			String SLASH = "/";
+			
+			@Override
+			protected void processStartElement() {
+				currentXPath.append(SLASH);
+				currentXPath.append(parser.getLocalName());
+				
+				if (divTags == null || divTags.size() == 0 || divTags.contains(parser.getLocalName())) tokenizeAndWrite();
+				super.processStartElement();
+				
+				if (parser.getLocalName().equals("text")) doProcess = true;
+			}
+			
+			@Override
+			protected void processEndElement() {
+				if (divTags == null || divTags.size() == 0 || divTags.contains(parser.getLocalName())) tokenizeAndWrite();
+				super.processEndElement();
+				
+				if (parser.getLocalName().equals("text")) doProcess = false;
+				
+				currentXPath.setLength(currentXPath.length() - parser.getLocalName().length() - 1);
+			}
+			
+			@Override
+			protected void processCharacters() {
+				if (doProcess) {
+					String text = parser.getText();
+					toProcess.append(text);
+				}
+				else {
+					// super.processCharacters();
+				}
+			}
+			
+			protected void tokenizeAndWrite() {
+				if (!doProcess) {
+					toProcess.setLength(0);
+					return;
+				}
+				if (toProcess.length() == 0) {
+					toProcess.setLength(0);
+					return;
+				}
+				String str = toProcess.toString().trim();
+				if (str.length() == 0) {
+					toProcess.setLength(0);
+					return;
+				}
+				
+				srcContent.append(str + "\n\n");
+				limits.add(currentXPath.toString());
+				toProcess.setLength(0);
+			}
+		};
+		System.out.println("PREPARING SRC...");
+		parser.process();
+		
+		System.out.println("APPLYING UDPIPE...");
+		String connlu = TestREST.process(target, model, srcContent.toString());
+		String[] newpars = connlu.split("# newpar\n");
+		System.out.println("newpars: " + newpars.length);
+		
+		Document tempDoc = DomUtils.emptyDocument();
+		Element currentElement = tempDoc.getDocumentElement();
+		
+		System.out.println("INJECTING ANNOTATIONS...");
+		StaxIdentityParser finalParser = new StaxIdentityParser(xmlFile) {
+			
+			StringBuilder toProcess = new StringBuilder();
+			
+			boolean doProcess = false;
+			
+			int n = 1;
+			
+			int s_n = 1;
+			
+			boolean inW = false;
+			
+			boolean inS = false;
+			
+			@Override
+			protected void processCharacters() throws XMLStreamException {
+				// if (inBlock) {
+				if ("form".equals(localname)) {
+					appendForm(parser.getText());
+				}
+				// }
+				// else {
+				//
+				// }
+			}
+			
+			private void appendForm(String surface) {
+				// TODO Auto-generated method stub
+				
+			}
+			
+			@Override
+			protected void processStartElement() throws XMLStreamException, IOException {
+				if (divTags == null || divTags.size() == 0 || divTags.contains(parser.getLocalName())) tokenizeAndWrite();
+				
+				if ("w".equals(localname)) {
+					inW = true;
+				}
+				else if ("s".equals(localname)) {
+					inS = true;
+				}
+				else {
+					super.processStartElement();
+				}
+				
+				if (parser.getLocalName().equals("text")) doProcess = true;
+			}
+			
+			@Override
+			protected void processEndElement() throws XMLStreamException {
+				if (divTags == null || divTags.size() == 0 || divTags.contains(parser.getLocalName())) tokenizeAndWrite();
+				
+				if ("w".equals(localname)) {
+					inW = false;
+				}
+				else if ("s".equals(localname)) {
+					inS = false;
+				}
+				else {
+					super.processEndElement();
+				}
+				
+				if (parser.getLocalName().equals("text")) doProcess = false;
+			}
+			
+			protected void tokenizeAndWrite() throws XMLStreamException {
+				if (!doProcess) {
+					toProcess.setLength(0);
+					return;
+				}
+				if (toProcess.length() == 0) {
+					toProcess.setLength(0);
+					return;
+				}
+				String str = toProcess.toString().trim();
+				if (str.length() == 0) {
+					toProcess.setLength(0);
+					return;
+				}
+				
+				String connlu = newpars[n++];
+				// System.out.println(connlu);
+			}
+		};
+		
+		return finalParser.process(outFile);
+	}
+	
+	public static boolean processXMLTEI(final WebTarget target, final String model, File xmlFile, File outFile) throws JSONException, IOException, XMLStreamException {
+		
+		StaxIdentityParser parser = new StaxIdentityParser(xmlFile) {
+			
+			StringBuilder toProcess = new StringBuilder();
+			
+			boolean doProcess = false;
+			
+			int s_n = 1;
+			
+			@Override
+			protected void processCharacters() throws XMLStreamException {
+				if (doProcess) {
+					String text = parser.getText();
+					toProcess.append(text);
+				}
+				else {
+					super.processCharacters();
+				}
+			}
+			
+			@Override
+			protected void processStartElement() throws XMLStreamException, IOException {
+				tokenizeAndWrite();
+				super.processStartElement();
+				
+				if (parser.getLocalName().equals("text")) doProcess = true;
+			}
+			
+			@Override
+			protected void processEndElement() throws XMLStreamException {
+				tokenizeAndWrite();
+				super.processEndElement();
+				
+				if (parser.getLocalName().equals("text")) doProcess = false;
+			}
+			
+			protected void tokenizeAndWrite() throws XMLStreamException {
+				if (!doProcess) {
+					toProcess.setLength(0);
+					return;
+				}
+				if (toProcess.length() == 0) {
+					toProcess.setLength(0);
+					return;
+				}
+				String str = toProcess.toString().trim();
+				if (str.length() == 0) {
+					toProcess.setLength(0);
+					return;
+				}
+				try {
+					String connlu = TestREST.process(target, model, str);
+					// System.out.println(connlu);
+					
+					String lines[] = connlu.split("\n");
+					boolean sopen = false;
+					for (String line : lines) {
+						// System.out.println(line);
+						
+						if (line.startsWith("# newdoc")) {
+							
+						}
+						else if (line.startsWith("# newpar")) {
+							
+						}
+						else if (line.startsWith("# text")) {
+							
+						}
+						else if (line.startsWith("# sent_id")) {
+							if (sopen) {
+								writer.writeEndElement(); // s
+								writer.writeCharacters("\n");
+							}
+							writer.writeStartElement("s");
+							writer.writeAttribute("n", "" + s_n++);
+							writer.writeCharacters("\n");
+							sopen = true;
+						}
+						else {
+							
+							String[] cols = line.split("\t");
+							if (cols.length <= 5) continue;
+							
+							writer.writeStartElement("w");
+							writer.writeAttribute("n", cols[0]);
+							writer.writeAttribute(model + "-lemma", cols[2]);
+							writer.writeAttribute(model + "-pos", cols[3]);
+							writer.writeAttribute(model + "-syntax", cols[7]);
+							writer.writeCharacters(cols[1]);
+							writer.writeEndElement();
+							writer.writeCharacters("\n");
+						}
+					}
+					
+					if (sopen) {
+						writer.writeEndElement(); // s
+						writer.writeCharacters("\n");
+					}
+					toProcess.setLength(0);
+				}
+				catch (JSONException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+			}
+		};
+		
+		return parser.process(outFile);
+	}
+	
+	public static boolean processXML(final WebTarget target, final String model, File xmlFile) throws JSONException, IOException, XMLStreamException {
+		
+		StaxIdentityParser parser = new StaxIdentityParser(xmlFile) {
+			
+			StringBuilder toProcess = new StringBuilder();
+			
+			@Override
+			protected void processCharacters() throws XMLStreamException {
+				String text = parser.getText();
+				toProcess.append(text);
+			}
+			
+			@Override
+			protected void processStartElement() throws XMLStreamException, IOException {
+				tokenizeAndWrite();
+				super.processStartElement();
+			}
+			
+			@Override
+			protected void processEndElement() throws XMLStreamException {
+				tokenizeAndWrite();
+				super.processEndElement();
+			}
+			
+			protected void tokenizeAndWrite() throws XMLStreamException {
+				if (toProcess.length() == 0) {
+					toProcess.setLength(0);
+					return;
+				}
+				String str = toProcess.toString().trim();
+				if (str.length() == 0) {
+					toProcess.setLength(0);
+					return;
+				}
+				try {
+					String connlu = TestREST.process(target, model, str);
+					// System.out.println(connlu);
+					
+					String lines[] = connlu.split("\n");
+					boolean sopen = false;
+					for (String line : lines) {
+						// System.out.println(line);
+						
+						if (line.startsWith("# newdoc")) {
+							
+						}
+						else if (line.startsWith("# newpar")) {
+							
+						}
+						else if (line.startsWith("# text")) {
+							
+						}
+						else if (line.startsWith("# sent_id")) {
+							if (sopen) {
+								writer.writeEndElement(); // s
+								writer.writeCharacters("\n");
+							}
+							writer.writeStartElement("s");
+							writer.writeAttribute("n", line.substring("# sent_id".length() + 1));
+							writer.writeCharacters("\n");
+							sopen = true;
+						}
+						else {
+							
+							String[] cols = line.split("\t");
+							if (cols.length <= 5) continue;
+							
+							writer.writeStartElement("w");
+							writer.writeAttribute("n", cols[0]);
+							writer.writeAttribute(model + "lemma", cols[2]);
+							writer.writeAttribute(model + "pos", cols[3]);
+							writer.writeAttribute(model + "syntax", cols[7]);
+							writer.writeCharacters(cols[1]);
+							writer.writeEndElement();
+							writer.writeCharacters("\n");
+						}
+					}
+					
+					if (sopen) {
+						writer.writeEndElement(); // s
+						writer.writeCharacters("\n");
+					}
+					toProcess.setLength(0);
+				}
+				catch (JSONException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+			}
+		};
+		
+		return parser.process(new File(xmlFile.getParentFile(), "out.xml"));
+	}
+	
+	public static void processTXT(WebTarget target, String model, File txtFile) throws JSONException, IOException {
+		Form form = new Form();
+		form.param("data", IOUtils.getText(txtFile));
+		form.param("model", model);
+		form.param("tokenizer", "");
+		form.param("tagger", "");
+		form.param("parser", "");
+		
+		String r = target.path("process").request().accept(MediaType.TEXT_XML).post(Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE), String.class);
+		// System.out.println(r.toString());
+		JSONObject obj;
+		obj = new JSONObject(r);
+		String result = obj.getString("result");
+		System.out.println(result);
+	}
+	
+	public static String process(WebTarget target, String model, String text) throws JSONException {
+		Form form = new Form();
+		form.param("data", text);
+		form.param("model", model);
+		form.param("tokenizer", "");
+		form.param("tagger", "");
+		form.param("parser", "");
+		
+		String r = target.path("process").request().accept(MediaType.TEXT_XML).post(Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE), String.class);
+		// System.out.println(r.toString());
+		JSONObject obj;
+		obj = new JSONObject(r);
+		
+		return obj.getString("result");
+	}
+	
+	public static void main(String[] args) throws JSONException, IOException, XMLStreamException {
+		ClientConfig config = new ClientConfig();
+		
+		Client client = ClientBuilder.newClient(config);
+		
+		WebTarget target = client.target(getBaseURI());
+		
+		// System.out.println(process(target, "fr-gsd", "un test simple"));
+		
+		// printAll(target, "un test simple");
+		
+		// processTXT(target, "fr-sequoia", new File("/home/mdecorde/xml/voeuxtxt/0001.txt"));
+		
+		long time = System.currentTimeMillis();
+		File inputDirectory = new File(System.getProperty("user.home"), "xml/ELTECFRAORIG");
+		File outDirectory = new File(inputDirectory.getAbsolutePath() + "-UDPIMPED");
+		outDirectory.mkdirs();
+		File[] xmlFiles = inputDirectory.listFiles(new FilenameFilter() {
+			
+			@Override
+			public boolean accept(File dir, String name) {
+				return name.endsWith(".xml");
+			}
+		});
+		System.out.println(inputDirectory.getAbsolutePath());
+		for (File xmlFile : xmlFiles) {
+			System.out.println("Processing " + xmlFile);
+			processXMLTEI(target, "fr-sequoia", xmlFile, new File(outDirectory, xmlFile.getName()));
+		}
+		time = System.currentTimeMillis() - time;
+		System.out.println("TIME= " + (time));
+		System.out.println("TIME PER TEXT= " + (time / xmlFiles.length));
+		
+		// long time2 = System.currentTimeMillis();
+		// processXMLTEIOpti(target, "fr-sequoia", new File("/home/mdecorde/xml/tdm80j/tdm80j.xml"), new File("/home/mdecorde/xml/tdm80j/tdm80j-out-opti.xml"));
+		// System.out.println("TIME2= " + (System.currentTimeMillis() - time2));
+	}
+	
+	public static void printAll(WebTarget target, String string) {
+		String r = target.path("models").request().accept(MediaType.TEXT_XML).get(String.class);
+		System.out.println(r);
+		
+		JSONObject obj;
+		try {
+			JSONObject models = new JSONObject(r);
+			JSONArray names = models.getJSONObject("models").names();
+			for (int i = 0; i < names.length(); i++) {
+				System.out.println(names.get(i));
+				
+				System.out.println(process(target, names.get(i).toString(), "La petite brise la glace."));
+			}
+		}
+		catch (JSONException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+	
+	private static URI getBaseURI() {
+		return UriBuilder.fromUri("http://localhost:7878").build();
+	}
+}

Property changes on: tmp/org.txm.udpipe.core/src/org/txm/udpipe/core/TestREST.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.core/build.properties
===================================================================
--- tmp/org.txm.udpipe.core/build.properties	(revision 0)
+++ tmp/org.txm.udpipe.core/build.properties	(revision 3120)
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

Property changes on: tmp/org.txm.udpipe.core/build.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.core/plugin.xml
===================================================================
--- tmp/org.txm.udpipe.core/plugin.xml	(revision 0)
+++ tmp/org.txm.udpipe.core/plugin.xml	(revision 3120)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.txm.annotation.core.AnnotationEngine">
+      <AnnotationEngine
+            class="org.txm.udpipe.core.UDPipeEngine"
+            description="UDPipe wrapper">
+      </AnnotationEngine>
+   </extension>
+   <extension
+         point="org.eclipse.core.runtime.preferences">
+      <initializer
+            class="org.txm.udpipe.core.UDPipePreferences">
+      </initializer>
+   </extension>
+
+</plugin>

Property changes on: tmp/org.txm.udpipe.core/plugin.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.feature/build.properties
===================================================================
--- tmp/org.txm.udpipe.feature/build.properties	(revision 0)
+++ tmp/org.txm.udpipe.feature/build.properties	(revision 3120)
@@ -0,0 +1 @@
+bin.includes = feature.xml

Property changes on: tmp/org.txm.udpipe.feature/build.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.feature/feature.xml
===================================================================
--- tmp/org.txm.udpipe.feature/feature.xml	(revision 0)
+++ tmp/org.txm.udpipe.feature/feature.xml	(revision 3120)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.txm.udpipe.feature"
+      label="org.txm.udpipe.feature"
+      version="1.0.0.qualifier">
+
+   <description url="http://www.example.com/description">
+      [Enter Feature Description here.]
+   </description>
+
+   <copyright url="http://www.example.com/copyright">
+      [Enter Copyright Description here.]
+   </copyright>
+
+   <license url="http://www.example.com/license">
+      [Enter License Description here.]
+   </license>
+
+   <plugin
+         id="org.txm.libs.udpipe"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"/>
+
+   <plugin
+         id="org.txm.udpipe.core"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.txm.udpipe.rcp"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>

Property changes on: tmp/org.txm.udpipe.feature/feature.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.feature/.project
===================================================================
--- tmp/org.txm.udpipe.feature/.project	(revision 0)
+++ tmp/org.txm.udpipe.feature/.project	(revision 3120)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.txm.udpipe.feature</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>

Property changes on: tmp/org.txm.udpipe.feature/.project
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.rcp/.classpath
===================================================================
--- tmp/org.txm.udpipe.rcp/.classpath	(revision 0)
+++ tmp/org.txm.udpipe.rcp/.classpath	(revision 3120)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
+		<accessrules>
+			<accessrule kind="accessible" pattern="**"/>
+		</accessrules>
+	</classpathentry>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Property changes on: tmp/org.txm.udpipe.rcp/.classpath
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.rcp/META-INF/MANIFEST.MF
===================================================================
--- tmp/org.txm.udpipe.rcp/META-INF/MANIFEST.MF	(revision 0)
+++ tmp/org.txm.udpipe.rcp/META-INF/MANIFEST.MF	(revision 3120)
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.txm.udpipe.rcp
+Bundle-SymbolicName: org.txm.udpipe.rcp;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: textometrie.org
+Automatic-Module-Name: org.txm.udpipe.rcp
+BBundle-RequiredExecutionEnvironment: JavaSE-10
+Require-Bundle: org.txm.udpipe.core;bundle-version="1.0.0";visibility:=reexport,
+ org.txm.annotation.rcp;bundle-version="1.0.0";visibility:=reexport

Property changes on: tmp/org.txm.udpipe.rcp/META-INF/MANIFEST.MF
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.rcp/.project
===================================================================
--- tmp/org.txm.udpipe.rcp/.project	(revision 0)
+++ tmp/org.txm.udpipe.rcp/.project	(revision 3120)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.txm.udpipe.rcp</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Property changes on: tmp/org.txm.udpipe.rcp/.project
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.rcp/src/org/txm/udpipe/rcp/preferences/UDPipePreferencePage.java
===================================================================
--- tmp/org.txm.udpipe.rcp/src/org/txm/udpipe/rcp/preferences/UDPipePreferencePage.java	(revision 0)
+++ tmp/org.txm.udpipe.rcp/src/org/txm/udpipe/rcp/preferences/UDPipePreferencePage.java	(revision 3120)
@@ -0,0 +1,55 @@
+// Copyright © 2010-2020 ENS de Lyon., University of Franche-Comté
+// 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:$
+// $LastChangedRevision:$
+// $LastChangedBy:$ 
+//
+package org.txm.udpipe.rcp.preferences;
+
+import org.eclipse.jface.preference.DirectoryFieldEditor;
+import org.eclipse.ui.IWorkbench;
+import org.txm.rcp.preferences.RCPPreferencesPage;
+import org.txm.rcp.preferences.TXMPreferenceStore;
+import org.txm.udpipe.core.UDPipePreferences;
+
+/**
+ * UDPipe preferences page.
+ * 
+ * @author mdecorde
+ *
+ */
+public class UDPipePreferencePage extends RCPPreferencesPage {
+	
+	@Override
+	public void createFieldEditors() {
+		
+		this.addField(new DirectoryFieldEditor(UDPipePreferences.MODELS_PATH, "Models directory", this.getFieldEditorParent()));
+		
+	}
+	
+	@Override
+	public void init(IWorkbench workbench) {
+		this.setPreferenceStore(new TXMPreferenceStore(UDPipePreferences.getInstance().getPreferencesNodeQualifier()));
+	}
+}

Property changes on: tmp/org.txm.udpipe.rcp/src/org/txm/udpipe/rcp/preferences/UDPipePreferencePage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.rcp/build.properties
===================================================================
--- tmp/org.txm.udpipe.rcp/build.properties	(revision 0)
+++ tmp/org.txm.udpipe.rcp/build.properties	(revision 3120)
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

Property changes on: tmp/org.txm.udpipe.rcp/build.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.rcp/plugin.xml
===================================================================
--- tmp/org.txm.udpipe.rcp/plugin.xml	(revision 0)
+++ tmp/org.txm.udpipe.rcp/plugin.xml	(revision 3120)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.eclipse.ui.preferencePages">
+      <page
+            category="org.txm.rcp.preferences.NLPPreferencePage"
+            class="org.txm.udpipe.rcp.preferences.UDPipePreferencePage"
+            id="org.txm.udpipe.rcp.preferences.UDPipePreferencePage"
+            name="UDPipe">
+      </page>
+   </extension>
+
+</plugin>

Property changes on: tmp/org.txm.udpipe.rcp/plugin.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.udpipe.rcp/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- tmp/org.txm.udpipe.rcp/.settings/org.eclipse.jdt.core.prefs	(revision 0)
+++ tmp/org.txm.udpipe.rcp/.settings/org.eclipse.jdt.core.prefs	(revision 3120)
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8

Property changes on: tmp/org.txm.udpipe.rcp/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.libs.udpipe/.project
===================================================================
--- tmp/org.txm.libs.udpipe/.project	(revision 0)
+++ tmp/org.txm.libs.udpipe/.project	(revision 3120)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.txm.libs.udpipe</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Property changes on: tmp/org.txm.libs.udpipe/.project
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.libs.udpipe/lib/hk2-api-2.6.1.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.libs.udpipe/lib/hk2-api-2.6.1.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.libs.udpipe/lib/jersey-media-json-binding.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.libs.udpipe/lib/jersey-media-json-binding.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.libs.udpipe/lib/jersey-media-jaxb.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.libs.udpipe/lib/jersey-media-jaxb.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.libs.udpipe/lib/jakarta.ws.rs-api-2.1.6.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.libs.udpipe/lib/jakarta.ws.rs-api-2.1.6.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.libs.udpipe/lib/jersey-container-servlet.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.libs.udpipe/lib/jersey-container-servlet.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.libs.udpipe/lib/jersey-server.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.libs.udpipe/lib/jersey-server.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.libs.udpipe/lib/libudpipe_java.dylib
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.libs.udpipe/lib/libudpipe_java.dylib
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.libs.udpipe/lib/jersey-media-sse.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.libs.udpipe/lib/jersey-media-sse.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.libs.udpipe/lib/jersey-client.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.libs.udpipe/lib/jersey-client.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.libs.udpipe/lib/jersey-hk2.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.libs.udpipe/lib/jersey-hk2.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.libs.udpipe/lib/libudpipe_java.so
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.libs.udpipe/lib/libudpipe_java.so
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.libs.udpipe/lib/hk2-utils-2.6.1.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.libs.udpipe/lib/hk2-utils-2.6.1.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.libs.udpipe/lib/udpipe_java.dll
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.libs.udpipe/lib/udpipe_java.dll
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.libs.udpipe/lib/udpipe.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.libs.udpipe/lib/udpipe.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.libs.udpipe/lib/hk2-locator-2.6.1.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.libs.udpipe/lib/hk2-locator-2.6.1.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.libs.udpipe/lib/jersey-common.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.libs.udpipe/lib/jersey-common.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.libs.udpipe/lib/jersey-container-servlet-core.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.libs.udpipe/lib/jersey-container-servlet-core.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.libs.udpipe/src/org/txm/libs/udpipe/Activator.java
===================================================================
--- tmp/org.txm.libs.udpipe/src/org/txm/libs/udpipe/Activator.java	(revision 0)
+++ tmp/org.txm.libs.udpipe/src/org/txm/libs/udpipe/Activator.java	(revision 3120)
@@ -0,0 +1,32 @@
+package org.txm.libs.udpipe;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+	
+	private static BundleContext context;
+	
+	public static BundleContext getContext() {
+		return context;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+	 */
+	@Override
+	public void start(BundleContext bundleContext) throws Exception {
+		Activator.context = bundleContext;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+	 */
+	@Override
+	public void stop(BundleContext bundleContext) throws Exception {
+		Activator.context = null;
+	}
+	
+}

Property changes on: tmp/org.txm.libs.udpipe/src/org/txm/libs/udpipe/Activator.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.libs.udpipe/build.properties
===================================================================
--- tmp/org.txm.libs.udpipe/build.properties	(revision 0)
+++ tmp/org.txm.libs.udpipe/build.properties	(revision 3120)
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               lib/

Property changes on: tmp/org.txm.libs.udpipe/build.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.libs.udpipe/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- tmp/org.txm.libs.udpipe/.settings/org.eclipse.jdt.core.prefs	(revision 0)
+++ tmp/org.txm.libs.udpipe/.settings/org.eclipse.jdt.core.prefs	(revision 3120)
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8

Property changes on: tmp/org.txm.libs.udpipe/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.libs.udpipe/.classpath
===================================================================
--- tmp/org.txm.libs.udpipe/.classpath	(revision 0)
+++ tmp/org.txm.libs.udpipe/.classpath	(revision 3120)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry exported="true" kind="lib" path="lib/hk2-api-2.6.1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/hk2-locator-2.6.1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/hk2-utils-2.6.1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/jakarta.ws.rs-api-2.1.6.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/jersey-client.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/jersey-common.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/jersey-container-servlet-core.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/jersey-container-servlet.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/jersey-hk2.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/jersey-media-jaxb.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/jersey-media-json-binding.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/jersey-media-sse.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/jersey-server.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/udpipe.jar"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Property changes on: tmp/org.txm.libs.udpipe/.classpath
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.libs.udpipe/META-INF/MANIFEST.MF
===================================================================
--- tmp/org.txm.libs.udpipe/META-INF/MANIFEST.MF	(revision 0)
+++ tmp/org.txm.libs.udpipe/META-INF/MANIFEST.MF	(revision 3120)
@@ -0,0 +1,123 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.txm.libs.udpipe
+Bundle-SymbolicName: org.txm.libs.udpipe
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.txm.libs.udpipe.Activator
+Require-Bundle: org.eclipse.core.runtime
+BBundle-RequiredExecutionEnvironment: JavaSE-10
+Automatic-Module-Name: org.txm.libs.udpipe
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: lib/hk2-api-2.6.1.jar,
+ lib/hk2-locator-2.6.1.jar,
+ lib/hk2-utils-2.6.1.jar,
+ lib/jakarta.ws.rs-api-2.1.6.jar,
+ lib/jersey-client.jar,
+ lib/jersey-common.jar,
+ lib/jersey-container-servlet-core.jar,
+ lib/jersey-container-servlet.jar,
+ lib/jersey-hk2.jar,
+ lib/jersey-media-jaxb.jar,
+ lib/jersey-media-json-binding.jar,
+ lib/jersey-media-sse.jar,
+ lib/jersey-server.jar,
+ lib/udpipe.jar,
+ .
+Export-Package: .,
+ com.sun.research.ws.wadl,
+ cz.cuni.mff.ufal.udpipe,
+ javax.ws.rs,
+ javax.ws.rs.client,
+ javax.ws.rs.container,
+ javax.ws.rs.core,
+ javax.ws.rs.ext,
+ javax.ws.rs.sse,
+ jersey.repackaged.org.objectweb.asm,
+ org.glassfish.hk2.api,
+ org.glassfish.hk2.api.messaging,
+ org.glassfish.hk2.extension,
+ org.glassfish.hk2.internal,
+ org.glassfish.hk2.utilities,
+ org.glassfish.hk2.utilities.binding,
+ org.glassfish.hk2.utilities.cache,
+ org.glassfish.hk2.utilities.cache.internal,
+ org.glassfish.hk2.utilities.general,
+ org.glassfish.hk2.utilities.general.internal,
+ org.glassfish.hk2.utilities.reflection,
+ org.glassfish.hk2.utilities.reflection.internal,
+ org.glassfish.jersey,
+ org.glassfish.jersey.client,
+ org.glassfish.jersey.client.authentication,
+ org.glassfish.jersey.client.filter,
+ org.glassfish.jersey.client.inject,
+ org.glassfish.jersey.client.internal,
+ org.glassfish.jersey.client.internal.inject,
+ org.glassfish.jersey.client.internal.jdkconnector,
+ org.glassfish.jersey.client.internal.routing,
+ org.glassfish.jersey.client.spi,
+ org.glassfish.jersey.inject.hk2,
+ org.glassfish.jersey.internal,
+ org.glassfish.jersey.internal.config,
+ org.glassfish.jersey.internal.guava,
+ org.glassfish.jersey.internal.inject,
+ org.glassfish.jersey.internal.jsr166,
+ org.glassfish.jersey.internal.l10n,
+ org.glassfish.jersey.internal.routing,
+ org.glassfish.jersey.internal.sonar,
+ org.glassfish.jersey.internal.spi,
+ org.glassfish.jersey.internal.util,
+ org.glassfish.jersey.internal.util.collection,
+ org.glassfish.jersey.jaxb.internal,
+ org.glassfish.jersey.jsonb,
+ org.glassfish.jersey.jsonb.internal,
+ org.glassfish.jersey.logging,
+ org.glassfish.jersey.media.sse,
+ org.glassfish.jersey.media.sse.internal,
+ org.glassfish.jersey.message,
+ org.glassfish.jersey.message.internal,
+ org.glassfish.jersey.model,
+ org.glassfish.jersey.model.internal,
+ org.glassfish.jersey.model.internal.spi,
+ org.glassfish.jersey.process,
+ org.glassfish.jersey.process.internal,
+ org.glassfish.jersey.server,
+ org.glassfish.jersey.server.filter,
+ org.glassfish.jersey.server.filter.internal,
+ org.glassfish.jersey.server.internal,
+ org.glassfish.jersey.server.internal.inject,
+ org.glassfish.jersey.server.internal.monitoring,
+ org.glassfish.jersey.server.internal.monitoring.core,
+ org.glassfish.jersey.server.internal.monitoring.jmx,
+ org.glassfish.jersey.server.internal.process,
+ org.glassfish.jersey.server.internal.routing,
+ org.glassfish.jersey.server.internal.scanning,
+ org.glassfish.jersey.server.internal.sonar,
+ org.glassfish.jersey.server.model,
+ org.glassfish.jersey.server.model.internal,
+ org.glassfish.jersey.server.monitoring,
+ org.glassfish.jersey.server.spi,
+ org.glassfish.jersey.server.spi.internal,
+ org.glassfish.jersey.server.wadl,
+ org.glassfish.jersey.server.wadl.config,
+ org.glassfish.jersey.server.wadl.internal,
+ org.glassfish.jersey.server.wadl.internal.generators,
+ org.glassfish.jersey.server.wadl.internal.generators.resourcedoc,
+ org.glassfish.jersey.server.wadl.internal.generators.resourcedoc.model,
+ org.glassfish.jersey.server.wadl.internal.generators.resourcedoc.xhtml,
+ org.glassfish.jersey.server.wadl.processor,
+ org.glassfish.jersey.servlet,
+ org.glassfish.jersey.servlet.async,
+ org.glassfish.jersey.servlet.init,
+ org.glassfish.jersey.servlet.init.internal,
+ org.glassfish.jersey.servlet.internal,
+ org.glassfish.jersey.servlet.internal.spi,
+ org.glassfish.jersey.servlet.spi,
+ org.glassfish.jersey.spi,
+ org.glassfish.jersey.uri,
+ org.glassfish.jersey.uri.internal,
+ org.jvnet.hk2.annotations,
+ org.jvnet.hk2.component,
+ org.jvnet.hk2.external.generator,
+ org.jvnet.hk2.external.runtime,
+ org.jvnet.hk2.internal,
+ org.txm.libs.udpipe

Property changes on: tmp/org.txm.libs.udpipe/META-INF/MANIFEST.MF
___________________________________________________________________
Added: svn:mime-type
   + text/plain

