Révision 726
| tmp/org.txm.index.core/src/org/txm/index/core/messages/messages.properties (revision 726) | ||
|---|---|---|
| 7 | 7 |
Index_1 = Console : |
| 8 | 8 |
Index_7 = ** Failed to export Lexicon : |
| 9 | 9 |
|
| 10 |
LEXICON_RESULT_TYPE = Lexicon |
|
| 11 |
|
|
| 12 |
LexiconDetailsFromCorpus = Lexicon:\n\ Corpus {0}\n\ query {1}\n\ properties {2}\n\ Fmin {3}\n\ Fmax {4}
|
|
| 13 |
|
|
| 14 |
LexiconDetailsFromPartition = Lexicon:\n\ Partition {0}\n\ query {1}\n\ properties {2}\n\ Fmin {3}\n\ Fmax {4}
|
|
| 15 |
|
|
| 16 |
Lexicon_0 = Forms and frequencies tables must be of the same length. |
|
| 17 |
Lexicon_3 = Lexicon : |
|
| 18 |
|
|
| 10 | 19 |
RESULT_TYPE = Index |
| tmp/org.txm.index.core/src/org/txm/index/core/messages/IndexCoreMessages.java (revision 726) | ||
|---|---|---|
| 16 | 16 |
public static String Index_1; |
| 17 | 17 |
public static String Index_7; |
| 18 | 18 |
|
| 19 |
public static String LEXICON_RESULT_TYPE; |
|
| 20 |
public static String Lexicon_0; |
|
| 21 |
public static String Lexicon_3; |
|
| 22 |
public static String LexiconDetailsFromPartition; |
|
| 23 |
public static String LexiconDetailsFromCorpus; |
|
| 24 |
|
|
| 25 |
|
|
| 26 |
|
|
| 19 | 27 |
//FIXME unused key |
| 20 | 28 |
public static String Index_0; |
| 21 | 29 |
//end of fixme |
| tmp/org.txm.index.core/src/org/txm/index/core/messages/messages_ru.properties (revision 726) | ||
|---|---|---|
| 3 | 3 |
|
| 4 | 4 |
DetailsFromPartition = Индекс:\n\ Распределение {0}\n\ Запрос {1}\n\ свойства {2}\n\ Fmin {3}\n\ Fmax {4}
|
| 5 | 5 |
|
| 6 |
LEXICON_RESULT_TYPE = Словарь |
|
| 7 |
|
|
| 8 |
LexiconDetailsFromCorpus = Словарь:\n\ Корпус {0}\n\ Запрос {1}\n\ Свойства {2}\n\ Fmin {3}\n\ Fmax {4}
|
|
| 9 |
|
|
| 10 |
LexiconDetailsFromPartition = Словарь:\n\ Распределение {0}\n\ Запрос {1}\n\ Свойства {2}\n\ Fmin {3}\n\ Fmax {4}
|
|
| 11 |
|
|
| 6 | 12 |
RESULT_TYPE = Индекс |
| tmp/org.txm.index.core/src/org/txm/index/core/messages/messages_fr.properties (revision 726) | ||
|---|---|---|
| 1 |
|
|
| 2 |
DetailsFromCorpus = Index:\n\ Corpus {0}\n\ Requ�te {1}\n\ propri�t�s {2}\n\ Fmin {3}\n\ Fmax {4}
|
|
| 3 |
|
|
| 4 |
DetailsFromPartition = Index:\n\ Partition {0}\n\ Requ�te {1}\n\ propri�t�s {2}\n\ Fmin {3}\n\ Fmax {4}
|
|
| 5 |
|
|
| 1 | 6 |
Index_0 = ** Erreur lors du calcul du lexique : \n |
| 2 | 7 |
Index_1 = console : |
| 3 | 8 |
Index_7 = ** Echec de l'exportation du Lexique : |
| ... | ... | |
| 2 | 7 |
|
| 8 |
LEXICON_RESULT_TYPE = Lexique |
|
| 3 | 9 |
|
| 4 |
DetailsFromCorpus = Index:\n\ Corpus {0}\n\ Requ?te {1}\n\ propri?t?s {2}\n\ Fmin {3}\n\ Fmax {4}
|
|
| 10 |
LexiconDetailsFromCorpus = Lexique :\n\ Corpus {0}\n\ Requête {1}\n\ Propriétés {2}\n\ Fmin {3}\n\ Fmax {4}
|
|
| 5 | 11 |
|
| 6 |
DetailsFromPartition = Index:\n\ Partition {0}\n\ Requ?te {1}\n\ propri?t?s {2}\n\ Fmin {3}\n\ Fmax {4}
|
|
| 12 |
LexiconDetailsFromPartition = Lexique :\n\ Partition {0}\n\ Requête {1}\n\ Propriétés {2}\n\ Fmin {3}\n\ Fmax {4}
|
|
| 7 | 13 |
|
| 14 |
Lexicon_0 = Le tableau des formes et des fréquences doivent avoir la même longueur. |
|
| 15 |
Lexicon_3 = Lexique : |
|
| 16 |
|
|
| 8 | 17 |
RESULT_TYPE = Index |
| tmp/org.txm.index.core/src/org/txm/index/core/functions/Lexicon.java (revision 726) | ||
|---|---|---|
| 1 |
// Copyright © 2010-2013 ENS de Lyon. |
|
| 2 |
// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of |
|
| 3 |
// Lyon 2, University of Franche-Comté, University of Nice |
|
| 4 |
// Sophia Antipolis, University of Paris 3. |
|
| 5 |
// |
|
| 6 |
// The TXM platform is free software: you can redistribute it |
|
| 7 |
// and/or modify it under the terms of the GNU General Public |
|
| 8 |
// License as published by the Free Software Foundation, |
|
| 9 |
// either version 2 of the License, or (at your option) any |
|
| 10 |
// later version. |
|
| 11 |
// |
|
| 12 |
// The TXM platform is distributed in the hope that it will be |
|
| 13 |
// useful, but WITHOUT ANY WARRANTY; without even the implied |
|
| 14 |
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
|
| 15 |
// PURPOSE. See the GNU General Public License for more |
|
| 16 |
// details. |
|
| 17 |
// |
|
| 18 |
// You should have received a copy of the GNU General |
|
| 19 |
// Public License along with the TXM platform. If not, see |
|
| 20 |
// http://www.gnu.org/licenses. |
|
| 21 |
// |
|
| 22 |
// |
|
| 23 |
// |
|
| 24 |
// $LastChangedDate: 2016-09-19 10:31:00 +0200 (Mon, 19 Sep 2016) $ |
|
| 25 |
// $LastChangedRevision: 3298 $ |
|
| 26 |
// $LastChangedBy: mdecorde $ |
|
| 27 |
// |
|
| 28 |
package org.txm.index.core.functions; |
|
| 29 |
|
|
| 30 |
import java.io.File; |
|
| 31 |
import java.io.FileNotFoundException; |
|
| 32 |
import java.io.FileOutputStream; |
|
| 33 |
import java.io.IOException; |
|
| 34 |
import java.io.OutputStreamWriter; |
|
| 35 |
import java.io.UnsupportedEncodingException; |
|
| 36 |
import java.util.Arrays; |
|
| 37 |
import java.util.Map; |
|
| 38 |
|
|
| 39 |
import org.eclipse.core.runtime.IProgressMonitor; |
|
| 40 |
import org.txm.core.messages.TXMCoreMessages; |
|
| 41 |
import org.txm.core.results.TXMParameters; |
|
| 42 |
import org.txm.core.results.TXMResult; |
|
| 43 |
import org.txm.index.core.messages.IndexCoreMessages; |
|
| 44 |
import org.txm.searchengine.cqp.ICqiClient; |
|
| 45 |
import org.txm.searchengine.cqp.clientExceptions.CqiClientException; |
|
| 46 |
import org.txm.searchengine.cqp.corpus.Corpus; |
|
| 47 |
import org.txm.searchengine.cqp.corpus.CorpusManager; |
|
| 48 |
import org.txm.searchengine.cqp.corpus.MainCorpus; |
|
| 49 |
import org.txm.searchengine.cqp.corpus.Property; |
|
| 50 |
import org.txm.searchengine.cqp.corpus.Subcorpus; |
|
| 51 |
import org.txm.searchengine.cqp.corpus.query.Query; |
|
| 52 |
import org.txm.statsengine.core.StatException; |
|
| 53 |
import org.txm.statsengine.core.data.Vector; |
|
| 54 |
import org.txm.statsengine.r.core.data.VectorImpl; |
|
| 55 |
import org.txm.utils.logger.Log; |
|
| 56 |
|
|
| 57 |
// TODO: Auto-generated Javadoc |
|
| 58 |
// TODO should be put into stat.data package ? |
|
| 59 |
/** |
|
| 60 |
* Represent a frequency list according to a {@link Corpus} (or a.
|
|
| 61 |
* |
|
| 62 |
* {@link Subcorpus}) and a {@link Property}.
|
|
| 63 |
* @author sloiseau |
|
| 64 |
*/ |
|
| 65 |
public class Lexicon extends TXMResult {
|
|
| 66 |
|
|
| 67 |
/** The nolex. */ |
|
| 68 |
protected static int nolex = 1; |
|
| 69 |
|
|
| 70 |
/** The prefix r. */ |
|
| 71 |
protected static String prefixR = "Lexicon_"; //$NON-NLS-1$ |
|
| 72 |
|
|
| 73 |
/** The forms. */ |
|
| 74 |
private String[] forms; |
|
| 75 |
|
|
| 76 |
/** The freqs. */ |
|
| 77 |
private int[] freqs; |
|
| 78 |
|
|
| 79 |
/** The ids. */ |
|
| 80 |
private int[] ids; |
|
| 81 |
|
|
| 82 |
/** The number of tokens. */ |
|
| 83 |
int numberOfTokens = -1; |
|
| 84 |
|
|
| 85 |
/** The property. */ |
|
| 86 |
private Property pProperty; |
|
| 87 |
|
|
| 88 |
/** The symbol. */ |
|
| 89 |
private String symbol; |
|
| 90 |
|
|
| 91 |
/** The writer. */ |
|
| 92 |
private OutputStreamWriter writer; |
|
| 93 |
|
|
| 94 |
private Corpus corpus; |
|
| 95 |
|
|
| 96 |
public Lexicon(Corpus corpus) {
|
|
| 97 |
super(corpus); |
|
| 98 |
this.corpus = corpus; |
|
| 99 |
} |
|
| 100 |
|
|
| 101 |
|
|
| 102 |
@Override |
|
| 103 |
public boolean saveParameters() throws Exception {
|
|
| 104 |
// TODO Auto-generated method stub |
|
| 105 |
return true; |
|
| 106 |
} |
|
| 107 |
|
|
| 108 |
@Override |
|
| 109 |
public boolean loadParameters() throws Exception {
|
|
| 110 |
// TODO Auto-generated method stub |
|
| 111 |
return true; |
|
| 112 |
} |
|
| 113 |
|
|
| 114 |
@Override |
|
| 115 |
public void clean() {
|
|
| 116 |
// TODO Auto-generated method stub |
|
| 117 |
|
|
| 118 |
} |
|
| 119 |
|
|
| 120 |
@Override |
|
| 121 |
public boolean canCompute() throws Exception {
|
|
| 122 |
return corpus != null && pProperty != null; |
|
| 123 |
} |
|
| 124 |
|
|
| 125 |
@Override |
|
| 126 |
protected boolean _compute() throws Exception {
|
|
| 127 |
if (corpus instanceof MainCorpus) {
|
|
| 128 |
return computeWithMainCorpus((MainCorpus)corpus, pProperty, monitor); |
|
| 129 |
} |
|
| 130 |
else if (corpus instanceof Subcorpus) {
|
|
| 131 |
return computewithSubCorpus((Subcorpus)corpus, pProperty, monitor); |
|
| 132 |
} |
|
| 133 |
else {
|
|
| 134 |
System.out.println("Error: Lexicon parent is neither a Maincorpus nor a Subcorpus.");
|
|
| 135 |
return false; |
|
| 136 |
} |
|
| 137 |
} |
|
| 138 |
|
|
| 139 |
/** |
|
| 140 |
* Gets the lexicon relative to a given property. |
|
| 141 |
* |
|
| 142 |
* @param property |
|
| 143 |
* the property |
|
| 144 |
* |
|
| 145 |
* @return the lexicon |
|
| 146 |
* |
|
| 147 |
* @throws CqiClientException |
|
| 148 |
* the cqi client exception |
|
| 149 |
*/ |
|
| 150 |
protected boolean computeWithMainCorpus(MainCorpus corpus, Property property, IProgressMonitor monitor) throws CqiClientException {
|
|
| 151 |
// System.out.println("in "+this.getCqpId()+" look for cached lexicon "+property);
|
|
| 152 |
// System.out.println("not found");
|
|
| 153 |
this.subTask("Computing lexicon size...");
|
|
| 154 |
Log.finest(TXMCoreMessages.LEXICON + corpus.getName()); |
|
| 155 |
int lexiconSize; |
|
| 156 |
try {
|
|
| 157 |
lexiconSize = CorpusManager.getCorpusManager().getCqiClient().lexiconSize(property.getQualifiedName()); |
|
| 158 |
} catch (Exception e) {
|
|
| 159 |
throw new CqiClientException(e); |
|
| 160 |
} |
|
| 161 |
|
|
| 162 |
int[] ids = new int[lexiconSize]; |
|
| 163 |
for (int i = 0; i < ids.length; i++) {
|
|
| 164 |
ids[i] = i; |
|
| 165 |
} |
|
| 166 |
|
|
| 167 |
int[] freqs; |
|
| 168 |
try {
|
|
| 169 |
this.subTask("Computing lexicon frequencies...");
|
|
| 170 |
freqs = CorpusManager.getCorpusManager().getCqiClient().id2Freq(property.getQualifiedName(), ids); |
|
| 171 |
} catch (Exception e) {
|
|
| 172 |
throw new CqiClientException(e); |
|
| 173 |
} |
|
| 174 |
|
|
| 175 |
init(corpus, property, freqs, ids); |
|
| 176 |
return true; |
|
| 177 |
} |
|
| 178 |
|
|
| 179 |
/** |
|
| 180 |
* |
|
| 181 |
* @param corpus |
|
| 182 |
* @param property |
|
| 183 |
* @param monitor |
|
| 184 |
* @return |
|
| 185 |
* @throws CqiClientException |
|
| 186 |
*/ |
|
| 187 |
protected boolean computewithSubCorpus(Subcorpus corpus, Property property, IProgressMonitor monitor) throws CqiClientException {
|
|
| 188 |
|
|
| 189 |
//System.out.println("not found");
|
|
| 190 |
Log.finest(TXMCoreMessages.SUBCORPUS_LEXICON + corpus.getName()); |
|
| 191 |
long start = System.currentTimeMillis(); |
|
| 192 |
int[][] fdist = null; |
|
| 193 |
Subcorpus tmp = null; |
|
| 194 |
try {
|
|
| 195 |
this.subTask("Computing lexicon frequencies...");
|
|
| 196 |
tmp = corpus.createSubcorpus(new Query("[]"), "S"+corpus.getNextSubcorpusCounter(), true); //$NON-NLS-1$
|
|
| 197 |
if (tmp != null) {
|
|
| 198 |
fdist = CorpusManager.getCorpusManager().getCqiClient().fdist1( |
|
| 199 |
tmp.getQualifiedCqpId(), 0, |
|
| 200 |
ICqiClient.CQI_CONST_FIELD_MATCH, property.getName()); |
|
| 201 |
|
|
| 202 |
corpus.dropSubcorpus(tmp); // drop the subcorpus only if correctly created |
|
| 203 |
} |
|
| 204 |
//System.out.println("nb lines: "+fdist.length);
|
|
| 205 |
} catch (Exception e) {
|
|
| 206 |
throw new CqiClientException(e); |
|
| 207 |
} finally {
|
|
| 208 |
if (tmp != null) {
|
|
| 209 |
try {corpus.dropSubcorpus(tmp);}
|
|
| 210 |
catch (Exception e2) {}
|
|
| 211 |
} |
|
| 212 |
} |
|
| 213 |
int lexiconSize = fdist.length; |
|
| 214 |
|
|
| 215 |
int[] freqs = new int[lexiconSize]; |
|
| 216 |
int[] ids = new int[lexiconSize]; |
|
| 217 |
for (int i = 0; i < fdist.length; i++) {
|
|
| 218 |
ids[i] = fdist[i][0]; |
|
| 219 |
freqs[i] = fdist[i][1]; |
|
| 220 |
} |
|
| 221 |
|
|
| 222 |
init(corpus, property, freqs, ids); |
|
| 223 |
return true; |
|
| 224 |
} |
|
| 225 |
|
|
| 226 |
|
|
| 227 |
/** |
|
| 228 |
* Convert the Lexicon into a Vector object. |
|
| 229 |
* |
|
| 230 |
* @return the vector |
|
| 231 |
* @throws StatException the stat exception |
|
| 232 |
*/ |
|
| 233 |
public Vector asVector() throws StatException {
|
|
| 234 |
String symbol = prefixR + (nolex++); |
|
| 235 |
VectorImpl v = new VectorImpl(freqs, symbol); |
|
| 236 |
v.setRNames(getForms()); |
|
| 237 |
this.symbol = v.getSymbol(); |
|
| 238 |
return v; |
|
| 239 |
} |
|
| 240 |
|
|
| 241 |
|
|
| 242 |
/** |
|
| 243 |
* Compute number of tokens. / this.nbr |
|
| 244 |
*/ |
|
| 245 |
private void computeNumberOfTokens() {
|
|
| 246 |
numberOfTokens = 0; |
|
| 247 |
for (int i = 0; i < freqs.length; i++) {
|
|
| 248 |
numberOfTokens += freqs[i]; |
|
| 249 |
// System.out.println(numberOfTokens); |
|
| 250 |
// if (freqs[i] != 1) System.out.println(freqs[i]); |
|
| 251 |
} |
|
| 252 |
} |
|
| 253 |
|
|
| 254 |
|
|
| 255 |
|
|
| 256 |
@Override |
|
| 257 |
public boolean delete() {
|
|
| 258 |
if (corpus != null) {
|
|
| 259 |
corpus.removeData(this); |
|
| 260 |
} |
|
| 261 |
return true; |
|
| 262 |
} |
|
| 263 |
|
|
| 264 |
/** |
|
| 265 |
* Dump lexicon forms and frequencies in a String. |
|
| 266 |
* |
|
| 267 |
* @param col the col |
|
| 268 |
* @param txt the txt |
|
| 269 |
* @return the string |
|
| 270 |
*/ |
|
| 271 |
public String dump(String col, String txt) {
|
|
| 272 |
StringBuffer buffer = new StringBuffer(); |
|
| 273 |
getForms(); |
|
| 274 |
for (int i = 0; i < forms.length; i++) {
|
|
| 275 |
buffer.append(txt+ forms[i].replace(txt, txt+txt) + txt + col + freqs[i] + "\n"); //$NON-NLS-1$ |
|
| 276 |
} |
|
| 277 |
return buffer.toString(); |
|
| 278 |
} |
|
| 279 |
|
|
| 280 |
/* (non-Javadoc) |
|
| 281 |
* @see java.lang.Object#equals(java.lang.Object) |
|
| 282 |
*/ |
|
| 283 |
@Override |
|
| 284 |
public boolean equals(Object obj) {
|
|
| 285 |
if (!(obj instanceof Lexicon)) {
|
|
| 286 |
return false; |
|
| 287 |
} |
|
| 288 |
Lexicon other = (Lexicon) obj; |
|
| 289 |
|
|
| 290 |
if (other.nbrOfType() != this.nbrOfType()) {
|
|
| 291 |
return false; |
|
| 292 |
} |
|
| 293 |
return (Arrays.equals(freqs, other.getFreq()) && Arrays.equals(getForms(), other.getForms())); |
|
| 294 |
} |
|
| 295 |
|
|
| 296 |
/** |
|
| 297 |
* The corpus or subcorpus this lexicon is build on. |
|
| 298 |
* |
|
| 299 |
* @return the corpus |
|
| 300 |
*/ |
|
| 301 |
public Corpus getCorpus() {
|
|
| 302 |
return corpus; |
|
| 303 |
} |
|
| 304 |
|
|
| 305 |
public String getDetails() {
|
|
| 306 |
return this.corpus.getName() + " " + this.pProperty.getName(); //$NON-NLS-1$ |
|
| 307 |
} |
|
| 308 |
|
|
| 309 |
//TODO: move this into a Lexicon chart renderer |
|
| 310 |
// /** |
|
| 311 |
// * Draw a pareto graphic with this frequency list and record it into the |
|
| 312 |
// * provided filename into svg format. |
|
| 313 |
// * |
|
| 314 |
// * @param file where to save the pareto graphic. |
|
| 315 |
// * @return the pareto graphic |
|
| 316 |
// * @throws StatException if anything goes wrong. |
|
| 317 |
// */ |
|
| 318 |
// public void getParetoGraphic(File file) throws StatException {
|
|
| 319 |
// String rName = asVector().getSymbol(); |
|
| 320 |
// String expr = "pareto(" + rName + ")"; //$NON-NLS-1$ //$NON-NLS-2$
|
|
| 321 |
// try {
|
|
| 322 |
// RWorkspace.getRWorkspaceInstance().plot(file, expr, RDevice.SVG); |
|
| 323 |
// } catch (Exception e) {
|
|
| 324 |
// throw new StatException(e); |
|
| 325 |
// } |
|
| 326 |
// } |
|
| 327 |
|
|
| 328 |
/** |
|
| 329 |
* The dif ferent types in the lexicon, the type at the index <code>j</code> |
|
| 330 |
* of this array have the frequency at index <code>j</code> in the array |
|
| 331 |
* returned by {@link #getFreq()}.
|
|
| 332 |
* |
|
| 333 |
* @return types as an array of <code>String</code> |
|
| 334 |
*/ |
|
| 335 |
public String[] getForms() {
|
|
| 336 |
if (forms == null) {
|
|
| 337 |
if(ids == null) {
|
|
| 338 |
return new String[0]; |
|
| 339 |
} |
|
| 340 |
try {
|
|
| 341 |
forms = CorpusManager.getCorpusManager().getCqiClient().id2Str(pProperty.getQualifiedName(), ids); |
|
| 342 |
} catch (Exception e) {
|
|
| 343 |
// TODO Auto-generated catch block |
|
| 344 |
org.txm.utils.logger.Log.printStackTrace(e); |
|
| 345 |
} |
|
| 346 |
} |
|
| 347 |
return forms; |
|
| 348 |
} |
|
| 349 |
|
|
| 350 |
/** |
|
| 351 |
* The dif ferent types in the lexicon, the type at the index <code>j</code> |
|
| 352 |
* of this array have the frequency at index <code>j</code> in the array |
|
| 353 |
* returned by {@link #getFreq()}.
|
|
| 354 |
* |
|
| 355 |
* @param number the number |
|
| 356 |
* @return types as an array of <code>String</code> |
|
| 357 |
*/ |
|
| 358 |
public String[] getForms(int number) {
|
|
| 359 |
//System.out.println("Lexicon("+this.property+" get forms. number="+number+", ids len="+ids.length);
|
|
| 360 |
if (forms == null) {
|
|
| 361 |
try {
|
|
| 362 |
number = Math.min(number, ids.length); |
|
| 363 |
if (number <= 0) {
|
|
| 364 |
return new String[0]; |
|
| 365 |
} |
|
| 366 |
int[] subpositions = new int[number]; |
|
| 367 |
System.arraycopy(ids, 0, subpositions, 0, number); |
|
| 368 |
return CorpusManager.getCorpusManager().getCqiClient().id2Str(pProperty.getQualifiedName(), subpositions); |
|
| 369 |
} catch (Exception e) {
|
|
| 370 |
// TODO Auto-generated catch block |
|
| 371 |
org.txm.utils.logger.Log.printStackTrace(e); |
|
| 372 |
return null; |
|
| 373 |
} |
|
| 374 |
} else {
|
|
| 375 |
number = Math.min(number, ids.length); |
|
| 376 |
if (number <= 0) {
|
|
| 377 |
return new String[0]; |
|
| 378 |
} |
|
| 379 |
String[] subforms = new String[number]; |
|
| 380 |
System.arraycopy(ids, 0, subforms, 0, number); |
|
| 381 |
return subforms; |
|
| 382 |
} |
|
| 383 |
} |
|
| 384 |
|
|
| 385 |
/** |
|
| 386 |
* The dif ferent frequencies in the lexicon. See {@link #getForms()}.
|
|
| 387 |
* |
|
| 388 |
* @return frequencies as an array of <code>int</code> |
|
| 389 |
*/ |
|
| 390 |
public int[] getFreq() {
|
|
| 391 |
return freqs; |
|
| 392 |
} |
|
| 393 |
|
|
| 394 |
/** |
|
| 395 |
* return the ids of the entries. |
|
| 396 |
* |
|
| 397 |
* @return types as an array of <code>String</code> |
|
| 398 |
*/ |
|
| 399 |
public int[] getIds() {
|
|
| 400 |
return ids; |
|
| 401 |
} |
|
| 402 |
|
|
| 403 |
public String getName() {
|
|
| 404 |
try {
|
|
| 405 |
return IndexCoreMessages.LEXICON_RESULT_TYPE + ": " + this.corpus.getSimpleName() + ": " + this.getSimpleName(); |
|
| 406 |
} |
|
| 407 |
catch(Exception e) {
|
|
| 408 |
} |
|
| 409 |
return ""; //$NON-NLS-1$ |
|
| 410 |
} |
|
| 411 |
|
|
| 412 |
/** |
|
| 413 |
* The property this lexicon is build on. |
|
| 414 |
* |
|
| 415 |
* @return the property |
|
| 416 |
*/ |
|
| 417 |
public Property getProperty() {
|
|
| 418 |
return pProperty; |
|
| 419 |
} |
|
| 420 |
|
|
| 421 |
public String getSimpleName() {
|
|
| 422 |
try {
|
|
| 423 |
return this.getProperty().getName(); |
|
| 424 |
} |
|
| 425 |
catch(Exception e) {
|
|
| 426 |
} |
|
| 427 |
return ""; |
|
| 428 |
} |
|
| 429 |
|
|
| 430 |
/** |
|
| 431 |
* Gets the symbol. |
|
| 432 |
* |
|
| 433 |
* @return the symbol |
|
| 434 |
*/ |
|
| 435 |
public String getSymbol() {
|
|
| 436 |
return this.symbol; |
|
| 437 |
} |
|
| 438 |
|
|
| 439 |
/** |
|
| 440 |
* Hack frequencies using a map to set forms and frequencies |
|
| 441 |
* |
|
| 442 |
* @param corpus the corpus |
|
| 443 |
* @param pProperty the property |
|
| 444 |
* @param map the map |
|
| 445 |
* {@link Corpus#getLexicon(Property)} or
|
|
| 446 |
* {@link Subcorpus#getLexicon(Property)}.
|
|
| 447 |
*/ |
|
| 448 |
public boolean hack(Map<String, Integer> map) {
|
|
| 449 |
if (map.size() != forms.length) return false; |
|
| 450 |
|
|
| 451 |
//super(corpus); |
|
| 452 |
int size = map.size(); |
|
| 453 |
int[] freqs = new int[size]; |
|
| 454 |
String[] forms = map.keySet().toArray(new String[] {});
|
|
| 455 |
for (int i = 0; i < forms.length; i++) {
|
|
| 456 |
freqs[i] = map.get(forms[i]); |
|
| 457 |
} |
|
| 458 |
|
|
| 459 |
this.freqs = freqs; |
|
| 460 |
return true; |
|
| 461 |
} |
|
| 462 |
|
|
| 463 |
/** |
|
| 464 |
* Protected on purpose: should be accessed through others initializer. |
|
| 465 |
* |
|
| 466 |
* @param corpus the corpus |
|
| 467 |
* @param property the property |
|
| 468 |
* @param freq the freq |
|
| 469 |
* @param ids the ids |
|
| 470 |
* {@link Corpus#getLexicon(Property)} or
|
|
| 471 |
* {@link Subcorpus#getLexicon(Property)}.
|
|
| 472 |
*/ |
|
| 473 |
protected void init(TXMResult corpus, Property property, int[] freq, int[] ids) {
|
|
| 474 |
if (freq.length != ids.length) {
|
|
| 475 |
throw new IllegalArgumentException(IndexCoreMessages.Lexicon_0); |
|
| 476 |
} |
|
| 477 |
this.freqs = freq; |
|
| 478 |
this.ids = ids; |
|
| 479 |
this.forms = null; |
|
| 480 |
this.pProperty = property; |
|
| 481 |
this.corpus = (Corpus) corpus; |
|
| 482 |
} |
|
| 483 |
|
|
| 484 |
|
|
| 485 |
/** |
|
| 486 |
* Number of tokens (sum of all the frequencies) in the corpus. |
|
| 487 |
* |
|
| 488 |
* @return the size of the corpus or subcorpus. |
|
| 489 |
*/ |
|
| 490 |
public int nbrOfToken() {
|
|
| 491 |
if (numberOfTokens <= 0) {
|
|
| 492 |
computeNumberOfTokens(); |
|
| 493 |
} |
|
| 494 |
return numberOfTokens; |
|
| 495 |
} |
|
| 496 |
|
|
| 497 |
|
|
| 498 |
/** |
|
| 499 |
* Number of dif ferent types in the frequency list. |
|
| 500 |
* |
|
| 501 |
* @return number of types in the corpus or subcorpus. |
|
| 502 |
*/ |
|
| 503 |
public int nbrOfType() {
|
|
| 504 |
return freqs.length; |
|
| 505 |
} |
|
| 506 |
|
|
| 507 |
public void setParameters(Property property) {
|
|
| 508 |
this.pProperty = property; |
|
| 509 |
} |
|
| 510 |
|
|
| 511 |
@Override |
|
| 512 |
public boolean setParameters(TXMParameters parameters) {
|
|
| 513 |
try {
|
|
| 514 |
Property p = (Property) parameters.get("properties");
|
|
| 515 |
this.setParameters(p); |
|
| 516 |
} catch (Exception e) {
|
|
| 517 |
Log.printStackTrace(e); |
|
| 518 |
return false; |
|
| 519 |
} |
|
| 520 |
return true; |
|
| 521 |
} |
|
| 522 |
|
|
| 523 |
/** |
|
| 524 |
* Sets the symbol. |
|
| 525 |
* |
|
| 526 |
* @param symbol the new symbol |
|
| 527 |
*/ |
|
| 528 |
public void setSymbol(String symbol) {
|
|
| 529 |
this.symbol = symbol; |
|
| 530 |
} |
|
| 531 |
|
|
| 532 |
|
|
| 533 |
@Override |
|
| 534 |
public String toString() {
|
|
| 535 |
return IndexCoreMessages.Lexicon_3 + getName(); |
|
| 536 |
} |
|
| 537 |
|
|
| 538 |
/** |
|
| 539 |
* To txt. |
|
| 540 |
* |
|
| 541 |
* @param outfile the outfile |
|
| 542 |
* @param encoding the encoding |
|
| 543 |
* @param colseparator the colseparator |
|
| 544 |
* @param txtseparator the txtseparator |
|
| 545 |
* @return true, if successful |
|
| 546 |
*/ |
|
| 547 |
@Deprecated |
|
| 548 |
public boolean toTxt(File outfile, String encoding, String colseparator, String txtseparator) {
|
|
| 549 |
// NK: writer declared as class attribute to perform a clean if the operation is interrupted |
|
| 550 |
// OutputStreamWriter writer; |
|
| 551 |
try {
|
|
| 552 |
this.writer = new OutputStreamWriter(new FileOutputStream(outfile), |
|
| 553 |
encoding); |
|
| 554 |
} catch (UnsupportedEncodingException e1) {
|
|
| 555 |
org.txm.utils.logger.Log.printStackTrace(e1); |
|
| 556 |
return false; |
|
| 557 |
} catch (FileNotFoundException e1) {
|
|
| 558 |
org.txm.utils.logger.Log.printStackTrace(e1); |
|
| 559 |
return false; |
|
| 560 |
} |
|
| 561 |
|
|
| 562 |
try {
|
|
| 563 |
writer.write(this.dump(colseparator, txtseparator)); |
|
| 564 |
writer.close(); |
|
| 565 |
} catch (IOException e) {
|
|
| 566 |
org.txm.utils.logger.Log.printStackTrace(e); |
|
| 567 |
return false; |
|
| 568 |
} |
|
| 569 |
|
|
| 570 |
return true; |
|
| 571 |
} |
|
| 572 |
|
|
| 573 |
public void setProperty(Property property) {
|
|
| 574 |
this.pProperty = property; |
|
| 575 |
} |
|
| 576 |
|
|
| 577 |
|
|
| 578 |
// /** |
|
| 579 |
// * Find or build a lexicon given a Corpus (MainCorpus or SubCorpus). |
|
| 580 |
// * |
|
| 581 |
// * @param corpus |
|
| 582 |
// * @param property |
|
| 583 |
// * @return a Lexicon. May return null if the lexicon forms or freqs are null. |
|
| 584 |
// * @throws Exception |
|
| 585 |
// */ |
|
| 586 |
// public static Lexicon getLexicon(Corpus corpus, Property property) throws Exception {
|
|
| 587 |
// HashSet<Object> results = corpus.getStoredData(Lexicon.class); |
|
| 588 |
// for (Object result : results) {
|
|
| 589 |
// Lexicon lex = (Lexicon)result; |
|
| 590 |
// if (lex.getProperty().equals(property)) {
|
|
| 591 |
// return lex; |
|
| 592 |
// } |
|
| 593 |
// } |
|
| 594 |
// |
|
| 595 |
// Lexicon lex = new Lexicon(corpus); |
|
| 596 |
// lex.setParameters(property); |
|
| 597 |
// if (lex.compute(null) && lex.getForms() != null && lex.getFreq() != null) {
|
|
| 598 |
// corpus.storeData(lex); |
|
| 599 |
// return lex; |
|
| 600 |
// } else {
|
|
| 601 |
// return null; |
|
| 602 |
// } |
|
| 603 |
// } |
|
| 604 |
|
|
| 605 |
|
|
| 606 |
|
|
| 607 |
} |
|
| 0 | 608 | |
| tmp/org.txm.index.core/src/org/txm/index/core/functions/Index.java (revision 726) | ||
|---|---|---|
| 48 | 48 |
import org.txm.index.core.functions.LineComparator.SortMode; |
| 49 | 49 |
import org.txm.index.core.messages.IndexCoreMessages; |
| 50 | 50 |
import org.txm.index.core.preferences.IndexPreferences; |
| 51 |
import org.txm.lexicon.core.functions.Lexicon; |
|
| 52 | 51 |
import org.txm.searchengine.cqp.CQPEngine; |
| 53 | 52 |
import org.txm.searchengine.cqp.ICqiClient; |
| 54 | 53 |
import org.txm.searchengine.cqp.clientExceptions.CqiClientException; |
| tmp/org.txm.index.core/META-INF/MANIFEST.MF (revision 726) | ||
|---|---|---|
| 6 | 6 |
Require-Bundle: org.txm.utils;bundle-version="1.0.0", |
| 7 | 7 |
org.txm.searchengine.cqp.core;bundle-version="1.1.0", |
| 8 | 8 |
org.txm.statsengine.r.core;bundle-version="1.0.0", |
| 9 |
org.txm.lexicon.core;bundle-version="1.0.0";visibility:=reexport, |
|
| 10 | 9 |
org.eclipse.core.runtime, |
| 11 | 10 |
org.txm.core;bundle-version="0.7.0", |
| 12 | 11 |
org.txm.searchengine.core;bundle-version="1.0.0" |
| tmp/org.txm.lexicaltable.rcp/META-INF/MANIFEST.MF (revision 726) | ||
|---|---|---|
| 13 | 13 |
org.txm.statsengine.r.rcp, |
| 14 | 14 |
org.txm.searchengine.cqp.core;bundle-version="1.1.0", |
| 15 | 15 |
org.txm.index.core;bundle-version="1.0.0", |
| 16 |
org.txm.lexicaltable.core;bundle-version="1.0.0", |
|
| 16 | 17 |
org.txm.ca.core;bundle-version="1.0.0", |
| 17 | 18 |
org.txm.core, |
| 18 |
org.txm.lexicaltable.core;bundle-version="1.0.0", |
|
| 19 | 19 |
org.txm.rcp, |
| 20 | 20 |
org.eclipse.core.expressions;bundle-version="3.4.600" |
| 21 | 21 |
Bundle-RequiredExecutionEnvironment: JavaSE-1.7 |
| tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/messages/messages.properties (revision 726) | ||
|---|---|---|
| 1 | 1 |
|
| 2 |
ComputeLexicalTable_10 = Opening the lexical table |
|
| 2 |
ComputeLexicalTable_0 = Computing the Lexical Table with {0}
|
|
| 3 |
ComputeLexicalTable_1 = Computing the Lexical Table {0} with the property {1}
|
|
| 4 |
ComputeLexicalTable_10 = Opening the lexical table. |
|
| 3 | 5 |
ComputeLexicalTable_12 = User index occurrences |
| 4 | 6 |
ComputeLexicalTable_13 = Select which margins you want to use |
| 5 | 7 |
ComputeLexicalTable_16 = Use all occurrences |
| 8 |
ComputeLexicalTable_2 = No property |
|
| 6 | 9 |
ComputeLexicalTable_3 = Opening marge configuration dialog |
| 10 |
ComputeLexicalTable_5 = Can not create a lexical table with an Index created on a Corpus |
|
| 11 |
ComputeLexicalTable_6 = Vocabularies must share the same properties: {0}
|
|
| 12 |
ComputeLexicalTable_7 = Vocabularies must share the same partition: {0}
|
|
| 13 |
ComputeLexicalTable_9 = LexicalTable dialog, failed to get corpus size: {0}
|
|
| 7 | 14 |
|
| 8 | 15 |
LexicalTableEditor_1 = ** Error: different columns number: before |
| 9 | 16 |
LexicalTableEditor_10 = Merge or Delete columns |
| tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/messages/messages_fr.properties (revision 726) | ||
|---|---|---|
| 1 | 1 |
|
| 2 |
ComputeLexicalTable_0 = Calcul de la table lexicale avec {0}
|
|
| 3 |
ComputeLexicalTable_1 = Calcul de la table lexicale {0} avec la propriété {1}
|
|
| 4 |
ComputeLexicalTable_10 = Ouverture de la table lexicale |
|
| 2 |
ComputeLexicalTable_0 = Calcul de la table lexicale avec {0}.
|
|
| 3 |
ComputeLexicalTable_1 = Calcul de la table lexicale {0} avec la propriété {1}.
|
|
| 4 |
ComputeLexicalTable_10 = Ouverture de la table lexicale.
|
|
| 5 | 5 |
ComputeLexicalTable_12 = Total toutes les occurrences recenses par l'index |
| 6 | 6 |
ComputeLexicalTable_13 = Sélectionnez les marges à utiliser |
| 7 | 7 |
ComputeLexicalTable_16 = Total toutes les occurrences du corpus |
| tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/messages/LexicalTableUIMessages.java (revision 726) | ||
|---|---|---|
| 25 | 25 |
public static String ComputeLexicalTable_13; |
| 26 | 26 |
public static String ComputeLexicalTable_16; |
| 27 | 27 |
public static String ComputeLexicalTable_3; |
| 28 |
public static String ComputeLexicalTable_5; |
|
| 29 |
public static String ComputeLexicalTable_6; |
|
| 30 |
public static String ComputeLexicalTable_7; |
|
| 31 |
|
|
| 28 | 32 |
|
| 29 | 33 |
|
| 30 | 34 |
static {
|
| tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/___LexicalTableEditorInput.java (revision 726) | ||
|---|---|---|
| 38 | 38 |
import org.eclipse.swt.graphics.Image; |
| 39 | 39 |
import org.eclipse.ui.IEditorInput; |
| 40 | 40 |
import org.eclipse.ui.part.EditorPart; |
| 41 |
import org.txm.core.messages.TXMCoreMessages; |
|
| 41 | 42 |
import org.txm.lexicaltable.core.functions.LexicalTable; |
| 43 |
import org.txm.rcp.editors.ITablableEditorInput; |
|
| 42 | 44 |
import org.txm.rcp.editors.TXMResultEditorInput; |
| 43 |
import org.txm.rcp.editors.ITablableEditorInput; |
|
| 44 | 45 |
import org.txm.rcp.editors.input.AbstractTablableEditorInput; |
| 45 | 46 |
import org.txm.rcp.messages.TXMUIMessages; |
| 46 | 47 |
import org.txm.searchengine.cqp.corpus.Property; |
| ... | ... | |
| 95 | 96 |
@Override |
| 96 | 97 |
public String[] getColumnTitles() {
|
| 97 | 98 |
return new String[] { TXMUIMessages.FrequencyListEditorInput_3,
|
| 98 |
TXMUIMessages.FrequencyListEditorInput_4 };
|
|
| 99 |
TXMCoreMessages.common_frequency };
|
|
| 99 | 100 |
} |
| 100 | 101 |
|
| 101 | 102 |
@Override |
| tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor.java (revision 726) | ||
|---|---|---|
| 355 | 355 |
formColumn.setLabelProvider(clp); |
| 356 | 356 |
|
| 357 | 357 |
freqColumn = new TableViewerColumn(viewer, SWT.LEFT); |
| 358 |
freqColumn.getColumn().setText(TXMUIMessages.FrequencyListEditorInput_4);
|
|
| 358 |
freqColumn.getColumn().setText(TXMCoreMessages.common_frequency);
|
|
| 359 | 359 |
freqColumn.getColumn().setWidth(200); |
| 360 | 360 |
freqColumn.getColumn().addSelectionListener(new ColumnSelectionListener(this, freqColumn, -1)); |
| 361 | 361 |
freqColumn.setLabelProvider(clp); |
| tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableDialog.java (revision 726) | ||
|---|---|---|
| 158 | 158 |
anaPropLabel.setText(mess); |
| 159 | 159 |
} |
| 160 | 160 |
else {
|
| 161 |
anaPropLabel.setText(TXMUIMessages.Property);
|
|
| 161 |
anaPropLabel.setText(TXMCoreMessages.common_properties);
|
|
| 162 | 162 |
} |
| 163 | 163 |
anaPropLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER, |
| 164 | 164 |
false, false)); |
| ... | ... | |
| 170 | 170 |
int i = 0; |
| 171 | 171 |
for (Property p : properties) {
|
| 172 | 172 |
anaPropCombo.add(p.getName()); |
| 173 |
if (p.getName().equals("word")) { //$NON-NLS-1$
|
|
| 173 |
if (p.getName().equals(TXMPreferences.DEFAULT_UNIT_PROPERTY)) {
|
|
| 174 | 174 |
iword=i; |
| 175 | 175 |
} |
| 176 | 176 |
i++; |
| tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/ComputeLexicalTable.java (revision 726) | ||
|---|---|---|
| 36 | 36 |
import org.eclipse.jface.viewers.ArrayContentProvider; |
| 37 | 37 |
import org.eclipse.jface.viewers.IStructuredSelection; |
| 38 | 38 |
import org.eclipse.jface.viewers.LabelProvider; |
| 39 |
import org.eclipse.osgi.util.NLS; |
|
| 39 | 40 |
import org.eclipse.ui.IWorkbenchWindow; |
| 40 | 41 |
import org.eclipse.ui.dialogs.ListDialog; |
| 41 | 42 |
import org.eclipse.ui.handlers.HandlerUtil; |
| ... | ... | |
| 45 | 46 |
import org.txm.lexicaltable.rcp.editors.LexicalTableDialog; |
| 46 | 47 |
import org.txm.lexicaltable.rcp.editors.LexicalTableEditor; |
| 47 | 48 |
import org.txm.lexicaltable.rcp.messages.LexicalTableUIMessages; |
| 49 |
import org.txm.rcp.StatusLine; |
|
| 50 |
import org.txm.rcp.TXMWindows; |
|
| 48 | 51 |
import org.txm.rcp.editors.TXMEditor; |
| 49 | 52 |
import org.txm.rcp.handlers.BaseAbstractHandler; |
| 50 |
import org.txm.rcp.messages.TXMUIMessages; |
|
| 51 | 53 |
import org.txm.rcp.views.corpora.CorporaView; |
| 52 | 54 |
import org.txm.searchengine.cqp.clientExceptions.CqiClientException; |
| 53 | 55 |
import org.txm.searchengine.cqp.corpus.Partition; |
| 56 |
import org.txm.searchengine.cqp.corpus.Property; |
|
| 57 |
import org.txm.utils.logger.Log; |
|
| 54 | 58 |
// TODO: Auto-generated Javadoc |
| 55 | 59 |
/** |
| 56 | 60 |
* if the selection is a Partition : creates a lexical table already filled if |
| ... | ... | |
| 66 | 70 |
|
| 67 | 71 |
|
| 68 | 72 |
|
| 69 |
/** The window. */ |
|
| 70 |
private IWorkbenchWindow window; |
|
| 71 | 73 |
|
| 72 |
/** The selection. */ |
|
| 73 |
private IStructuredSelection selection; |
|
| 74 |
|
|
| 75 |
/** The table. */ |
|
| 76 |
private LexicalTable table = null; |
|
| 77 |
|
|
| 78 | 74 |
/** The code. */ |
| 79 | 75 |
int code; |
| 80 | 76 |
|
| ... | ... | |
| 96 | 92 |
|
| 97 | 93 |
// Creating from Index |
| 98 | 94 |
if (selection instanceof Index) {
|
| 95 |
|
|
| 96 |
IWorkbenchWindow window = TXMWindows.getActiveWindow(); |
|
| 99 | 97 |
List<Index> vocabularies = ((IStructuredSelection) HandlerUtil.getCurrentSelection(event)).toList(); |
| 100 | 98 |
|
| 101 | 99 |
System.out.println(LexicalTableUIMessages.ComputeLexicalTable_3); |
| ... | ... | |
| 125 | 123 |
return false; |
| 126 | 124 |
} |
| 127 | 125 |
|
| 126 |
|
|
| 128 | 127 |
//computeWithVocabularies(vocabularies, useAllOccurrences); |
| 128 |
|
|
| 129 |
|
|
| 130 |
if (vocabularies.size() == 0) {
|
|
| 131 |
return false; |
|
| 132 |
} |
|
| 133 |
|
|
| 134 |
vocabularies = vocabularies.subList(0, 1); |
|
| 135 |
for (Index voc : vocabularies) {
|
|
| 136 |
if (!voc.isComputedWithPartition()) {
|
|
| 137 |
System.out.println(LexicalTableUIMessages.ComputeLexicalTable_5); |
|
| 138 |
StatusLine.setMessage(LexicalTableUIMessages.ComputeLexicalTable_5); |
|
| 139 |
return false; |
|
| 140 |
} |
|
| 141 |
} |
|
| 142 |
|
|
| 143 |
List<Property> properties = vocabularies.get(0).getProperties(); |
|
| 144 |
for (Index voc : vocabularies) {
|
|
| 145 |
if (!properties.equals(voc.getProperties())) {
|
|
| 146 |
Log.warning(NLS.bind(LexicalTableUIMessages.ComputeLexicalTable_6, properties)); |
|
| 147 |
return false; |
|
| 148 |
} |
|
| 149 |
} |
|
| 150 |
|
|
| 151 |
final Index firstIndex = vocabularies.get(0); |
|
| 152 |
Partition firstPartition = firstIndex.getPartition(); |
|
| 153 |
for (Index voc : vocabularies) {
|
|
| 154 |
if (!firstPartition.equals(voc.getPartition())) {
|
|
| 155 |
Log.warning(NLS.bind(LexicalTableUIMessages.ComputeLexicalTable_7, firstPartition)); |
|
| 156 |
return false; |
|
| 157 |
} |
|
| 158 |
} |
|
| 159 |
|
|
| 160 |
final Property property = properties.get(0); |
|
| 161 |
|
|
| 162 |
lexicalTable = new LexicalTable(firstIndex); |
|
| 163 |
lexicalTable.setUseAllOccurrences(useAllOccurrences); |
|
| 164 |
lexicalTable.setUnitProperty(property); |
|
| 165 |
|
|
| 166 |
|
|
| 167 |
|
|
| 168 |
// FIXME: useless? |
|
| 129 | 169 |
//return null; |
| 130 | 170 |
// } else if (s instanceof QueryIndex) {
|
| 131 | 171 |
// List<QueryIndex> qindexes = selection.toList(); |
| ... | ... | |
| 134 | 174 |
} |
| 135 | 175 |
// Creating from Partition |
| 136 | 176 |
else if (selection instanceof Partition) {
|
| 137 |
try {
|
|
| 138 |
lexicalTable = new LexicalTable((Partition) selection); |
|
| 139 |
} |
|
| 140 |
catch (CqiClientException e) {
|
|
| 141 |
// TODO Auto-generated catch block |
|
| 142 |
e.printStackTrace(); |
|
| 143 |
} |
|
| 177 |
lexicalTable = new LexicalTable((Partition) selection); |
|
| 144 | 178 |
} |
| 145 | 179 |
// Reopening from existing result |
| 146 | 180 |
else if (selection instanceof LexicalTable) {
|
| 147 | 181 |
lexicalTable = (LexicalTable) selection; |
| 148 | 182 |
} |
| 183 |
// Error |
|
| 184 |
else {
|
|
| 185 |
this.logCanNotCompute(selection); |
|
| 186 |
} |
|
| 149 | 187 |
|
| 150 | 188 |
// FIXME: tests |
| 151 | 189 |
// try {
|
| tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/editors/TSIndexEditor.java (revision 726) | ||
|---|---|---|
| 895 | 895 |
|
| 896 | 896 |
freqColumn = new TableColumn(viewer.getTable(), SWT.RIGHT); |
| 897 | 897 |
try {
|
| 898 |
if(partition != null) |
|
| 899 |
freqColumn.setText(TXMUIMessages.FrequencyListEditorInput_4+" T="+partition.getTotalSize()); //$NON-NLS-1$ |
|
| 900 |
else |
|
| 901 |
freqColumn.setText(TXMUIMessages.FrequencyListEditorInput_4+" T="+corpus.getSize()); //$NON-NLS-1$ |
|
| 898 |
if(partition != null) {
|
|
| 899 |
freqColumn.setText(TXMCoreMessages.common_frequency + " T=" + partition.getTotalSize()); //$NON-NLS-1$ |
|
| 900 |
} |
|
| 901 |
else {
|
|
| 902 |
freqColumn.setText(TXMCoreMessages.common_frequency + " T=" + corpus.getSize()); //$NON-NLS-1$ |
|
| 903 |
} |
|
| 902 | 904 |
} catch (CqiClientException e2) {
|
| 903 | 905 |
Log.printStackTrace(e2); |
| 904 | 906 |
return; |
| 905 | 907 |
} |
| 906 |
freqColumn.setToolTipText(TXMUIMessages.FrequencyListEditorInput_4);
|
|
| 908 |
freqColumn.setToolTipText(TXMCoreMessages.common_frequency);
|
|
| 907 | 909 |
freqColumn.setWidth(100); |
| 908 | 910 |
freqColumn.addSelectionListener(new SelectionListener() {
|
| 909 | 911 |
@Override |
| tmp/org.txm.partition.core/src/org/txm/partition/core/functions/PartitionDimensions.java (revision 726) | ||
|---|---|---|
| 12 | 12 |
import org.txm.chartsengine.core.results.ChartResult; |
| 13 | 13 |
import org.txm.core.results.Parameter; |
| 14 | 14 |
import org.txm.core.results.TXMParameters; |
| 15 |
import org.txm.core.results.TXMResult; |
|
| 15 | 16 |
import org.txm.partition.core.messages.PartitionCoreMessages; |
| 16 | 17 |
import org.txm.partition.core.preferences.PartitionDimensionsPreferences; |
| 17 | 18 |
import org.txm.searchengine.cqp.clientExceptions.CqiClientException; |
| ... | ... | |
| 56 | 57 |
|
| 57 | 58 |
/** |
| 58 | 59 |
* Creates a partition dimensions result from the specified <link>Partition</link>. |
| 60 |
* @param partition |
|
| 59 | 61 |
*/ |
| 60 | 62 |
public PartitionDimensions(Partition partition) {
|
| 61 | 63 |
super(partition); |
| 62 | 64 |
} |
| 63 | 65 |
|
| 66 |
/** |
|
| 67 |
* Creates a partition dimensions result from the specified <link>Partition</link>. |
|
| 68 |
* @param UUID |
|
| 69 |
* @param partition |
|
| 70 |
*/ |
|
| 71 |
public PartitionDimensions(String UUID, Partition partition) {
|
|
| 72 |
super(UUID, partition); |
|
| 73 |
} |
|
| 74 |
|
|
| 64 | 75 |
|
| 65 |
|
|
| 66 | 76 |
@Override |
| 67 | 77 |
public boolean loadParameters() {
|
| 68 | 78 |
// nothing to do |
| tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/messages/messages_ru.properties (revision 726) | ||
|---|---|---|
| 8 | 8 |
|
| 9 | 9 |
SpecificitiesTableEditor_0 = Не удалось подсчитать специфичность |
| 10 | 10 |
SpecificitiesTableEditor_11 = T |
| 11 |
SpecificitiesTableEditor_5 = Неожиданная ошибка в статистической машине R : {0}
|
|
| tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/messages/SpecificitiesUIMessages.java (revision 726) | ||
|---|---|---|
| 20 | 20 |
public static String SpecificitiesTableEditor_0; |
| 21 | 21 |
public static String SpecificitiesTableEditor_11; |
| 22 | 22 |
|
| 23 |
public static String SpecificitiesTableEditor_5; |
|
| 24 | 23 |
|
| 25 | 24 |
static {
|
| 26 | 25 |
// initialize resource bundle |
| tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/messages/messages_fr.properties (revision 726) | ||
|---|---|---|
| 7 | 7 |
SpecificitiesPreferencePage_7 = Banalité |
| 8 | 8 |
SpecificitiesPreferencePage_8 = Indice maximum |
| 9 | 9 |
|
| 10 |
SpecificitiesTableEditor_0 = Le calcul des spécificités a échoué |
|
| 10 |
SpecificitiesTableEditor_0 = Le calcul des spécificités a échoué.
|
|
| 11 | 11 |
SpecificitiesTableEditor_11 = T |
| 12 |
SpecificitiesTableEditor_5 = Erreur inattendue dans le moteur statistique R : {0}
|
|
| tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/messages/messages.properties (revision 726) | ||
|---|---|---|
| 7 | 7 |
SpecificitiesPreferencePage_7 = Banality |
| 8 | 8 |
SpecificitiesPreferencePage_8 = Maximum score |
| 9 | 9 |
|
| 10 |
SpecificitiesTableEditor_0 = Unable to compute the specificities
|
|
| 10 |
SpecificitiesTableEditor_0 = Failed to compute specificities.
|
|
| 11 | 11 |
SpecificitiesTableEditor_11 = \ T |
| 12 |
SpecificitiesTableEditor_5 = Unexpected error in the statistical engine R {0}
|
|
| tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesEditor.java (revision 726) | ||
|---|---|---|
| 49 | 49 |
import org.txm.rcp.editors.TXMEditor; |
| 50 | 50 |
import org.txm.rcp.editors.TableKeyListener; |
| 51 | 51 |
import org.txm.rcp.messages.TXMUIMessages; |
| 52 |
import org.txm.rcp.swt.widget.structures.PropertiesComboViewer; |
|
| 53 |
import org.txm.searchengine.cqp.corpus.Corpus; |
|
| 52 | 54 |
import org.txm.specificities.core.functions.Specificities; |
| 53 | 55 |
import org.txm.specificities.core.preferences.SpecificitiesPreferences; |
| 54 | 56 |
import org.txm.specificities.rcp.messages.SpecificitiesUIMessages; |
| 55 | 57 |
import org.txm.statsengine.core.StatException; |
| 58 |
import org.txm.statsengine.r.core.messages.RCoreMessages; |
|
| 56 | 59 |
import org.txm.utils.logger.Log; |
| 57 | 60 |
|
| 58 | 61 |
/** |
| ... | ... | |
| 77 | 80 |
protected SpecificitiesLinesViewerComparator viewerComparator; |
| 78 | 81 |
|
| 79 | 82 |
|
| 83 |
|
|
| 80 | 84 |
/** |
| 85 |
* Unit property. |
|
| 86 |
*/ |
|
| 87 |
@Parameter(key=SpecificitiesPreferences.UNIT_PROPERTY) |
|
| 88 |
protected PropertiesComboViewer unitPropertyComboViewer; |
|
| 89 |
|
|
| 90 |
/** |
|
| 81 | 91 |
* Maximum score. |
| 82 | 92 |
*/ |
| 83 | 93 |
@Parameter(key=SpecificitiesPreferences.MAX_SCORE) |
| ... | ... | |
| 88 | 98 |
@Override |
| 89 | 99 |
public void _createPartControl(Composite parent) {
|
| 90 | 100 |
|
| 91 |
// max score parameter |
|
| 92 |
Composite parametersArea = this.getCommandParametersGroup(); |
|
| 93 |
new Label(parametersArea, SWT.NONE).setText("Maximum score");
|
|
| 94 |
|
|
| 95 |
this.maxScore = new Spinner(parametersArea, SWT.BORDER); |
|
| 96 |
this.maxScore.setToolTipText("The maximum score to display");
|
|
| 97 |
this.maxScore.setMinimum(0); |
|
| 98 |
|
|
| 99 |
// result area |
|
| 100 | 101 |
try {
|
| 101 | 102 |
|
| 103 |
// max score |
|
| 104 |
Composite parametersArea = this.getCommandParametersGroup(); |
|
| 105 |
new Label(parametersArea, SWT.NONE).setText("Maximum score");
|
|
| 106 |
this.maxScore = new Spinner(parametersArea, SWT.BORDER); |
|
| 107 |
this.maxScore.setToolTipText("The maximum score to display");
|
|
| 108 |
this.maxScore.setMinimum(0); |
|
| 109 |
|
|
| 110 |
// unit property |
|
| 111 |
new Label(parametersArea, SWT.NONE).setText(TXMCoreMessages.common_property); |
|
| 112 |
this.unitPropertyComboViewer = new PropertiesComboViewer(parametersArea, this, true, |
|
| 113 |
Corpus.getFirstParentCorpus(this.getResult()).getOrderedProperties(), |
|
| 114 |
this.getResult().getUnitProperty(), false); |
|
| 115 |
|
|
| 116 |
|
|
| 117 |
// result area |
|
| 102 | 118 |
Composite resultArea = this.getResultArea(); |
| 103 | 119 |
|
| 104 | 120 |
GridLayout layout = new GridLayout(2, false); |
| ... | ... | |
| 144 | 160 |
|
| 145 | 161 |
// create 2nd column |
| 146 | 162 |
TableColumn typeFrequencyColumn = new TableColumn(viewer.getTable(), SWT.NONE); |
| 147 |
typeFrequencyColumn.setText(TXMUIMessages.FrequencyListEditorInput_4 + " " + SpecificitiesUIMessages.SpecificitiesTableEditor_11 + " " + this.getResult().getCorpusSize()); //$NON-NLS-1$ //$NON-NLS-2$
|
|
| 148 |
typeFrequencyColumn.setToolTipText(TXMUIMessages.FrequencyListEditorInput_4 + " " + SpecificitiesUIMessages.SpecificitiesTableEditor_11 + " " + this.getResult().getCorpusSize());
|
|
| 163 |
typeFrequencyColumn.setText(TXMCoreMessages.common_frequency + " " + SpecificitiesUIMessages.SpecificitiesTableEditor_11 + " " + this.getResult().getCorpusSize()); //$NON-NLS-1$ //$NON-NLS-2$
|
|
| 164 |
typeFrequencyColumn.setToolTipText(typeFrequencyColumn.getText());
|
|
| 149 | 165 |
typeFrequencyColumn.setAlignment(SWT.RIGHT); |
| 150 | 166 |
typeFrequencyColumn.pack(); |
| 151 | 167 |
|
| ... | ... | |
| 162 | 178 |
partNames = this.getResult().getPartShortNames(); |
| 163 | 179 |
partSize = this.getResult().getPartSizes(); |
| 164 | 180 |
} catch (StatException e) {
|
| 165 |
System.err.println(NLS.bind(SpecificitiesUIMessages.SpecificitiesTableEditor_5, e));
|
|
| 181 |
System.err.println(NLS.bind(RCoreMessages.error_unexpectedErrorInRStatisticsEngine, e));
|
|
| 166 | 182 |
Log.printStackTrace(e); |
| 167 | 183 |
return; |
| 168 | 184 |
} |
| ... | ... | |
| 204 | 220 |
spacer.setVisible(false); |
| 205 | 221 |
|
| 206 | 222 |
// Register the context menu |
| 207 |
TXMEditor.initContextMenu(specificitesTable, "SpecificitiesEditorContextMenu", this.getSite(), this.viewer); // $NON-NLS-1$
|
|
| 223 |
TXMEditor.initContextMenu(this.specificitesTable, this.getSite(), this.viewer);
|
|
| 208 | 224 |
|
| 209 | 225 |
// adjust UI to the original sorting |
| 210 | 226 |
specificitesTable.setSortColumn(typeNameColumn); |
| 211 | 227 |
specificitesTable.setSortDirection(SWT.UP); |
| 212 | 228 |
|
| 213 |
} catch (StatException e) {
|
|
| 229 |
} catch (Exception e) {
|
|
| 214 | 230 |
System.err.println(NLS.bind(SpecificitiesUIMessages.SpecificitiesTableEditor_0, e.getMessage())); |
| 215 | 231 |
e.printStackTrace(); |
| 216 | 232 |
} |
| tmp/org.txm.specificities.rcp/OSGI-INF/l10n/bundle_ru_utf-8.properties (revision 726) | ||
|---|---|---|
| 1 |
command.name=Специфичность |
|
| 2 |
editor.name=Специфичность |
|
| 3 |
page.name=Специфичность |
|
| 4 |
command.label=Специфичность |
|
| 5 |
command.tooltip=Вычислить специфичные для каждой части слова |
|
| 6 |
command.name.0 = Построить гистограмму выделенных строк |
|
| tmp/org.txm.specificities.rcp/OSGI-INF/l10n/bundle.properties (revision 726) | ||
|---|---|---|
| 1 |
|
|
| 2 |
command.label = Specificities |
|
| 3 |
|
|
| 4 |
command.name = Specificities |
|
| 5 |
|
|
| 1 | 6 |
command.name.0 = Compute the histogram of the selected lines |
| 2 |
command.name=Compute Specificities |
|
| 3 |
editor.name=Specificities |
|
| 4 |
page.name=Specificities |
|
| 5 |
command.label=Specificities |
|
| 6 |
command.tooltip=Compute the specific words of each part of the selected item |
|
| 7 |
|
|
| 8 |
command.tooltip = Compute the specific words of each part of the selected item |
|
| 9 |
|
|
| 10 |
editor.name = Specificities |
|
| 11 |
|
|
| 12 |
page.name = Specificities |
|
| tmp/org.txm.specificities.rcp/OSGI-INF/l10n/bundle_ru.properties (revision 726) | ||
|---|---|---|
| 1 |
command.name=\u0421\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u043e\u0441\u0442\u044c |
|
| 2 |
editor.name=\u0421\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u043e\u0441\u0442\u044c |
|
| 3 |
page.name=\u0421\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u043e\u0441\u0442\u044c |
|
| 4 |
command.label=\u0421\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u043e\u0441\u0442\u044c |
|
| 5 |
command.tooltip=\u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u043b\u043e\u0432\u0430 |
|
| 1 |
|
|
| 2 |
command.label = Специфичность |
|
| 3 |
|
|
| 4 |
command.name = Специфичность |
|
| 5 |
|
|
| 6 |
command.name.0 = Построить гистограмму выделенных строк |
|
| 7 |
|
|
| 8 |
command.tooltip = Вычислить специфичные для каждой части слова |
|
| 9 |
|
|
| 10 |
editor.name = Специфичность |
|
| 11 |
|
|
| 12 |
page.name = Специфичность |
|
| tmp/org.txm.specificities.rcp/OSGI-INF/l10n/bundle_fr.properties (revision 726) | ||
|---|---|---|
| 1 |
command.name.0=Calculer le diagramme en b?tons des lignes s?lectionn?es |
|
| 2 |
command.name=Sp?cificit?s |
|
| 3 |
editor.name=Sp?cificit?s |
|
| 4 |
page.name=Sp?cificit?s |
|
| 5 |
command.label=Sp?cificiti?s |
|
| 6 |
command.tooltip=Calculer les mots sp?cifiques de chaque partie |
|
| 1 |
|
|
| 2 |
command.label = Spécificitiés |
|
| 3 |
|
|
| 4 |
command.name = Spécificités |
|
| 5 |
|
|
| 6 |
command.name.0 = Calculer le diagramme en bâtons des lignes sélectionnées |
|
| 7 |
|
|
| 8 |
command.tooltip = Calculer les mots spécifiques de chaque partie |
|
| 9 |
|
|
| 10 |
editor.name = Spécificités |
|
| 11 |
|
|
| 12 |
page.name = Spécificités |
|
| tmp/org.txm.specificities.rcp/plugin.xml (revision 726) | ||
|---|---|---|
| 27 | 27 |
name="%command.name"> |
| 28 | 28 |
</command> |
| 29 | 29 |
<command |
| 30 |
categoryId="org.txm.rcp.category.txm" |
|
| 30 | 31 |
defaultHandler="org.txm.specificities.rcp.handlers.ComputeSpecifictiesSelectionChart" |
| 31 | 32 |
id="org.txm.specificities.rcp.handlers.ComputeSpecifictiesSelectionChart" |
| 32 | 33 |
name="%command.name.0"> |
| ... | ... | |
| 118 | 119 |
</command> |
| 119 | 120 |
</menuContribution> |
| 120 | 121 |
<menuContribution |
| 121 |
locationURI="popup:SpecificitiesEditorContextMenu">
|
|
| 122 |
locationURI="popup:org.txm.specificities.rcp.editors.SpecificitiesEditor">
|
|
| 122 | 123 |
<command |
| 123 | 124 |
commandId="org.txm.specificities.rcp.handlers.ComputeSpecifictiesSelectionChart" |
| 124 |
icon="icons/functions/specificities.png" |
|
| 125 |
icon="icons/functions/specificities_selection.png"
|
|
| 125 | 126 |
style="push"> |
| 126 | 127 |
</command> |
| 127 | 128 |
</menuContribution> |
| ... | ... | |
| 172 | 173 |
<with |
| 173 | 174 |
variable="activePartId"> |
| 174 | 175 |
<equals |
| 175 |
value="SpecificitiesEditor"> |
|
| 176 |
value="org.txm.specificities.rcp.editors.SpecificitiesEditor">
|
|
| 176 | 177 |
</equals> |
| 177 | 178 |
</with> |
| 178 | 179 |
</definition> |
| tmp/org.txm.specificities.rcp/.settings/org.eclipse.core.resources.prefs (revision 726) | ||
|---|---|---|
| 1 | 1 |
eclipse.preferences.version=1 |
| 2 |
encoding//OSGI-INF/l10n/bundle_ru_utf-8.properties=UTF-8 |
|
| 3 | 2 |
encoding//src/org/txm/specificities/rcp/messages/messages.properties=UTF-8 |
| 4 | 3 |
encoding//src/org/txm/specificities/rcp/messages/messages_fr.properties=UTF-8 |
| 5 | 4 |
encoding//src/org/txm/specificities/rcp/messages/messages_ru.properties=UTF-8 |
| tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/StartRserve.java (revision 726) | ||
|---|---|---|
| 29 | 29 |
|
| 30 | 30 |
import java.io.File; |
| 31 | 31 |
|
| 32 |
import org.eclipse.osgi.util.NLS; |
|
| 32 | 33 |
import org.rosuda.REngine.Rserve.RConnection; |
| 33 | 34 |
import org.txm.statsengine.r.core.messages.RCoreMessages; |
| 34 | 35 |
import org.txm.utils.OSDetector; |
| ... | ... | |
| 192 | 193 |
protected static boolean checkLocalRserve(int port, boolean debug, String rargs, String rServeArgs) {
|
| 193 | 194 |
Log.info(RCoreMessages.info_rPathNotSetTryingToFindIt); |
| 194 | 195 |
if (isRserveRunning(port)) {
|
| 195 |
Log.info(RCoreMessages.error_rserveIsAlreadyRunningOnPort+port);
|
|
| 196 |
Log.info(NLS.bind(RCoreMessages.error_rserveIsAlreadyRunningOnPort, port));
|
|
| 196 | 197 |
return true; |
| 197 | 198 |
} |
| 198 | 199 |
// Windows OS |
| tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/messages/RCoreMessages.java (revision 726) | ||
|---|---|---|
| 46 | 46 |
public static String info_tryingToStartRFrom; |
| 47 | 47 |
public static String info_tryingToStartRWithRPath; |
| 48 | 48 |
|
| 49 |
public static String error_unexpectedErrorInRStatisticsEngine; |
|
| 50 |
|
|
| 49 | 51 |
static {
|
| 50 | 52 |
// initialize resource bundle |
| 51 | 53 |
Utf8NLS.initializeMessages(BUNDLE_NAME, RCoreMessages.class); |
| tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/messages/messages.properties (revision 726) | ||
|---|---|---|
| 2 | 2 |
error_cantFindRServeInPath = ** The Statistics Engine program path is set but we couldn't find it in: {0}.
|
| 3 | 3 |
error_connectionFailed = ** Error while connecting to the stat engine. |
| 4 | 4 |
error_errorDuringItemsListExtraction = ** Error during items list extraction: |
| 5 |
error_errorWhileEvaluating = ** R error: "{0}"\nwhile evaluating:{1}
|
|
| 6 |
error_evaluationError = ** Evaluation error: |
|
| 7 |
error_failedToConnectToTheRWorkspace = ** Failed to connect to the R Workspace
|
|
| 5 |
error_errorWhileEvaluating = ** R error: "{0}"\nwhile evaluating: {1}
|
|
| 6 |
error_evaluationError = ** Evaluation error: {0}\n{1}.
|
|
| 7 |
error_failedToConnectToTheRWorkspace = ** Failed to connect to the R Workspace.
|
|
| 8 | 8 |
error_failedToInitializeFileTransfert = ** Failed to initialize file transfert: {0}.
|
| 9 |
error_failedToKillRServe = Failed to exec 'taskkill /IM Rserve.exe /F':
|
|
| 10 |
error_failedToKillRServe2 = Failed to exec 'tskill Rserve.exe':
|
|
| 11 |
error_failedToKillRServe3 = Failed to exec 'killall -9 Rserve-bin.so':
|
|
| 12 |
error_failedToLoadLibrary = Failed to load the {0} library: {1}
|
|
| 13 |
error_failedToRunREG = ** Failed to run REG to find the location of R program:
|
|
| 14 |
error_failedToStartRServe = Failed to start RServe :
|
|
| 9 |
error_failedToKillRServe = Failed to exec 'taskkill /IM Rserve.exe /F'.
|
|
| 10 |
error_failedToKillRServe2 = Failed to exec 'tskill Rserve.exe'.
|
|
| 11 |
error_failedToKillRServe3 = Failed to exec 'killall -9 Rserve-bin.so'.
|
|
| 12 |
error_failedToLoadLibrary = Failed to load the {0} library: {1}.
|
|
| 13 |
error_failedToRunREG = ** Failed to run REG to find the location of R program.
|
|
| 14 |
error_failedToStartRServe = Failed to start RServe.
|
|
| 15 | 15 |
error_failedToStartRServeWithCommand = ** Failed to start Rserve with command: |
| 16 |
error_matrixIsEmpty = Matrix is empty |
|
| 16 |
error_matrixIsEmpty = Matrix is empty.
|
|
| 17 | 17 |
error_requestedObjectNotFoundInR = The requested object ({0}) was not found in the R workspace.
|
| 18 |
error_rserveIsAlreadyRunningOnPort = Rserve already running on port
|
|
| 19 |
error_rservePathNotSet = ** The Statistics Engine program path is not set and we could not find it |
|
| 18 |
error_rserveIsAlreadyRunningOnPort = Rserve is already running on port {0}.
|
|
| 19 |
error_rservePathNotSet = ** The Statistics Engine program path is not set and we could not find it.
|
|
| 20 | 20 |
error_statsEngineNotReadyCancelingCommand = Statistics Engine is not ready, canceling command. |
| 21 |
error_unexpectedErrorInRStatisticsEngine = Unexpected error R statistics engine: {0}.
|
|
| 21 | 22 |
error_youNeedRSoftware = You need the 'R' software and you need to configure in the 'Tools/Preferences' window the correct path to it. |
| 22 | 23 |
|
| 23 | 24 |
info_connected = Connected. |
| 24 |
info_connectingToRAt = Connecting to R at {0}:{1}
|
|
| 25 |
info_connectingToRAt = Connecting to R at {0}:{1}.
|
|
| 25 | 26 |
info_connectingToRAtWithUser = Connecting to R at {0}:{1} with user {2}.
|
| 26 | 27 |
info_lastSafeEvalExpression = Last safeeval expression: {0}.
|
| 27 | 28 |
info_rPathNotSetTryingToFindIt = R path is not set, trying to find it... |
| tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/messages/messages_ru.properties (revision 726) | ||
|---|---|---|
| 1 | 1 |
|
| 2 |
error_unexpectedErrorInRStatisticsEngine = Неожиданная ошибка в статистической машине R : {0}
|
|
| 3 |
|
|
| 2 | 4 |
info_tryingToStartRWithRPath = |
| tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/messages/messages_fr.properties (revision 726) | ||
|---|---|---|
| 3 | 3 |
error_connectionFailed = ** La connexion au moteur statistique a échoué. |
| 4 | 4 |
error_errorDuringItemsListExtraction = ** Erreur lors de l'extraction de la liste d'items : \ |
| 5 | 5 |
error_errorWhileEvaluating = ** Erreur R : "{0}"\nlors de l'évaluation de : {1}
|
| 6 |
error_evaluationError = ** Erreur d'évaluation : |
|
| 7 |
error_failedToConnectToTheRWorkspace = ** Echec de connexion à l'espace de travail R
|
|
| 6 |
error_evaluationError = ** Erreur d'évaluation : {0}\n{1}.
|
|
| 7 |
error_failedToConnectToTheRWorkspace = ** Echec de connexion à l'espace de travail R.
|
|
| 8 | 8 |
error_failedToInitializeFileTransfert = ** Echec de l'initialisation du transfert : {0}.
|
| 9 |
error_failedToKillRServe = Echec de la commande 'taskkill /IM Rserve.exe /F':
|
|
| 10 |
error_failedToKillRServe2 = Echec de la commande 'tskill Rserve.exe':
|
|
| 11 |
error_failedToKillRServe3 = Echec de la commande 'killall -9 Rserve-bin.so':
|
|
| 12 |
error_failedToLoadLibrary = La librairie {0} n''a pu être chargée : {1}
|
|
| 13 |
error_failedToRunREG = ** Echec du lancement de REG pour localiser le programme R |
|
| 14 |
error_failedToStartRServe = Impossible de démarrer RServe :
|
|
| 9 |
error_failedToKillRServe = Echec de la commande 'taskkill /IM Rserve.exe /F'.
|
|
| 10 |
error_failedToKillRServe2 = Echec de la commande 'tskill Rserve.exe'.
|
|
| 11 |
error_failedToKillRServe3 = Echec de la commande 'killall -9 Rserve-bin.so'.
|
|
| 12 |
error_failedToLoadLibrary = La librairie {0} n'a pu être chargée : {1}.
|
|
| 13 |
error_failedToRunREG = ** Echec du lancement de REG pour localiser le programme R.
|
|
| 14 |
error_failedToStartRServe = Impossible de démarrer RServe.
|
|
| 15 | 15 |
error_failedToStartRServeWithCommand = ** Echec du lancement de Rserve avec la commande : |
| 16 |
error_matrixIsEmpty = La matrice est vide |
|
| 16 |
error_matrixIsEmpty = La matrice est vide.
|
|
| 17 | 17 |
error_requestedObjectNotFoundInR = L'objet demandé ({0}) n'a pas été trouvé dans l'espace de travail R.
|
| 18 |
error_rserveIsAlreadyRunningOnPort = Rserve déja démarré sur le port
|
|
| 19 |
error_rservePathNotSet = ** Le chemin du programme du serveur statistique n'a pas été renseigné et sa recherche a échoué |
|
| 18 |
error_rserveIsAlreadyRunningOnPort = Rserve est déja démarré sur le port {0}.
|
|
| 19 |
error_rservePathNotSet = ** Le chemin du programme du serveur statistique n'a pas été renseigné et sa recherche a échoué.
|
|
| 20 | 20 |
error_statsEngineNotReadyCancelingCommand = Le moteur de statistiques n'est pas initialisé, annulation de la commande. |
| 21 |
error_youNeedRSoftware = Vous avez besoin du logiciel 'R' et de configurer ses chemins via la fenêtre de préférences 'Outils/Préférences' |
|
| 21 |
error_unexpectedErrorInRStatisticsEngine = Erreur inattendue dans le moteur statistique R : {0}.
|
|
| 22 |
error_youNeedRSoftware = Vous avez besoin du logiciel 'R' et de configurer ses chemins via la fenêtre de préférences 'Outils/Préférences'. |
|
| 22 | 23 |
|
| 23 | 24 |
info_connected = Connecté. |
| 24 |
info_connectingToRAt = Connexion à R à {0}:{1}
|
|
| 25 |
info_connectingToRAt = Connexion à R à {0}:{1}.
|
|
| 25 | 26 |
info_connectingToRAtWithUser = Connexion à R à {0}:{1} avec l'utilisateur {2}.
|
| 26 | 27 |
info_lastSafeEvalExpression = Dernier 'safeeval' : {0}.
|
| 27 | 28 |
info_rPathNotSetTryingToFindIt = Chemin d'accès à R non fourni, tentative de résolution... |
| tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RWorkspace.java (revision 726) | ||
|---|---|---|
| 479 | 479 |
initRserve(pathToRExecutable, port, debug, rArgs, rServeArgs); |
| 480 | 480 |
return true; |
| 481 | 481 |
} catch (RWorkspaceException e) {
|
| 482 |
System.out.println(RCoreMessages.error_failedToStartRServe+e);
|
|
| 482 |
System.out.println(RCoreMessages.error_failedToStartRServe); |
|
| 483 | 483 |
org.txm.utils.logger.Log.printStackTrace(e); |
| 484 | 484 |
} |
| 485 | 485 |
return false; |
| ... | ... | |
| 1520 | 1520 |
System.out.println("REXPMismatchException: "+e);
|
| 1521 | 1521 |
Log.printStackTrace(e); |
| 1522 | 1522 |
} catch (RserveException e) {
|
| 1523 |
System.out.println(RCoreMessages.error_evaluationError + e.getMessage()+" : "+exp); //$NON-NLS-1$
|
|
| 1523 |
System.out.println(NLS.bind(RCoreMessages.error_evaluationError, e.getMessage(), exp));
|
|
| 1524 | 1524 |
Log.printStackTrace(e); |
| 1525 | 1525 |
} |
| 1526 | 1526 |
|
| tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/TxmToHSQL.groovy (revision 726) | ||
|---|---|---|
| 27 | 27 |
// |
| 28 | 28 |
package org.txm.scripts; |
| 29 | 29 |
|
| 30 |
import org.txm.lexicon.core.functions.Lexicon;
|
|
| 30 |
import org.txm.index.core.functions.Lexicon;
|
|
| 31 | 31 |
import org.txm.searchengine.cqp.corpus.Corpus; |
| 32 | 32 |
import org.txm.searchengine.cqp.corpus.Property; |
| 33 | 33 |
import org.txm.searchengine.cqp.corpus.CorpusManager; |
| tmp/org.txm.groovy.core/META-INF/MANIFEST.MF (revision 726) | ||
|---|---|---|
| 20 | 20 |
org.txm.core;bundle-version="0.7.0", |
| 21 | 21 |
org.txm.index.core;bundle-version="1.0.0", |
| 22 | 22 |
org.txm.lexicaltable.core;bundle-version="1.0.0", |
| 23 |
org.txm.lexicon.core;bundle-version="1.0.0", |
|
| 24 |
org.txm.libs.batik;bundle-version="0.0.0", |
|
| 23 |
org.txm.libs.batik;bundle-version="0.0.0", |
|
| 25 | 24 |
org.txm.libs.colt;bundle-version="1.2.0", |
| 26 | 25 |
org.txm.libs.itext;bundle-version="2.1.5", |
| 27 | 26 |
org.txm.libs.jfreechart;bundle-version="1.0.17", |
| tmp/org.txm.wordcloud.rcp/META-INF/MANIFEST.MF (revision 726) | ||
|---|---|---|
| 9 | 9 |
org.eclipse.osgi;bundle-version="3.10.2", |
| 10 | 10 |
org.txm.index.rcp;bundle-version="1.0.0", |
| 11 | 11 |
org.eclipse.core.runtime;bundle-version="3.10.0", |
| 12 |
org.txm.lexicon.core;bundle-version="1.0.0", |
|
| 13 | 12 |
org.txm.chartsengine.core;bundle-version="1.0.0", |
Formats disponibles : Unified diff