Révision 2935

tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/commands/ImportCONNLUAnnotations.java (revision 2935)
1
// Copyright © 2010-2020 ENS de Lyon., University of Franche-Comté
2
// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
3
// Lyon 2, University of Franche-Comté, University of Nice
4
// Sophia Antipolis, University of Paris 3.
5
// 
6
// The TXM platform is free software: you can redistribute it
7
// and/or modify it under the terms of the GNU General Public
8
// License as published by the Free Software Foundation,
9
// either version 2 of the License, or (at your option) any
10
// later version.
11
// 
12
// The TXM platform is distributed in the hope that it will be
13
// useful, but WITHOUT ANY WARRANTY; without even the implied
14
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15
// PURPOSE. See the GNU General Public License for more
16
// details.
17
// 
18
// You should have received a copy of the GNU General
19
// Public License along with the TXM platform. If not, see
20
// http://www.gnu.org/licenses.
21
// 
22
// 
23
// 
24
// $LastChangedDate:$
25
// $LastChangedRevision:$
26
// $LastChangedBy:$ 
27
//
28
package org.txm.tigersearch.commands;
29

  
30
import java.io.BufferedReader;
31
import java.io.File;
32
import java.io.FileFilter;
33
import java.io.IOException;
34
import java.util.HashMap;
35

  
36
import javax.xml.stream.XMLStreamException;
37

  
38
import org.eclipse.core.commands.AbstractHandler;
39
import org.eclipse.core.commands.ExecutionEvent;
40
import org.eclipse.core.commands.ExecutionException;
41
import org.eclipse.jface.viewers.IStructuredSelection;
42
import org.eclipse.ui.handlers.HandlerUtil;
43
import org.kohsuke.args4j.Option;
44
import org.txm.core.messages.TXMCoreMessages;
45
import org.txm.rcp.commands.workspace.UpdateCorpus;
46
import org.txm.rcp.swt.widget.parameters.ParametersDialog;
47
import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
48
import org.txm.searchengine.cqp.corpus.CQPCorpus;
49
import org.txm.searchengine.cqp.corpus.MainCorpus;
50
import org.txm.searchengine.cqp.serverException.CqiServerError;
51
import org.txm.utils.io.FileCopy;
52
import org.txm.utils.io.IOUtils;
53
import org.txm.utils.logger.Log;
54
import org.txm.xml.xmltxm.XMLTXMWordPropertiesInjection;
55

  
56
import cern.colt.Arrays;
57

  
58
/**
59
 * Import CONNLU annotations into a TXM corpus
60
 * 
61
 * IF the corpus already contains CONNLU annotations, they are replaced
62
 * 
63
 * @author mdecorde.
64
 */
65
public class ImportCONNLUAnnotations extends AbstractHandler {
66
	
67
	public static final String ID = ImportCONNLUAnnotations.class.getName();
68
	
69
	@Option(name = "connluDirectory", usage = "connluDirectory", widget = "Folder", required = true, def = "connlu-directory")
70
	File connluDirectory;
71
	
72
	@Option(name = "propertiesPrefix", usage = "optional prefix for the properties to create", widget = "String", required = true, def = "ud")
73
	String propertiesPrefix;
74
	
75
	/*
76
	 * (non-Javadoc)
77
	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
78
	 */
79
	@Override
80
	public Object execute(final ExecutionEvent event) throws ExecutionException {
81
		
82
		IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
83
		
84
		Object s = selection.getFirstElement();
85
		if (!(s instanceof MainCorpus)) {
86
			Log.warning("Selection is not a corpus. Aborting.");
87
			return null;
88
		}
89
		
90
		ParametersDialog.open(this);
91
		if (connluDirectory == null || !connluDirectory.exists() || !connluDirectory.isDirectory() || connluDirectory.listFiles().length == 0) {
92
			Log.warning("Error: connlu directory is empty: " + connluDirectory);
93
			return null;
94
		}
95
		
96
		CQPCorpus corpus = (CQPCorpus) s;
97
		MainCorpus mainCorpus = corpus.getMainCorpus();
98
		
99
		try {
100
			return importAnnotations(mainCorpus, connluDirectory, propertiesPrefix);
101
		}
102
		catch (Exception e) {
103
			Log.warning(e);
104
			e.printStackTrace();
105
		}
106
		
107
		return null;
108
	}
109
	
110
	/**
111
	 * 
112
	 * if import CONNLU annotations in the corpus with the same name already exists, it is replaced
113
	 * 
114
	 * @param corpus
115
	 * @param connluDirectory
116
	 * @param propertiesPrefix
117
	 * @return the number of imported annotations
118
	 * @throws CqiClientException
119
	 * @throws CqiServerError
120
	 * @throws IOException
121
	 * @throws XMLStreamException
122
	 */
123
	public static int importAnnotations(MainCorpus mainCorpus, File connluDirectory, String propertiesPrefix) throws IOException,
124
			CqiServerError, CqiClientException, XMLStreamException {
125
		Log.info(TXMCoreMessages.bind("Importing CONNL-u annotations of {0} in {1} using the ''{2}'' prefix...", connluDirectory, mainCorpus, propertiesPrefix));
126
		
127
		File[] files = connluDirectory.listFiles(new FileFilter() {
128
			
129
			@Override
130
			public boolean accept(File file) {
131
				return file.isFile() && file.getName().endsWith(".conllu");
132
			}
133
		});
134
		
135
		int nTextProcessed = 0;
136
		int nWords = 0;
137
		int nWordsInserted = 0;
138
		for (File coonluFile : files) {
139
			
140
			String textid = coonluFile.getName().substring(0, coonluFile.getName().length() - 7);
141
			Log.info("** processing text: " + textid);
142
			File xmltxmFile = mainCorpus.getProject().getText(textid).getXMLTXMFile();
143
			File xmltxmUpdatedFile = new File(System.getProperty("java.io.tmpdir"), xmltxmFile.getName());
144
			
145
			XMLTXMWordPropertiesInjection processor = new XMLTXMWordPropertiesInjection(xmltxmFile);
146
			HashMap<String, HashMap<String, String>> rules = new HashMap<>();
147
			processor.setProperties(rules);
148
			
149
			BufferedReader reader = IOUtils.getReader(coonluFile);
150
			String line = reader.readLine();
151
			String[] propNames = { "id", "form", "lemma", "upos", "xpos", "feats", "head", "deprel", "deps", "misc" };
152
			
153
			int nWords2 = 0;
154
			int nLine = 0;
155
			while (line != null) {
156
				nLine++;
157
				if (line.startsWith("#") || line.length() == 0) {
158
					line = reader.readLine();
159
					continue; // comment
160
				}
161
				
162
				String[] split = line.split("\t", 10);
163
				if (split.length < 10) {
164
					Log.warning("Error: line " + nLine + " : " + line + " -> " + Arrays.toString(split) + " len=" + split.length);
165
					line = reader.readLine();
166
					continue; // comment
167
				}
168
				
169
				String id = split[9];
170
				int from = id.indexOf("XmlId=") + 6;
171
				if (from < 6) {
172
					Log.warning("Error: line " + nLine + " with no 'XmlId=': " + line);
173
					line = reader.readLine();
174
					continue;
175
				}
176
				id = id.substring(from);
177
				// System.out.println("ID=" + id);
178
				
179
				if (id.contains("-")) continue; // TODO to manage later
180
				
181
				HashMap<String, String> properties = new HashMap<>();
182
				for (int i = 0; i < split.length; i++) {
183
					properties.put(propertiesPrefix + propNames[i], split[i]); // add the property name using the prefix
184
				}
185
				
186
				processor.addProperty(id, properties);
187
				nWords2++;
188
				line = reader.readLine();
189
			}
190
			reader.close();
191
			
192
			if (nWords2 == 0) {
193
				Log.warning("** No annotation found in " + coonluFile);
194
			}
195
			
196
			nWords += nWords2;
197
			
198
			Log.info("** loading annotations from : " + coonluFile);
199
			
200
			if (processor.process(xmltxmUpdatedFile)) {
201
				if (xmltxmFile.delete() && FileCopy.copy(xmltxmUpdatedFile, xmltxmFile)) {
202
					
203
				}
204
				else {
205
					Log.warning("** Warning: annotation import failed for replace the corpus XML-TXM file: " + xmltxmFile + ". TEMP file: " + xmltxmUpdatedFile);
206
					return 0;
207
				}
208
			}
209
			else {
210
				Log.warning("** Warning: annotation import failed for text: " + textid);
211
				return 0;
212
			}
213
			
214
			if (processor.getNInsertions() == 0) {
215
				Log.warning("** No annotation imported in " + textid);
216
			}
217
			
218
			nWordsInserted += processor.getNInsertions();
219
			nTextProcessed++;
220
		}
221
		
222
		if (nTextProcessed == 0) {
223
			Log.warning("** No text to process. Aborting.");
224
			return 0;
225
		}
226
		
227
		if (nWords == 0) {
228
			Log.warning("** No annotation to import in corpus. Aborting.");
229
			return 0;
230
		}
231
		
232
		if (nWordsInserted == 0) {
233
			Log.warning("** No annotation imported. Aborting.");
234
			return 0;
235
		}
236
		
237
		Log.info("XML-TXM source files updated. Updating indexes...");
238
		
239
		UpdateCorpus.update(mainCorpus);
240
		
241
		Log.info("Done.");
242
		
243
		return 0;
244
	}
245
}
0 246

  
tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/commands/ExportCorpusAsCONNLU.java (revision 2935)
1
// Copyright © 2010-2020 ENS de Lyon., University of Franche-Comté
2
// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
3
// Lyon 2, University of Franche-Comté, University of Nice
4
// Sophia Antipolis, University of Paris 3.
5
// 
6
// The TXM platform is free software: you can redistribute it
7
// and/or modify it under the terms of the GNU General Public
8
// License as published by the Free Software Foundation,
9
// either version 2 of the License, or (at your option) any
10
// later version.
11
// 
12
// The TXM platform is distributed in the hope that it will be
13
// useful, but WITHOUT ANY WARRANTY; without even the implied
14
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15
// PURPOSE. See the GNU General Public License for more
16
// details.
17
// 
18
// You should have received a copy of the GNU General
19
// Public License along with the TXM platform. If not, see
20
// http://www.gnu.org/licenses.
21
// 
22
// 
23
// 
24
// $LastChangedDate:$
25
// $LastChangedRevision:$
26
// $LastChangedBy:$ 
27
//
28
package org.txm.tigersearch.commands;
29

  
30
import java.io.File;
31
import java.io.IOException;
32
import java.io.RandomAccessFile;
33
import java.nio.MappedByteBuffer;
34
import java.nio.channels.FileChannel;
35

  
36
import org.apache.log4j.BasicConfigurator;
37
import org.eclipse.core.commands.AbstractHandler;
38
import org.eclipse.core.commands.ExecutionEvent;
39
import org.eclipse.core.commands.ExecutionException;
40
import org.eclipse.jface.dialogs.MessageDialog;
41
import org.eclipse.jface.viewers.IStructuredSelection;
42
import org.eclipse.swt.SWT;
43
import org.eclipse.swt.widgets.DirectoryDialog;
44
import org.eclipse.ui.handlers.HandlerUtil;
45
import org.txm.searchengine.cqp.AbstractCqiClient;
46
import org.txm.searchengine.cqp.CQPSearchEngine;
47
import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
48
import org.txm.searchengine.cqp.clientExceptions.UnexpectedAnswerException;
49
import org.txm.searchengine.cqp.corpus.CQPCorpus;
50
import org.txm.searchengine.cqp.corpus.MainCorpus;
51
import org.txm.searchengine.cqp.serverException.CqiServerError;
52
import org.txm.searchengine.ts.InternalCorpusQueryManagerLocal2;
53
import org.txm.searchengine.ts.TSCorpus;
54
import org.txm.searchengine.ts.TSCorpusManager;
55
import org.txm.utils.ConsoleProgressBar;
56
import org.txm.utils.DeleteDir;
57
import org.txm.utils.io.FileCopy;
58
import org.txm.utils.io.IOUtils;
59
import org.txm.utils.logger.Log;
60

  
61
import ims.tiger.corpus.Sentence;
62
import ims.tiger.corpus.T_Node;
63
import ims.tiger.index.reader.Index;
64
import ims.tiger.index.reader.IndexException;
65
import ims.tiger.index.writer.IndexBuilderErrorHandler;
66
import ims.tiger.index.writer.SimpleErrorHandler;
67
import ims.tiger.index.writer.XMLIndexing;
68
import ims.tiger.query.api.QueryIndexException;
69
import ims.tiger.query.processor.CorpusQueryProcessor;
70

  
71
/**
72
 * Import TIGERSearch annotations into a TXM corpus
73
 * 
74
 * IF the corpus alreasy wontains TIGER annotations, they are replaced
75
 * 
76
 * The annotations are given using a TIGERSEarch binary corpus OR a TIGER source directory using a "main.xml" file
77
 * 
78
 * @author mdecorde.
79
 */
