Révision 3862
TXM/trunk/bundles/org.txm.specificities.core/src/org/txm/specificities/core/chartsengine/r/RSpecificitiesBarChartCreator.java (revision 3862) | ||
---|---|---|
69 | 69 |
|
70 | 70 |
|
71 | 71 |
// Title |
72 |
String title = ""; |
|
72 |
String title = ""; //$NON-NLS-1$
|
|
73 | 73 |
if (result.getBooleanParameterValue(ChartsEnginePreferences.SHOW_TITLE)) { |
74 | 74 |
title = specificitiesSelection.getName(); |
75 | 75 |
} |
TXM/trunk/bundles/org.txm.specificities.core/src/org/txm/specificities/core/functions/SpecificitiesSelection.java (revision 3862) | ||
---|---|---|
152 | 152 |
sb.append(this.getName()); |
153 | 153 |
|
154 | 154 |
if (banality != null) { |
155 |
sb.append("\n\t" + "banality: " + this.banality); |
|
155 |
sb.append("\n\t" + "banality: " + this.banality); //$NON-NLS-1$
|
|
156 | 156 |
} |
157 | 157 |
if (drawBars != null) { |
158 |
sb.append("\n\t" + "draw bars: " + this.drawBars); |
|
158 |
sb.append("\n\t" + "draw bars: " + this.drawBars); //$NON-NLS-1$
|
|
159 | 159 |
} |
160 | 160 |
if (drawLines != null) { |
161 |
sb.append("\n\t" + "draw lines: " + this.drawLines); |
|
161 |
sb.append("\n\t" + "draw lines: " + this.drawLines); //$NON-NLS-1$
|
|
162 | 162 |
} |
163 | 163 |
if (groupByLines != null) { |
164 |
sb.append("\n\t" + "group lines: " + this.groupByLines); |
|
164 |
sb.append("\n\t" + "group lines: " + this.groupByLines); //$NON-NLS-1$
|
|
165 | 165 |
} |
166 | 166 |
return sb.toString(); |
167 | 167 |
} |
... | ... | |
170 | 170 |
public String getName() { |
171 | 171 |
String name = "[" + StringUtils.join(this.selectedTypeNames, ", ") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
172 | 172 |
if (name.length() > 80) { |
173 |
name = name.substring(0, 79) + "..."; |
|
173 |
name = name.substring(0, 79) + "..."; //$NON-NLS-1$
|
|
174 | 174 |
} |
175 | 175 |
return name; |
176 | 176 |
} |
... | ... | |
262 | 262 |
public boolean loadParameters() { |
263 | 263 |
String str = this.getStringParameterValue(SpecificitiesPreferences.VALUES); |
264 | 264 |
if (!str.isEmpty()) { |
265 |
selectedTypeNames = Arrays.asList(str.split("\t")); |
|
265 |
selectedTypeNames = Arrays.asList(str.split("\t")); //$NON-NLS-1$
|
|
266 | 266 |
} |
267 | 267 |
return true; |
268 | 268 |
} |
... | ... | |
270 | 270 |
@Override |
271 | 271 |
public boolean saveParameters() { |
272 | 272 |
if (selectedTypeNames != null) { |
273 |
this.saveParameter(SpecificitiesPreferences.VALUES, StringUtils.join(selectedTypeNames, "\t")); |
|
273 |
this.saveParameter(SpecificitiesPreferences.VALUES, StringUtils.join(selectedTypeNames, "\t")); //$NON-NLS-1$
|
|
274 | 274 |
} |
275 | 275 |
return true; |
276 | 276 |
} |
TXM/trunk/bundles/org.txm.specificities.core/src/org/txm/specificities/core/functions/Specificities.java (revision 3862) | ||
---|---|---|
295 | 295 |
*/ |
296 | 296 |
public static double computeIndex(int f, int F, int t, int T) throws Exception { |
297 | 297 |
RWorkspace rw = RWorkspace.getRWorkspaceInstance(); |
298 |
rw.voidEval("library(textometry)"); |
|
299 |
REXP rez = rw.eval("specificities(matrix(c(" + f + ", " + (t - f) + ", " + (F - f) + ", " + (T - t - F + f) |
|
300 |
+ "), ncol=2))"); |
|
298 |
rw.voidEval("library(textometry)"); //$NON-NLS-1$
|
|
299 |
REXP rez = rw.eval("specificities(matrix(c(" + f + ", " + (t - f) + ", " + (F - f) + ", " + (T - t - F + f) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
|
300 |
+ "), ncol=2))"); //$NON-NLS-1$
|
|
301 | 301 |
if (rez != null) { |
302 | 302 |
return rez.asDoubles()[0]; |
303 | 303 |
} |
... | ... | |
685 | 685 |
|
686 | 686 |
@Override |
687 | 687 |
public String getDetails() { |
688 |
return NLS.bind(this.getName() + " (max score={0})", this.maxScore); |
|
688 |
return NLS.bind(this.getName() + " (max score={0})", this.maxScore); //$NON-NLS-1$
|
|
689 | 689 |
} |
690 | 690 |
|
691 | 691 |
@Override |
TXM/trunk/bundles/org.txm.specificities.core/src/org/txm/functions/contrasts/Contrast.java (revision 3862) | ||
---|---|---|
42 | 42 |
public Contrast(LexicalTable table) { |
43 | 43 |
super(table); |
44 | 44 |
this.table = table; |
45 |
symbol = "Contrast_"+this.getClass().getSimpleName()+"_"+(no_contrast++); |
|
45 |
symbol = "Contrast_"+this.getClass().getSimpleName()+"_"+(no_contrast++); //$NON-NLS-1$ //$NON-NLS-2$
|
|
46 | 46 |
} |
47 | 47 |
|
48 | 48 |
// public Contrast(Corpus corpus, Subcorpus subcorpus, Property property) throws Exception, Exception { |
... | ... | |
257 | 257 |
@Override |
258 | 258 |
public boolean saveParameters() { |
259 | 259 |
// TODO Auto-generated method stub |
260 |
System.err.println("Contrast.saveParameters(): not yet implemented."); |
|
260 |
System.err.println("Contrast.saveParameters(): not yet implemented."); //$NON-NLS-1$
|
|
261 | 261 |
return true; |
262 | 262 |
} |
263 | 263 |
|
... | ... | |
265 | 265 |
@Override |
266 | 266 |
public boolean loadParameters() { |
267 | 267 |
// TODO Auto-generated method stub |
268 |
System.err.println("Contrast.loadParameters(): not yet implemented."); |
|
268 |
System.err.println("Contrast.loadParameters(): not yet implemented."); //$NON-NLS-1$
|
|
269 | 269 |
return true; |
270 | 270 |
} |
271 | 271 |
|
Formats disponibles : Unified diff