Révision 3846

TXM/trunk/bundles/org.txm.progression.core/src/org/txm/progression/core/messages/messages.properties (revision 3846)
4 4
doneColonNoMatchFound=Done\: no match found.
5 5
errorColonSubcorpusWithSize0=** Error\: the sub-corpus is empty
6 6
filteringREGEXColon=, filtering REGEX\: 
7
Finalizing=Finalizing...
7 8
inP0=in {0}
8 9
occurrences=Occurrences
10
ProcessingQueries=Processing queries...
11
ProcessingStructuralUnits=Processing structural units...
9 12
progressionOf=Progression of 
10 13
progressionOfP0InTheP1Corpus=Progression of {0} in {1} corpus...
11 14
propertyColon=, property\: 
TXM/trunk/bundles/org.txm.progression.core/src/org/txm/progression/core/messages/ProgressionCoreMessages.java (revision 3846)
30 30
	public static String doneColonNoMatchFound; 
31 31
	
32 32
	
33
	public static String errorColonSubcorpusWithSize0; 
33
	public static String errorColonSubcorpusWithSize0;
34

  
35
	public static String Finalizing;
36

  
37
	public static String ProcessingQueries;
38

  
39
	public static String ProcessingStructuralUnits; 
34 40
	public static String progressionOfP0InTheP1Corpus;
35 41
	
36 42
	
TXM/trunk/bundles/org.txm.progression.core/src/org/txm/progression/core/functions/Progression.java (revision 3846)
322 322
			this.structurePositions = new int[0];
323 323
			this.structureNames = new String[0];
324 324
			
325
			monitor.setTask("Processing queries...");
325
			monitor.setTask(ProgressionCoreMessages.ProcessingQueries);
326 326
			if (!this.stepQueries(monitor)) {
327 327
				return true;
328 328
			}
......
334 334
		}
335 335
		
336 336
		// Structural units
337
		monitor.setTask("Processing structural units...");
337
		monitor.setTask(ProgressionCoreMessages.ProcessingStructuralUnits);
338 338
		if (!this.stepStructuralUnits(monitor)) {
339 339
			return false;
340 340
		}
......
343 343
		
344 344
		// Finalization steps