80
public class ExportCorpusAsCONNLU extends AbstractHandler {
81
	
82
	public static final String ID = "org.txm.rcp.commands.function.ComputeTSIndex"; //$NON-NLS-1$
83
	
84
	/*
85
	 * (non-Javadoc)
86
	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
87
	 */
88
	@Override
89
	public Object execute(final ExecutionEvent event) throws ExecutionException {
90
		
91
		IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
92
		
93
		Object s = selection.getFirstElement();
94
		if (s instanceof MainCorpus) {
95
			CQPCorpus corpus = (CQPCorpus) s;
96
			MainCorpus mainCorpus = corpus.getMainCorpus();
97
			
98
			File tigerCorpusDirectory = null;
99
			DirectoryDialog dialog = new DirectoryDialog(HandlerUtil.getActiveShell(event), SWT.OPEN);
100
			String path = dialog.open();
101
			if (path == null) {
102
				Log.warning("Aborting annotation importation.");
103
				return null;
104
			}
105
			else {
106
				tigerCorpusDirectory = new File(path);
107
			}
108
			
109
			File tigerDirectory = new File(mainCorpus.getProjectDirectory(), "tiger");
110
			File tigerCorpusExistingDirectory = new File(tigerDirectory, tigerCorpusDirectory.getName());
111
			if (tigerCorpusExistingDirectory.exists()) {
112
				boolean doIt = MessageDialog.openConfirm(HandlerUtil.getActiveShell(event), "Replace existing annotations", "TIGERSearch annotations already exists, replace them ?");
113
				if (!doIt) {
114
					Log.warning("Aborting annotation importation.");
115
					return null;
116
				}
117
			}
118
			
119
			if (new File(tigerCorpusDirectory, "word.lexicon").exists() && new File(tigerCorpusDirectory, "corpus_config.xml").exists()) {
120
				// ok this is a TIGERSearch binary corpus
121
			}
122
			else {
123
				
124
				// need to build a TIGERSearch binary corpus
125
				File tigerBinaryCorpusDirectory = new File(tigerCorpusDirectory, "tiger");
126
				if (!buildTIGERCorpus(mainCorpus, tigerCorpusDirectory, tigerBinaryCorpusDirectory)) {
127
					Log.warning("Aborting annotation importation.");
128
					return null;
129
				}
130
				tigerCorpusDirectory = new File(tigerBinaryCorpusDirectory, corpus.getName());
131
			}
132
			
133
			try {
134
				return importAnnotations(mainCorpus, tigerCorpusDirectory, "editionId");
135
			}
136
			catch (Exception e) {
137
				e.printStackTrace();
138
				return null;
139
			}
140
		}
141
		else {
142
			Log.warning("Selection is not a corpus. Aborting.");
143
			return null;
144
		}
145
	}
146
	
147
	private boolean buildTIGERCorpus(MainCorpus corpus, File sourceDirectory, File tigerDir) {
148
		tigerDir.mkdirs();
149
		
150
		File configfile = new File(tigerDir, "tigersearch.logprop");
151
		if (!configfile.exists()) {
152
			TSCorpus.createLogPropFile(tigerDir);
153
		}
154
		
155
		BasicConfigurator.configure();
156
		File master = new File(sourceDirectory, "main.xml");
157
		if (!master.exists()) master = new File(sourceDirectory, "master.xml");
158
		
159
		if (!master.exists()) {
160
			Log.warning("Error: Can't create TIGERSearch corpus: no main or master file found in " + sourceDirectory);
161
			return false;
162
		}
163
		String uri = master.getAbsolutePath(); // TIGER corpus source root file
164
		File tigerBinDir = new File(tigerDir, corpus.getName());
165
		tigerBinDir.mkdirs();
166
		try {
167
			IndexBuilderErrorHandler handler = new SimpleErrorHandler(tigerBinDir.getAbsolutePath()) {
168
				
169
				@Override
170
				public void setMessage(String message) {}
171
				
172
				@Override
173
				public void setNumberOfSentences(int number) {}
174
				
175
				@Override
176
				public void setProgressBar(int value) {}
177
			};
178
			
179
			XMLIndexing indexing = new XMLIndexing(corpus.getName(), uri, tigerBinDir.getAbsolutePath(), handler, false);
180
			
181
			indexing.startIndexing();
182
			
183
			File logs = new File(tigerBinDir, "indexing.log");
184
			
185
			String txt = IOUtils.getText(logs);
186
			if (txt.contains("Error in corpus graph ")) {
187
				Log.warning("Error while importing TIGER corpus: " + txt);
188
				return false;
189
			}
190
		}
191
		catch (Exception e) {
192
			System.out.println(e.getMessage());
193
			return false;
194
		}
195
		return true;
196
	}
197
	
198
	/**
199
	 * 
200
	 * if aTIGER corpus with the same name already exists, it is replaced
201
	 * 
202
	 * @param corpus
203
	 * @param tigerCorpusDirectory
204
	 * @return the number of imported annotations
205
	 * @throws IndexException
206
	 * @throws QueryIndexException
207
	 * @throws CqiClientException
208
	 * @throws CqiServerError
209
	 * @throws IOException
210
	 * @throws UnexpectedAnswerException
211
	 */
212
	public static int importAnnotations(MainCorpus corpus, File tigerCorpusDirectory, String wordIdAttribute) throws IndexException, QueryIndexException, UnexpectedAnswerException, IOException,
213
			CqiServerError,
214
			CqiClientException {
215
		
216
		// TXM corpus files
217
		File tigerDirectory = new File(corpus.getProjectDirectory(), "tiger");
218
		File tigerCorpusExistingDirectory = new File(tigerDirectory, corpus.getName());
219
		DeleteDir.deleteDirectory(tigerCorpusExistingDirectory);
220
		tigerCorpusExistingDirectory.mkdirs();
221
		
222
		File configfile = new File(tigerDirectory, "tigersearch.logprop");
223
		if (!configfile.exists()) {
224
			TSCorpus.createLogPropFile(tigerDirectory);
225
		}
226
		
227
		AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
228
		
229
		TSCorpusManager manager = new TSCorpusManager(tigerCorpusDirectory.getParentFile(), configfile);
230
		
231
		TSCorpus tcorpus = manager.getCorpus(tigerCorpusDirectory.getName());
232
		InternalCorpusQueryManagerLocal2 tigermanager = tcorpus.manager;
233
		CorpusQueryProcessor processor = tigermanager.getQueryProcessor();
234
		
235
		Index index = processor.getIndex();
236
		int size = 0;
237
		for (int nr = 0; nr < index.getNumberOfGraphs(); nr++) {
238
			size += index.getNumberOfTNodes(nr);
239
		}
240
		
241
		if (size == 0) {
242
			Log.warning("No word found in the TIGERSearch corpus: " + tigerCorpusDirectory + ". Aborting.");
243
			return 0;
244
		}
245
		
246
		Log.info("Importing " + size + " word annotations...");
247
		
248
		// compute start position of sentences
249
		int[] starts = new int[index.getNumberOfGraphs()];
250
		for (int i = 0; i < index.getNumberOfGraphs(); i++) {
251
			starts[i] = 0;
252
			if (i > 0) {
253
				starts[i] += index.getNumberOfTNodes(i - 1) + starts[i - 1];
254
			}
255
		}
256
		
257
		File offsetsFile = new File(tigerCorpusExistingDirectory, "offsets.data");
258
		RandomAccessFile offsetsRAFile = new RandomAccessFile(offsetsFile, "rw");
259
		FileChannel offsetsFileChannel = offsetsRAFile.getChannel();
260
		MappedByteBuffer offsetsMapped = offsetsFileChannel.map(FileChannel.MapMode.READ_WRITE, 0, size * Integer.BYTES);
261
		// out.putInt(positions[i])
262
		
263
		File presencesFile = new File(tigerCorpusExistingDirectory, "presences.data");
264
		RandomAccessFile presencesRAFile = new RandomAccessFile(presencesFile, "rw");
265
		FileChannel presencesFileChannel = presencesRAFile.getChannel();
266
		MappedByteBuffer presencesMapped = presencesFileChannel.map(FileChannel.MapMode.READ_WRITE, 0, size);
267
		
268
		int numberOfWordsAnnotated = 0;
269
		
270
		// for each sentence
271
		ConsoleProgressBar cpb = new ConsoleProgressBar(index.getNumberOfGraphs());
272
		for (int nr = 0; nr < index.getNumberOfGraphs(); nr++) {
273
			cpb.tick();
274
			int sent_size = index.getNumberOfTNodes(nr);
275
			Sentence sent = tcorpus.manager.getSentence(nr);
276
			
277
			String[] ids = new String[sent_size];
278
			int[] tigerPositions = new int[sent_size];
279
			for (int t = 0; t < sent_size; t++) {
280
				T_Node terminal = (T_Node) sent.getTerminalAt(t);
281
				ids[t] = terminal.getFeature(wordIdAttribute);
282
				
283
				// try fixing ID
284
				if (ids[t].startsWith("w")) {
285
					if (!ids[t].startsWith("w_")) {
286
						ids[t] = "w_" + ids[t].substring(1);
287
					}
288
				}
289
				else {
290
					ids[t] = "w_" + ids[t];
291
				}
292
				tigerPositions[t] = starts[nr] + t;
293
				// System.out.println("T id="+terminal.getID());
294
			}
295
			
296
			int[] ids_idx = CQI.str2Id(corpus.getProperty("id").getQualifiedName(), ids);
297
			Integer[] cqpPositions = new Integer[sent_size];
298
			Integer[] offsets = new Integer[sent_size];
299
			for (int t = 0; t < sent_size; t++) {
300
				if (ids_idx[t] >= 0) {
301
					int[] positions = CQI.id2Cpos(corpus.getProperty("id").getQualifiedName(), ids_idx[t]);
302
					if (positions.length > 1) {
303
						Log.warning("Warning: multiple CQP positions for word_id=" + ids[t]);
304
					}
305
					cqpPositions[t] = positions[0]; // take the first position
306
				}
307
				else { // word not in the CQP corpus
308
					Log.warning("Could not find word for id=" + ids[t]);
309
					cqpPositions[t] = null;
310
				}
311
				
312
				if (cqpPositions[t] != null) {
313
					offsets[t] = cqpPositions[t] - tigerPositions[t];
314
				}
315
				else {
316
					offsets[t] = null;
317
				}
318
			}
319
			// System.out.println("ids="+Arrays.toString(ids));
320
			// System.out.println("cqp indexes="+Arrays.toString(ids_idx));
321
			// System.out.println("tiger positions="+Arrays.toString(tigerPositions));
322
			// System.out.println("cqp positions="+Arrays.toString(cqpPositions));
323
			// System.out.println("offsets="+Arrays.toString(offsets));
324
			
325
			// writing data to offset and presences files
326
			for (int t = 0; t < sent_size; t++) {
327
				
328
				if (offsets[t] != null) {
329
					numberOfWordsAnnotated++;
330
					presencesMapped.put((byte) 1);
331
					offsetsMapped.putInt(offsets[t]);
332
				}
333
				else {
334
					presencesMapped.put((byte) 0);
335
					offsetsMapped.putInt(0);
336
				}
337
			}
338
		}
339
		cpb.done();
340
		
341
		offsetsFileChannel.close();
342
		offsetsRAFile.close();
343
		presencesFileChannel.close();
344
		presencesRAFile.close();
345
		
346
		Log.info("Finalizing TIGERSearch corpus");
347
		if (numberOfWordsAnnotated > 0) {
348
			FileCopy.copyFiles(tigerCorpusDirectory, tigerCorpusExistingDirectory);
349
			Log.info("Done. " + numberOfWordsAnnotated + " words annotated.");
350
		}
351
		else {
352
			Log.warning("Warning: no words could be aligned with the CQP corpus. Aborting");
353
		}
354
		
355
		return numberOfWordsAnnotated;
356
	}
357
}
0 358

  
tmp/org.txm.tigersearch.rcp/plugin.xml (revision 2935)
34 34
            id="org.txm.tigersearch.commands.ImportTIGERAnnotations"
