Révision 342
tmp/org.txm.statsengine.r.rcp/META-INF/MANIFEST.MF (revision 342) | ||
---|---|---|
16 | 16 |
org.txm.statsengine.r.rcp.preferences, |
17 | 17 |
org.txm.statsengine.r.rcp.views |
18 | 18 |
Bundle-Vendor: Textometrie.org |
19 |
Import-Package: org.txm.lexicaltable.core.functions |
tmp/org.txm.ca.core/META-INF/MANIFEST.MF (revision 342) | ||
---|---|---|
9 | 9 |
org.eclipse.core.runtime;bundle-version="3.10.0", |
10 | 10 |
org.txm.chartsengine.r.core;bundle-version="1.0.0", |
11 | 11 |
org.txm.chartsengine.jfreechart.core;bundle-version="1.0.0", |
12 |
org.txm.lexicaltable.core |
|
12 |
org.txm.lexicaltable.core, |
|
13 |
org.txm.statsengine.r.core;bundle-version="1.0.0", |
|
14 |
org.txm.statsengine.r.rcp;bundle-version="1.0.0" |
|
13 | 15 |
Export-Package: org.txm.ca.core.chartsengine.base, |
14 | 16 |
org.txm.ca.core.chartsengine.jfreechart.datasets, |
15 | 17 |
org.txm.ca.core.chartsengine.jfreechart.themes.highcharts.chartcreators, |
tmp/org.txm.ca.core/src/org/txm/ca/core/functions/CA.java (revision 342) | ||
---|---|---|
843 | 843 |
*/ |
844 | 844 |
public void stepCompute() throws StatException |
845 | 845 |
{ |
846 |
// System.out.println("CA lexicaltable: "+table); |
|
847 |
// System.out.println("CA ilexicaltable: "+table.getData()); |
|
846 | 848 |
if (useFactoMineR) |
847 | 849 |
ca = new FactoMineRCA(table.getData()); |
848 | 850 |
else |
... | ... | |
872 | 874 |
try { |
873 | 875 |
table.getData().filter(vmax, fmin); |
874 | 876 |
} catch (Exception e) { |
875 |
// TODO Auto-generated catch block |
|
876 | 877 |
org.txm.utils.logger.Log.printStackTrace(e); |
877 | 878 |
} |
878 | 879 |
} |
tmp/org.txm.lexicaltable.core/META-INF/MANIFEST.MF (revision 342) | ||
---|---|---|
3 | 3 |
Bundle-Name: Lexical Table Core |
4 | 4 |
Bundle-SymbolicName: org.txm.lexicaltable.core;singleton:=true |
5 | 5 |
Bundle-Version: 1.0.0.qualifier |
6 |
Require-Bundle: org.txm.statsengine.core;bundle-version="1.0.0", |
|
7 |
org.txm.statsengine.r.core;bundle-version="1.0.0", |
|
8 |
org.txm.core;bundle-version="0.7.0", |
|
9 |
org.eclipse.core.runtime, |
|
10 |
org.txm.index.core;bundle-version="1.0.0", |
|
11 |
org.txm.lexicon.core;bundle-version="1.0.0" |
|
6 |
Require-Bundle: org.txm.statsengine.core;bundle-version="1.0.0";visibility:=reexport,
|
|
7 |
org.txm.statsengine.r.core;bundle-version="1.0.0";visibility:=reexport,
|
|
8 |
org.txm.core;bundle-version="0.7.0";visibility:=reexport,
|
|
9 |
org.eclipse.core.runtime;visibility:=reexport,
|
|
10 |
org.txm.index.core;bundle-version="1.0.0";visibility:=reexport,
|
|
11 |
org.txm.lexicon.core;bundle-version="1.0.0";visibility:=reexport
|
|
12 | 12 |
Bundle-RequiredExecutionEnvironment: JavaSE-1.6 |
13 | 13 |
Bundle-ActivationPolicy: lazy |
14 | 14 |
Export-Package: org.txm.functions.intertextualdistance, |
... | ... | |
16 | 16 |
org.txm.lexicaltable.core.messages, |
17 | 17 |
org.txm.lexicaltable.core.preferences, |
18 | 18 |
org.txm.lexicaltable.core.statsengine.data, |
19 |
org.txm.lexicaltable.core.statsengine.r.data |
|
19 |
org.txm.lexicaltable.core.statsengine.r.data, |
|
20 |
org.txm.lexicon.core.messages |
|
20 | 21 |
Bundle-Vendor: Textometrie.org |
tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTable.java (revision 342) | ||
---|---|---|
32 | 32 |
*/ |
33 | 33 |
public class LexicalTable extends TXMResult { |
34 | 34 |
|
35 |
/** The constructor_fmin. */ |
|
36 |
private int constructor_fmin; |
|
37 |
|
|
38 |
/** The corpus. */ |
|
39 |
private Corpus corpus; |
|
40 |
|
|
35 | 41 |
/** the statengine data object */ |
36 | 42 |
ILexicalTable data; |
37 |
|
|
43 |
|
|
38 | 44 |
/** The partition. */ |
39 | 45 |
private Partition partition; |
40 | 46 |
|
41 |
/** The corpus. */ |
|
42 |
private Corpus corpus; |
|
43 |
|
|
44 | 47 |
/** The property. */ |
45 | 48 |
private Property property; |
46 |
|
|
47 |
/** The constructor_fmin. */ |
|
48 |
private int constructor_fmin; |
|
49 | 49 |
|
50 |
/** |
|
51 |
* Get the partition this lexical table is bound to. |
|
52 |
* |
|
53 |
* @return the partition |
|
54 |
*/ |
|
55 |
public Partition getPartition() { |
|
56 |
return partition; |
|
57 |
} |
|
58 |
|
|
59 |
/** |
|
60 |
* Get the corpus this lexical table is bound to. |
|
61 |
* |
|
62 |
* @return the corpus or null if the LexicalTable was build without a Corpus or thiout a Partition (built with a Corpus) |
|
63 |
*/ |
|
64 |
public Corpus getCorpus() { |
|
65 |
if (corpus != null) return corpus; |
|
66 |
else if (partition != null) return partition.getCorpus(); |
|
67 |
else return null; |
|
68 |
} |
|
69 |
|
|
70 |
/** |
|
71 |
* Get the property this lexical table is bound to. |
|
72 |
* |
|
73 |
* @return the property. |
|
74 |
*/ |
|
75 |
public Property getProperty() { |
|
76 |
return property; |
|
77 |
} |
|
78 |
|
|
79 |
@Override |
|
80 |
public String getName() { |
|
81 |
return data.getSymbol(); |
|
82 |
} |
|
83 |
|
|
84 |
@Override |
|
85 |
public String getSimpleName() { |
|
86 |
return data.getSymbol(); |
|
87 |
} |
|
88 |
|
|
89 |
@Override |
|
90 |
public String getDetails() { |
|
91 |
return data.getSymbol(); |
|
92 |
} |
|
93 |
|
|
94 |
@Override |
|
95 |
public void clean() { |
|
96 |
try { |
|
97 |
RWorkspace.getRWorkspaceInstance().removeVariableFromWorkspace(data.getSymbol()); |
|
98 |
} catch (RWorkspaceException e) { |
|
99 |
// TODO Auto-generated catch block |
|
100 |
e.printStackTrace(); |
|
101 |
} |
|
102 |
} |
|
103 |
|
|
104 |
|
|
105 |
|
|
106 |
public LexicalTable(Lexicon corpusLexicon, Lexicon subcorpusLexicon) throws StatException { |
|
107 |
super(); |
|
108 |
|
|
109 |
data = new LexicalTableImpl(corpusLexicon.getName()+ "minus" + subcorpusLexicon.getName(), corpusLexicon, subcorpusLexicon); |
|
110 |
|
|
111 |
this.property = corpusLexicon.getProperty(); |
|
112 |
this.corpus = corpusLexicon.getCorpus(); |
|
113 |
this.corpus.addResult(this); |
|
114 |
} |
|
115 |
|
|
116 | 50 |
public LexicalTable(Corpus corpus, Subcorpus subcorpus) throws StatException, CqiClientException { |
117 | 51 |
this(Lexicon.getLexicon(corpus, corpus.getProperty("word")), Lexicon.getLexicon(subcorpus, subcorpus.getProperty("word"))); |
118 | 52 |
} |
... | ... | |
121 | 55 |
this(Lexicon.getLexicon(corpus, property), Lexicon.getLexicon(subcorpus, property)); |
122 | 56 |
} |
123 | 57 |
|
124 |
public LexicalTable(Partition partition, Property analysisProperty, int fmin, LexicalTableImpl itable) { |
|
125 |
this.property = partition.getProperty(); |
|
126 |
this.partition = partition; |
|
127 |
this.corpus = partition.getCorpus(); |
|
128 |
} |
|
129 |
|
|
130 |
|
|
131 | 58 |
/** |
132 | 59 |
* Creates the lexical table. |
133 | 60 |
* |
... | ... | |
140 | 67 |
String symbol) throws RWorkspaceException { |
141 | 68 |
this(Arrays.asList(partIndex), symbol, true); |
142 | 69 |
} |
143 |
|
|
70 |
|
|
71 |
public LexicalTable(Lexicon corpusLexicon, Lexicon subcorpusLexicon) throws StatException { |
|
72 |
super(); |
|
73 |
|
|
74 |
data = new LexicalTableImpl(corpusLexicon.getName()+ "minus" + subcorpusLexicon.getName(), corpusLexicon, subcorpusLexicon); |
|
75 |
|
|
76 |
this.property = corpusLexicon.getProperty(); |
|
77 |
this.corpus = corpusLexicon.getCorpus(); |
|
78 |
this.corpus.addResult(this); |
|
79 |
} |
|
80 |
|
|
144 | 81 |
/** |
145 | 82 |
* Creates the lexical table. |
146 | 83 |
* |
... | ... | |
237 | 174 |
.toArray(new String[] {})); |
238 | 175 |
} |
239 | 176 |
|
177 |
public LexicalTable(Partition partition, Property analysisProperty, int fmin, LexicalTableImpl itable) { |
|
178 |
|
|
179 |
this.property = analysisProperty; |
|
180 |
this.partition = partition; |
|
181 |
this.corpus = partition.getCorpus(); |
|
182 |
this.data = itable; |
|
183 |
} |
|
184 |
|
|
185 |
@Override |
|
186 |
public void clean() { |
|
187 |
try { |
|
188 |
RWorkspace.getRWorkspaceInstance().removeVariableFromWorkspace(data.getSymbol()); |
|
189 |
} catch (RWorkspaceException e) { |
|
190 |
// TODO Auto-generated catch block |
|
191 |
e.printStackTrace(); |
|
192 |
} |
|
193 |
} |
|
194 |
|
|
195 |
|
|
196 |
|
|
197 |
public Vector getColMarginsVector() throws StatException { |
|
198 |
return data.getColMarginsVector(); |
|
199 |
} |
|
200 |
|
|
201 |
public Vector getColNames() { |
|
202 |
return data.getColNames(); |
|
203 |
} |
|
204 |
|
|
205 |
/** |
|
206 |
* Get the corpus this lexical table is bound to. |
|
207 |
* |
|
208 |
* @return the corpus or null if the LexicalTable was build without a Corpus or thiout a Partition (built with a Corpus) |
|
209 |
*/ |
|
210 |
public Corpus getCorpus() { |
|
211 |
if (corpus != null) return corpus; |
|
212 |
else if (partition != null) return partition.getCorpus(); |
|
213 |
else return null; |
|
214 |
} |
|
215 |
|
|
240 | 216 |
public ILexicalTable getData() { |
241 | 217 |
return data; |
242 | 218 |
} |
243 | 219 |
|
244 |
public Vector getRowNames() { |
|
245 |
return data.getRowNames(); |
|
220 |
@Override |
|
221 |
public String getDetails() { |
|
222 |
return data.getSymbol(); |
|
246 | 223 |
} |
247 | 224 |
|
248 |
public Vector getColNames() { |
|
249 |
return data.getRowNames(); |
|
225 |
@Override |
|
226 |
public String getName() { |
|
227 |
return data.getSymbol(); |
|
250 | 228 |
} |
251 | 229 |
|
252 | 230 |
public int getNColumns() { |
253 | 231 |
return data.getNColumns(); |
254 | 232 |
} |
255 | 233 |
|
256 |
public Vector getColMarginsVector() throws StatException {
|
|
257 |
return data.getColMarginsVector();
|
|
234 |
public int getNRows() {
|
|
235 |
return data.getNRows();
|
|
258 | 236 |
} |
237 |
|
|
238 |
/** |
|
239 |
* Get the partition this lexical table is bound to. |
|
240 |
* |
|
241 |
* @return the partition |
|
242 |
*/ |
|
243 |
public Partition getPartition() { |
|
244 |
return partition; |
|
245 |
} |
|
259 | 246 |
|
247 |
/** |
|
248 |
* Get the property this lexical table is bound to. |
|
249 |
* |
|
250 |
* @return the property. |
|
251 |
*/ |
|
252 |
public Property getProperty() { |
|
253 |
return property; |
|
254 |
} |
|
255 |
|
|
256 |
public Vector getRow(int i) throws StatException { |
|
257 |
return data.getRow(i); |
|
258 |
} |
|
259 |
|
|
260 | 260 |
public Vector getRowMarginsVector() throws StatException { |
261 | 261 |
return data.getRowMarginsVector(); |
262 | 262 |
} |
263 | 263 |
|
264 |
public int getNRows() {
|
|
265 |
return data.getNRows();
|
|
264 |
public Vector getRowNames() {
|
|
265 |
return data.getRowNames();
|
|
266 | 266 |
} |
267 | 267 |
|
268 |
public Vector getRow(int i) throws StatException { |
|
269 |
return data.getRow(i); |
|
268 |
@Override |
|
269 |
public String getSimpleName() { |
|
270 |
return data.getSymbol(); |
|
270 | 271 |
} |
271 | 272 |
|
272 | 273 |
public void toTxt(File outfile, String encoding, String colseparator, String txtseparator) { |
tmp/org.txm.chartsengine.r.rcp/META-INF/MANIFEST.MF (revision 342) | ||
---|---|---|
4 | 4 |
Bundle-SymbolicName: org.txm.chartsengine.r.rcp;singleton:=true |
5 | 5 |
Bundle-Version: 1.0.0.qualifier |
6 | 6 |
Bundle-RequiredExecutionEnvironment: JavaSE-1.7 |
7 |
Require-Bundle: org.txm.chartsengine.rcp;bundle-version="1.0.0";visibility:=reexport, |
|
7 |
Require-Bundle: org.txm.core, |
|
8 |
org.txm.chartsengine.rcp;bundle-version="1.0.0";visibility:=reexport, |
|
8 | 9 |
org.txm.rcp;bundle-version="0.7.8", |
9 |
org.txm.chartsengine.r.core;bundle-version="1.0.0";visibility:=reexport, |
|
10 |
org.txm.core |
|
10 |
org.txm.chartsengine.r.core;bundle-version="1.0.0";visibility:=reexport |
|
11 | 11 |
Bundle-Vendor: Textometrie.org |
12 | 12 |
Import-Package: org.txm.chartsengine.rcp.messages |
tmp/org.txm.chartsengine.r.rcp/src/org/txm/rcp/chartsengine/r/preferences/RChartsEnginePreferencePage.java (revision 342) | ||
---|---|---|
43 | 43 |
import org.txm.chartsengine.r.core.preferences.RChartsEnginePreferences; |
44 | 44 |
import org.txm.chartsengine.rcp.SWTChartsComponentsProvider; |
45 | 45 |
import org.txm.chartsengine.rcp.messages.SWTComponentsProviderMessages; |
46 |
import org.txm.core.preferences.TXMPreferences; |
|
46 | 47 |
import org.txm.rcp.preferences.ExportPreferencePage; |
47 | 48 |
import org.txm.rcp.preferences.TXMPreferencePage; |
48 | 49 |
import org.txm.rcp.preferences.TXMPreferenceStore; |
... | ... | |
105 | 106 |
|
106 | 107 |
//FIXME: old code |
107 | 108 |
// Set the first charts engine supported export file format as default charts export file format |
109 |
|
|
108 | 110 |
// TXMPreferences.putString(ChartsEnginePreferences.PREFERENCES_NODE, ChartsEnginePreferences.RDEVICE, ChartsEngine.getCurrent().getSupportedOutputFileFormats().get(0)); |
109 | 111 |
// |
110 | 112 |
// // Refresh the User\Export preference page to update "Default charts export file format" combo box |
111 | 113 |
// PlatformUI.getWorkbench().getPreferenceManager(). |
112 | 114 |
// find("org.txm.rcp.preferences.TextometriePreferencePage/" + UserPreferencePage.ID + "/" + ExportPreferencePage.ID).createPage(); //$NON-NLS-1$ //$NON-NLS-2$ |
113 |
|
|
114 | 115 |
} |
115 | 116 |
|
116 | 117 |
|
tmp/org.txm.lexicaltable.rcp/META-INF/MANIFEST.MF (revision 342) | ||
---|---|---|
11 | 11 |
org.txm.rcp, |
12 | 12 |
org.eclipse.ui;bundle-version="3.106.1", |
13 | 13 |
org.txm.statsengine.r.rcp, |
14 |
org.eclipse.core.expressions;bundle-version="3.4.600" |
|
14 |
org.eclipse.core.expressions;bundle-version="3.4.600", |
|
15 |
org.txm.statsengine.core;bundle-version="1.0.0", |
|
16 |
org.txm.statsengine.r.core;bundle-version="1.0.0" |
|
15 | 17 |
Bundle-RequiredExecutionEnvironment: JavaSE-1.6 |
16 | 18 |
Bundle-ActivationPolicy: lazy |
17 | 19 |
Export-Package: org.txm.lexicaltable.rcp.adapters, |
tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor2.java (revision 342) | ||
---|---|---|
36 | 36 |
|
37 | 37 |
import org.eclipse.core.runtime.IProgressMonitor; |
38 | 38 |
import org.eclipse.jface.action.MenuManager; |
39 |
import org.eclipse.jface.viewers.CellLabelProvider; |
|
39 | 40 |
import org.eclipse.jface.viewers.TableViewer; |
40 | 41 |
import org.eclipse.jface.viewers.TableViewerColumn; |
42 |
import org.eclipse.jface.viewers.ViewerCell; |
|
41 | 43 |
import org.eclipse.jface.window.Window; |
42 | 44 |
import org.eclipse.osgi.util.NLS; |
43 | 45 |
import org.eclipse.swt.SWT; |
... | ... | |
71 | 73 |
import org.txm.rcp.StatusLine; |
72 | 74 |
import org.txm.rcp.commands.editor.CustomizableEditor; |
73 | 75 |
import org.txm.rcp.editors.TableKeyListener; |
76 |
import org.txm.rcp.swt.provider.SimpleLabelProvider; |
|
74 | 77 |
import org.txm.rcp.swt.widget.ObjectSelector; |
75 | 78 |
import org.txm.rcp.swt.widget.PropertiesSelector; |
76 | 79 |
import org.txm.rcp.swt.widget.QueryWidget; |
... | ... | |
104 | 107 |
/** The line table viewer. */ |
105 | 108 |
TableViewer viewer; |
106 | 109 |
|
107 |
/** The part columns. */ |
|
108 |
List<TableViewerColumn> partColumns = new ArrayList<TableViewerColumn>(); |
|
109 |
|
|
110 | 110 |
/** The part column. */ |
111 |
TableViewerColumn partColumn; |
|
111 |
// TableViewerColumn partColumn;
|
|
112 | 112 |
|
113 | 113 |
/** The n column. */ |
114 |
TableViewerColumn nColumn; |
|
114 |
//TableViewerColumn nColumn;
|
|
115 | 115 |
|
116 | 116 |
/** The form column. */ |
117 | 117 |
TableViewerColumn formColumn; |
... | ... | |
415 | 415 |
FormLayout resultLayout = new FormLayout(); |
416 | 416 |
resultArea.setLayout(resultLayout); |
417 | 417 |
|
418 |
viewer = new TableViewer(resultArea, SWT.MULTI |
|
419 |
| SWT.FULL_SELECTION | SWT.BORDER | SWT.VIRTUAL); |
|
418 |
viewer = new TableViewer(resultArea, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER | SWT.VIRTUAL); |
|
420 | 419 |
viewer.getTable().addKeyListener(new TableKeyListener(viewer)); |
421 | 420 |
viewer.getTable().setLinesVisible(true); |
422 | 421 |
viewer.getTable().setHeaderVisible(true); |
... | ... | |
427 | 426 |
tableLayoutData.left = new FormAttachment(0); |
428 | 427 |
tableLayoutData.right = new FormAttachment(100); |
429 | 428 |
viewer.getTable().setLayoutData(tableLayoutData); |
430 |
|
|
431 |
nColumn = new TableViewerColumn(viewer, SWT.RIGHT); |
|
429 |
CellLabelProvider clp = new CellLabelProvider() { |
|
430 |
@Override |
|
431 |
public void update(ViewerCell cell) { } |
|
432 |
}; |
|
433 |
TableViewerColumn nColumn = new TableViewerColumn(viewer, SWT.RIGHT); |
|
432 | 434 |
nColumn.getColumn().setText(" "); //$NON-NLS-1$ |
433 | 435 |
nColumn.getColumn().pack(); |
434 |
|
|
436 |
nColumn.setLabelProvider(clp); |
|
437 |
|
|
435 | 438 |
formColumn = new TableViewerColumn(viewer, SWT.LEFT); |
436 | 439 |
formColumn.getColumn().setText(this.table.getProperty().getName()); |
437 | 440 |
formColumn.getColumn().setWidth(200); |
438 | 441 |
formColumn.getColumn().addSelectionListener(new ColumnSelectionListener(formColumn, -2)); |
439 |
|
|
442 |
formColumn.setLabelProvider(clp); |
|
443 |
|
|
440 | 444 |
freqColumn = new TableViewerColumn(viewer, SWT.LEFT); |
441 | 445 |
freqColumn.getColumn().setText(Messages.FrequencyListEditorInput_4); |
442 | 446 |
freqColumn.getColumn().setWidth(200); |
443 | 447 |
freqColumn.getColumn().addSelectionListener(new ColumnSelectionListener(freqColumn, -1)); |
448 |
freqColumn.setLabelProvider(clp); |
|
449 |
|
|
444 | 450 |
collist = new ArrayList<Object>(); |
445 | 451 |
Vector colnames = table.getColNames(); |
446 | 452 |
|
... | ... | |
450 | 456 |
for (String colname : colnames.asStringsArray()) { |
451 | 457 |
// partColumn = new TableColumn(lineTableViewer.getTable(), |
452 | 458 |
// SWT.RIGHT); |
453 |
partColumn = new TableViewerColumn(viewer, SWT.RIGHT); |
|
459 |
TableViewerColumn partColumn = new TableViewerColumn(viewer, SWT.RIGHT);
|
|
454 | 460 |
partColumn.getColumn().setText(colname+" t="+colmargins[i]); //$NON-NLS-1$ |
455 | 461 |
partColumn.getColumn().setToolTipText(colname); |
456 | 462 |
collist.add(colname); |
457 | 463 |
partColumn.getColumn().setWidth(200); |
458 | 464 |
partColumn.getColumn().addSelectionListener(new ColumnSelectionListener(partColumn, i)); |
465 |
partColumn.setLabelProvider(clp); |
|
459 | 466 |
i++; |
460 | 467 |
} |
461 | 468 |
} catch (StatException e1) { |
... | ... | |
463 | 470 |
return; |
464 | 471 |
} |
465 | 472 |
|
466 |
nColumn = new TableViewerColumn(viewer, SWT.RIGHT); |
|
467 |
nColumn.getColumn().setText(""); //$NON-NLS-1$ |
|
468 |
nColumn.getColumn().pack(); |
|
473 |
// nColumn = new TableViewerColumn(viewer, SWT.RIGHT);
|
|
474 |
// nColumn.getColumn().setText(""); //$NON-NLS-1$
|
|
475 |
// nColumn.getColumn().pack();
|
|
469 | 476 |
|
470 | 477 |
viewer.setContentProvider(new LineContentProvider()); |
471 | 478 |
viewer.setInput(table); |
... | ... | |
475 | 482 |
viewer.getTable().setSortColumn(formColumn.getColumn()); |
476 | 483 |
viewer.getTable().setSortDirection(SWT.UP); |
477 | 484 |
|
478 |
|
|
479 | 485 |
refresh(); |
480 |
|
|
481 | 486 |
|
482 | 487 |
createContextMenu(viewer); |
483 | 488 |
|
484 | 489 |
this.commandParametersGroup.pack(); |
485 |
|
|
486 | 490 |
} |
487 | 491 |
|
488 | 492 |
private void refreshColNames() throws StatException, CqiClientException { |
... | ... | |
503 | 507 |
+ TXMCoreMessages.V + itable.getNRows() |
504 | 508 |
+ TXMCoreMessages.FMIN_2 + itable.getFmin() |
505 | 509 |
+ TXMCoreMessages.FMAX_2 + itable.getFmax()); |
506 |
} catch (RWorkspaceException e3) {
|
|
510 |
} catch (Exception e3) { |
|
507 | 511 |
// TODO Auto-generated catch block |
508 | 512 |
org.txm.rcp.utils.Logger.printStackTrace(e3); |
509 | 513 |
} |
510 |
catch(StatException e) { |
|
511 |
// TODO Auto-generated catch block |
|
512 |
e.printStackTrace(); |
|
513 |
} |
|
514 | 514 |
} |
515 | 515 |
|
516 | 516 |
/** |
... | ... | |
540 | 540 |
minfreqspinner.setMaximum(itable.getFmax()); |
541 | 541 |
viewer.getTable().setFocus(); |
542 | 542 |
} |
543 |
|
|
544 | 543 |
|
545 | 544 |
@Override |
546 | 545 |
public void refresh() { |
... | ... | |
550 | 549 |
super.refresh(); |
551 | 550 |
} |
552 | 551 |
|
553 |
|
|
554 |
|
|
555 | 552 |
/** |
556 | 553 |
* Creates the context menu. |
557 | 554 |
* |
tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifities.java (revision 342) | ||
---|---|---|
81 | 81 |
CorporaView.addDoubleClickListener(SpecificitesResult.class, ComputeSpecifities.class); |
82 | 82 |
} |
83 | 83 |
|
84 |
|
|
85 |
|
|
86 |
|
|
87 | 84 |
/** The window. */ |
88 | 85 |
private IWorkbenchWindow window; |
89 | 86 |
|
tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesResultEditorInput.java (revision 342) | ||
---|---|---|
357 | 357 |
} else { |
358 | 358 |
int[] partSize = null; |
359 | 359 |
try { |
360 |
partSize = res.getPartSize(); |
|
360 |
partSize = res.getPartSizes();
|
|
361 | 361 |
} catch (StatException e) { |
362 | 362 |
org.txm.rcp.utils.Logger.printStackTrace(e); |
363 | 363 |
} |
tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesTableEditor.java (revision 342) | ||
---|---|---|
321 | 321 |
int[] partSize = null; |
322 | 322 |
try { |
323 | 323 |
partNames = specificitiesResult.getPartShortNames(); |
324 |
partSize = specificitiesResult.getPartSize(); |
|
324 |
partSize = specificitiesResult.getPartSizes();
|
|
325 | 325 |
} catch (StatException e) { |
326 | 326 |
System.err.println(NLS.bind(SpecificitiesUIMessages.SpecificitiesTableEditor_5, e)); |
327 | 327 |
return; |
tmp/org.txm.specificities.rcp/META-INF/MANIFEST.MF (revision 342) | ||
---|---|---|
12 | 12 |
org.txm.chartsengine.rcp, |
13 | 13 |
org.txm.rcp;bundle-version="0.7.8", |
14 | 14 |
org.eclipse.core.expressions;bundle-version="3.4.600", |
15 |
org.eclipse.core.runtime;bundle-version="3.10.0" |
|
15 |
org.eclipse.core.runtime;bundle-version="3.10.0", |
|
16 |
org.txm.statsengine.core;bundle-version="1.0.0", |
|
17 |
org.txm.statsengine.r.core;bundle-version="1.0.0" |
|
16 | 18 |
Export-Package: org.txm.specificities.rcp.adapters, |
17 | 19 |
org.txm.specificities.rcp.editors, |
18 | 20 |
org.txm.specificities.rcp.handlers, |
tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/data/MatrixImpl.java (revision 342) | ||
---|---|---|
94 | 94 |
// /** The nrow. */ |
95 | 95 |
// protected int nrow; |
96 | 96 |
|
97 |
|
|
98 | 97 |
/** |
99 | 98 |
* Instantiates a new matrix impl. |
100 | 99 |
* |
... | ... | |
236 | 235 |
*/ |
237 | 236 |
protected MatrixImpl(String symbol) throws RWorkspaceException { |
238 | 237 |
super(symbol); |
239 |
if (!rw.containsVariable(symbol)) { |
|
240 |
throw new RObjectDoesNotExist(StatsEngineCoreMessages.MatrixImpl_0 + symbol |
|
241 |
+ StatsEngineCoreMessages.MatrixImpl_1); |
|
242 |
} |
|
243 |
REXP res = rw.eval("dim(" + symbol + ")"); //$NON-NLS-2$ //$NON-NLS-1$ |
|
244 |
int[] dim = null; |
|
245 |
try { |
|
246 |
dim = res.asIntegers(); |
|
247 |
} catch (REXPMismatchException e) { |
|
248 |
throw new RWorkspaceException(e); |
|
249 |
} |
|
250 |
// nrow = dim[0]; |
|
251 |
// ncol = dim[1]; |
|
252 |
//this.rows = null; |
|
253 |
//this.cols = null; |
|
254 | 238 |
} |
255 | 239 |
|
256 | 240 |
/** |
tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/preferences/RPreferences.java (revision 342) | ||
---|---|---|
70 | 70 |
|
71 | 71 |
@Override |
72 | 72 |
public void initializeDefaultPreferences() { |
73 |
System.out.println("INITIALIZE R PREFERENCES"); |
|
74 | 73 |
Preferences preferences = DefaultScope.INSTANCE.getNode(PREFERENCES_NODE); |
75 | 74 |
|
76 | 75 |
//FIXME: need to define here the PATH_TO_EXECUTABLE preference according to current OS and the current TXM install directory |
tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/handlers/ComputeCA.java (revision 342) | ||
---|---|---|
179 | 179 |
monitor.beginTask("", 100); //$NON-NLS-1$ |
180 | 180 |
monitor.subTask(CAUIMessages.ComputeCorrespondanceAnalysis_15); |
181 | 181 |
|
182 |
if(ca == null) { |
|
182 |
if (ca == null) {
|
|
183 | 183 |
if (selection instanceof Partition) { |
184 | 184 |
ca = new CA(partition, property, fmin, vmax); |
185 | 185 |
} |
... | ... | |
190 | 190 |
ca = ((ICAComputable) selection).toCA(); |
191 | 191 |
} |
192 | 192 |
|
193 |
|
|
194 | 193 |
if (selection instanceof Partition) { |
195 | 194 |
if (monitor.isCanceled()) return Status.CANCEL_STATUS; |
196 | 195 |
monitor.subTask(CAUIMessages.ComputeCorrespondanceAnalysis_16); |
... | ... | |
216 | 215 |
ca.getLexicalTable().addResult(ca); |
217 | 216 |
|
218 | 217 |
} |
219 |
if(ca == null) { |
|
218 |
|
|
219 |
if (ca == null) { |
|
220 | 220 |
return Status.CANCEL_STATUS; |
221 | 221 |
} |
222 | 222 |
|
tmp/org.txm.ca.rcp/META-INF/MANIFEST.MF (revision 342) | ||
---|---|---|
12 | 12 |
org.txm.rcp, |
13 | 13 |
org.eclipse.ui;bundle-version="3.106.1", |
14 | 14 |
org.eclipse.core.runtime;bundle-version="3.10.0", |
15 |
org.eclipse.core.expressions;bundle-version="3.4.600" |
|
15 |
org.eclipse.core.expressions;bundle-version="3.4.600", |
|
16 |
org.txm.statsengine.core;bundle-version="1.0.0", |
|
17 |
org.txm.statsengine.r.core;bundle-version="1.0.0", |
|
18 |
org.txm.statsengine.r.rcp;bundle-version="1.0.0" |
|
16 | 19 |
Export-Package: org.txm.ca.rcp.adapters, |
17 | 20 |
org.txm.ca.rcp.chartsengine.events, |
18 | 21 |
org.txm.ca.rcp.editors, |
tmp/org.txm.specificities.core/src/org/txm/specificities/core/statsengine/r/function/SpecificitiesImpl.java (revision 342) | ||
---|---|---|
75 | 75 |
public SpecificitiesImpl(ILexicalTable lt) throws StatException { |
76 | 76 |
super(prefixR+(specif_counter++)); |
77 | 77 |
|
78 |
|
|
79 | 78 |
// Create a set of the existing types |
80 | 79 |
String[] rownames = lt.getRowNames().asStringsArray(); |
81 | 80 |
String[] colnames = lt.getColNames().asStringsArray(); |
tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/SpecificitesResult.java (revision 342) | ||
---|---|---|
251 | 251 |
} |
252 | 252 |
} |
253 | 253 |
} |
254 |
if (partFocus != null && partFocus.size() != 0) { |
|
255 |
if (partFocus.size() != specIndex[0].length) { |
|
256 |
throw new IllegalArgumentException( |
|
257 |
SpecificitiesCoreMessages.SpecificitesResult_7 + partFocus.size() |
|
258 |
+ ", " + specIndex[0].length + ")."); //$NON-NLS-1$//$NON-NLS-2$ |
|
259 |
} |
|
260 |
colindex = ArrayIndex.getIndex( |
|
261 |
table.getColNames().asStringsArray(), partFocus |
|
262 |
.toArray(new String[] {})); |
|
263 |
for (int i : colindex) { |
|
264 |
if (i == -1) { |
|
265 |
throw new IllegalArgumentException( |
|
266 |
SpecificitiesCoreMessages.SpecificitesResult_10); |
|
267 |
} |
|
268 |
} |
|
269 |
} |
|
254 |
// if (partFocus != null && partFocus.size() != 0) {
|
|
255 |
// if (partFocus.size() != specIndex[0].length) {
|
|
256 |
// throw new IllegalArgumentException(
|
|
257 |
// SpecificitiesCoreMessages.SpecificitesResult_7 + partFocus.size()
|
|
258 |
// + ", " + specIndex[0].length + ")."); //$NON-NLS-1$//$NON-NLS-2$
|
|
259 |
// }
|
|
260 |
// colindex = ArrayIndex.getIndex(
|
|
261 |
// table.getColNames().asStringsArray(), partFocus
|
|
262 |
// .toArray(new String[] {}));
|
|
263 |
// for (int i : colindex) {
|
|
264 |
// if (i == -1) {
|
|
265 |
// throw new IllegalArgumentException(
|
|
266 |
// SpecificitiesCoreMessages.SpecificitesResult_10);
|
|
267 |
// }
|
|
268 |
// }
|
|
269 |
// }
|
|
270 | 270 |
} |
271 | 271 |
|
272 | 272 |
/** |
... | ... | |
357 | 357 |
* parts.get(i).getShortName(); } |
358 | 358 |
*/ |
359 | 359 |
return table.getColNames().asStringsArray(); |
360 |
|
|
361 | 360 |
} else { |
362 |
if(this.subCorpus != null) |
|
361 |
if (this.subCorpus != null)
|
|
363 | 362 |
return new String[] { this.subCorpus.getName(), |
364 | 363 |
this.corpus.getName() + " \\ " + this.subCorpus.getName() }; //$NON-NLS-1$ |
365 | 364 |
} |
... | ... | |
430 | 429 |
* @return the part size |
431 | 430 |
* @throws StatException the stat exception |
432 | 431 |
*/ |
433 |
public int[] getPartSize() throws StatException { |
|
432 |
public int[] getPartSizes() throws StatException {
|
|
434 | 433 |
if (table != null) { |
435 | 434 |
Vector partsize = table.getColMarginsVector(); |
436 | 435 |
if (colindex != null) { |
... | ... | |
708 | 707 |
double[][] specIndex = si.getScores(); |
709 | 708 |
|
710 | 709 |
if (table.getPartition() != null) { |
710 |
// System.out.println("table="+table); |
|
711 |
// System.out.println("rows="+table.getRowNames()); |
|
712 |
// System.out.println("cols="+table.getColNames()); |
|
713 |
// System.out.println("prop="+table.getProperty()); |
|
711 | 714 |
init(symbol, specIndex, table, Arrays |
712 | 715 |
.asList(table.getRowNames().asStringsArray()), Arrays.asList(table.getColNames().asStringsArray()), table.getProperty().getName(), maxScore); |
713 | 716 |
} else { |
tmp/org.txm.lexicon.core/src/org/txm/lexicon/core/corpusengine/cqp/Lexicon.java (revision 342) | ||
---|---|---|
94 | 94 |
|
95 | 95 |
public Lexicon(Corpus corpus, Property property) throws CqiClientException { |
96 | 96 |
if (corpus instanceof MainCorpus) initLexiconWith((MainCorpus)corpus, property); |
97 |
else if (corpus instanceof Subcorpus) initLexiconWith((MainCorpus)corpus, property);
|
|
97 |
else if (corpus instanceof Subcorpus) initLexiconWith((Subcorpus)corpus, property);
|
|
98 | 98 |
else { |
99 | 99 |
throw new IllegalArgumentException("Corpus class not managed: "+corpus); |
100 | 100 |
} |
Formats disponibles : Unified diff