Révision 2237
| tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTable.java (revision 2237) | ||
|---|---|---|
| 88 | 88 |
super(corpus); |
| 89 | 89 |
try { // create empty LT to store infos
|
| 90 | 90 |
String[] rowNames = {};
|
| 91 |
String[] colNames = {NLS.bind("{0}-{1}", corpus.getCorpusParent().getName(), corpus.getName()), corpus.getName()};
|
|
| 91 |
String[] colNames = {corpus.getName(), NLS.bind("{0}-{1}", corpus.getCorpusParent().getName(), corpus.getName())};
|
|
| 92 | 92 |
int[][] matrix = new int[0][2]; |
| 93 | 93 |
this.statsData = new LexicalTableImpl(matrix, rowNames, colNames); |
| 94 | 94 |
} catch (Exception e) {
|
| tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/statsengine/r/data/LexicalTableImpl.java (revision 2237) | ||
|---|---|---|
| 162 | 162 |
//TODO: implement the R function : rw.callFunction("lexicons2LexicalTable", new QuantitativeDataStructure[] { corpusLexiconV, subcorpusLexiconV }, symbol); //$NON-NLS-1$
|
| 163 | 163 |
|
| 164 | 164 |
rw.eval(symbol+" <- matrix(0, ncol = 2, nrow=length("+corpusLexiconV.getSymbol()+"))");
|
| 165 |
rw.eval("colnames("+symbol+") <- c(\""+corpusLexicon.getParent().getName()+"-"+subcorpusLexicon.getParent().getName()+"\", \""+subcorpusLexicon.getParent().getName()+"\")");
|
|
| 165 |
rw.eval("colnames("+symbol+") <- c(\""+subcorpusLexicon.getParent().getName()+"\", \""+corpusLexicon.getParent().getName()+"-"+subcorpusLexicon.getParent().getName()+"\")");
|
|
| 166 | 166 |
//System.out.println("forms: "+Arrays.toString(corpusLexicon.getForms()));
|
| 167 | 167 |
rw.addVectorToWorkspace("ltnames", corpusLexicon.getForms());
|
| 168 | 168 |
rw.eval("rownames("+symbol+") <- ltnames");
|
| 169 |
rw.eval(symbol+"[names("+corpusLexiconV.getSymbol()+"),1] <- "+corpusLexiconV.getSymbol());
|
|
| 170 |
rw.eval(symbol+"[names("+subcorpusLexiconV.getSymbol()+"),1] <- "+symbol+"[names("+subcorpusLexiconV.getSymbol()+"),1] - "+subcorpusLexiconV.getSymbol());
|
|
| 171 |
rw.eval(symbol+"[names("+subcorpusLexiconV.getSymbol()+"),2] <- "+subcorpusLexiconV.getSymbol());
|
|
| 169 |
rw.eval(symbol+"[names("+corpusLexiconV.getSymbol()+"),2] <- "+corpusLexiconV.getSymbol());
|
|
| 170 |
rw.eval(symbol+"[names("+subcorpusLexiconV.getSymbol()+"),2] <- "+symbol+"[names("+subcorpusLexiconV.getSymbol()+"),2] - "+subcorpusLexiconV.getSymbol());
|
|
| 171 |
rw.eval(symbol+"[names("+subcorpusLexiconV.getSymbol()+"),1] <- "+subcorpusLexiconV.getSymbol());
|
|
| 172 |
|
|
| 172 | 173 |
// try {
|
| 173 | 174 |
// System.out.println("colnames: "+Arrays.toString(rw.eval("colnames("+symbol+")").asStrings()));
|
| 174 | 175 |
// System.out.println("ltnames: "+Arrays.toString(rw.eval("ltnames").asStrings()));
|
Formats disponibles : Unified diff