35 35
            name="Import TIGERSearch Annotations...">
36 36
      </command>
37
      <command
38
            categoryId="TIGERSearch4TXM.commands.category"
39
            defaultHandler="org.txm.tigersearch.commands.ImportCONNLUAnnotations"
40
            id="org.txm.tigersearch.commands.ImportCONNLUAnnotations"
41
            name="Import CONNL-u Annotations...">
42
      </command>
43
      <command
44
            categoryId="TIGERSearch4TXM.commands.category"
45
            defaultHandler="org.txm.tigersearch.commands.ExportCorpusAsCONNLU"
46
            id="org.txm.tigersearch.commands.ExportCorpusAsCONNLU"
47
            name="Export CONNL-u Annotations...">
48
      </command>
37 49
   </extension>
38 50
   <extension
39 51
         point="org.eclipse.core.expressions.propertyTesters">
......
195 207
                  </or>
196 208
               </visibleWhen>
197 209
            </command>
210
            <command
211
                  commandId="org.txm.tigersearch.commands.ImportCONNLUAnnotations"
212
                  icon="icons/functions/UDplus.png"
213
                  style="push">
214
               <visibleWhen
215
                     checkEnabled="false">
216
                  <or>
217
                     <test
218
                           forcePluginActivation="true"
219
                           property="org.txm.rcp.testers.TIGERSearchReady"
