Révision 3298

TXM/trunk/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/functions/Cooccurrence.java (revision 3298)
654 654
		if (this.getStructuralUnitLimit() != null) maxempanstr += this.getStructuralUnitLimit().getName();
655 655

  
656 656

  
657
		String pquery = CQLQuery.fixQuery(this.getQuery().getQueryString());
657
		String pquery = CQLQuery.fixQuery(this.getQuery().getQueryString(), this.getCorpus().getLang());
658 658
		if (this.getMaxLeft() == 0) {
659 659
			query = "" + pquery + " []* " + query + " " + maxempanstr; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
660 660
		}
......
1463 1463
		CQPCorpus corpus = this.getCorpus();
1464 1464
		QueryResult r1 = corpus.query(pQuery, "CoocFocusQuery", false); // keywords positions //$NON-NLS-1$
1465 1465
		QueryResult r2 = null;
1466
		if (contextQuery.equals(pQuery.fixQuery())) {
1466
		if (contextQuery.equals(pQuery.fixQuery(this.getCorpus().getLang()))) {
1467 1467
			r2 = r1;
1468 1468
		}
1469 1469
		else {
1470 1470
			r2 = corpus.query(contextQuery, "CoocContextFocusQuery", false); // max context //$NON-NLS-1$
1471 1471
		}
1472 1472
		QueryResult r3 = null;
1473
		if (anticontextquery.equals(pQuery.fixQuery())) {
1473
		if (anticontextquery.equals(pQuery.fixQuery(this.getCorpus().getLang()))) {
1474 1474
			r3 = r1;
1475 1475
		}
1476 1476
		else if (contextQuery.equals(anticontextquery)) {
......
1576 1576
	public boolean stepQueryLimits() {
1577 1577
		// structural context
1578 1578

  
1579
		String fixedQuery = CQLQuery.fixQuery(pQuery.getQueryString());
1579
		String fixedQuery = CQLQuery.fixQuery(pQuery.getQueryString(), this.getCorpus().getLang());
1580 1580

  
1581 1581
		if (pStructuralUnitLimit != null) {
1582 1582
			String tempquery = ""; //$NON-NLS-1$
TXM/trunk/org.txm.progression.core/src/org/txm/progression/core/functions/Progression.java (revision 3298)
49 49
import org.txm.progression.core.messages.ProgressionCoreMessages;
50 50
import org.txm.progression.core.preferences.ProgressionPreferences;
51 51
import org.txm.searchengine.core.Query;
52
import org.txm.searchengine.core.Selection;
52 53
import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
53 54
import org.txm.searchengine.cqp.corpus.CQPCorpus;
54 55
import org.txm.searchengine.cqp.corpus.CorpusManager;
......
118 119
	 * Queries.
119 120
	 */
120 121
	@Parameter(key = TXMPreferences.QUERIES)
121
	protected List<CQLQuery> queries;
122
	protected List<Query> queries;
122 123
	
123 124
	/**
124 125
	 * Structural unit.
......
188 189
	@Override
189 190
	public boolean loadParameters() {
190 191
		if (!this.getStringParameterValue(TXMPreferences.QUERIES).isEmpty()) {
191
			this.queries = CQLQuery.unserialize(this.getStringParameterValue(TXMPreferences.QUERIES));
192
			this.queries = Query.stringToQueries(this.getStringParameterValue(TXMPreferences.QUERIES));
192 193
		}
193 194
		
194 195
		if (!this.getStringParameterValue(TXMPreferences.STRUCTURAL_UNIT).isEmpty()) {
......
218 219
	public boolean saveParameters() {
219 220
		
220 221
		if (this.queries != null && !this.queries.isEmpty()) {
221
			this.saveParameter(TXMPreferences.QUERIES, CQLQuery.serialize(this.queries));
222
			this.saveParameter(TXMPreferences.QUERIES, Query.queriesToString(this.queries));
222 223
		}
223 224
		
224 225
		if (this.structuralUnit != null) {
......
300 301
	 * @param bandeMultiplier
301 302
	 */
302 303
	// FIXME : SJ: all parameters related to rendering should be removed from this class and centralized in the charts engine system, eg. line width
303
	public void setParameters(List<CQLQuery> queries,
304
	public void setParameters(List<Query> queries,
304 305
			StructuralUnit structuralUnit, StructuralUnitProperty property, String propertyregex,
305 306
			boolean doCumulative, int lineWidth, boolean repeatValues, float bandeMultiplier) {
306 307
		this.queries = queries; // the query of the selection
......
436 437
	
437 438
	/**
438 439
	 * Step queries.
439
	 *
440
	 * @throws CqiClientException the cqi client exception
440
	 * @throws Exception 
441 441
	 */
442
	public boolean stepQueries(TXMProgressMonitor monitor) throws CqiClientException {
442
	public boolean stepQueries(TXMProgressMonitor monitor) throws Exception {
443 443
		this.maxX = this.getCorpus().getSize();
444 444
		int npositions = 0;
445 445
		
446 446
		for (int iQuery = 0; iQuery < queries.size(); iQuery++) {
447
			QueryResult result = null;
447
			Selection result = null;
448 448
			if (queryResults != null) {
449 449
				result = queryResults.get(iQuery);
450 450
			}
451 451
			else {
452
				CQLQuery query = queries.get(iQuery);
452
				Query query = queries.get(iQuery);
453 453
				// System.out.println("query "+query.getQueryString());
454
				result = getCorpus().query(query, query.getQueryString()
455
						.replace(" ", "_") + "_progression", true); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
454
				result = query.getSearchEngine().query(getCorpus(), query, query.getQueryString().replace(" ", "_") + "_progression", true);
455
				//result = getCorpus().query(query, query.getQueryString().replace(" ", "_") + "_progression", true); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
456 456
			}
457 457
			int nLines = result.getNMatch();
458 458
			if (maxY < nLines)
459 459
				maxY = nLines;
460 460
			
461
			List<Match> matches = null;
461
			List<? extends org.txm.objects.Match> matches = null;
462 462
			if (nLines > 0) {
463 463
				matches = result.getMatches(0, nLines - 1); // get the indexes
464 464
				// sequences of result's tokens
......
472 472
			// if (matches.size() > 0)
473 473
			allPositions.add(positions);
474 474
			int i = 0;
475
			for (Match m : matches) {
475
			for (org.txm.objects.Match m : matches) {
476 476
				positions[i++] = m.getStart();
477 477
				npositions++;
478 478
				monitor.worked(1);
......
634 634
	 *
635 635
	 * @return the queries
636 636
	 */
637
	public List<CQLQuery> getQueries() {
637
	public List<Query> getQueries() {
638 638
		return this.queries;
639 639
	}
640 640
	
......
848 848
	
849 849
	@Override
850 850
	public String getComputingStartMessage() {
851
		return TXMCoreMessages.bind(ProgressionCoreMessages.progressionOfP0InTheP1Corpus, CQLQuery.asString(this.queries), this.getCorpus().getName());
851
		return TXMCoreMessages.bind(ProgressionCoreMessages.progressionOfP0InTheP1Corpus, Query.queriesToString(this.queries), this.getCorpus().getName());
852 852
	}
853 853
	
854 854
	
......
913 913
	/**
914 914
	 * @param queries the queries to set
915 915
	 */
916
	public void setQueries(List<CQLQuery> queries) {
916
	public void setQueries(List<Query> queries) {
917 917
		this.queries = queries;
918 918
	}
919 919
	
TXM/trunk/org.txm.progression.core/src/org/txm/progression/core/chartsengine/jfreechart/JFCProgressionCumulativeChartCreator.java (revision 3298)
25 25
import org.txm.progression.core.functions.Progression;
26 26
import org.txm.progression.core.messages.ProgressionCoreMessages;
27 27
import org.txm.progression.core.preferences.ProgressionPreferences;
28
import org.txm.searchengine.core.Query;
28 29
import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
29 30
import org.txm.searchengine.cqp.corpus.query.CQLQuery;
30 31

  
......
133 134
		dataset.removeAllSeries();
134 135
		
135 136
		List<int[]> positions = progression.getAllPositions();
136
		List<CQLQuery> queries = progression.getQueries();
137
		List<Query> queries = progression.getQueries();
137 138
		for (int i = 0; i < positions.size(); i++) {
138 139
			int[] list = positions.get(i);
139
			CQLQuery query = queries.get(i);
140
			XYSeries series = new XYSeries(query.toString() + " " + list.length);
140
			Query query = queries.get(i);
141
			XYSeries series = new XYSeries(query.getName() + " " + list.length);
141 142
			int c = 1;
142 143
			for (int j = 0; j < list.length; j++) {
143 144
				// add a first point to draw a vertical line
TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/search/URSQuery.java (revision 3298)
3 3
import org.txm.Toolbox;
4 4
import org.txm.core.engines.EngineType;
5 5
import org.txm.searchengine.core.IQuery;
6
import org.txm.searchengine.core.Query;
6 7
import org.txm.searchengine.core.SearchEngine;
7 8

  
8 9
/**
......
12 13
 * @author mdecorde
13 14
 *
14 15
 */
15
public class URSQuery implements IQuery {
16
public class URSQuery extends Query {
16 17
	
17
	String query = ""; //$NON-NLS-1$
18
	
19
	@Override
20
	public String getQueryString() {
21
		return query;
18
	public URSQuery() {
19
		
20
		super("", (SearchEngine) Toolbox.getEngineManager(EngineType.SEARCH).getEngine("URS"));
22 21
	}
23 22
	
24
	@Override
25
	public boolean isEmpty() {
26
		return query == null || query.isEmpty();
23
	public URSQuery(String queryString) {
24
		
25
		super(queryString, (SearchEngine) Toolbox.getEngineManager(EngineType.SEARCH).getEngine("URS"));
27 26
	}
28 27
	
29 28
	@Override
30
	public SearchEngine getSearchEngine() {
31
		return (SearchEngine) Toolbox.getEngineManager(EngineType.SEARCH).getEngine("URS"); //$NON-NLS-1$
32
	}
33
	
34
	@Override
35
	public IQuery setQuery(String rawQuery) {
36
		query = rawQuery;
29
	public IQuery fixQuery(String lang) {
37 30
		return this;
38 31
	}
39
	
40
	@Override
41
	public IQuery fixQuery() {
42
		return this;
43
	}
44
	
45
	@Override
46
	public String toString() {
47
		return query;
48
	}
49
	
50
	@Override
51
	public boolean equals(IQuery q) {
52
		return this.getClass().equals(q.getClass()) && this.getQueryString().equals(q.getQueryString());
53
	}
54
	
55
	@Override
56
	public String asString() {
57
		return "<" + query + ">";
58
	}
59 32
}
TXM/trunk/org.txm.udpipe.core/src/org/txm/udpipe/core/UDPipeJavaUtils.java (revision 3298)
77 77
		return buffer.toString();
78 78
	}
79 79
	
80
	public static void toConnluFile(File resultConnluFile, File model, String string) throws UnsupportedEncodingException, FileNotFoundException {
80
	public static void toCoNLLUFile(File resultCoNLLUFile, File model, String string) throws UnsupportedEncodingException, FileNotFoundException {
81 81
		Sentences sentences = process(model.getAbsolutePath(), string);
82 82
		OutputFormat of = OutputFormat.newConlluOutputFormat();
83 83
		
84
		PrintWriter writer = IOUtils.getWriter(resultConnluFile);
84
		PrintWriter writer = IOUtils.getWriter(resultCoNLLUFile);
85 85
		
86 86
		for (int iSentence = 0; iSentence < sentences.size(); iSentence++) {
87 87
			Sentence sent = sentences.get(iSentence);
......
107 107
		return buffer.toString();
108 108
	}
109 109
	
110
	public static String toConnluString(File model, String string) {
110
	public static String toCoNLLUString(File model, String string) {
111 111
		Sentences sentences = process(model.getAbsolutePath(), string);
112 112
		OutputFormat of = OutputFormat.newConlluOutputFormat();
113 113
		
......
127 127
	
128 128
	public static void main(String[] args) {
129 129
//		try {
130
//			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"),
130
//			toCoNLLUFile(new File("/tmp/result.conllu"), new File("/home/mdecorde/SOFTWARE/udpipe-1.2.0-bin/bin-linux64/french-gsd-ud-2.4-190531.udpipe"),
131 131
//					"Et un petit test... En deux phrases ? ou trois.");
132 132
//		}
133 133
//		catch (UnsupportedEncodingException | FileNotFoundException e) {
TXM/trunk/org.txm.udpipe.core/src/org/txm/udpipe/core/TestREST.java (revision 3298)
114 114
		parser.process();
115 115
		
116 116
		System.out.println("APPLYING UDPIPE...");
117
		String connlu = TestREST.process(target, model, srcContent.toString());
118
		String[] newpars = connlu.split("# newpar\n");
117
		String conllu = TestREST.process(target, model, srcContent.toString());
118
		String[] newpars = conllu.split("# newpar\n");
119 119
		System.out.println("newpars: " + newpars.length);
120 120
		
121 121
		Document tempDoc = DomUtils.emptyDocument();
......
202 202
					return;
203 203
				}
204 204
				
205
				String connlu = newpars[n++];
206
				// System.out.println(connlu);
205
				String conllu = newpars[n++];
206
				// System.out.println(conllu);
207 207
			}
208 208
		};
209 209
		
......
262 262
					return;
263 263
				}
264 264
				try {
265
					String connlu = TestREST.process(target, model, str);
266
					// System.out.println(connlu);
265
					String conllu = TestREST.process(target, model, str);
266
					// System.out.println(conllu);
267 267
					
268
					String lines[] = connlu.split("\n");
268
					String lines[] = conllu.split("\n");
269 269
					boolean sopen = false;
270 270
					for (String line : lines) {
271 271
						// System.out.println(line);
......
356 356
					return;
357 357
				}
358 358
				try {
359
					String connlu = TestREST.process(target, model, str);
360
					// System.out.println(connlu);
359
					String conllu = TestREST.process(target, model, str);
360
					// System.out.println(conllu);
361 361
					
362
					String lines[] = connlu.split("\n");
362
					String lines[] = conllu.split("\n");
363 363
					boolean sopen = false;
364 364
					for (String line : lines) {
365 365
						// System.out.println(line);
TXM/trunk/org.txm.udpipe.core/src/org/txm/udpipe/core/UDPipeClientUtils.java (revision 3298)
106 106
					return;
107 107
				}
108 108
				try {
109
					String connlu = UDPipeClientUtils.process(target, model, str);
110
					// System.out.println(connlu);
109
					String conllu = UDPipeClientUtils.process(target, model, str);
110
					// System.out.println(conllu);
111 111
					
112
					String lines[] = connlu.split("\n");
112
					String lines[] = conllu.split("\n");
113 113
					boolean sopen = false;
114 114
					for (String line : lines) {
115 115
						// System.out.println(line);
......
200 200
					return;
201 201
				}
202 202
				try {
203
					String connlu = UDPipeClientUtils.process(target, model, str);
204
					// System.out.println(connlu);
203
					String conllu = UDPipeClientUtils.process(target, model, str);
204
					// System.out.println(conllu);
205 205
					
206
					String lines[] = connlu.split("\n");
206
					String lines[] = conllu.split("\n");
207 207
					boolean sopen = false;
208 208
					for (String line : lines) {
209 209
						// System.out.println(line);
TXM/trunk/org.txm.udpipe.core/src/org/txm/udpipe/core/UDPipeProcessor.java (revision 3298)
119 119
	
120 120
	public boolean apply(String model) throws JSONException {
121 121
		System.out.println("APPLYING UDPIPE...");
122
		String connlu = UDPipeJavaUtils.toConnluString(new File(model), srcContent.toString());
122
		String conllu = UDPipeJavaUtils.toCoNLLUString(new File(model), srcContent.toString());
123 123
		
124 124
		try {
125
			IOUtils.write(new File("/home/mdecorde/TEMP/applyraw.txt"), connlu);
125
			IOUtils.write(new File("/home/mdecorde/TEMP/applyraw.txt"), conllu);
126 126
		}
127 127
		catch (Exception e) {
128 128
			// TODO Auto-generated catch block
129 129
			e.printStackTrace();
130 130
		}
131 131
		
132
		newpars = connlu.split("# newpar");
132
		newpars = conllu.split("# newpar");
133 133
		System.out.println("N newpars: " + newpars.length);
134 134
		
135 135
		String[] newpars2 = new String[newpars.length - 1];
......
218 218
	// return;
219 219
	// }
220 220
	//
221
	// String connlu = newpars[n++];
222
	// // System.out.println(connlu);
221
	// String conllu = newpars[n++];
222
	// // System.out.println(conllu);
223 223
	//
224
	// String lines[] = connlu.split("\n");
224
	// String lines[] = conllu.split("\n");
225 225
	// boolean sopen = false;
226 226
	// for (String line : lines) {
227 227
	// // System.out.println(line);
TXM/trunk/org.txm.libs.batik/build.properties (revision 3298)
1 1
bin.includes = META-INF/,\
2
               batik-anim.jar,\
3
               batik-awt-util.jar,\
4
               batik-bridge.jar,\
5
               batik-codec.jar,\
6
               batik-css.jar,\
7
               batik-dom.jar,\
8
               batik-ext.jar,\
9
               batik-gui-util.jar,\
10
               batik-gvt.jar,\
11
               batik-parser.jar,\
12
               batik-script.jar,\
13
               batik-svg-dom.jar,\
14
               batik-svggen.jar,\
15
               batik-util.jar,\
16
               batik-transcoder.jar,\
17
               batik-swing.jar,\
18
               batik-xml.jar,\
19 2
               build.properties,\
20
               js.jar,\
21
               xml-apis-ext.jar,\
22
               xml-apis.jar,\
23 3
               .,\
24
               OSGI-INF/
4
               OSGI-INF/,\
5
               batik-anim-1.14.jar,\
6
               batik-awt-util-1.14.jar,\
7
               batik-bridge-1.14.jar,\
8
               batik-constants-1.14.jar,\
9
               batik-css-1.14.jar,\
10
               batik-dom-1.14.jar,\
11
               batik-ext-1.14.jar,\
12
               batik-gui-util-1.14.jar,\
13
               batik-gvt-1.14.jar,\
14
               batik-i18n-1.14.jar,\
15
               batik-parser-1.14.jar,\
16
               batik-script-1.14.jar,\
17
               batik-shared-resources-1.14.jar,\
18
               batik-svg-dom-1.14.jar,\
19
               batik-swing-1.14.jar,\
20
               batik-test-1.14.jar,\
21
               batik-test-swing-1.14.jar,\
22
               batik-util-1.14.jar,\
23
               batik-xml-1.14.jar,\
24
               commons-io-1.3.1.jar,\
25
               commons-logging-1.0.4.jar,\
26
               serializer-2.7.2.jar,\
27
               xalan-2.7.2.jar,\
28
               xml-apis-1.4.01.jar,\
29
               xml-apis-ext-1.3.04.jar,\
30
               xmlgraphics-commons-2.6.jar,\
31
               batik-svggen-1.14.jar,\
32
               batik-transcoder-1.14.jar
TXM/trunk/org.txm.libs.batik/.classpath (revision 3298)
1 1
<?xml version="1.0" encoding="UTF-8"?>
2 2
<classpath>
3
	  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
4
	  <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
5
	  <classpathentry exported="true" kind="lib" path="batik-anim.jar"/>
6
	  <classpathentry exported="true" kind="lib" path="batik-awt-util.jar"/>
7
	  <classpathentry exported="true" kind="lib" path="batik-bridge.jar"/>
8
	  <classpathentry exported="true" kind="lib" path="batik-codec.jar"/>
9
	  <classpathentry exported="true" kind="lib" path="batik-css.jar"/>
10
	  <classpathentry exported="true" kind="lib" path="batik-dom.jar"/>
11
	  <classpathentry exported="true" kind="lib" path="batik-ext.jar"/>
12
	  <classpathentry exported="true" kind="lib" path="batik-gui-util.jar"/>
13
	  <classpathentry exported="true" kind="lib" path="batik-gvt.jar"/>
14
	  <classpathentry exported="true" kind="lib" path="batik-parser.jar"/>
15
	  <classpathentry exported="true" kind="lib" path="batik-script.jar"/>
16
	  <classpathentry exported="true" kind="lib" path="batik-svg-dom.jar"/>
17
	  <classpathentry exported="true" kind="lib" path="batik-svggen.jar"/>
18
	  <classpathentry exported="true" kind="lib" path="batik-swing.jar"/>
19
	  <classpathentry exported="true" kind="lib" path="batik-transcoder.jar"/>
20
	  <classpathentry exported="true" kind="lib" path="batik-util.jar"/>
21
	  <classpathentry exported="true" kind="lib" path="batik-xml.jar"/>
22
	  <classpathentry exported="true" kind="lib" path="js.jar"/>
23
	  <classpathentry exported="true" kind="lib" path="xml-apis-ext.jar"/>
24
	  <classpathentry exported="true" kind="lib" path="xml-apis.jar"/>
25
	  <classpathentry kind="output" path="bin"/>
26
</classpath>
3
	<classpathentry exported="true" kind="lib" path="batik-svggen-1.14.jar"/>
4
	<classpathentry exported="true" kind="lib" path="batik-transcoder-1.14.jar"/>
5
	<classpathentry exported="true" kind="lib" path="batik-anim-1.14.jar"/>
6
	<classpathentry exported="true" kind="lib" path="batik-awt-util-1.14.jar"/>
7
	<classpathentry exported="true" kind="lib" path="batik-bridge-1.14.jar"/>
8
	<classpathentry exported="true" kind="lib" path="batik-constants-1.14.jar"/>
9
	<classpathentry exported="true" kind="lib" path="batik-css-1.14.jar"/>
10
	<classpathentry exported="true" kind="lib" path="batik-dom-1.14.jar"/>
11
	<classpathentry exported="true" kind="lib" path="batik-ext-1.14.jar"/>
12
	<classpathentry exported="true" kind="lib" path="batik-gui-util-1.14.jar"/>
13
	<classpathentry exported="true" kind="lib" path="batik-gvt-1.14.jar"/>
14
	<classpathentry exported="true" kind="lib" path="batik-i18n-1.14.jar"/>
15
	<classpathentry exported="true" kind="lib" path="batik-parser-1.14.jar"/>
16
	<classpathentry exported="true" kind="lib" path="batik-script-1.14.jar"/>
17
	<classpathentry exported="true" kind="lib" path="batik-shared-resources-1.14.jar"/>
18
	<classpathentry exported="true" kind="lib" path="batik-svg-dom-1.14.jar"/>
19
	<classpathentry exported="true" kind="lib" path="batik-swing-1.14.jar"/>
20
	<classpathentry exported="true" kind="lib" path="batik-test-1.14.jar"/>
21
	<classpathentry exported="true" kind="lib" path="batik-test-swing-1.14.jar"/>
22
	<classpathentry exported="true" kind="lib" path="batik-util-1.14.jar"/>
23
	<classpathentry exported="true" kind="lib" path="batik-xml-1.14.jar"/>
24
	<classpathentry exported="true" kind="lib" path="commons-io-1.3.1.jar"/>
25
	<classpathentry exported="true" kind="lib" path="commons-logging-1.0.4.jar"/>
26
	<classpathentry exported="true" kind="lib" path="serializer-2.7.2.jar"/>
27
	<classpathentry exported="true" kind="lib" path="xalan-2.7.2.jar"/>
28
	<classpathentry exported="true" kind="lib" path="xml-apis-1.4.01.jar"/>
29
	<classpathentry exported="true" kind="lib" path="xml-apis-ext-1.3.04.jar"/>
30
	<classpathentry exported="true" kind="lib" path="xmlgraphics-commons-2.6.jar"/>
31
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
32
	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
33
	<classpathentry kind="output" path="bin"/>
34
</classpath>
TXM/trunk/org.txm.libs.batik/META-INF/MANIFEST.MF (revision 3298)
1 1
Manifest-Version: 1.0
2 2
Bundle-SymbolicName: org.txm.libs.batik
3
Export-Package: javax.xml,javax.xml.datatype,javax.xml.namespace,javax
4
 .xml.parsers,javax.xml.transform,javax.xml.transform.dom,javax.xml.tr
5
 ansform.sax,javax.xml.transform.stream,javax.xml.validation,javax.xml
6
 .xpath,org.apache.batik,org.apache.batik.anim,org.apache.batik.anim.t
7
 iming,org.apache.batik.anim.values,org.apache.batik.bridge,org.apache
8
 .batik.bridge.svg12,org.apache.batik.css.dom,org.apache.batik.css.eng
9
 ine,org.apache.batik.css.engine.sac,org.apache.batik.css.engine.value
10
 ,org.apache.batik.css.engine.value.css2,org.apache.batik.css.engine.v
11
 alue.svg,org.apache.batik.css.engine.value.svg12,org.apache.batik.css
12
 .parser,org.apache.batik.dom,org.apache.batik.dom.anim,org.apache.bat
13
 ik.dom.events,org.apache.batik.dom.svg,org.apache.batik.dom.svg12,org
14
 .apache.batik.dom.traversal,org.apache.batik.dom.util,org.apache.bati
15
 k.dom.xbl,org.apache.batik.ext.awt,org.apache.batik.ext.awt.color,org
16
 .apache.batik.ext.awt.font,org.apache.batik.ext.awt.g2d,org.apache.ba
17
 tik.ext.awt.geom,org.apache.batik.ext.awt.image,org.apache.batik.ext.
18
 awt.image.codec.imageio,org.apache.batik.ext.awt.image.codec.jpeg,org
19
 .apache.batik.ext.awt.image.codec.png,org.apache.batik.ext.awt.image.
20
 codec.tiff,org.apache.batik.ext.awt.image.codec.util,org.apache.batik
21
 .ext.awt.image.renderable,org.apache.batik.ext.awt.image.rendered,org
22
 .apache.batik.ext.awt.image.spi,org.apache.batik.ext.swing,org.apache
23
 .batik.gvt,org.apache.batik.gvt.event,org.apache.batik.gvt.filter,org
24
 .apache.batik.gvt.flow,org.apache.batik.gvt.font,org.apache.batik.gvt
25
 .renderer,org.apache.batik.gvt.svg12,org.apache.batik.gvt.text,org.ap
26
 ache.batik.i18n,org.apache.batik.parser,org.apache.batik.script,org.a
27
 pache.batik.script.rhino,org.apache.batik.script.rhino.svg12,org.apac
28
 he.batik.svggen,org.apache.batik.svggen.font,org.apache.batik.svggen.
29
 font.table,org.apache.batik.swing,org.apache.batik.swing.gvt,org.apac
30
 he.batik.swing.svg,org.apache.batik.transcoder,org.apache.batik.trans
31
 coder.image,org.apache.batik.transcoder.image.resources,org.apache.ba
32
 tik.transcoder.keys,org.apache.batik.transcoder.print,org.apache.bati
33
 k.transcoder.svg2svg,org.apache.batik.transcoder.wmf,org.apache.batik
34
 .transcoder.wmf.tosvg,org.apache.batik.util,org.apache.batik.util.gui
35
 ,org.apache.batik.util.gui.resource,org.apache.batik.util.gui.xmledit
36
 or,org.apache.batik.util.io,org.apache.batik.util.resources,org.apach
37
 e.batik.xml,org.apache.xmlcommons,org.mozilla.classfile,org.mozilla.j
38
 avascript,org.mozilla.javascript.continuations,org.mozilla.javascript
39
 .debug,org.mozilla.javascript.jdk11,org.mozilla.javascript.jdk13,org.
40
 mozilla.javascript.optimizer,org.mozilla.javascript.regexp,org.mozill
41
 a.javascript.serialize,org.mozilla.javascript.tools,org.mozilla.javas
42
 cript.tools.debugger,org.mozilla.javascript.tools.debugger.downloaded
43
 ,org.mozilla.javascript.tools.idswitch,org.mozilla.javascript.tools.j
44
 sc,org.mozilla.javascript.tools.shell,org.mozilla.javascript.xml,org.
45
 mozilla.javascript.xmlimpl,org.w3c.css.sac,org.w3c.css.sac.helpers,or
46
 g.w3c.dom,org.w3c.dom.bootstrap,org.w3c.dom.css,org.w3c.dom.events,or
47
 g.w3c.dom.html,org.w3c.dom.ls,org.w3c.dom.ranges,org.w3c.dom.smil,org
48
 .w3c.dom.stylesheets,org.w3c.dom.svg,org.w3c.dom.traversal,org.w3c.do
49
 m.views,org.w3c.dom.xpath,org.xml.sax,org.xml.sax.ext,org.xml.sax.hel
50
 pers
3
Export-Package: java_cup.runtime,
4
 javax.xml,
5
 javax.xml.datatype,
6
 javax.xml.namespace,
7
 javax.xml.parsers,
8
 javax.xml.stream,
9
 javax.xml.stream.events,
10
 javax.xml.stream.util,
11
 javax.xml.transform,
12
 javax.xml.transform.dom,
13
 javax.xml.transform.sax,
14
 javax.xml.transform.stax,
15
 javax.xml.transform.stream,
16
 javax.xml.validation,
17
 javax.xml.xpath,
18
 org.apache.batik,
19
 org.apache.batik.anim,
20
 org.apache.batik.anim.dom,
21
 org.apache.batik.anim.timing,
22
 org.apache.batik.anim.values,
23
 org.apache.batik.bridge,
24
 org.apache.batik.bridge.svg12,
25
 org.apache.batik.constants,
26
 org.apache.batik.css.dom,
27
 org.apache.batik.css.engine,
28
 org.apache.batik.css.engine.sac,
29
 org.apache.batik.css.engine.value,
30
 org.apache.batik.css.engine.value.css2,
31
 org.apache.batik.css.engine.value.svg,
32
 org.apache.batik.css.engine.value.svg12,
33
 org.apache.batik.css.parser,
34
 org.apache.batik.dom,
35
 org.apache.batik.dom.events,
36
 org.apache.batik.dom.svg,
37
 org.apache.batik.dom.svg12,
38
 org.apache.batik.dom.traversal,
39
 org.apache.batik.dom.util,
40
 org.apache.batik.dom.xbl,
41
 org.apache.batik.ext.awt,
42
 org.apache.batik.ext.awt.color,
43
 org.apache.batik.ext.awt.font,
44
 org.apache.batik.ext.awt.g2d,
45
 org.apache.batik.ext.awt.geom,
46
 org.apache.batik.ext.awt.image,
47
 org.apache.batik.ext.awt.image.renderable,
48
 org.apache.batik.ext.awt.image.rendered,
49
 org.apache.batik.ext.awt.image.spi,
50
 org.apache.batik.ext.swing,
51
 org.apache.batik.gvt,
52
 org.apache.batik.gvt.event,
53
 org.apache.batik.gvt.filter,
54
 org.apache.batik.gvt.flow,
55
 org.apache.batik.gvt.font,
56
 org.apache.batik.gvt.renderer,
57
 org.apache.batik.gvt.text,
58
 org.apache.batik.i18n,
59
 org.apache.batik.parser,
60
 org.apache.batik.script,
61
 org.apache.batik.script.jpython,
62
 org.apache.batik.script.rhino,
63
 org.apache.batik.svggen,
64
 org.apache.batik.svggen.font,
65
 org.apache.batik.svggen.font.table,
66
 org.apache.batik.swing,
67
 org.apache.batik.swing.gvt,
68
 org.apache.batik.swing.svg,
69
 org.apache.batik.test,
70
 org.apache.batik.test.xml,
71
 org.apache.batik.transcoder,
72
 org.apache.batik.transcoder.image,
73
 org.apache.batik.transcoder.image.resources,
74
 org.apache.batik.transcoder.keys,
75
 org.apache.batik.transcoder.print,
76
 org.apache.batik.transcoder.svg2svg,
77
 org.apache.batik.transcoder.wmf,
78
 org.apache.batik.transcoder.wmf.tosvg,
79
 org.apache.batik.util,
80
 org.apache.batik.util.gui,
81
 org.apache.batik.util.gui.resource,
82
 org.apache.batik.util.gui.xmleditor,
83
 org.apache.batik.util.io,
84
 org.apache.batik.util.resources,
85
 org.apache.batik.w3c.dom,
86
 org.apache.batik.w3c.dom.events,
87
 org.apache.batik.xml,
88
 org.apache.bcel,
89
 org.apache.bcel.classfile,
90
 org.apache.bcel.generic,
91
 org.apache.bcel.util,
92
 org.apache.bcel.verifier,
93
 org.apache.bcel.verifier.exc,
94
 org.apache.bcel.verifier.statics,
95
 org.apache.bcel.verifier.structurals,
96
 org.apache.commons.io,
97
 org.apache.commons.io.filefilter,
98
 org.apache.commons.io.input,
99
 org.apache.commons.io.output,
100
 org.apache.commons.logging,
101
 org.apache.commons.logging.impl,
102
 org.apache.regexp,
103
 org.apache.xalan,
104
 org.apache.xalan.client,
105
 org.apache.xalan.extensions,
106
 org.apache.xalan.lib,
107
 org.apache.xalan.lib.sql,
108
 org.apache.xalan.processor,
109
 org.apache.xalan.res,
110
 org.apache.xalan.serialize,
111
 org.apache.xalan.templates,
112
 org.apache.xalan.trace,
113
 org.apache.xalan.transformer,
114
 org.apache.xalan.xslt,
115
 org.apache.xalan.xsltc,
116
 org.apache.xalan.xsltc.cmdline,
117
 org.apache.xalan.xsltc.cmdline.getopt,
118
 org.apache.xalan.xsltc.compiler,
119
 org.apache.xalan.xsltc.compiler.util,
120
 org.apache.xalan.xsltc.dom,
121
 org.apache.xalan.xsltc.runtime,
122
 org.apache.xalan.xsltc.runtime.output,
123
 org.apache.xalan.xsltc.trax,
124
 org.apache.xalan.xsltc.util,
125
 org.apache.xml.dtm,
126
 org.apache.xml.dtm.ref,
127
 org.apache.xml.dtm.ref.dom2dtm,
128
 org.apache.xml.dtm.ref.sax2dtm,
129
 org.apache.xml.res,
130
 org.apache.xml.serializer,
131
 org.apache.xml.serializer.dom3,
132
 org.apache.xml.serializer.utils,
133
 org.apache.xml.utils,
134
 org.apache.xml.utils.res,
135
 org.apache.xmlcommons,
136
 org.apache.xmlgraphics.fonts,
137
 org.apache.xmlgraphics.image,
138
 org.apache.xmlgraphics.image.codec.png,
139
 org.apache.xmlgraphics.image.codec.tiff,
140
 org.apache.xmlgraphics.image.codec.util,
141
 org.apache.xmlgraphics.image.loader,
142
 org.apache.xmlgraphics.image.loader.cache,
143
 org.apache.xmlgraphics.image.loader.impl,
144
 org.apache.xmlgraphics.image.loader.impl.imageio,
145
 org.apache.xmlgraphics.image.loader.pipeline,
146
 org.apache.xmlgraphics.image.loader.spi,
147
 org.apache.xmlgraphics.image.loader.util,
148
 org.apache.xmlgraphics.image.rendered,
149
 org.apache.xmlgraphics.image.writer,
150
 org.apache.xmlgraphics.image.writer.imageio,
151
 org.apache.xmlgraphics.image.writer.internal,
152
 org.apache.xmlgraphics.io,
153
 org.apache.xmlgraphics.java2d,
154
 org.apache.xmlgraphics.java2d.color,
155
 org.apache.xmlgraphics.java2d.color.profile,
156
 org.apache.xmlgraphics.java2d.ps,
157
 org.apache.xmlgraphics.ps,
158
 org.apache.xmlgraphics.ps.dsc,
159
 org.apache.xmlgraphics.ps.dsc.events,
160
 org.apache.xmlgraphics.ps.dsc.tools,
161
 org.apache.xmlgraphics.util,
162
 org.apache.xmlgraphics.util.dijkstra,
163
 org.apache.xmlgraphics.util.i18n,
164
 org.apache.xmlgraphics.util.io,
165
 org.apache.xmlgraphics.util.uri,
166
 org.apache.xmlgraphics.xmp,
167
 org.apache.xmlgraphics.xmp.merge,
168
 org.apache.xmlgraphics.xmp.schemas,
169
 org.apache.xmlgraphics.xmp.schemas.pdf,
170
 org.apache.xpath,
171
 org.apache.xpath.axes,
172
 org.apache.xpath.compiler,
173
 org.apache.xpath.domapi,
174
 org.apache.xpath.functions,
175
 org.apache.xpath.jaxp,
176
 org.apache.xpath.objects,
177
 org.apache.xpath.operations,
178
 org.apache.xpath.patterns,
179
 org.apache.xpath.res,
180
 org.w3c.css.sac,
181
 org.w3c.css.sac.helpers,
182
 org.w3c.dom,
183
 org.w3c.dom.bootstrap,
184
 org.w3c.dom.css,
185
 org.w3c.dom.events,
186
 org.w3c.dom.html,
187
 org.w3c.dom.ls,
188
 org.w3c.dom.ranges,
189
 org.w3c.dom.smil,
190
 org.w3c.dom.stylesheets,
191
 org.w3c.dom.svg,
192
 org.w3c.dom.traversal,
193
 org.w3c.dom.views,
194
 org.w3c.dom.xpath,
195
 org.xml.sax,
196
 org.xml.sax.ext,
197
 org.xml.sax.helpers
51 198
Bundle-Name: Batik
52 199
Bundle-Version: 0
53
Bundle-ClassPath: .,batik-anim.jar,batik-awt-util.jar,batik-bridge.jar
54
 ,batik-codec.jar,batik-css.jar,batik-dom.jar,batik-ext.jar,batik-gui-
55
 util.jar,batik-gvt.jar,batik-parser.jar,batik-script.jar,batik-svg-do
56
 m.jar,batik-svggen.jar,batik-swing.jar,batik-transcoder.jar,batik-uti
57
 l.jar,batik-xml.jar,js.jar,xml-apis-ext.jar,xml-apis.jar
200
Bundle-ClassPath: .,
201
 batik-anim-1.14.jar,
202
 batik-awt-util-1.14.jar,
203
 batik-bridge-1.14.jar,
204
 batik-constants-1.14.jar,
205
 batik-css-1.14.jar,
206
 batik-dom-1.14.jar,
207
 batik-ext-1.14.jar,
208
 batik-gui-util-1.14.jar,
209
 batik-gvt-1.14.jar,
210
 batik-i18n-1.14.jar,
211
 batik-parser-1.14.jar,
212
 batik-script-1.14.jar,
213
 batik-shared-resources-1.14.jar,
214
 batik-svg-dom-1.14.jar,
215
 batik-swing-1.14.jar,
216
 batik-test-1.14.jar,
217
 batik-test-swing-1.14.jar,
218
 batik-util-1.14.jar,
219
 batik-xml-1.14.jar,
220
 commons-io-1.3.1.jar,
221
 commons-logging-1.0.4.jar,
222
 serializer-2.7.2.jar,
223
 xalan-2.7.2.jar,
224
 xml-apis-1.4.01.jar,
225
 xml-apis-ext-1.3.04.jar,
226
 xmlgraphics-commons-2.6.jar,
227
 batik-svggen-1.14.jar,
228
 batik-transcoder-1.14.jar
58 229
Require-Bundle: org.apache.xerces;bundle-version="2.9.0";visibility:=r
59 230
 eexport
60 231
Bundle-ManifestVersion: 2
TXM/trunk/org.txm.conllu.feature/feature.xml (revision 3298)
17 17
   </license>
18 18

  
19 19
   <plugin
20
         id="org.txm.connlu.core"
20
         id="org.txm.conllu.core"
21 21
         download-size="0"
22 22
         install-size="0"
23 23
         version="0.0.0"
TXM/trunk/org.txm.index.rcp/META-INF/MANIFEST.MF (revision 3298)
5 5
Bundle-SymbolicName: org.txm.index.rcp;singleton:=true
6 6
Bundle-Version: 1.0.0.qualifier
7 7
Bundle-Name: %Bundle-Name
8
Require-Bundle: org.txm.statsengine.r.rcp;visibility:=reexport,org.txm
9
 .links.rcp;bundle-version="1.0.0";visibility:=reexport,org.txm.index.
10
 core;bundle-version="1.0.0";visibility:=reexport
8
Require-Bundle: org.txm.statsengine.r.rcp;visibility:=reexport,
9
 org.txm.links.rcp;bundle-version="1.0.0";visibility:=reexport,
10
 org.txm.index.core;bundle-version="1.0.0";visibility:=reexport
11 11
Bundle-ManifestVersion: 2
12 12
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
13 13
Bundle-Vendor: Textometrie.org
TXM/trunk/org.txm.searchengine.core/src/org/txm/searchengine/core/IQuery.java (revision 3298)
31 31
	public IQuery setQuery(String rawQuery);
32 32
	
33 33
	/**
34
	 * update the query name
35
	 * 
36
	 * @param rawQuery
37
	 * @return this
38
	 */
39
	public String getName();
40
	
41
	/**
42
	 * update the query name for frienddier access
43
	 * 
44
	 * @param name
45
	 * @return this
46
	 */
47
	public IQuery setName(String name);
48
	
49
	/**
34 50
	 * fix the query using sugar syntax rules
35 51
	 * 
36 52
	 * @return this
37 53
	 */
38
	public IQuery fixQuery();
54
	public IQuery fixQuery(String lang);
39 55
	
40 56
	public boolean equals(IQuery q);
41 57
	
TXM/trunk/org.txm.searchengine.core/src/org/txm/searchengine/core/Query.java (revision 3298)
30 30
import java.util.ArrayList;
31 31
import java.util.List;
32 32

  
33
import org.apache.commons.lang.StringUtils;
34 33
import org.txm.core.preferences.TXMPreferences;
35 34

  
36 35
/**
......
41 40

  
42 41
public class Query implements IQuery {
43 42
	
43
	public Query() {
44
		
45
	}
46
	
44 47
	/**
45 48
	 * Converts the specified list of Query to a string.
46 49
	 * Queries strings are separated by a tabulation.
......
49 52
	 * @return
50 53
	 */
51 54
	public static String queriesToString(List<Query> queries) {
55
		if (queries == null) return "";
52 56
		String str = "";
53 57
		for (int i = 0; i < queries.size(); i++) {
54 58
			if (i > 0) {
......
92 96
	public static Query stringToQuery(String str) {
93 97
		
94 98
		String[] split = str.split(TXMPreferences.LIST_SEPARATOR, 2);
95
		String eName = split[1];
99
		String eName = "CQP";
100
		if (split[1] != null) {
101
			eName = split[1];
102
		}
103
		
96 104
		SearchEngine e = SearchEnginesManager.getSearchEngine(eName);
97 105
		return new Query(split[0], e);
98
		
99 106
	}
100 107
	
101 108
	
......
109 116
	 */
110 117
	protected String queryString = "";
111 118
	
119
	/**
120
	 * The query friendly name.
121
	 */
122
	protected String friendlyName = "";
112 123
	
113 124
	/**
114 125
	 * Instantiates a new query.
......
131 142
	}
132 143
	
133 144
	@Override
145
	public Query setName(String name) {
146
		this.friendlyName = name;
147
		return this;
148
	}
149
	
150
	@Override
151
	public String getName() {
152
		if (friendlyName == null || friendlyName.length() == 0) return queryString;
153
		
154
		return friendlyName;
155
	}
156
	
157
	@Override
134 158
	public boolean equals(IQuery q) {
135 159
		return this.engine.equals(q.getSearchEngine()) && this.getQueryString().equals(q.getQueryString());
136 160
	}
......
148 172
	}
149 173
	
150 174
	@Override
151
	public IQuery fixQuery() {
175
	public IQuery fixQuery(String lang) {
152 176
		return new Query(queryString, this.engine);
153 177
	}
154 178
	
......
191 215
	 */
192 216
	@Override
193 217
	public String asString() {
194
		return "<" + this.queryString + ">"; //$NON-NLS-1$ //$NON-NLS-2$
218
		return (friendlyName != null?friendlyName:"")+"<" + this.queryString + ">"; //$NON-NLS-1$ //$NON-NLS-2$
195 219
	}
196 220
	
197 221
	
TXM/trunk/org.txm.connlu.core/src/org/txm/ud/function/ImportCoNLLUAnnotations.java (revision 3298)
1
package org.txm.ud.function;
2

  
3
import java.io.BufferedReader;
4
import java.io.File;
5
import java.io.IOException;
6
import java.util.ArrayList;
7
import java.util.Arrays;
8
import java.util.HashMap;
9
import java.util.LinkedHashMap;
10
import java.util.Set;
11

  
12
import javax.xml.stream.XMLStreamException;
13

  
14
import org.apache.commons.lang.StringUtils;
15
import org.txm.objects.Text;
16
import org.txm.searchengine.cqp.corpus.MainCorpus;
17
import org.txm.utils.AsciiUtils;
18
import org.txm.utils.io.FileCopy;
19
import org.txm.utils.io.IOUtils;
20
import org.txm.utils.logger.Log;
21
import org.txm.xml.xmltxm.XMLTXMWordPropertiesInjection;
22

  
23
public class ImportCoNLLUAnnotations {
24
	
25
	public static final String[] UD_PROPERTY_NAMES = { "id", "form", "lemma", "upos", "xpos", "feats", "head", "deprel", "deps", "misc" };
26
	
27
	public static int _importAnnotations(File coonluFile, MainCorpus mainCorpus, String propertiesPrefix, String textId, Boolean normalize_word_ids, Set<String> headPropertiesToProject, Set<String> depsPropertiesToProject, Set<String> udPropertiesToImport) throws IOException, XMLStreamException {
28
		if (textId == null || textId.length() == 0) { // no text id provided, using the conllu file name
29
			textId = coonluFile.getName().substring(0, coonluFile.getName().length() - 7);
30
		}
31
		
32
		Log.info("** processing text: " + textId);
33
		Text text = mainCorpus.getProject().getText(textId);
34
		if (text == null) {
35
			Log.warning("No text found with ID=" + textId);
36
			return 0;
37
		}
38
		File xmltxmFile = mainCorpus.getProject().getText(textId).getXMLTXMFile();
39
		File xmltxmUpdatedFile = new File(System.getProperty("java.io.tmpdir"), xmltxmFile.getName());
40
		
41
		XMLTXMWordPropertiesInjection processor = new XMLTXMWordPropertiesInjection(xmltxmFile);
42
		HashMap<String, HashMap<String, String>> rules = new HashMap<>();
43
		processor.setProperties(rules);
44
		
45
		BufferedReader reader = IOUtils.getReader(coonluFile);
46
		String line = reader.readLine();
47
		
48
		int nWords2 = 0;
49
		int nLine = 0;
50
		String sent_id = null;
51
		String newpar_id = null;
52
		String newdoc_id = null;
53
		LinkedHashMap<String, HashMap<String, String>> sentenceProperties = new LinkedHashMap<String, HashMap<String, String>>();
54
		while (line != null) {
55
			nLine++;
56
			if (line.length() == 0) {
57
				line = reader.readLine();
58
				continue; // comment
59
			}
60
			
61
			if (line.startsWith("#")) {
62
				if (line.startsWith("# sent_id = ")) {
63
					
64
					// write previous sentence word properties
65
					if (sentenceProperties.size() > 0) {
66
						storeSentenceProperties(sentenceProperties, processor, propertiesPrefix, headPropertiesToProject, depsPropertiesToProject);
67
						
68
					}
69
					
70
					sent_id = line.substring(12).trim();
71
					
72
				}
73
				else if (line.startsWith("# newdoc id = ")) {
74
					newdoc_id = line.substring(14).trim();
75
				}
76
				else if (line.startsWith("# newpar id = ")) {
77
					newpar_id = line.substring(14).trim();
78
				}
79
				else {
80
					// nothing for now
81
				}
82
				
83
				line = reader.readLine();
84
				continue; // comment
85
			}
86
			
87
			String[] split = line.split("\t", 10);
88
			if (split.length < 10) {
89
				Log.warning("Error: line " + nLine + " : " + line + " -> " + Arrays.toString(split) + " len=" + split.length);
90
				line = reader.readLine();
91
				continue; // comment
92
			}
93
			
94
			String misc = split[9];
95
			String[] miscValues = misc.split("\\|");
96
			String wId = null;
97
			for (String miscValue : miscValues) {
98
				if (miscValue.startsWith("XmlId=")) {
99
					wId = miscValue.substring(6);
100
				}
101
			}
102
			
103
			HashMap<String, String> properties = new HashMap<>();
104
			for (int i = 0; i < split.length; i++) {
105
				properties.put(UD_PROPERTY_NAMES[i], split[i]); // add the property name using the prefix ; XML-TXM types are prefixed with '#'
106
			}
107
			
108
			if (sent_id != null) {
109
				properties.put("#"+propertiesPrefix+"sentid", sent_id);
110
				sent_id = ""; // reset value for next sentence
111
			}
112
			else {
113
				properties.put("#"+propertiesPrefix+"sentid", "");
114
			}
115
			
116
			if (newdoc_id != null) {
117
				properties.put("#"+propertiesPrefix+"newdocid", newdoc_id);
118
				newdoc_id = null; // reset value for next sentence
119
			}
120
			else {
121
				properties.put("#"+propertiesPrefix+"newdocid", "");
122
			}
123
			
124
			if (newpar_id != null) {
125
				properties.put("#"+propertiesPrefix+"newparid", newpar_id);
126
				newpar_id = null; // reset value for next sentence
127
			}
128
			else {
129
				properties.put("#"+propertiesPrefix+"newparid", "");
130
			}
131
			
132
			if (wId == null) {
133
				Log.warning("No 'XmlId=' found for UD line: " + line);
134
			}
135
			else {
136
				
137
				if (normalize_word_ids) {
138
					if (!wId.startsWith("w_")) {
139
						wId = "w_" + wId.substring(1);
140
					}
141
					wId = AsciiUtils.buildWordId(wId);
142
				}
143
				
144
				//processor.addProperty(id, properties);
145
				sentenceProperties.put(wId, properties);
146
				nWords2++;
147
			}
148
			line = reader.readLine();
149
		}
... Ce différentiel a été tronqué car il excède la taille maximale pouvant être affichée.

Formats disponibles : Unified diff