Révision 1391
tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTable.java (revision 1391) | ||
---|---|---|
351 | 351 |
if (this.parent instanceof Subcorpus) { |
352 | 352 |
|
353 | 353 |
this.subTask("Computing from Subcorpus."); |
354 |
|
|
354 |
|
|
355 | 355 |
Subcorpus subcorpus = (Subcorpus) this.parent; |
356 | 356 |
CQPCorpus parentCorpus = subcorpus.getMainCorpus(); |
357 |
Lexicon l1 = Lexicon.findLexiconForParameter(parentCorpus, property);
|
|
358 |
Lexicon l2 = Lexicon.findLexiconForParameter(subcorpus, property);
|
|
357 |
Lexicon l1 = Lexicon.getLexicon(parentCorpus, property, monitor);
|
|
358 |
Lexicon l2 = Lexicon.getLexicon(subcorpus, property, monitor);
|
|
359 | 359 |
|
360 | 360 |
this.statsData = new LexicalTableImpl(getNextName(), l1, l2); |
361 | 361 |
} |
tmp/org.txm.index.core/src/org/txm/index/core/functions/Lexicon.java (revision 1391) | ||
---|---|---|
40 | 40 |
|
41 | 41 |
import org.eclipse.core.runtime.IProgressMonitor; |
42 | 42 |
import org.eclipse.osgi.util.NLS; |
43 |
import org.txm.core.messages.TXMCoreMessages; |
|
44 |
import org.txm.core.preferences.TBXPreferences; |
|
45 | 43 |
import org.txm.core.preferences.TXMPreferences; |
46 | 44 |
import org.txm.core.results.Parameter; |
47 | 45 |
import org.txm.core.results.TXMParameters; |
... | ... | |
53 | 51 |
import org.txm.searchengine.cqp.corpus.CQPCorpus; |
54 | 52 |
import org.txm.searchengine.cqp.corpus.CorpusManager; |
55 | 53 |
import org.txm.searchengine.cqp.corpus.MainCorpus; |
56 |
import org.txm.searchengine.cqp.corpus.Part; |
|
57 | 54 |
import org.txm.searchengine.cqp.corpus.Property; |
58 | 55 |
import org.txm.searchengine.cqp.corpus.Subcorpus; |
59 |
import org.txm.searchengine.cqp.corpus.query.CQLQuery; |
|
60 | 56 |
import org.txm.searchengine.cqp.serverException.CqiServerError; |
61 | 57 |
import org.txm.statsengine.core.StatException; |
62 | 58 |
import org.txm.statsengine.core.data.Vector; |
... | ... | |
301 | 297 |
// if (freqs[i] != 1) System.out.println(freqs[i]); |
302 | 298 |
} |
303 | 299 |
} |
304 |
|
|
305 |
public static Lexicon findLexiconForParameter(CQPCorpus corpus, Property prop) { |
|
306 |
List<Lexicon> lexicons = (List<Lexicon>) corpus.getChildren(Lexicon.class); |
|
307 |
for (Lexicon l : lexicons) { |
|
308 |
if (l.getProperty().equals(prop)) { |
|
309 |
return l; |
|
310 |
} |
|
311 |
} |
|
312 |
|
|
313 |
Lexicon newL = new Lexicon(corpus); |
|
314 |
newL.setProperty(prop); |
|
315 |
newL.compute(); |
|
316 |
return newL; |
|
317 |
|
|
318 |
} |
|
319 | 300 |
|
320 | 301 |
/** |
321 | 302 |
* Dump lexicon forms and frequencies in a String. |
Formats disponibles : Unified diff