220
                           value="TIGERSearchReady">
221
                     </test>
222
                     <reference
223
                           definitionId="OneMainCorpusSelected">
224
                     </reference>
225
                  </or>
226
               </visibleWhen>
227
            </command>
198 228
         </menu>
199 229
      </menuContribution>
230
      <menuContribution
231
            locationURI="menu:menu.file.export">
232
         <command
233
               commandId="org.txm.tigersearch.commands.ExportCorpusAsCONNLU"
234
               icon="icons/functions/UD.png"
235
               label="Export corpus as CONNL-u..."
236
               style="push">
237
            <visibleWhen
238
                  checkEnabled="false">
239
               <reference
240
                     definitionId="OneMainCorpusSelected">
241
               </reference>
242
            </visibleWhen>
243
         </command>
244
      </menuContribution>
200 245
   </extension>
201 246
   <extension
202 247
         point="org.eclipse.ui.editors">
tmp/org.txm.core/src/java/org/txm/xml/UDPipeAnnotate.java (revision 2935)
1
package org.txm.xml;
2

  
3

  
4
public class UDPipeAnnotate {
5
	
6
}
tmp/org.txm.core/src/java/org/txm/xml/xmltxm/XMLTXMWordPropertiesInjection.java (revision 2935)
1
// Copyright © 2010-2013 ENS de Lyon.
2
// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
3
// Lyon 2, University of Franche-Comté, University of Nice
4
// Sophia Antipolis, University of Paris 3.
5
//
6
// The TXM platform is free software: you can redistribute it
7
// and/or modify it under the terms of the GNU General Public
8
// License as published by the Free Software Foundation,
9
// either version 2 of the License, or (at your option) any
10
// later version.
11
//
12
// The TXM platform is distributed in the hope that it will be
13
// useful, but WITHOUT ANY WARRANTY; without even the implied
14
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15
// PURPOSE. See the GNU General Public License for more
16
// details.
17
//
18
// You should have received a copy of the GNU General
19
// Public License along with the TXM platform. If not, see
20
// http://www.gnu.org/licenses.
21
//
22
//
23
//
24
// $LastChangedDate: 2016-03-02 14:17:06 +0100 (mer., 02 mars 2016) $
25
// $LastChangedRevision: 3134 $
26
// $LastChangedBy: mdecorde $
27
//
28
package org.txm.xml.xmltxm;
29

  
30
import java.io.File;
31
import java.io.IOException;
32
import java.util.ArrayList;
33
import java.util.Arrays;
34
import java.util.HashMap;
35
import java.util.List;
36
import java.util.Map.Entry;
37

  
38
import javax.xml.stream.XMLStreamException;
39

  
40
import org.txm.xml.IdentityHook;
41
import org.txm.xml.XMLProcessor;
42
import org.txm.xml.XPathHookActivator;
43
import org.txm.xml.XPathsHookActivator;
44

  
45
/**
46
 * The Class AnnotationInjection.
47
 *
48
 * @author mdecorde
49
 * 
50
 *         inject annotation from a stand-off file into a xml-tei-txm file
51
 */
52

  
53
public class XMLTXMWordPropertiesInjection extends XMLProcessor {
54
	
55
	HashMap<String, HashMap<String, String>> rules;
56
	
57
	XPathHookActivator activator;
58
	
59
	IdentityHook hook;
60
	
61
	int nInsertions = 0;
62
	
63
	public XMLTXMWordPropertiesInjection(File infile) throws IOException, XMLStreamException {
64
		super(infile);
65
	}
66
	
67
	public void addProperty(String id, HashMap<String, String> properties) throws IOException, XMLStreamException {
68
		if (rules != null) {
69
			rules.put(id, properties);
70
		}
71
	}
72
	
73
	public void setProperties(HashMap<String, HashMap<String, String>> rules) throws IOException, XMLStreamException {
74
		
75
		this.rules = rules;
76
		
77
		activator = new XPathHookActivator<>(hook, "//w");
78
		
79
		hook = new IdentityHook("word_hook", activator, this) {
80
			
81
			String id;
82
			
83
			boolean inAna = false;
84
			
85
			boolean inForm = false;
86
			
87
			boolean inW = false;
88
			
89
			ArrayList<String[]> anaValues = new ArrayList<>();
90
			
91
			ArrayList<String[]> formValues = new ArrayList<>();
92
			
93
			StringBuilder resp = new StringBuilder(), type = new StringBuilder(), value = new StringBuilder();
94
			
95
			@Override
96
			public boolean deactivate() {
97
				return true;
98
			}
99
			
100
			@Override
101
			public boolean _activate() {
102
				id = parser.getAttributeValue(null, "id");
103
				
104
				if (id != null && rules.containsKey(id)) {
105
					anaValues.clear(); // empty ana values
106
					formValues.clear(); // empty form values
107
					nInsertions++;
108
					return true;
109
				}
110
				else {
111
					return false;
112
				}
113
			}
114
			
115
			@Override
116
			protected void processStartElement() throws XMLStreamException, IOException {
117
				if (localname.equals("ana")) {
118
					// store values
119
					inAna = true;
120
					
121
					resp.setLength(0);
122
					resp.append(parser.getAttributeValue(null, "resp"));
123
					
124
					type.setLength(0);
125
					type.append(parser.getAttributeValue(null, "type"));
126
					
127
					value.setLength(0);
128
					return; // write ana later
129
				}
130
				else if (localname.equals("form")) {
131
					// store values
132
					inForm = true;
133
					
134
					type.setLength(0);
135
					if (parser.getAttributeValue(null, "type") != null) {
136
						type.append(parser.getAttributeValue(null, "type"));
137
					}
138
					
139
					value.setLength(0);
140
					return; // write form later
141
				}
142
				else {
143
					if (localname.equals("w")) inW = true;
144
					
145
					super.processStartElement();
146
				}
147
			}
148
			
149
			@Override
150
			protected void processCharacters() throws XMLStreamException {
151
				if (inAna || inForm) {
152
					value.append(parser.getText());
153
				}
154
				else if (inW) {
155
					
156
				}
157
				else {
158
					super.processCharacters();
159
				}
160
			}
161
			
162
			@Override
163
			protected void processEndElement() throws XMLStreamException {
164
				if (localname.equals("w")) {
165
					// update ana values
166
					HashMap<String, String> values = rules.get(id);
167
					
168
					for (String[] l : anaValues) { // update existing values
169
						if (values.containsKey(l[0])) {
170
							l[2] = values.get(l[0]);
171
							values.remove(l[0]);
172
						}
173
					}
174
					
175
					for (Entry<String, String> e : values.entrySet()) { // create new values
176
						anaValues.add(new String[] { "#" + e.getKey(), "#txm", e.getValue() });
177
					}
178
					
179
					// write forms
180
					for (String[] l : formValues) {
181
						writer.writeStartElement("txm:form");
182
						if (l[0].length() > 0) {
183
							writer.writeAttribute("type", l[0]);
184
						}
185
						writer.writeCharacters(l[1]);
186
						writer.writeEndElement();
187
					}
188
					writer.writeCharacters("\n");
189
					
190
					// write anas
191
					for (String[] l : anaValues) {
192
						writer.writeStartElement("txm:ana");
193
						writer.writeAttribute("resp", l[1]);
194
						writer.writeAttribute("type", l[0]);
195
						writer.writeCharacters(l[2]);
196
						writer.writeEndElement();
197
					}
198
					writer.writeCharacters("\n");
199
					
200
					// let parent writer the end of the w element
201
					inW = false;
202
					super.processEndElement();
203
				}
204
				else if (localname.equals("ana")) {
205
					anaValues.add(new String[] { type.toString(), resp.toString(), value.toString() });
206
					inAna = false;
207
					return; // write ana later
208
				}
209
				else if (localname.equals("form")) {
210
					formValues.add(new String[] { type.toString(), value.toString() });
211
					inForm = false;
212
					return; // write form later
213
				}
214
				else {
215
					super.processEndElement();
216
				}
217
			}
218
		};
219
	}
220
	
221
	public int getNInsertions() {
222
		return nInsertions;
223
	}
224
	
225
	public static void main(String[] args) {
226
		
227
		File infile = new File(System.getProperty("user.home"), "xml/srcmfmadridxmltxm/alexis-txm.xml");
228
		File outfile = new File(System.getProperty("user.home"), "xml/srcmfmadridxmltxm/alexis-txm-out.xml");
229
		
230
		try {
231
			XMLTXMWordPropertiesInjection processor = new XMLTXMWordPropertiesInjection(infile);
232
			HashMap<String, HashMap<String, String>> rules = new HashMap<>();
233
			
234
			HashMap<String, String> props = new HashMap<>();
235
			props.put("lol", "lolvalue");
236
			rules.put("w19_1303", props);
237
			processor.setProperties(rules);
238
			
239
			processor.process(outfile);
240
		}
241
		catch (Exception e) {
242
			// TODO Auto-generated catch block
243
			e.printStackTrace();
244
		}
245
	}
246
	
247
}
0 248

  
tmp/org.txm.core/META-INF/MANIFEST.MF (revision 2935)
1 1
Manifest-Version: 1.0
2
Export-Package: .,EDU.oswego.cs.dl.util.concurrent,EDU.oswego.cs.dl.ut
3
 il.concurrent.misc,antlr,antlr.ASdebug,antlr.actions.cpp,antlr.action
