Révision 1984
| tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTable.java (revision 1984) | ||
|---|---|---|
| 67 | 67 |
private int vMaxFilter; |
| 68 | 68 |
|
| 69 | 69 |
/** |
| 70 |
* if true and if built with an Index, the ##REST## line is added containing the cumulated frequencies of the occurrences not counted in the lexical table (corpus frequencies minus the index frequencies)
|
|
| 70 |
* if true and if built from a partition index, the #RESTE# line is added containing the cumulated frequencies of the occurrences not counted in the lexical table (corpus frequencies minus the index frequencies)
|
|
| 71 | 71 |
*/ |
| 72 | 72 |
@Parameter(key=LexicalTablePreferences.USE_ALL_OCCURRENCES) |
| 73 | 73 |
protected boolean useAllOccurrences; |
| ... | ... | |
| 269 | 269 |
rownames.add(l.toString()); |
| 270 | 270 |
} |
| 271 | 271 |
int extra = 0; |
| 272 |
if (useAllOccurrences) {
|
|
| 272 |
if (this.useAllOccurrences) {
|
|
| 273 | 273 |
extra = 1; |
| 274 | 274 |
} |
| 275 | 275 |
|
| ... | ... | |
| 286 | 286 |
entries[i++] = l.toString(); |
| 287 | 287 |
} |
| 288 | 288 |
|
| 289 |
if (useAllOccurrences) {
|
|
| 289 |
if (this.useAllOccurrences) {
|
|
| 290 | 290 |
try {
|
| 291 | 291 |
int[] partitionSizes = partition.getPartSizes(); |
| 292 | 292 |
int[] reste = new int[partitionSizes.length]; |
| ... | ... | |
| 324 | 324 |
// FIXME: SJ: became useless? |
| 325 | 325 |
//this.statsData = null; // reset frequencies |
| 326 | 326 |
|
| 327 |
|
|
| 328 |
int vMaxFilter = this.vMaxFilter; |
|
| 329 |
|
|
| 327 | 330 |
if (this.parent instanceof Subcorpus) {
|
| 328 | 331 |
|
| 329 |
this.subTask("Computing from Subcorpus: "+this.parent);
|
|
| 332 |
this.subTask("Computing from Subcorpus: " + this.parent);
|
|
| 330 | 333 |
|
| 331 | 334 |
Subcorpus subcorpus = (Subcorpus) this.parent; |
| 332 | 335 |
CQPCorpus parentCorpus = subcorpus.getMainCorpus(); |
| ... | ... | |
| 337 | 340 |
} |
| 338 | 341 |
else if (this.parent instanceof Partition) {
|
| 339 | 342 |
|
| 340 |
this.subTask("Computing from Partition: "+this.parent);
|
|
| 343 |
this.subTask("Computing from Partition: " + this.parent);
|
|
| 341 | 344 |
|
| 342 | 345 |
this._computeFromPartition((Partition)this.parent); |
| 343 | 346 |
} |
| 344 | 347 |
else if (parent instanceof PartitionIndex) {
|
| 345 | 348 |
|
| 346 |
this.subTask("Computing from Index: "+this.parent);
|
|
| 349 |
// FIXME: SJ: add 1 to vmax filter to manage the #RESTE# line when computed with corpora margins |
|
| 350 |
// need to validate |
|
| 351 |
if(this.useAllOccurrences) {
|
|
| 352 |
vMaxFilter++; |
|
| 353 |
} |
|
| 354 |
|
|
| 355 |
this.subTask("Computing from Partition Index: " + this.parent);
|
|
| 347 | 356 |
|
| 348 | 357 |
this._computeFromIndexes(Arrays.asList((PartitionIndex)this.parent)); |
| 349 | 358 |
} |
| ... | ... | |
| 353 | 362 |
} |
| 354 | 363 |
|
| 355 | 364 |
// apply filtering |
| 356 |
this.statsData.filter(this.vMaxFilter, this.fMinFilter); |
|
| 365 |
this.statsData.filter(vMaxFilter, this.fMinFilter); |
|
| 366 |
// FIXME SJ: old version, < TXM 0.7.8 |
|
| 367 |
//this.statsData.cut(this.vMaxFilter); |
|
| 357 | 368 |
|
| 358 | 369 |
return true; |
| 359 | 370 |
} |
Formats disponibles : Unified diff