345 345
		if (this.hasParameterChanged(ProgressionPreferences.QUERIES)) {
346
			monitor.setTask("Finalizing...");
346
			monitor.setTask(ProgressionCoreMessages.Finalizing);
347 347
			if (!stepFinalize()) {
348 348
				return false;
349 349
			}
......
440 440
			else {
441 441
				Query query = queries.get(iQuery);
442 442
				// System.out.println("query "+query.getQueryString());
443
				result = query.getSearchEngine().query(getCorpus(), query, query.getQueryString().replace(" ", "_") + "_progression", true);
443
				result = query.getSearchEngine().query(getCorpus(), query, query.getQueryString().replace(" ", "_") + "_progression", true); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
444 444
				//result = getCorpus().query(query, query.getQueryString().replace(" ", "_") + "_progression", true); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
445 445
			}
446 446
			int nLines = result.getNMatch();
......
745 745
	
746 746
	@Override
747 747
	public String[] getExportTXTExtensions() {
748
		return new String[] { "*.txt" };
748
		return new String[] { "*.txt" }; //$NON-NLS-1$
749 749
	}
750 750
	
751 751
	
......
771 771
	 */
772 772
	public String getQueriesString(ArrayList<Integer> queriesIndexes) {
773 773
		
774
		String query = "";
774
		String query = ""; //$NON-NLS-1$
775 775
		
776 776
		for (int i = 0; i < this.queries.size(); i++) {
777 777
			if (queriesIndexes.contains(i)) {
778 778
				String tmpQuery = this.queries.get(i).getQueryString();
779 779
				// Remove "[" and "]" only if it's a simple query as "[look]"
780
				if (tmpQuery.startsWith("[") && !tmpQuery.contains("=")) {
780
				if (tmpQuery.startsWith("[") && !tmpQuery.contains("=")) { //$NON-NLS-1$ //$NON-NLS-2$
781 781
					int length = tmpQuery.length();
782
					if (tmpQuery.endsWith("]")) {
782
					if (tmpQuery.endsWith("]")) { //$NON-NLS-1$
783 783
						length--;
784 784
					}
785 785
					tmpQuery = tmpQuery.substring(1, length);
786 786
				}
787 787
				if (query.length() > 0) {
788
					query += "|";
788
					query += "|"; //$NON-NLS-1$
789 789
				}
790 790
				query += tmpQuery;
791 791
			}
TXM/trunk/bundles/org.txm.progression.core/src/org/txm/progression/core/chartsengine/jfreechart/JFCProgressionCumulativeChartCreator.java (revision 3846)
80 80
		else {
81 81
			
82 82
			// FIXME : density not yet implemented
83
			System.err.println("JFCProgressionCumulativeChartCreator.createChart(): density mode not yet implemented.");
83
			System.err.println("JFCProgressionCumulativeChartCreator.createChart(): density mode not yet implemented."); //$NON-NLS-1$
84 84
			
85 85
			// for(int i = 0; i < progression.getAllpositions().size(); i++) {
86 86
			// int[] liste = positions.get(i);
......
138 138
		for (int i = 0; i < positions.size(); i++) {
139 139
			int[] list = positions.get(i);
140 140
			Query query = queries.get(i);
141
			XYSeries series = new XYSeries(query.getName() + " " + list.length);
141
			XYSeries series = new XYSeries(query.getName() + " " + list.length); //$NON-NLS-1$
142 142
			int c = 1;
143 143
			for (int j = 0; j < list.length; j++) {
144 144
				// add a first point to draw a vertical line
TXM/trunk/bundles/org.txm.progression.core/src/org/txm/progression/core/chartsengine/jfreechart/themes/highcharts/renderers/ProgressionItemSelectionRenderer.java (revision 3846)
74 74
				Color color = (Color) getSeriesPaint(series);
75 75
				// FIXME: this case should never happen but it sometimes happens with Progression
76 76
				if(color == null)	{
77
					return "";
77
					return ""; //$NON-NLS-1$
78 78
				}
79
				String hex = "#" + Integer.toHexString(color.getRGB()).substring(2);
79
				String hex = "#" + Integer.toHexString(color.getRGB()).substring(2); //$NON-NLS-1$
80 80
				XYSeriesCollection xyDataset = (XYSeriesCollection) dataset;
81 81

  
82 82
//
......
123 123
//				}
124 124

  
125 125
				String token = xyDataset.getSeriesKey(series).toString();
126
				token = token.substring(0, token.lastIndexOf(" "));
126
				token = token.substring(0, token.lastIndexOf(" ")); //$NON-NLS-1$
127 127
				int tokenCount = xyDataset.getSeries(series).getItemCount() - 2; // -2 for the 0 point and the dummy last point
128 128

  
129
				return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p><span style=\"color: " + hex + ";\">" + token + "</span> <b>(" + RendererUtils.valuesNumberFormat.format(xyDataset.getSeries(series).getY(item)) + " / " + tokenCount + ")</b>"
130
						+ "</p></body><html>";
129
				return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p><span style=\"color: " + hex + ";\">" + token + "</span> <b>(" + RendererUtils.valuesNumberFormat.format(xyDataset.getSeries(series).getY(item)) + " / " + tokenCount + ")</b>" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
130
						+ "</p></body><html>"; //$NON-NLS-1$
131 131
				
132 132
				// FIXME: test contexts in tool tip
133 133
//				return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p><span style=\"color: " + hex + ";\">" + xyDataset.getSeriesKey(series)
......
282 282
			item--;
283 283
		}
284 284
		
285
		String label = "";
285
		String label = ""; //$NON-NLS-1$
286 286
		int globalPosition = (int) dataset.getXValue(series, item) + 1;
287 287
		
288 288
		try {
......
318 318
		if (additionalInformations != null) {
319 319
			if (additionalInformations.size() > series) {
320 320
				if (additionalInformations.get(series).size() > item) {
321
					label += "\n "+additionalInformations.get(series).get(item);
321
					label += "\n "+additionalInformations.get(series).get(item); //$NON-NLS-1$
322 322
				}
323 323
			}
324 324
		}
TXM/trunk/bundles/org.txm.progression.core/src/org/txm/progression/core/chartsengine/r/RProgressionBaseChartCreator.java (revision 3846)
48 48
			int renderingColorMode = progression.getRenderingColorsMode();
49 49
			
50 50
			RWorkspace rw = RWorkspace.getRWorkspaceInstance();
51
			rw.eval("library(textometry)");
51
			rw.eval("library(textometry)"); //$NON-NLS-1$
52 52
			// System.out.println("create list of positions");
53 53
			
54 54
			
TXM/trunk/bundles/org.txm.progression.core/src/org/txm/progression/core/r/ProgressionRTransformer.java (revision 3846)
40 40
				names[i] = queries.get(i).getQueryString();
41 41
			}
42 42
			
43
			rw.addVectorToWorkspace("tmpqueries", names);
44
			rw.eval("tmppositions <- list();");
43
			rw.addVectorToWorkspace("tmpqueries", names); //$NON-NLS-1$
44
			rw.eval("tmppositions <- list();"); //$NON-NLS-1$
45 45
			//rw.eval(s+"$positions <- list();");
46 46
			for (int i = 0 ; i < queries.size() ; i++) {
47
				rw.addVectorToWorkspace("TEMP", positions.get(i));
48
				rw.eval("tmppositions[["+(i+1)+"]] <- TEMP");
47
				rw.addVectorToWorkspace("TEMP", positions.get(i)); //$NON-NLS-1$
48
				rw.eval("tmppositions[["+(i+1)+"]] <- TEMP"); //$NON-NLS-1$ //$NON-NLS-2$
49 49
			}
50
			rw.eval(s+" <- list(queries=tmpqueries, positions=tmppositions);");
51
			rw.eval("rm(tmpqueries, tmppositions);");
50
			rw.eval(s+" <- list(queries=tmpqueries, positions=tmppositions);"); //$NON-NLS-1$
51
			rw.eval("rm(tmpqueries, tmppositions);"); //$NON-NLS-1$
52 52
			//rw.addVectorToWorkspace(variableName, vector);
53 53
			return s;
54 54
		}

Formats disponibles : Unified diff