4
 s.csharp,antlr.actions.java,antlr.actions.python,antlr.build,antlr.co
5
 llections,antlr.collections.impl,antlr.debug,antlr.debug.misc,antlr.p
6
 reprocessor,ch.randelshofer.quaqua,ch.randelshofer.quaqua.border,ch.r
7
 andelshofer.quaqua.color,ch.randelshofer.quaqua.colorchooser,ch.rande
8
 lshofer.quaqua.datatransfer,ch.randelshofer.quaqua.ext.base64,ch.rand
9
 elshofer.quaqua.ext.batik.ext.awt,ch.randelshofer.quaqua.ext.batik.ex
10
 t.awt.image,ch.randelshofer.quaqua.ext.batik.ext.awt.image.codec.tiff
11
 ,ch.randelshofer.quaqua.ext.batik.ext.awt.image.codec.util,ch.randels
12
 hofer.quaqua.ext.batik.ext.awt.image.renderable,ch.randelshofer.quaqu
13
 a.ext.batik.ext.awt.image.rendered,ch.randelshofer.quaqua.ext.batik.i
14
 18n,ch.randelshofer.quaqua.ext.batik.util,ch.randelshofer.quaqua.ext.
15
 nanoxml,ch.randelshofer.quaqua.filechooser,ch.randelshofer.quaqua.ico
16
 n,ch.randelshofer.quaqua.images,ch.randelshofer.quaqua.jaguar,ch.rand
17
 elshofer.quaqua.jaguar.filechooser,ch.randelshofer.quaqua.jaguar.imag
18
 es,ch.randelshofer.quaqua.leopard,ch.randelshofer.quaqua.leopard.file
19
 chooser,ch.randelshofer.quaqua.leopard.images,ch.randelshofer.quaqua.
20
 osx,ch.randelshofer.quaqua.panther,ch.randelshofer.quaqua.panther.fil
21
 echooser,ch.randelshofer.quaqua.panther.images,ch.randelshofer.quaqua
22
 .subset,ch.randelshofer.quaqua.tiger,ch.randelshofer.quaqua.tiger.fil
23
 echooser,ch.randelshofer.quaqua.tiger.images,ch.randelshofer.quaqua.u
24
 til,com.birosoft.liquid,com.birosoft.liquid.borders,com.birosoft.liqu
25
 id.icons,com.birosoft.liquid.skin,com.jgoodies.forms.builder,com.jgoo
26
 dies.forms.debug,com.jgoodies.forms.factories,com.jgoodies.forms.layo
27
 ut,com.jgoodies.forms.util,com.jgoodies.looks,com.jgoodies.looks.comm
28
 on,com.jgoodies.looks.plastic,com.jgoodies.looks.plastic.icons,com.jg
29
 oodies.looks.plastic.theme,com.jgoodies.looks.windows,com.jgoodies.lo
30
 oks.windows.icons,com.jgoodies.looks.windows.icons.xp,com.sun.star.ac
31
 cessibility,com.sun.star.animations,com.sun.star.auth,com.sun.star.aw
32
 t,com.sun.star.awt.grid,com.sun.star.awt.tree,com.sun.star.beans,com.
33
 sun.star.bridge,com.sun.star.bridge.oleautomation,com.sun.star.chart,
34
 com.sun.star.chart2,com.sun.star.chart2.data,com.sun.star.configurati
35
 on,com.sun.star.configuration.backend,com.sun.star.connection,com.sun
36
 .star.container,com.sun.star.corba,com.sun.star.corba.giop,com.sun.st
37
 ar.corba.iiop,com.sun.star.corba.iop,com.sun.star.datatransfer,com.su
38
 n.star.datatransfer.clipboard,com.sun.star.datatransfer.dnd,com.sun.s
39
 tar.deployment,com.sun.star.deployment.test,com.sun.star.deployment.u
40
 i,com.sun.star.document,com.sun.star.drawing,com.sun.star.drawing.fra
41
 mework,com.sun.star.embed,com.sun.star.form,com.sun.star.form.binding
42
 ,com.sun.star.form.inspection,com.sun.star.form.runtime,com.sun.star.
43
 form.submission,com.sun.star.form.validation,com.sun.star.formula,com
44
 .sun.star.frame,com.sun.star.frame.status,com.sun.star.gallery,com.su
45
 n.star.geometry,com.sun.star.graphic,com.sun.star.i18n,com.sun.star.i
46
 nspection,com.sun.star.installation,com.sun.star.io,com.sun.star.java
47
 ,com.sun.star.lang,com.sun.star.ldap,com.sun.star.lib.uno.typedesc,co
48
 m.sun.star.lib.uno.typeinfo,com.sun.star.lib.util,com.sun.star.lingui
49
 stic2,com.sun.star.loader,com.sun.star.logging,com.sun.star.mail,com.
50
 sun.star.media,com.sun.star.mozilla,com.sun.star.office,com.sun.star.
51
 oooimprovement,com.sun.star.packages,com.sun.star.packages.manifest,c
52
 om.sun.star.packages.zip,com.sun.star.plugin,com.sun.star.presentatio
53
 n,com.sun.star.rdf,com.sun.star.reflection,com.sun.star.registry,com.
54
 sun.star.rendering,com.sun.star.report,com.sun.star.report.inspection
55
 ,com.sun.star.report.meta,com.sun.star.resource,com.sun.star.scanner,
56
 com.sun.star.script,com.sun.star.script.browse,com.sun.star.script.pr
57
 ovider,com.sun.star.sdb,com.sun.star.sdb.application,com.sun.star.sdb
58
 .tools,com.sun.star.sdbc,com.sun.star.sdbcx,com.sun.star.security,com
59
 .sun.star.setup,com.sun.star.sheet,com.sun.star.smarttags,com.sun.sta
60
 r.style,com.sun.star.svg,com.sun.star.sync,com.sun.star.sync2,com.sun
61
 .star.system,com.sun.star.table,com.sun.star.task,com.sun.star.test,c
62
 om.sun.star.test.bridge,com.sun.star.test.performance,com.sun.star.te
63
 xt,com.sun.star.ucb,com.sun.star.ui,com.sun.star.ui.dialogs,com.sun.s
64
 tar.uno,com.sun.star.uri,com.sun.star.util,com.sun.star.util.logging,
65
 com.sun.star.view,com.sun.star.xforms,com.sun.star.xml,com.sun.star.x
66
 ml.crypto,com.sun.star.xml.crypto.sax,com.sun.star.xml.csax,com.sun.s
67
 tar.xml.dom,com.sun.star.xml.dom.events,com.sun.star.xml.dom.views,co
68
 m.sun.star.xml.input,com.sun.star.xml.sax,com.sun.star.xml.wrapper,co
