Révision 237
tmp/org.txm.ca.core/src/org/txm/ca/core/statsengine/r/functions/CA.java (revision 237) | ||
---|---|---|
30 | 30 |
import java.io.File; |
31 | 31 |
|
32 | 32 |
import org.rosuda.REngine.REXP; |
33 |
import org.txm.Messages; |
|
34 |
import org.txm.stat.StatException; |
|
35 |
import org.txm.stat.data.LexicalTable; |
|
36 |
import org.txm.stat.engine.r.RWorkspace; |
|
37 |
import org.txm.stat.engine.r.RWorkspaceException; |
|
38 |
import org.txm.stat.engine.r.data.QuantitativeDataStructureImpl; |
|
33 |
import org.txm.ca.core.messages.CACoreMessages; |
|
34 |
import org.txm.core.messages.TXMCoreMessages; |
|
35 |
import org.txm.lexicaltable.core.statsengine.data.LexicalTable; |
|
36 |
import org.txm.statsengine.core.StatException; |
|
37 |
import org.txm.statsengine.r.core.RWorkspace; |
|
38 |
import org.txm.statsengine.r.core.RWorkspaceException; |
|
39 |
import org.txm.statsengine.r.core.data.QuantitativeDataStructureImpl; |
|
39 | 40 |
|
40 | 41 |
/** |
41 | 42 |
* Access to the R implementation of the Correspondance Analysis. |
... | ... | |
109 | 110 |
|
110 | 111 |
|
111 | 112 |
if (!rw.containsVariable(table.getSymbol())) { |
112 |
throw new StatException(Messages.CA_0);
|
|
113 |
throw new StatException(CACoreMessages.ERROR_0);
|
|
113 | 114 |
} |
114 | 115 |
|
115 | 116 |
loadLibrary(); |
... | ... | |
119 | 120 |
rw.callFunctionAndAffect( |
120 | 121 |
"ca", new String[] { table.getSymbol() }, symbol); //$NON-NLS-1$ |
121 | 122 |
} catch (RWorkspaceException e) { |
122 |
throw new StatException(Messages.CA_2 + e.getMessage(), e);
|
|
123 |
throw new StatException(CACoreMessages.ERROR_2 + e.getMessage(), e);
|
|
123 | 124 |
} |
124 | 125 |
} |
125 | 126 |
|
... | ... | |
219 | 220 |
coldist = RWorkspace.toDouble(sv); |
220 | 221 |
// Arrays.sort(coldist); |
221 | 222 |
} catch (RWorkspaceException e) { |
222 |
throw new StatException(Messages.CA_4 + e.getMessage(), e);
|
|
223 |
throw new StatException(CACoreMessages.ERROR_3 + e.getMessage(), e);
|
|
223 | 224 |
} |
224 | 225 |
} |
225 | 226 |
return coldist; |
... | ... | |
239 | 240 |
colinertia = RWorkspace.toDouble(sv); |
240 | 241 |
// Arrays.sort(colinertia); |
241 | 242 |
} catch (RWorkspaceException e) { |
242 |
throw new StatException(Messages.CA_4 + e.getMessage(), e);
|
|
243 |
throw new StatException(CACoreMessages.ERROR_3 + e.getMessage(), e);
|
|
243 | 244 |
} |
244 | 245 |
} |
245 | 246 |
return colinertia; |
... | ... | |
259 | 260 |
colmass = RWorkspace.toDouble(sv); |
260 | 261 |
// Arrays.sort(colmass); |
261 | 262 |
} catch (RWorkspaceException e) { |
262 |
throw new StatException(Messages.CA_4 + e.getMessage(), e);
|
|
263 |
throw new StatException(CACoreMessages.ERROR_3 + e.getMessage(), e);
|
|
263 | 264 |
} |
264 | 265 |
} |
265 | 266 |
return colmass; |
... | ... | |
363 | 364 |
rowdist = RWorkspace.toDouble(sv); |
364 | 365 |
// Arrays.sort(rowdist); |
365 | 366 |
} catch (RWorkspaceException e) { |
366 |
throw new StatException(Messages.CA_4 + e.getMessage(), e);
|
|
367 |
throw new StatException(CACoreMessages.ERROR_3 + e.getMessage(), e);
|
|
367 | 368 |
} |
368 | 369 |
} |
369 | 370 |
return rowdist; |
... | ... | |
383 | 384 |
rowinertia = RWorkspace.toDouble(sv); |
384 | 385 |
// Arrays.sort(rowinertia); |
385 | 386 |
} catch (RWorkspaceException e) { |
386 |
throw new StatException(Messages.CA_4 + e.getMessage(), e);
|
|
387 |
throw new StatException(CACoreMessages.ERROR_3 + e.getMessage(), e);
|
|
387 | 388 |
} |
388 | 389 |
} |
389 | 390 |
return rowinertia; |
... | ... | |
403 | 404 |
rowmass = RWorkspace.toDouble(sv); |
404 | 405 |
// Arrays.sort(rowmass); |
405 | 406 |
} catch (RWorkspaceException e) { |
406 |
throw new StatException(Messages.CA_4 + e.getMessage(), e);
|
|
407 |
throw new StatException(CACoreMessages.ERROR_3 + e.getMessage(), e);
|
|
407 | 408 |
} |
408 | 409 |
} |
409 | 410 |
return rowmass; |
... | ... | |
423 | 424 |
singularValues = RWorkspace.toDouble(sv); |
424 | 425 |
// Arrays.sort(singularValues); |
425 | 426 |
} catch (RWorkspaceException e) { |
426 |
throw new StatException(Messages.CA_4 + e.getMessage(), e);
|
|
427 |
throw new StatException(CACoreMessages.ERROR_3 + e.getMessage(), e);
|
|
427 | 428 |
} |
428 | 429 |
} |
429 | 430 |
return singularValues; |
... | ... | |
462 | 463 |
try { |
463 | 464 |
rw.voidEval("library(ca)"); //$NON-NLS-1$ |
464 | 465 |
} catch (RWorkspaceException e) { |
465 |
System.out.println(Messages.CA_16 + e);
|
|
466 |
System.out.println(CACoreMessages.ERROR_1 + e);
|
|
466 | 467 |
return false; |
467 | 468 |
} |
468 | 469 |
return true; |
tmp/org.txm.ca.core/src/org/txm/ca/core/statsengine/r/functions/FactoMineRCA.java (revision 237) | ||
---|---|---|
32 | 32 |
|
33 | 33 |
import org.rosuda.REngine.REXP; |
34 | 34 |
import org.rosuda.REngine.REXPMismatchException; |
35 |
import org.txm.Messages; |
|
36 |
import org.txm.stat.StatException; |
|
37 |
import org.txm.stat.data.LexicalTable; |
|
38 |
import org.txm.stat.engine.r.RWorkspace; |
|
39 |
import org.txm.stat.engine.r.RWorkspaceException; |
|
40 |
import org.txm.stat.engine.r.data.QuantitativeDataStructureImpl; |
|
35 |
import org.txm.ca.core.messages.CACoreMessages; |
|
36 |
import org.txm.core.messages.TXMCoreMessages; |
|
37 |
import org.txm.lexicaltable.core.statsengine.data.LexicalTable; |
|
38 |
import org.txm.statsengine.core.StatException; |
|
39 |
import org.txm.statsengine.r.core.RWorkspace; |
|
40 |
import org.txm.statsengine.r.core.RWorkspaceException; |
|
41 |
import org.txm.statsengine.r.core.data.QuantitativeDataStructureImpl; |
|
41 | 42 |
|
42 | 43 |
// TODO: Auto-generated Javadoc |
43 | 44 |
/** |
... | ... | |
107 | 108 |
public FactoMineRCA(LexicalTable table) throws StatException { |
108 | 109 |
|
109 | 110 |
if (!rw.containsVariable(table.getSymbol())) { |
110 |
throw new StatException(Messages.CA_0);
|
|
111 |
throw new StatException(CACoreMessages.ERROR_0);
|
|
111 | 112 |
} |
112 | 113 |
|
113 | 114 |
loadLibrary(); |
... | ... | |
117 | 118 |
//rw.callFunctionAndAffect("FactoMineR:CA", new String[] { table.getSymbol() }, symbol); //$NON-NLS-1$ |
118 | 119 |
rw.eval(symbol+" <- FactoMineR::CA("+table.getSymbol()+", graph=FALSE)"); //$NON-NLS-1$ //$NON-NLS-2$ |
119 | 120 |
} catch (RWorkspaceException e) { |
120 |
throw new StatException(Messages.CA_2 + e.getMessage(), e);
|
|
121 |
throw new StatException(CACoreMessages.ERROR_2 + e.getMessage(), e);
|
|
121 | 122 |
} |
122 | 123 |
} |
123 | 124 |
|
... | ... | |
132 | 133 |
colcontrib = sv.asDoubleMatrix(); |
133 | 134 |
// Arrays.sort(rowdist); |
134 | 135 |
} catch (RWorkspaceException e) { |
135 |
throw new StatException(Messages.FactoMineRCA_2 + e.getMessage(), e); |
|
136 |
throw new StatException(TXMCoreMessages.FactoMineRCA_2 + e.getMessage(), e);
|
|
136 | 137 |
} catch (REXPMismatchException e) { |
137 | 138 |
// TODO Auto-generated catch block |
138 | 139 |
org.txm.utils.logger.Log.printStackTrace(e); |
... | ... | |
152 | 153 |
colcos2 = sv.asDoubleMatrix(); |
153 | 154 |
// Arrays.sort(rowdist); |
154 | 155 |
} catch (RWorkspaceException e) { |
155 |
throw new StatException(Messages.FactoMineRCA_3 + e.getMessage(), e); |
|
156 |
throw new StatException(TXMCoreMessages.FactoMineRCA_3 + e.getMessage(), e);
|
|
156 | 157 |
} catch (REXPMismatchException e) { |
157 | 158 |
// TODO Auto-generated catch block |
158 | 159 |
org.txm.utils.logger.Log.printStackTrace(e); |
... | ... | |
238 | 239 |
colinertia = RWorkspace.toDouble(sv); |
239 | 240 |
// Arrays.sort(colinertia); |
240 | 241 |
} catch (RWorkspaceException e) { |
241 |
throw new StatException(Messages.CA_4 + e.getMessage(), e);
|
|
242 |
throw new StatException(CACoreMessages.ERROR_3 + e.getMessage(), e);
|
|
242 | 243 |
} |
243 | 244 |
} |
244 | 245 |
return colinertia; |
... | ... | |
258 | 259 |
colmass = RWorkspace.toDouble(sv); |
259 | 260 |
// Arrays.sort(colmass); |
260 | 261 |
} catch (RWorkspaceException e) { |
261 |
throw new StatException(Messages.CA_4 + e.getMessage(), e);
|
|
262 |
throw new StatException(CACoreMessages.ERROR_3 + e.getMessage(), e);
|
|
262 | 263 |
} |
263 | 264 |
} |
264 | 265 |
return colmass; |
... | ... | |
279 | 280 |
rowcontrib[i][j] = rowcontrib[i][j] / 100.0; |
280 | 281 |
// Arrays.sort(rowdist); |
281 | 282 |
} catch (RWorkspaceException e) { |
282 |
throw new StatException(Messages.FactoMineRCA_4 + e.getMessage(), e); |
|
283 |
throw new StatException(TXMCoreMessages.FactoMineRCA_4 + e.getMessage(), e);
|
|
283 | 284 |
} catch (REXPMismatchException e) { |
284 | 285 |
// TODO Auto-generated catch block |
285 | 286 |
org.txm.utils.logger.Log.printStackTrace(e); |
... | ... | |
299 | 300 |
rowcos2 = sv.asDoubleMatrix(); |
300 | 301 |
// Arrays.sort(rowdist); |
301 | 302 |
} catch (RWorkspaceException e) { |
302 |
throw new StatException(Messages.FactoMineRCA_5 + e.getMessage(), e); |
|
303 |
throw new StatException(TXMCoreMessages.FactoMineRCA_5 + e.getMessage(), e);
|
|
303 | 304 |
} catch (REXPMismatchException e) { |
304 | 305 |
// TODO Auto-generated catch block |
305 | 306 |
org.txm.utils.logger.Log.printStackTrace(e); |
... | ... | |
371 | 372 |
rowinertia = RWorkspace.toDouble(sv); |
372 | 373 |
// Arrays.sort(rowinertia); |
373 | 374 |
} catch (RWorkspaceException e) { |
374 |
throw new StatException(Messages.CA_4 + e.getMessage(), e);
|
|
375 |
throw new StatException(CACoreMessages.ERROR_3 + e.getMessage(), e);
|
|
375 | 376 |
} |
376 | 377 |
} |
377 | 378 |
return rowinertia; |
... | ... | |
391 | 392 |
rowmass = RWorkspace.toDouble(sv); |
392 | 393 |
// Arrays.sort(rowmass); |
393 | 394 |
} catch (RWorkspaceException e) { |
394 |
throw new StatException(Messages.CA_4 + e.getMessage(), e);
|
|
395 |
throw new StatException(CACoreMessages.ERROR_3 + e.getMessage(), e);
|
|
395 | 396 |
} |
396 | 397 |
} |
397 | 398 |
return rowmass; |
... | ... | |
439 | 440 |
valeursPropres = Arrays.copyOfRange(valeursPropres, 0, valeursPropres.length -1); |
440 | 441 |
// Arrays.sort(singularValues); |
441 | 442 |
} catch (RWorkspaceException e) { |
442 |
throw new StatException(Messages.CA_4 + e.getMessage(), e);
|
|
443 |
throw new StatException(CACoreMessages.ERROR_3 + e.getMessage(), e);
|
|
443 | 444 |
} |
444 | 445 |
} |
445 | 446 |
return valeursPropres; |
... | ... | |
454 | 455 |
try { |
455 | 456 |
rw.voidEval("library(FactoMineR)"); //$NON-NLS-1$ |
456 | 457 |
} catch (RWorkspaceException e) { |
457 |
System.out.println(Messages.CA_16+ e);
|
|
458 |
System.out.println(CACoreMessages.ERROR_1+ e);
|
|
458 | 459 |
return false; |
459 | 460 |
} |
460 | 461 |
return true; |
tmp/org.txm.ca.core/src/org/txm/ca/core/statsengine/r/functions/ICA.java (revision 237) | ||
---|---|---|
29 | 29 |
|
30 | 30 |
import java.io.File; |
31 | 31 |
|
32 |
import org.txm.stat.StatException; |
|
32 |
import org.txm.statsengine.core.StatException;
|
|
33 | 33 |
|
34 | 34 |
// TODO: Auto-generated Javadoc |
35 | 35 |
/** |
tmp/org.txm.ca.core/src/org/txm/ca/core/messages/messages_fr.properties (revision 237) | ||
---|---|---|
1 |
ChartsEngine_CA_FACTORIAL_MAP_AXIS_LABEL_PREFIX=Axe |
|
2 |
ChartsEngine_CA_FACTORIAL_MAP_LEGEND_COLUMNS_LABEL=Colonnes |
|
3 |
ChartsEngine_CA_FACTORIAL_MAP_LEGEND_ROWS_LABEL=Lignes |
|
4 |
ChartsEngine_CA_FACTORIAL_MAP_TITLE=Plan factoriel de l''analyse des correspondances\nsur la partition {0} du corpus {1} |
|
5 |
ChartsEngine_CA_FACTORIAL_MAP_TOOLTIP_COLS_LABEL=t |
|
6 |
ChartsEngine_CA_FACTORIAL_MAP_TOOLTIP_COORDINATES=Coordonn�es |
|
7 |
ChartsEngine_CA_FACTORIAL_MAP_TOOLTIP_ROWS_LABEL=Fr�quence |
|
8 |
ChartsEngine_CA_SINGULAR_VALUES_CANT_CREATE_CHART=Impossible de cr�er l'histogramme des valeurs propres de l'AFC |
|
9 |
ChartsEngine_CA_SINGULAR_VALUES_TITLE=Valeurs propres |
|
10 |
ChartsEngine_CA_SINGULAR_VALUES_TOOLTIP_PERCENT=% |
|
11 |
ChartsEngine_CA_SINGULAR_VALUES_TOOLTIP_Y_LABEL=Valeur propre |
|
12 |
ChartsEngine_CA_SINGULAR_VALUES_X_AXIS_LABEL=Axe |
|
13 |
ChartsEngine_CA_SINGULAR_VALUES_X_LABELS_PREFIX= |
|
14 |
ChartsEngine_CA_SINGULAR_VALUES_Y_AXIS_LABEL=Valeur propre |
|
15 |
ChartsEngine_CANT_CREATE_CA_FILE_CHART=Impossible de créer le fichier du graphique du plan factoriel de l'AFC (moteur de production de graphiques: {0}) |
|
16 |
ChartsEngine_CANT_CREATE_CA_SINGULAR_VALUES_FILE_CHART=Impossible de créer le fichier du graphique des valeurs singulières de l''AFC (moteur de production de graphiques: {0}) |
|
17 |
ColumnLabel_21=Lignes |
|
18 |
ColumnLabel_22=Colonnes |
|
19 |
ColumnLabel_23=Q12 |
|
20 |
ColumnLabel_24=Q13 |
|
21 |
ColumnLabel_25=Q23 |
|
22 |
ColumnLabel_26=Mass |
|
23 |
ColumnLabel_27=Dist |
|
24 |
ColumnLabel_29=Cont |
|
25 |
ColumnLabel_30=Cos² |
|
26 |
ColumnLabel_32=c1 |
|
27 |
ColumnLabel_33=c2 |
|
28 |
ColumnLabel_34=c3 |
|
1 |
|
|
2 |
CHARTS_ERROR_CANT_CREATE_CA_FILE_CHART = Impossible de créer le fichier du graphique du plan factoriel de l'AFC (moteur de production de graphiques: {0}) |
|
3 |
CHARTS_ERROR_CANT_CREATE_SINGULAR_VALUES_CHART = Impossible de créer l'histogramme des valeurs propres de l'AFC |
|
4 |
CHARTS_FACTORIAL_MAP_AXIS_LABEL_PREFIX = Axe |
|
5 |
CHARTS_FACTORIAL_MAP_LEGEND_COLUMNS_LABEL = Colonnes |
|
6 |
CHARTS_FACTORIAL_MAP_LEGEND_ROWS_LABEL = Lignes |
|
7 |
CHARTS_FACTORIAL_MAP_TITLE = Plan factoriel de l'analyse des correspondances\nsur la partition {0} du corpus {1} |
|
8 |
CHARTS_FACTORIAL_MAP_TOOLTIP_COLS_LABEL = t |
|
9 |
CHARTS_FACTORIAL_MAP_TOOLTIP_COORDINATES = Coordonnées |
|
10 |
CHARTS_FACTORIAL_MAP_TOOLTIP_ROWS_LABEL = Fréquence |
|
11 |
CHARTS_SINGULAR_VALUES_TITLE = Valeurs propres |
|
12 |
CHARTS_SINGULAR_VALUES_TOOLTIP_PERCENT = % |
|
13 |
CHARTS_SINGULAR_VALUES_TOOLTIP_SUM = ∑ |
|
14 |
CHARTS_SINGULAR_VALUES_TOOLTIP_Y_LABEL = Valeur propre |
|
15 |
CHARTS_SINGULAR_VALUES_X_AXIS_LABEL = Axe |
|
16 |
CHARTS_SINGULAR_VALUES_X_LABELS_PREFIX = |
|
17 |
CHARTS_SINGULAR_VALUES_Y_AXIS_LABEL = Valeur propre |
|
18 |
|
|
19 |
ColumnLabel_C1 = c1 |
|
20 |
ColumnLabel_C2 = c2 |
|
21 |
ColumnLabel_C3 = c3 |
|
22 |
ColumnLabel_COLS = Colonnes |
|
23 |
ColumnLabel_CONT = Cont |
|
24 |
ColumnLabel_COS2 = Cos² |
|
25 |
ColumnLabel_DIST = Dist |
|
26 |
ColumnLabel_MASS = Mass |
|
27 |
ColumnLabel_Q12 = Q12 |
|
28 |
ColumnLabel_Q13 = Q13 |
|
29 |
ColumnLabel_Q23 = Q23 |
|
30 |
ColumnLabel_ROWS = Lignes |
|
31 |
|
|
32 |
ERROR_0 = ** La table lexicale n'a pas été trouvée dans l'espace de travail R. |
|
33 |
ERROR_1 = ** Impossible de charger la librairie 'ca' |
|
34 |
ERROR_2 = ** Erreur lors du calcul de l'analyse factorielle des correspondances : |
|
35 |
ERROR_3 = ** Impossible d'extraire les valeurs propres |
tmp/org.txm.ca.core/src/org/txm/ca/core/messages/messages.properties (revision 237) | ||
---|---|---|
1 |
ChartsEngine_CA_FACTORIAL_MAP_AXIS_LABEL_PREFIX=Axis |
|
2 |
ChartsEngine_CA_FACTORIAL_MAP_LEGEND_COLUMNS_LABEL=Columns |
|
3 |
ChartsEngine_CA_FACTORIAL_MAP_LEGEND_ROWS_LABEL=Rows |
|
4 |
ChartsEngine_CA_FACTORIAL_MAP_TITLE=Correspondence analysis factorial map\n of the {0} partition in the {1} corpus |
|
5 |
ChartsEngine_CA_FACTORIAL_MAP_TOOLTIP_COLS_LABEL=t |
|
6 |
ChartsEngine_CA_FACTORIAL_MAP_TOOLTIP_COORDINATES=Coordinates |
|
7 |
ChartsEngine_CA_FACTORIAL_MAP_TOOLTIP_ROWS_LABEL=Frequency |
|
8 |
ChartsEngine_CA_SINGULAR_VALUES_CANT_CREATE_CHART=Can't create bar chart of the CA singular values |
|
9 |
ChartsEngine_CA_SINGULAR_VALUES_TITLE=Eigenvalues |
|
10 |
ChartsEngine_CA_SINGULAR_VALUES_TOOLTIP_PERCENT=% |
|
11 |
ChartsEngine_CA_SINGULAR_VALUES_TOOLTIP_SUM=∑ |
|
12 |
ChartsEngine_CA_SINGULAR_VALUES_TOOLTIP_Y_LABEL=Eigenvalue |
|
13 |
ChartsEngine_CA_SINGULAR_VALUES_X_AXIS_LABEL=Axis |
|
14 |
ChartsEngine_CA_SINGULAR_VALUES_X_LABELS_PREFIX= |
|
15 |
ChartsEngine_CA_SINGULAR_VALUES_Y_AXIS_LABEL=Eigenvalue |
|
16 |
ChartsEngine_CANT_CREATE_CA_FILE_CHART=Can''t create CA chart file (charts engine: {0}) |
|
17 |
ChartsEngine_CANT_CREATE_CA_SINGULAR_VALUES_FILE_CHART=Can''t create CA singular values chart file (charts engine: {0}) |
|
18 |
ColumnLabel_21=Rows |
|
19 |
ColumnLabel_22=Cols |
|
20 |
ColumnLabel_23=Q12 |
|
21 |
ColumnLabel_24=Q13 |
|
22 |
ColumnLabel_25=Q23 |
|
23 |
ColumnLabel_26=Mass |
|
24 |
ColumnLabel_27=Dist |
|
25 |
ColumnLabel_29=Cont |
|
26 |
ColumnLabel_30=Cos² |
|
27 |
ColumnLabel_32=c1 |
|
28 |
ColumnLabel_33=c2 |
|
29 |
CorrespondanceAnalysisEditorInput_33=c2 |
|
30 |
ColumnLabel_34=c3 |
|
1 |
|
|
2 |
CHARTS_ERROR_CANT_CREATE_CA_FILE_CHART = Can't create CA chart file (charts engine: {0}) |
|
3 |
CHARTS_ERROR_CANT_CREATE_SINGULAR_VALUES_CHART = Can't create bar chart of the CA singular values |
|
4 |
CHARTS_FACTORIAL_MAP_AXIS_LABEL_PREFIX = Axis |
|
5 |
CHARTS_FACTORIAL_MAP_LEGEND_COLUMNS_LABEL = Columns |
|
6 |
CHARTS_FACTORIAL_MAP_LEGEND_ROWS_LABEL = Rows |
|
7 |
CHARTS_FACTORIAL_MAP_TITLE = Correspondence analysis factorial map\nof the {0} partition in the {1} corpus |
|
8 |
CHARTS_FACTORIAL_MAP_TOOLTIP_COLS_LABEL = t |
|
9 |
CHARTS_FACTORIAL_MAP_TOOLTIP_COORDINATES = Coordinates |
|
10 |
CHARTS_FACTORIAL_MAP_TOOLTIP_ROWS_LABEL = Frequency |
|
11 |
CHARTS_SINGULAR_VALUES_TITLE = Eigenvalues |
|
12 |
CHARTS_SINGULAR_VALUES_TOOLTIP_PERCENT = % |
|
13 |
CHARTS_SINGULAR_VALUES_TOOLTIP_SUM = ∑ |
|
14 |
CHARTS_SINGULAR_VALUES_TOOLTIP_Y_LABEL = Eigenvalue |
|
15 |
CHARTS_SINGULAR_VALUES_X_AXIS_LABEL = Axis |
|
16 |
CHARTS_SINGULAR_VALUES_X_LABELS_PREFIX = |
|
17 |
CHARTS_SINGULAR_VALUES_Y_AXIS_LABEL = Eigenvalue |
|
18 |
|
|
19 |
ColumnLabel_C1 = c1 |
|
20 |
ColumnLabel_C2 = c2 |
|
21 |
ColumnLabel_C3 = c3 |
|
22 |
ColumnLabel_COLS = Cols |
|
23 |
ColumnLabel_CONT = Cont |
|
24 |
ColumnLabel_COS2 = Cos² |
|
25 |
ColumnLabel_DIST = Dist |
|
26 |
ColumnLabel_MASS = Mass |
|
27 |
ColumnLabel_Q12 = Q12 |
|
28 |
ColumnLabel_Q13 = Q13 |
|
29 |
ColumnLabel_Q23 = Q23 |
|
30 |
ColumnLabel_ROWS = Rows |
|
31 |
|
|
32 |
ERROR_0 = ** The lexical table was not found in the R workspace. |
|
33 |
ERROR_1 = ** Cannot load the 'ca' library |
|
34 |
ERROR_2 = ** Error while computing correspondence analysis: |
|
35 |
ERROR_3 = ** Unable to extract singular values |
tmp/org.txm.ca.core/src/org/txm/ca/core/messages/CACoreMessages.java (revision 237) | ||
---|---|---|
8 | 8 |
private static final String BUNDLE_NAME = "org.txm.ca.core.messages.messages"; //$NON-NLS-1$ |
9 | 9 |
|
10 | 10 |
|
11 |
public static String ChartsEngine_CANT_CREATE_CA_FILE_CHART; |
|
12 |
public static String ChartsEngine_CANT_CREATE_CA_SINGULAR_VALUES_FILE_CHART; |
|
11 |
public static String CHARTS_ERROR_CANT_CREATE_CA_FILE_CHART; |
|
13 | 12 |
|
14 |
public static String ChartsEngine_CA_FACTORIAL_MAP_TITLE;
|
|
15 |
public static String ChartsEngine_CA_FACTORIAL_MAP_LEGEND_COLUMNS_LABEL;
|
|
16 |
public static String ChartsEngine_CA_FACTORIAL_MAP_LEGEND_ROWS_LABEL;
|
|
17 |
public static String ChartsEngine_CA_FACTORIAL_MAP_AXIS_LABEL_PREFIX;
|
|
18 |
public static String ChartsEngine_CA_FACTORIAL_MAP_TOOLTIP_ROWS_LABEL;
|
|
19 |
public static String ChartsEngine_CA_FACTORIAL_MAP_TOOLTIP_COLS_LABEL;
|
|
20 |
public static String ChartsEngine_CA_FACTORIAL_MAP_TOOLTIP_COORDINATES;
|
|
13 |
public static String CHARTS_FACTORIAL_MAP_TITLE;
|
|
14 |
public static String CHARTS_FACTORIAL_MAP_LEGEND_COLUMNS_LABEL;
|
|
15 |
public static String CHARTS_FACTORIAL_MAP_LEGEND_ROWS_LABEL;
|
|
16 |
public static String CHARTS_FACTORIAL_MAP_AXIS_LABEL_PREFIX;
|
|
17 |
public static String CHARTS_FACTORIAL_MAP_TOOLTIP_ROWS_LABEL;
|
|
18 |
public static String CHARTS_FACTORIAL_MAP_TOOLTIP_COLS_LABEL;
|
|
19 |
public static String CHARTS_FACTORIAL_MAP_TOOLTIP_COORDINATES;
|
|
21 | 20 |
|
22 |
public static String ChartsEngine_CA_SINGULAR_VALUES_CANT_CREATE_CHART;
|
|
23 |
public static String ChartsEngine_CA_SINGULAR_VALUES_TITLE;
|
|
24 |
public static String ChartsEngine_CA_SINGULAR_VALUES_X_AXIS_LABEL;
|
|
25 |
public static String ChartsEngine_CA_SINGULAR_VALUES_X_LABELS_PREFIX;
|
|
26 |
public static String ChartsEngine_CA_SINGULAR_VALUES_Y_AXIS_LABEL;
|
|
27 |
public static String ChartsEngine_CA_SINGULAR_VALUES_TOOLTIP_Y_LABEL;
|
|
28 |
public static String ChartsEngine_CA_SINGULAR_VALUES_TOOLTIP_PERCENT;
|
|
29 |
public static String ChartsEngine_CA_SINGULAR_VALUES_TOOLTIP_SUM;
|
|
21 |
public static String CHARTS_ERROR_CANT_CREATE_SINGULAR_VALUES_CHART;
|
|
22 |
public static String CHARTS_SINGULAR_VALUES_TITLE;
|
|
23 |
public static String CHARTS_SINGULAR_VALUES_X_AXIS_LABEL;
|
|
24 |
public static String CHARTS_SINGULAR_VALUES_X_LABELS_PREFIX;
|
|
25 |
public static String CHARTS_SINGULAR_VALUES_Y_AXIS_LABEL;
|
|
26 |
public static String CHARTS_SINGULAR_VALUES_TOOLTIP_Y_LABEL;
|
|
27 |
public static String CHARTS_SINGULAR_VALUES_TOOLTIP_PERCENT;
|
|
28 |
public static String CHARTS_SINGULAR_VALUES_TOOLTIP_SUM;
|
|
30 | 29 |
|
31 |
public static String ColumnLabel_21;
|
|
32 |
public static String ColumnLabel_22;
|
|
33 |
public static String ColumnLabel_23;
|
|
34 |
public static String ColumnLabel_24;
|
|
35 |
public static String ColumnLabel_25;
|
|
36 |
public static String ColumnLabel_26;
|
|
37 |
public static String ColumnLabel_27;
|
|
38 |
public static String ColumnLabel_29;
|
|
39 |
public static String ColumnLabel_30;
|
|
40 |
public static String ColumnLabel_32;
|
|
41 |
public static String ColumnLabel_33;
|
|
42 |
public static String ColumnLabel_34;
|
|
30 |
public static String ColumnLabel_ROWS;
|
|
31 |
public static String ColumnLabel_COLS;
|
|
32 |
public static String ColumnLabel_Q12;
|
|
33 |
public static String ColumnLabel_Q13;
|
|
34 |
public static String ColumnLabel_Q23;
|
|
35 |
public static String ColumnLabel_MASS;
|
|
36 |
public static String ColumnLabel_DIST;
|
|
37 |
public static String ColumnLabel_CONT;
|
|
38 |
public static String ColumnLabel_COS2;
|
|
39 |
public static String ColumnLabel_C1;
|
|
40 |
public static String ColumnLabel_C2;
|
|
41 |
public static String ColumnLabel_C3;
|
|
43 | 42 |
|
43 |
public static String ERROR_0; |
|
44 |
public static String ERROR_1; |
|
45 |
public static String ERROR_2; |
|
46 |
public static String ERROR_3; |
|
44 | 47 |
|
45 | 48 |
|
46 | 49 |
static { |
tmp/org.txm.ca.core/src/org/txm/ca/core/functions/CA.java (revision 237) | ||
---|---|---|
45 | 45 |
import org.txm.core.preferences.TXMPreferences; |
46 | 46 |
import org.txm.core.results.ITXMResult; |
47 | 47 |
import org.txm.functions.Function; |
48 |
import org.txm.lexicaltable.functions.LexicalTableFactory; |
|
48 |
import org.txm.lexicaltable.core.functions.LexicalTableFactory; |
|
49 |
import org.txm.lexicaltable.core.statsengine.data.LexicalTable; |
|
49 | 50 |
import org.txm.searchengine.cqp.clientExceptions.CqiClientException; |
50 | 51 |
import org.txm.searchengine.cqp.corpus.Corpus; |
51 | 52 |
import org.txm.searchengine.cqp.corpus.Partition; |
52 | 53 |
import org.txm.searchengine.cqp.corpus.Property; |
53 |
import org.txm.stat.StatException; |
|
54 |
import org.txm.stat.data.LexicalTable; |
|
54 |
import org.txm.statsengine.core.StatException; |
|
55 | 55 |
|
56 | 56 |
|
57 | 57 |
/** |
... | ... | |
424 | 424 |
{ |
425 | 425 |
if (coltitles == null) { |
426 | 426 |
List<String> colnames = new ArrayList<String>(); |
427 |
colnames.add(CACoreMessages.ColumnLabel_22); // entry
|
|
427 |
colnames.add(CACoreMessages.ColumnLabel_COLS); // entry
|
|
428 | 428 |
colnames.add(" "); //$NON-NLS-1$ |
429 |
colnames.add(CACoreMessages.ColumnLabel_23); // Q12
|
|
430 |
colnames.add(CACoreMessages.ColumnLabel_24); // Q13
|
|
431 |
colnames.add(CACoreMessages.ColumnLabel_25); // Q23
|
|
432 |
colnames.add(CACoreMessages.ColumnLabel_26); // Mass
|
|
433 |
colnames.add(CACoreMessages.ColumnLabel_27); // Dist
|
|
429 |
colnames.add(CACoreMessages.ColumnLabel_Q12); // Q12
|
|
430 |
colnames.add(CACoreMessages.ColumnLabel_Q13); // Q13
|
|
431 |
colnames.add(CACoreMessages.ColumnLabel_Q23); // Q23
|
|
432 |
colnames.add(CACoreMessages.ColumnLabel_MASS); // Mass
|
|
433 |
colnames.add(CACoreMessages.ColumnLabel_DIST); // Dist
|
|
434 | 434 |
for (int c = 0; c < 3; c++)// seulement les 3 premiers axes |
435 | 435 |
{ |
436 | 436 |
colnames.add(" "); // separator //$NON-NLS-1$ |
437 |
colnames.add(CACoreMessages.ColumnLabel_29+ (c + 1)); // ContribN
|
|
438 |
colnames.add(CACoreMessages.ColumnLabel_30+ (c + 1)); // Cos²N
|
|
437 |
colnames.add(CACoreMessages.ColumnLabel_CONT+ (c + 1)); // ContribN
|
|
438 |
colnames.add(CACoreMessages.ColumnLabel_COS2+ (c + 1)); // Cos²N
|
|
439 | 439 |
} |
440 | 440 |
colnames.add(" "); // separator //$NON-NLS-1$ |
441 |
colnames.add(CACoreMessages.ColumnLabel_32); // coord axis 1
|
|
442 |
colnames.add(CACoreMessages.ColumnLabel_33); // coord axis 2
|
|
443 |
colnames.add(CACoreMessages.ColumnLabel_34); // coord axis 3
|
|
441 |
colnames.add(CACoreMessages.ColumnLabel_C1); // coord axis 1
|
|
442 |
colnames.add(CACoreMessages.ColumnLabel_C2); // coord axis 2
|
|
443 |
colnames.add(CACoreMessages.ColumnLabel_C3); // coord axis 3
|
|
444 | 444 |
colnames.add(""); //$NON-NLS-1$ |
445 | 445 |
|
446 | 446 |
coltitles = colnames.toArray(new String[] {}); |
... | ... | |
624 | 624 |
public String[] getRowInfosTitles() { |
625 | 625 |
if (rowtitles == null) { |
626 | 626 |
List<String> colnames = new ArrayList<String>(); |
627 |
colnames.add(CACoreMessages.ColumnLabel_21); // entry
|
|
627 |
colnames.add(CACoreMessages.ColumnLabel_ROWS); // entry
|
|
628 | 628 |
colnames.add(" "); //$NON-NLS-1$ |
629 |
colnames.add(CACoreMessages.ColumnLabel_23); // Q12
|
|
630 |
colnames.add(CACoreMessages.ColumnLabel_24); // Q13
|
|
631 |
colnames.add(CACoreMessages.ColumnLabel_25); // Q23
|
|
632 |
colnames.add(CACoreMessages.ColumnLabel_26); // Mass
|
|
633 |
colnames.add(CACoreMessages.ColumnLabel_27); // Dist
|
|
629 |
colnames.add(CACoreMessages.ColumnLabel_Q12); // Q12
|
|
630 |
colnames.add(CACoreMessages.ColumnLabel_Q13); // Q13
|
|
631 |
colnames.add(CACoreMessages.ColumnLabel_Q23); // Q23
|
|
632 |
colnames.add(CACoreMessages.ColumnLabel_MASS); // Mass
|
|
633 |
colnames.add(CACoreMessages.ColumnLabel_DIST); // Dist
|
|
634 | 634 |
for (int c = 0; c < 3; c++)// seulement les 3 premiers axes |
635 | 635 |
{ |
636 | 636 |
colnames.add(" "); // separator //$NON-NLS-1$ |
637 |
colnames.add(CACoreMessages.ColumnLabel_29+ (c + 1)); // ContribN
|
|
638 |
colnames.add(CACoreMessages.ColumnLabel_30+ (c + 1)); // Cos²N
|
|
637 |
colnames.add(CACoreMessages.ColumnLabel_CONT+ (c + 1)); // ContribN
|
|
638 |
colnames.add(CACoreMessages.ColumnLabel_COS2+ (c + 1)); // Cos²N
|
|
639 | 639 |
} |
640 | 640 |
colnames.add(" "); // separator //$NON-NLS-1$ |
641 |
colnames.add(CACoreMessages.ColumnLabel_32); // coord axis 1
|
|
642 |
colnames.add(CACoreMessages.ColumnLabel_33); // coord axis 2
|
|
643 |
colnames.add(CACoreMessages.ColumnLabel_34); // coord axis 3
|
|
641 |
colnames.add(CACoreMessages.ColumnLabel_C1); // coord axis 1
|
|
642 |
colnames.add(CACoreMessages.ColumnLabel_C2); // coord axis 2
|
|
643 |
colnames.add(CACoreMessages.ColumnLabel_C3); // coord axis 3
|
|
644 | 644 |
colnames.add(""); //$NON-NLS-1$ |
645 | 645 |
|
646 | 646 |
rowtitles = colnames.toArray(new String[] {}); |
tmp/org.txm.ca.core/src/org/txm/ca/core/functions/ICAComputable.java (revision 237) | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import org.txm.searchengine.cqp.corpus.Corpus; |
4 | 4 |
import org.txm.searchengine.cqp.corpus.Partition; |
5 |
import org.txm.stat.StatException; |
|
5 |
import org.txm.statsengine.core.StatException;
|
|
6 | 6 |
|
7 | 7 |
public interface ICAComputable { |
8 | 8 |
public CA toCA() throws StatException; |
tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/jfreechart/themes/highcharts/renderers/CASingularValuesItemSelectionRenderer.java (revision 237) | ||
---|---|---|
64 | 64 |
List<List<Object>> singularValuesData = ca.getSingularValuesInfos(); |
65 | 65 |
|
66 | 66 |
return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p>#" + catDataset.getColumnKey(column) + "</p>" |
67 |
+ "<p><span style=\"color: " + hex + ";\">" + catDataset.getRowKey(row) + ChartsEngineCoreMessages.ChartsEngine_LABEL_VALUE_SEPARATORS
|
|
67 |
+ "<p><span style=\"color: " + hex + ";\">" + catDataset.getRowKey(row) + ChartsEngineCoreMessages.CHARTS_LABEL_VALUE_SEPARATORS
|
|
68 | 68 |
+ " </span><b>" + valuesNumberFormat.format(value) + "</b></p>" |
69 |
+ "<p><span style=\"color: " + hex + ";\">" + CACoreMessages.ChartsEngine_CA_SINGULAR_VALUES_TOOLTIP_PERCENT + ChartsEngineCoreMessages.ChartsEngine_LABEL_VALUE_SEPARATORS
|
|
69 |
+ "<p><span style=\"color: " + hex + ";\">" + CACoreMessages.CHARTS_SINGULAR_VALUES_TOOLTIP_PERCENT + ChartsEngineCoreMessages.CHARTS_LABEL_VALUE_SEPARATORS
|
|
70 | 70 |
+ " </span><b>" + percentValuesNumberFormat.format(singularValuesData.get(column).get(2)) + "</b></p>" |
71 |
+ "<p><span style=\"color: " + hex + ";\">" + CACoreMessages.ChartsEngine_CA_SINGULAR_VALUES_TOOLTIP_SUM + CACoreMessages.ChartsEngine_CA_SINGULAR_VALUES_TOOLTIP_PERCENT
|
|
72 |
+ ChartsEngineCoreMessages.ChartsEngine_LABEL_VALUE_SEPARATORS
|
|
71 |
+ "<p><span style=\"color: " + hex + ";\">" + CACoreMessages.CHARTS_SINGULAR_VALUES_TOOLTIP_SUM + CACoreMessages.CHARTS_SINGULAR_VALUES_TOOLTIP_PERCENT
|
|
72 |
+ ChartsEngineCoreMessages.CHARTS_LABEL_VALUE_SEPARATORS
|
|
73 | 73 |
+ " </span><b>" + percentValuesNumberFormat.format(singularValuesData.get(column).get(3)) + "</b></p>" |
74 | 74 |
+ "</body><html>"; |
75 | 75 |
} |
tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/jfreechart/themes/highcharts/renderers/FCAItemSelectionRenderer.java (revision 237) | ||
---|---|---|
72 | 72 |
|
73 | 73 |
FCAXYDataset caDataset = (FCAXYDataset) dataset; |
74 | 74 |
return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p style=\"color: " + hex + "\"><b>" + caDataset.getLabel(series, item) + "</b></p><p>" |
75 |
+ CACoreMessages.ChartsEngine_CA_FACTORIAL_MAP_TOOLTIP_ROWS_LABEL + ChartsEngineCoreMessages.ChartsEngine_LABEL_VALUE_SEPARATORS + " <b>" + caDataset.getFrequency(series, item).replace("-", "") + "</b></p>"
|
|
76 |
+ "<p>" + CACoreMessages.ChartsEngine_CA_FACTORIAL_MAP_TOOLTIP_COORDINATES + ChartsEngineCoreMessages.ChartsEngine_LABEL_VALUE_SEPARATORS + " <b>[" + format.format(caDataset.getX(series, item)) + ":" + format.format(caDataset.getY(series, item)) + "]</b></p></body><html>";
|
|
75 |
+ CACoreMessages.CHARTS_FACTORIAL_MAP_TOOLTIP_ROWS_LABEL + ChartsEngineCoreMessages.CHARTS_LABEL_VALUE_SEPARATORS + " <b>" + caDataset.getFrequency(series, item).replace("-", "") + "</b></p>"
|
|
76 |
+ "<p>" + CACoreMessages.CHARTS_FACTORIAL_MAP_TOOLTIP_COORDINATES + ChartsEngineCoreMessages.CHARTS_LABEL_VALUE_SEPARATORS + " <b>[" + format.format(caDataset.getX(series, item)) + ":" + format.format(caDataset.getY(series, item)) + "]</b></p></body><html>";
|
|
77 | 77 |
} |
78 | 78 |
}); |
79 | 79 |
|
... | ... | |
95 | 95 |
// FIXME: to disable tool tip we can return null here or in other renderers generateToolTip methods |
96 | 96 |
// return null; |
97 | 97 |
return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p style=\"color: " + hex + "\"><b>" + caDataset.getLabel(series, item) + "</b></p><p>" |
98 |
+ CACoreMessages.ChartsEngine_CA_FACTORIAL_MAP_TOOLTIP_COLS_LABEL + ChartsEngineCoreMessages.ChartsEngine_LABEL_VALUE_SEPARATORS + " <b>" + caDataset.getFrequency(series, item).replace("-", "") + "</b></p>"
|
|
99 |
+ "<p>" + CACoreMessages.ChartsEngine_CA_FACTORIAL_MAP_TOOLTIP_COORDINATES + ChartsEngineCoreMessages.ChartsEngine_LABEL_VALUE_SEPARATORS + " <b>[" + format.format(caDataset.getX(series, item)) + ":" + format.format(caDataset.getY(series, item)) + "]</b></p></body><html>";
|
|
98 |
+ CACoreMessages.CHARTS_FACTORIAL_MAP_TOOLTIP_COLS_LABEL + ChartsEngineCoreMessages.CHARTS_LABEL_VALUE_SEPARATORS + " <b>" + caDataset.getFrequency(series, item).replace("-", "") + "</b></p>"
|
|
99 |
+ "<p>" + CACoreMessages.CHARTS_FACTORIAL_MAP_TOOLTIP_COORDINATES + ChartsEngineCoreMessages.CHARTS_LABEL_VALUE_SEPARATORS + " <b>[" + format.format(caDataset.getX(series, item)) + ":" + format.format(caDataset.getY(series, item)) + "]</b></p></body><html>";
|
|
100 | 100 |
} |
101 | 101 |
}); |
102 | 102 |
|
tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/jfreechart/themes/highcharts/chartcreators/JFCSingularValueChartCreator.java (revision 237) | ||
---|---|---|
10 | 10 |
import org.txm.core.results.ITXMResult; |
11 | 11 |
import org.txm.chartsengine.jfreechart.core.JFCChartCreator; |
12 | 12 |
import org.txm.chartsengine.jfreechart.core.themes.base.ExtendedNumberAxis; |
13 |
import org.txm.stat.StatException; |
|
13 |
import org.txm.statsengine.core.StatException;
|
|
14 | 14 |
import org.txm.utils.logger.Log; |
15 | 15 |
|
16 | 16 |
/** |
17 |
* JFC progression chart creator.
|
|
17 |
* JFC Eigenvalues chart creator.
|
|
18 | 18 |
* |
19 | 19 |
* @author sjacquot |
20 | 20 |
* |
... | ... | |
42 | 42 |
double[] singularValues = ca.getValeursPropres(); |
43 | 43 |
|
44 | 44 |
for(int i = 0; i < singularValues.length; i++) { |
45 |
dataset.setValue(singularValues[i], CACoreMessages.ChartsEngine_CA_SINGULAR_VALUES_TOOLTIP_Y_LABEL, CACoreMessages.ChartsEngine_CA_SINGULAR_VALUES_X_LABELS_PREFIX + String.valueOf(i + 1));
|
|
45 |
dataset.setValue(singularValues[i], CACoreMessages.CHARTS_SINGULAR_VALUES_TOOLTIP_Y_LABEL, CACoreMessages.CHARTS_SINGULAR_VALUES_X_LABELS_PREFIX + String.valueOf(i + 1));
|
|
46 | 46 |
} |
47 | 47 |
|
48 | 48 |
// Create the chart |
49 |
chart = this.getChartsEngine().createCategoryBarChart(dataset, CACoreMessages.ChartsEngine_CA_SINGULAR_VALUES_TITLE, CACoreMessages.ChartsEngine_CA_SINGULAR_VALUES_X_AXIS_LABEL, CACoreMessages.ChartsEngine_CA_SINGULAR_VALUES_Y_AXIS_LABEL, false, false, false);
|
|
49 |
chart = this.getChartsEngine().createCategoryBarChart(dataset, CACoreMessages.CHARTS_SINGULAR_VALUES_TITLE, CACoreMessages.CHARTS_SINGULAR_VALUES_X_AXIS_LABEL, CACoreMessages.CHARTS_SINGULAR_VALUES_Y_AXIS_LABEL, false, false, false);
|
|
50 | 50 |
|
51 | 51 |
// Custom renderer |
52 | 52 |
chart.getCategoryPlot().setRenderer(new CASingularValuesItemSelectionRenderer(ca)); |
... | ... | |
57 | 57 |
|
58 | 58 |
} |
59 | 59 |
catch(StatException e) { |
60 |
Log.severe(CACoreMessages.ChartsEngine_CA_SINGULAR_VALUES_CANT_CREATE_CHART + e);
|
|
60 |
Log.severe(CACoreMessages.CHARTS_ERROR_CANT_CREATE_SINGULAR_VALUES_CHART + e);
|
|
61 | 61 |
} |
62 | 62 |
|
63 | 63 |
|
tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/jfreechart/themes/highcharts/chartcreators/JFCCAChartCreator.java (revision 237) | ||
---|---|---|
32 | 32 |
import org.txm.chartsengine.jfreechart.core.themes.base.BlockRoundBorder; |
33 | 33 |
import org.txm.core.preferences.TXMPreferences; |
34 | 34 |
import org.txm.core.results.ITXMResult; |
35 |
import org.txm.stat.StatException; |
|
35 |
import org.txm.statsengine.core.StatException;
|
|
36 | 36 |
import org.txm.utils.logger.Log; |
37 | 37 |
|
38 | 38 |
/** |
39 |
* JFC progression chart creator.
|
|
39 |
* JFC CA chart creator.
|
|
40 | 40 |
* |
41 | 41 |
* @author sjacquot |
42 | 42 |
* |
... | ... | |
343 | 343 |
try { |
344 | 344 |
double sinuglarValuesSum = ca.getValeursPropresSum(); |
345 | 345 |
DecimalFormat f = new DecimalFormat("###.00"); //$NON-NLS-1$ |
346 |
((JFreeChart) chart).getXYPlot().getDomainAxis().setLabel(CACoreMessages.ChartsEngine_CA_FACTORIAL_MAP_AXIS_LABEL_PREFIX + " " + dimension1 + " (" + f.format(100 * ca.getValeursPropres()[dimension1 - 1] / sinuglarValuesSum) + "%)");
|
|
347 |
((JFreeChart) chart).getXYPlot().getRangeAxis().setLabel(CACoreMessages.ChartsEngine_CA_FACTORIAL_MAP_AXIS_LABEL_PREFIX + " " + dimension2 + " (" + f.format(100 * ca.getValeursPropres()[dimension2 - 1] / sinuglarValuesSum) + "%)");
|
|
346 |
((JFreeChart) chart).getXYPlot().getDomainAxis().setLabel(CACoreMessages.CHARTS_FACTORIAL_MAP_AXIS_LABEL_PREFIX + " " + dimension1 + " (" + f.format(100 * ca.getValeursPropres()[dimension1 - 1] / sinuglarValuesSum) + "%)");
|
|
347 |
((JFreeChart) chart).getXYPlot().getRangeAxis().setLabel(CACoreMessages.CHARTS_FACTORIAL_MAP_AXIS_LABEL_PREFIX + " " + dimension2 + " (" + f.format(100 * ca.getValeursPropres()[dimension2 - 1] / sinuglarValuesSum) + "%)");
|
|
348 | 348 |
|
349 | 349 |
// Refresh data set |
350 | 350 |
// FIXME : any way to fire a data set event rather than reassign the same data set? |
tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/jfreechart/datasets/FCAXYDataset.java (revision 237) | ||
---|---|---|
4 | 4 |
import org.jfree.data.xy.XYDataset; |
5 | 5 |
import org.txm.ca.core.functions.CA; |
6 | 6 |
import org.txm.ca.core.messages.CACoreMessages; |
7 |
import org.txm.stat.StatException; |
|
7 |
import org.txm.statsengine.core.StatException;
|
|
8 | 8 |
|
9 | 9 |
/** |
10 | 10 |
* XY data set for storing coordinates and frequencies of CA plots. |
... | ... | |
245 | 245 |
public Comparable getSeriesKey(int series) { |
246 | 246 |
// Rows |
247 | 247 |
if(series == 0) { |
248 |
return CACoreMessages.ChartsEngine_CA_FACTORIAL_MAP_LEGEND_ROWS_LABEL;
|
|
248 |
return CACoreMessages.CHARTS_FACTORIAL_MAP_LEGEND_ROWS_LABEL;
|
|
249 | 249 |
} |
250 | 250 |
// Cols |
251 | 251 |
else { |
252 |
return CACoreMessages.ChartsEngine_CA_FACTORIAL_MAP_LEGEND_COLUMNS_LABEL;
|
|
252 |
return CACoreMessages.CHARTS_FACTORIAL_MAP_LEGEND_COLUMNS_LABEL;
|
|
253 | 253 |
} |
254 | 254 |
} |
255 | 255 |
|
tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/r/RCAChartCreator.java (revision 237) | ||
---|---|---|
17 | 17 |
import org.txm.utils.logger.Log; |
18 | 18 |
|
19 | 19 |
/** |
20 |
* R progression chart creator.
|
|
20 |
* R CA chart creator.
|
|
21 | 21 |
* @author mdecorde |
22 | 22 |
* @author sjacquot |
23 | 23 |
* |
... | ... | |
73 | 73 |
|
74 | 74 |
} |
75 | 75 |
catch(Exception e) { |
76 |
Log.severe(CACoreMessages.bind(CACoreMessages.ChartsEngine_CANT_CREATE_CA_FILE_CHART + " - FactoMineR package", RChartsEngine.DESCRIPTION) + e); //$NON-NLS-1$
|
|
76 |
Log.severe(CACoreMessages.bind(CACoreMessages.CHARTS_ERROR_CANT_CREATE_CA_FILE_CHART + " - FactoMineR package", RChartsEngine.DESCRIPTION) + e); //$NON-NLS-1$
|
|
77 | 77 |
} |
78 | 78 |
|
79 | 79 |
return destFile; |
... | ... | |
116 | 116 |
this.getChartsEngine().plot(destFile, cmd); |
117 | 117 |
} |
118 | 118 |
catch(Exception e) { |
119 |
Log.severe(CACoreMessages.bind(CACoreMessages.ChartsEngine_CANT_CREATE_CA_FILE_CHART + " - CA package", RChartsEngine.DESCRIPTION) + e); //$NON-NLS-1$
|
|
119 |
Log.severe(CACoreMessages.bind(CACoreMessages.CHARTS_ERROR_CANT_CREATE_CA_FILE_CHART + " - CA package", RChartsEngine.DESCRIPTION) + e); //$NON-NLS-1$
|
|
120 | 120 |
} |
121 | 121 |
|
122 | 122 |
return destFile; |
tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/r/RSingularValuesChartCreator.java (revision 237) | ||
---|---|---|
9 | 9 |
import org.txm.chartsengine.r.core.RChartCreator; |
10 | 10 |
|
11 | 11 |
/** |
12 |
* R progression chart creator.
|
|
12 |
* R CA Eigenvalues chart creator.
|
|
13 | 13 |
* @author mdecorde |
14 | 14 |
* @author sjacquot |
15 | 15 |
* |
... | ... | |
66 | 66 |
if(i > 0) { |
67 | 67 |
xLabels.append(", "); //$NON-NLS-1$ |
68 | 68 |
} |
69 |
xLabels.append("\"" + CACoreMessages.ChartsEngine_CA_SINGULAR_VALUES_X_LABELS_PREFIX + (i + 1) + "\""); //$NON-NLS-1$ //$NON-NLS-2$
|
|
69 |
xLabels.append("\"" + CACoreMessages.CHARTS_SINGULAR_VALUES_X_LABELS_PREFIX + (i + 1) + "\""); //$NON-NLS-1$ //$NON-NLS-2$
|
|
70 | 70 |
} |
71 | 71 |
xLabels.append(")"); //$NON-NLS-1$ |
72 | 72 |
|
73 | 73 |
String cmd = "tmpY <- " + ca.getSymbol() + "$eig$eigenvalue[1:length(" + ca.getSymbol() + "$eig$eigenvalue) - 1];\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
74 | 74 |
cmd += "barplot(tmpY, main=\"" //$NON-NLS-1$ |
75 |
+ CACoreMessages.ChartsEngine_CA_SINGULAR_VALUES_TITLE + "\", ylab=\"" + //$NON-NLS-1$
|
|
76 |
CACoreMessages.ChartsEngine_CA_SINGULAR_VALUES_Y_AXIS_LABEL + "\", xlab=\"" + //$NON-NLS-1$
|
|
77 |
CACoreMessages.ChartsEngine_CA_SINGULAR_VALUES_X_AXIS_LABEL + "\", names.arg=" + xLabels + ");\n"; //$NON-NLS-1$ //$NON-NLS-2$
|
|
75 |
+ CACoreMessages.CHARTS_SINGULAR_VALUES_TITLE + "\", ylab=\"" + //$NON-NLS-1$
|
|
76 |
CACoreMessages.CHARTS_SINGULAR_VALUES_Y_AXIS_LABEL + "\", xlab=\"" + //$NON-NLS-1$
|
|
77 |
CACoreMessages.CHARTS_SINGULAR_VALUES_X_AXIS_LABEL + "\", names.arg=" + xLabels + ");\n"; //$NON-NLS-1$ //$NON-NLS-2$
|
|
78 | 78 |
|
79 | 79 |
this.getChartsEngine().plot(file, cmd); |
80 | 80 |
|
tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/base/Utils.java (revision 237) | ||
---|---|---|
40 | 40 |
corpusName = ca.getCorpus().getSimpleName(); |
41 | 41 |
} |
42 | 42 |
|
43 |
return ChartsEngineCoreMessages.bind(CACoreMessages.ChartsEngine_CA_FACTORIAL_MAP_TITLE, partitionName, corpusName);
|
|
43 |
return ChartsEngineCoreMessages.bind(CACoreMessages.CHARTS_FACTORIAL_MAP_TITLE, partitionName, corpusName);
|
|
44 | 44 |
} |
45 | 45 |
|
46 | 46 |
/** |
47 |
* Gets a chart creator from the specified charts engine.
|
|
48 |
* @param chartsEngine |
|
49 |
* @return |
|
47 |
* Convenience method to get a CA chart creator from the specified charts engine.
|
|
48 |
* @param chartsEngine charts engine to look in for a chart creator
|
|
49 |
* @return a CA chart creator
|
|
50 | 50 |
*/ |
51 | 51 |
public static CAChartCreator getChartCreator(ChartsEngine chartsEngine) { |
52 | 52 |
return (CAChartCreator) chartsEngine.getChartCreator(CA.class); |
Formats disponibles : Unified diff