69
 m.sun.star.xml.xpath,com.sun.star.xsd,drafts.com.sun.star.form,images
70
 ,jline,jsesh.macSpecific,jsesh.softwares.rtfCleaner,junit.extensions,
71
 junit.framework,junit.runner,junit.textui,org.apache.log4j,org.apache
72
 .log4j.chainsaw,org.apache.log4j.config,org.apache.log4j.helpers,org.
73
 apache.log4j.jdbc,org.apache.log4j.jmx,org.apache.log4j.lf5,org.apach
74
 e.log4j.lf5.config,org.apache.log4j.lf5.util,org.apache.log4j.lf5.vie
75
 wer,org.apache.log4j.lf5.viewer.categoryexplorer,org.apache.log4j.lf5
76
 .viewer.configure,org.apache.log4j.lf5.viewer.images,org.apache.log4j
77
 .net,org.apache.log4j.nt,org.apache.log4j.or,org.apache.log4j.or.jms,
78
 org.apache.log4j.or.sax,org.apache.log4j.spi,org.apache.log4j.varia,o
79
 rg.apache.log4j.xml,org.apache.tools.ant,org.apache.tools.ant.dispatc
80
 h,org.apache.tools.ant.filters,org.apache.tools.ant.filters.util,org.
81
 apache.tools.ant.helper,org.apache.tools.ant.input,org.apache.tools.a
82
 nt.launch,org.apache.tools.ant.listener,org.apache.tools.ant.loader,o
83
 rg.apache.tools.ant.property,org.apache.tools.ant.taskdefs,org.apache
84
 .tools.ant.taskdefs.compilers,org.apache.tools.ant.taskdefs.condition
85
 ,org.apache.tools.ant.taskdefs.cvslib,org.apache.tools.ant.taskdefs.e
86
 mail,org.apache.tools.ant.taskdefs.rmic,org.apache.tools.ant.types,or
87
 g.apache.tools.ant.types.conditions,org.apache.tools.ant.types.mapper
88
 s,org.apache.tools.ant.types.resources,org.apache.tools.ant.types.res
89
 ources.comparators,org.apache.tools.ant.types.resources.selectors,org
90
 .apache.tools.ant.types.selectors,org.apache.tools.ant.types.selector
91
 s.modifiedselector,org.apache.tools.ant.types.spi,org.apache.tools.an
92
 t.util,org.apache.tools.ant.util.facade,org.apache.tools.ant.util.reg
93
 exp,org.apache.tools.bzip2,org.apache.tools.mail,org.apache.tools.tar
94
 ,org.apache.tools.zip,org.artofsolving.jodconverter,org.artofsolving.
95
 jodconverter.cli,org.artofsolving.jodconverter.document,org.artofsolv
96
 ing.jodconverter.office,org.artofsolving.jodconverter.process,org.art
97
 ofsolving.jodconverter.util,org.dom4j,org.dom4j.bean,org.dom4j.dataty
98
 pe,org.dom4j.dom,org.dom4j.dtd,org.dom4j.io,org.dom4j.jaxb,org.dom4j.
99
 rule,org.dom4j.rule.pattern,org.dom4j.swing,org.dom4j.tree,org.dom4j.
100
 util,org.dom4j.xpath,org.dom4j.xpp,org.hamcrest,org.hamcrest.core,org
101
 .hamcrest.internal,org.jdesktop.layout,org.json,org.jsoup,org.jsoup.h
102
 elper,org.jsoup.internal,org.jsoup.nodes,org.jsoup.parser,org.jsoup.s
103
 afety,org.jsoup.select,org.junit,org.junit.experimental.results,org.j
104
 unit.experimental.runners,org.junit.experimental.theories,org.junit.e
105
 xperimental.theories.internal,org.junit.experimental.theories.supplie
106
 rs,org.junit.internal,org.junit.internal.builders,org.junit.internal.
107
 matchers,org.junit.internal.requests,org.junit.internal.runners,org.j
108
 unit.internal.runners.model,org.junit.internal.runners.statements,org
109
 .junit.matchers,org.junit.runner,org.junit.runner.manipulation,org.ju
110
 nit.runner.notification,org.junit.runners,org.junit.runners.model,org
111
 .knallgrau.utils.textcat,org.knallgrau.utils.textcat.language_fp,org.
112
 mozilla.universalchardet,org.mozilla.universalchardet.prober,org.mozi
113
 lla.universalchardet.prober.contextanalysis,org.mozilla.universalchar
114
 det.prober.distributionanalysis,org.mozilla.universalchardet.prober.s
115
 equence,org.mozilla.universalchardet.prober.statemachine,org.objectwe
116
 b.asm.tree,org.objectweb.asm.tree.analysis,org.postgresql,org.postgre
117
 sql.copy,org.postgresql.core,org.postgresql.core.v2,org.postgresql.co
118
 re.v3,org.postgresql.ds,org.postgresql.ds.common,org.postgresql.fastp
119
 ath,org.postgresql.geometric,org.postgresql.gss,org.postgresql.hostch
120
 ooser,org.postgresql.jdbc,org.postgresql.jdbc2,org.postgresql.jdbc2.o
121
 ptional,org.postgresql.jdbc3,org.postgresql.largeobject,org.postgresq
122
 l.osgi,org.postgresql.ssl,org.postgresql.ssl.jdbc4,org.postgresql.ssp
123
 i,org.postgresql.translation,org.postgresql.util,org.postgresql.xa,or
124
 g.qenherkhopeshef.graphics.bitmaps,org.qenherkhopeshef.graphics.emf,o
125
 rg.qenherkhopeshef.graphics.eps,org.qenherkhopeshef.graphics.generic,
126
 org.qenherkhopeshef.graphics.pict,org.qenherkhopeshef.graphics.rtfBas
127
 icWriter,org.qenherkhopeshef.graphics.svg,org.qenherkhopeshef.graphic
128
 s.utils,org.qenherkhopeshef.graphics.vectorClipboard,org.qenherkhopes
129
 hef.graphics.wmf,org.sqlite,org.sqlite.core,org.sqlite.date,org.sqlit
130
 e.javax,org.sqlite.jdbc3,org.sqlite.jdbc4,org.sqlite.util,org.txm,org
131
 .txm.core,org.txm.core.engines,org.txm.core.messages,org.txm.core.pre
132
 ferences,org.txm.core.results,org.txm.core.results.comparators,org.tx
133
 m.css,org.txm.functions,org.txm.images.icons,org.txm.importer,org.txm
134
 .importer.scripting,org.txm.importer.scripts.filters,org.txm.importer
135
 .scripts.xmltxm,org.txm.importer.xtz,org.txm.js,org.txm.js.viewer,org
136
 .txm.metadatas,org.txm.objects,org.txm.scripts.importer,org.txm.sql,o
137
 rg.txm.tests,org.txm.ts,org.txm.utils,org.txm.xml.schema,org.txm.xml.
138
 xsl,org.txm.xml.xsl.tei,org.txm.xml.xsl.tei.bibtex,org.txm.xml.xsl.te
139
 i.common2,org.txm.xml.xsl.tei.docbook,org.txm.xml.xsl.tei.docx,org.tx
140
 m.xml.xsl.tei.docx.from,org.txm.xml.xsl.tei.docx.from.dynamic,org.txm
141
 .xml.xsl.tei.docx.from.dynamic.tests,org.txm.xml.xsl.tei.docx.from.dy
142
 namic.tests.xspec,org.txm.xml.xsl.tei.docx.from.graphics,org.txm.xml.
143
 xsl.tei.docx.from.lists,org.txm.xml.xsl.tei.docx.from.marginals,org.t
144
 xm.xml.xsl.tei.docx.from.maths,org.txm.xml.xsl.tei.docx.from.paragrap
145
 hs,org.txm.xml.xsl.tei.docx.from.pass0,org.txm.xml.xsl.tei.docx.from.
146
 pass2,org.txm.xml.xsl.tei.docx.from.tables,org.txm.xml.xsl.tei.docx.f
147
 rom.templates,org.txm.xml.xsl.tei.docx.from.textruns,org.txm.xml.xsl.
148
 tei.docx.from.utils,org.txm.xml.xsl.tei.docx.from.wordsections,org.tx
149
 m.xml.xsl.tei.docx.misc,org.txm.xml.xsl.tei.docx.to,org.txm.xml.xsl.t
150
 ei.docx.to.docxfiles,org.txm.xml.xsl.tei.docx.to.drama,org.txm.xml.xs
151
 l.tei.docx.to.dynamic,org.txm.xml.xsl.tei.docx.to.graphics,org.txm.xm
152
 l.xsl.tei.docx.to.lists,org.txm.xml.xsl.tei.docx.to.maths,org.txm.xml
153
 .xsl.tei.docx.to.odds,org.txm.xml.xsl.tei.docx.to.templates,org.txm.x
154
 ml.xsl.tei.docx.to.wordsections,org.txm.xml.xsl.tei.docx.utils,org.tx
155
 m.xml.xsl.tei.docx.utils.graphics,org.txm.xml.xsl.tei.docx.utils.iden
156
 tity,org.txm.xml.xsl.tei.docx.utils.maths,org.txm.xml.xsl.tei.docx.ut
157
 ils.verbatim,org.txm.xml.xsl.tei.dtd,org.txm.xml.xsl.tei.epub,org.txm
158
 .xml.xsl.tei.epub3,org.txm.xml.xsl.tei.fo2,org.txm.xml.xsl.tei.html,o
159
 rg.txm.xml.xsl.tei.html5,org.txm.xml.xsl.tei.latex2,org.txm.xml.xsl.t
160
 ei.nlm,org.txm.xml.xsl.tei.odds2,org.txm.xml.xsl.tei.odt,org.txm.xml.
161
 xsl.tei.profiles,org.txm.xml.xsl.tei.rdf,org.txm.xml.xsl.tei.relaxng,
162
 org.txm.xml.xsl.tei.rnc,org.txm.xml.xsl.tei.slides,org.txm.xml.xsl.te
163
 i.tbx,org.txm.xml.xsl.tei.tite,org.txm.xml.xsl.tei.tools,org.txm.xml.
164
 xsl.tei.tools.ImageInfo,org.txm.xml.xsl.tei.txt,org.txm.xml.xsl.tei.x
165
 html2,org.txm.xml.xsl.tei.xsd,resources,resources.documents,src.main.
166
 assembly,target
2
Export-Package: .,
3
 EDU.oswego.cs.dl.util.concurrent,
4
 EDU.oswego.cs.dl.util.concurrent.misc,
5
 antlr,
6
 antlr.ASdebug,
7
 antlr.actions.cpp,
8
 antlr.actions.csharp,
9
 antlr.actions.java,
10
 antlr.actions.python,
11
 antlr.build,
12
 antlr.collections,
13
 antlr.collections.impl,
14
 antlr.debug,
15
 antlr.debug.misc,
16
 antlr.preprocessor,
17
 ch.randelshofer.quaqua,
18
 ch.randelshofer.quaqua.border,
19
 ch.randelshofer.quaqua.color,
20
 ch.randelshofer.quaqua.colorchooser,
21
 ch.randelshofer.quaqua.datatransfer,
22
 ch.randelshofer.quaqua.ext.base64,
23
 ch.randelshofer.quaqua.ext.batik.ext.awt,
24
 ch.randelshofer.quaqua.ext.batik.ext.awt.image,
25
 ch.randelshofer.quaqua.ext.batik.ext.awt.image.codec.tiff,
26
 ch.randelshofer.quaqua.ext.batik.ext.awt.image.codec.util,
27
 ch.randelshofer.quaqua.ext.batik.ext.awt.image.renderable,
28
 ch.randelshofer.quaqua.ext.batik.ext.awt.image.rendered,
29
 ch.randelshofer.quaqua.ext.batik.i18n,
30
 ch.randelshofer.quaqua.ext.batik.util,
31
 ch.randelshofer.quaqua.ext.nanoxml,
32
 ch.randelshofer.quaqua.filechooser,
33
 ch.randelshofer.quaqua.icon,
34
 ch.randelshofer.quaqua.images,
35
 ch.randelshofer.quaqua.jaguar,
36
 ch.randelshofer.quaqua.jaguar.filechooser,
37
 ch.randelshofer.quaqua.jaguar.images,
38
 ch.randelshofer.quaqua.leopard,
39
 ch.randelshofer.quaqua.leopard.filechooser,
40
 ch.randelshofer.quaqua.leopard.images,
41
 ch.randelshofer.quaqua.osx,
42
 ch.randelshofer.quaqua.panther,
43
 ch.randelshofer.quaqua.panther.filechooser,
44
 ch.randelshofer.quaqua.panther.images,
45
 ch.randelshofer.quaqua.subset,
46
 ch.randelshofer.quaqua.tiger,
47
 ch.randelshofer.quaqua.tiger.filechooser,
48
 ch.randelshofer.quaqua.tiger.images,
49
 ch.randelshofer.quaqua.util,
50
 com.birosoft.liquid,
51
 com.birosoft.liquid.borders,
52
 com.birosoft.liquid.icons,
53
 com.birosoft.liquid.skin,
54
 com.jgoodies.forms.builder,
55
 com.jgoodies.forms.debug,
56
 com.jgoodies.forms.factories,
57
 com.jgoodies.forms.layout,
58
 com.jgoodies.forms.util,
59
 com.jgoodies.looks,
60
 com.jgoodies.looks.common,
61
 com.jgoodies.looks.plastic,
62
 com.jgoodies.looks.plastic.icons,
63
 com.jgoodies.looks.plastic.theme,
64
 com.jgoodies.looks.windows,
65
 com.jgoodies.looks.windows.icons,
66
 com.jgoodies.looks.windows.icons.xp,
67
 com.sun.star.accessibility,
68
 com.sun.star.animations,
69
 com.sun.star.auth,
70
 com.sun.star.awt,
71
 com.sun.star.awt.grid,
72
 com.sun.star.awt.tree,
73
 com.sun.star.beans,
74
 com.sun.star.bridge,
75
 com.sun.star.bridge.oleautomation,
76
 com.sun.star.chart,
77
 com.sun.star.chart2,
78
 com.sun.star.chart2.data,
79
 com.sun.star.configuration,
80
 com.sun.star.configuration.backend,
81
 com.sun.star.connection,
82
 com.sun.star.container,
83
 com.sun.star.corba,
84
 com.sun.star.corba.giop,
85
 com.sun.star.corba.iiop,
86
 com.sun.star.corba.iop,
87
 com.sun.star.datatransfer,
88
 com.sun.star.datatransfer.clipboard,
89
 com.sun.star.datatransfer.dnd,
90
 com.sun.star.deployment,
91
 com.sun.star.deployment.test,
92
 com.sun.star.deployment.ui,
93
 com.sun.star.document,
94
 com.sun.star.drawing,
95
 com.sun.star.drawing.framework,
96
 com.sun.star.embed,
97
 com.sun.star.form,
98
 com.sun.star.form.binding,
99
 com.sun.star.form.inspection,
100
 com.sun.star.form.runtime,
101
 com.sun.star.form.submission,
102
 com.sun.star.form.validation,
103
 com.sun.star.formula,
104
 com.sun.star.frame,
105
 com.sun.star.frame.status,
106
 com.sun.star.gallery,
107
 com.sun.star.geometry,
108
 com.sun.star.graphic,
109
 com.sun.star.i18n,
110
 com.sun.star.inspection,
111
 com.sun.star.installation,
112
 com.sun.star.io,
113
 com.sun.star.java,
114
 com.sun.star.lang,
115
 com.sun.star.ldap,
116
 com.sun.star.lib.uno.typedesc,
117
 com.sun.star.lib.uno.typeinfo,
118
 com.sun.star.lib.util,
119
 com.sun.star.linguistic2,
120
 com.sun.star.loader,
121
 com.sun.star.logging,
122
 com.sun.star.mail,
123
 com.sun.star.media,
124
 com.sun.star.mozilla,
125
 com.sun.star.office,
126
 com.sun.star.oooimprovement,
127
 com.sun.star.packages,
128
 com.sun.star.packages.manifest,
129
 com.sun.star.packages.zip,
130
 com.sun.star.plugin,
131
 com.sun.star.presentation,
132
 com.sun.star.rdf,
133
 com.sun.star.reflection,
134
 com.sun.star.registry,
135
 com.sun.star.rendering,
136
 com.sun.star.report,
137
 com.sun.star.report.inspection,
138
 com.sun.star.report.meta,
139
 com.sun.star.resource,
140
 com.sun.star.scanner,
141
 com.sun.star.script,
142
 com.sun.star.script.browse,
143
 com.sun.star.script.provider,
144
 com.sun.star.sdb,
145
 com.sun.star.sdb.application,
146
 com.sun.star.sdb.tools,
147
 com.sun.star.sdbc,
148
 com.sun.star.sdbcx,
149
 com.sun.star.security,
150
 com.sun.star.setup,
151
 com.sun.star.sheet,
152
 com.sun.star.smarttags,
153
 com.sun.star.style,
154
 com.sun.star.svg,
155
 com.sun.star.sync,
156
 com.sun.star.sync2,
157
 com.sun.star.system,
158
 com.sun.star.table,
159
 com.sun.star.task,
160
 com.sun.star.test,
161
 com.sun.star.test.bridge,
162
 com.sun.star.test.performance,
163
 com.sun.star.text,
164
 com.sun.star.ucb,
165
 com.sun.star.ui,
166
 com.sun.star.ui.dialogs,
167
 com.sun.star.uno,
168
 com.sun.star.uri,
169
 com.sun.star.util,
170
 com.sun.star.util.logging,
171
 com.sun.star.view,
172
 com.sun.star.xforms,
173
 com.sun.star.xml,
174
 com.sun.star.xml.crypto,
175
 com.sun.star.xml.crypto.sax,
176
 com.sun.star.xml.csax,
177
 com.sun.star.xml.dom,
178
 com.sun.star.xml.dom.events,
179
 com.sun.star.xml.dom.views,
180
 com.sun.star.xml.input,
181
 com.sun.star.xml.sax,
182
 com.sun.star.xml.wrapper,
183
 com.sun.star.xml.xpath,
184
 com.sun.star.xsd,
185
 drafts.com.sun.star.form,
186
 images,
187
 jline,
188
 jsesh.macSpecific,
189
 jsesh.softwares.rtfCleaner,
190
 junit.extensions,
191
 junit.framework,
192
 junit.runner,
193
 junit.textui,
194
 org.apache.log4j,
195
 org.apache.log4j.chainsaw,
196
 org.apache.log4j.config,
197
 org.apache.log4j.helpers,
198
 org.apache.log4j.jdbc,
199
 org.apache.log4j.jmx,
200
 org.apache.log4j.lf5,
201
 org.apache.log4j.lf5.config,
202
 org.apache.log4j.lf5.util,
203
 org.apache.log4j.lf5.viewer,
204
 org.apache.log4j.lf5.viewer.categoryexplorer,
205
 org.apache.log4j.lf5.viewer.configure,
206
 org.apache.log4j.lf5.viewer.images,
207
 org.apache.log4j.net,
208
 org.apache.log4j.nt,
209
 org.apache.log4j.or,
210
 org.apache.log4j.or.jms,
211
 org.apache.log4j.or.sax,
212
 org.apache.log4j.spi,
213
 org.apache.log4j.varia,
214
 org.apache.log4j.xml,
215
 org.apache.tools.ant,
216
 org.apache.tools.ant.dispatch,
217
 org.apache.tools.ant.filters,
218
 org.apache.tools.ant.filters.util,
219
 org.apache.tools.ant.helper,
220
 org.apache.tools.ant.input,
221
 org.apache.tools.ant.launch,
222
 org.apache.tools.ant.listener,
223
 org.apache.tools.ant.loader,
224
 org.apache.tools.ant.property,
225
 org.apache.tools.ant.taskdefs,
226
 org.apache.tools.ant.taskdefs.compilers,
227
 org.apache.tools.ant.taskdefs.condition,
228
 org.apache.tools.ant.taskdefs.cvslib,
229
 org.apache.tools.ant.taskdefs.email,
230
 org.apache.tools.ant.taskdefs.rmic,
231
 org.apache.tools.ant.types,
232
 org.apache.tools.ant.types.conditions,
233
 org.apache.tools.ant.types.mappers,
234
 org.apache.tools.ant.types.resources,
235
 org.apache.tools.ant.types.resources.comparators,
236
 org.apache.tools.ant.types.resources.selectors,
237
 org.apache.tools.ant.types.selectors,
238
 org.apache.tools.ant.types.selectors.modifiedselector,
239
 org.apache.tools.ant.types.spi,
240
 org.apache.tools.ant.util,
241
 org.apache.tools.ant.util.facade,
242
 org.apache.tools.ant.util.regexp,
243
 org.apache.tools.bzip2,
244
 org.apache.tools.mail,
245
 org.apache.tools.tar,
246
 org.apache.tools.zip,
247
 org.artofsolving.jodconverter,
248
 org.artofsolving.jodconverter.cli,
249
 org.artofsolving.jodconverter.document,
250
 org.artofsolving.jodconverter.office,
251
 org.artofsolving.jodconverter.process,
252
 org.artofsolving.jodconverter.util,
253
 org.dom4j,
254
 org.dom4j.bean,
255
 org.dom4j.datatype,
256
 org.dom4j.dom,
257
 org.dom4j.dtd,
258
 org.dom4j.io,
259
 org.dom4j.jaxb,
260
 org.dom4j.rule,
261
 org.dom4j.rule.pattern,
262
 org.dom4j.swing,
263
 org.dom4j.tree,
264
 org.dom4j.util,
265
 org.dom4j.xpath,
266
 org.dom4j.xpp,
267
 org.hamcrest,
268
 org.hamcrest.core,
269
 org.hamcrest.internal,
270
 org.jdesktop.layout,
271
 org.json,
272
 org.jsoup,
273
 org.jsoup.helper,
274
 org.jsoup.internal,
275
 org.jsoup.nodes,
276
 org.jsoup.parser,
277
 org.jsoup.safety,
278
 org.jsoup.select,
279
 org.junit,
280
 org.junit.experimental.results,
281
 org.junit.experimental.runners,
282
 org.junit.experimental.theories,
283
 org.junit.experimental.theories.internal,
284
 org.junit.experimental.theories.suppliers,
285
 org.junit.internal,
286
 org.junit.internal.builders,
287
 org.junit.internal.matchers,
288
 org.junit.internal.requests,
289
 org.junit.internal.runners,
290
 org.junit.internal.runners.model,
291
 org.junit.internal.runners.statements,
292
 org.junit.matchers,
293
 org.junit.runner,
294
 org.junit.runner.manipulation,
295
 org.junit.runner.notification,
296
 org.junit.runners,
297
 org.junit.runners.model,
298
 org.knallgrau.utils.textcat,
299
 org.knallgrau.utils.textcat.language_fp,
300
 org.mozilla.universalchardet,
301
 org.mozilla.universalchardet.prober,
302
 org.mozilla.universalchardet.prober.contextanalysis,
303
 org.mozilla.universalchardet.prober.distributionanalysis,
304
 org.mozilla.universalchardet.prober.sequence,
305
 org.mozilla.universalchardet.prober.statemachine,
306
 org.objectweb.asm.tree,
307
 org.objectweb.asm.tree.analysis,
308
 org.postgresql,
309
 org.postgresql.copy,
310
 org.postgresql.core,
311
 org.postgresql.core.v2,
312
 org.postgresql.core.v3,
313
 org.postgresql.ds,
314
 org.postgresql.ds.common,
315
 org.postgresql.fastpath,
316
 org.postgresql.geometric,
317
 org.postgresql.gss,
318
 org.postgresql.hostchooser,
319
 org.postgresql.jdbc,
320
 org.postgresql.jdbc2,
321
 org.postgresql.jdbc2.optional,
322
 org.postgresql.jdbc3,
323
 org.postgresql.largeobject,
324
 org.postgresql.osgi,
325
 org.postgresql.ssl,
326
 org.postgresql.ssl.jdbc4,
327
 org.postgresql.sspi,
328
 org.postgresql.translation,
329
 org.postgresql.util,
330
 org.postgresql.xa,
331
 org.qenherkhopeshef.graphics.bitmaps,
332
 org.qenherkhopeshef.graphics.emf,
333
 org.qenherkhopeshef.graphics.eps,
334
 org.qenherkhopeshef.graphics.generic,
335
 org.qenherkhopeshef.graphics.pict,
336
 org.qenherkhopeshef.graphics.rtfBasicWriter,
337
 org.qenherkhopeshef.graphics.svg,
338
 org.qenherkhopeshef.graphics.utils,
339
 org.qenherkhopeshef.graphics.vectorClipboard,
340
 org.qenherkhopeshef.graphics.wmf,
341
 org.sqlite,
342
 org.sqlite.core,
343
 org.sqlite.date,
344
 org.sqlite.javax,
345
 org.sqlite.jdbc3,
346
 org.sqlite.jdbc4,
347
 org.sqlite.util,
348
 org.txm,
349
 org.txm.core,
350
 org.txm.core.engines,
351
 org.txm.core.messages,
352
 org.txm.core.preferences,
353
 org.txm.core.results,
... Ce différentiel a été tronqué car il excède la taille maximale pouvant être affichée.

Formats disponibles : Unified diff