Révision 2631
| tmp/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ExpI.java (revision 2631) | ||
|---|---|---|
| 165 | 165 |
reader.close(); |
| 166 | 166 |
|
| 167 | 167 |
System.out.println("Number of query lines: " + lines.size());
|
| 168 |
monitor.monitorSetTask("Querying...");
|
|
| 168 |
monitor.setTask("Querying...");
|
|
| 169 | 169 |
|
| 170 | 170 |
for (String line : lines) {
|
| 171 | 171 |
String[] split = line.split("=", 2); //$NON-NLS-1$
|
| ... | ... | |
| 177 | 177 |
if (addLine(split[0], new CQLQuery(split[1])) == null) {
|
| 178 | 178 |
System.out.println(TXMCoreMessages.bind(TXMCoreMessages.warningColonQueryFailedColonP0, line)); |
| 179 | 179 |
} |
| 180 |
monitor.monitorSetWorked(1);
|
|
| 180 |
monitor.worked(1);
|
|
| 181 | 181 |
} |
| 182 | 182 |
} |
| 183 | 183 |
} |
| tmp/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ContextSubcorpus.java (revision 2631) | ||
|---|---|---|
| 84 | 84 |
keywordFileReader.close(); |
| 85 | 85 |
System.out.println("Number of keywords lines: " + keywordLines.size());
|
| 86 | 86 |
System.out.println("context left and right size is: " + contextSize);
|
| 87 |
monitor.monitorSetTask("Querying keywords...");
|
|
| 87 |
monitor.setTask("Querying keywords...");
|
|
| 88 | 88 |
|
| 89 | 89 |
int nkeyword = 0; |
| 90 | 90 |
for (String line : keywordLines) {
|
| ... | ... | |
| 94 | 94 |
keywordQueriestoName.put(split[1], split[0]); |
| 95 | 95 |
results.add(corpus.query(q, "K" + nkeyword++, false)); |
| 96 | 96 |
} |
| 97 |
monitor.monitorSetWorked(1);
|
|
| 97 |
monitor.worked(1);
|
|
| 98 | 98 |
} |
| 99 | 99 |
keywordFileReader.close(); |
| 100 | 100 |
|
| 101 | 101 |
// Loop over QueryResult to Merge them into one subcorpus |
| 102 | 102 |
int n = 0; |
| 103 |
monitor.monitorSetTask("Creating subcorpus...");
|
|
| 103 |
monitor.setTask("Creating subcorpus...");
|
|
| 104 | 104 |
while (results.size() > 1) {
|
| 105 | 105 |
|
| 106 | 106 |
QueryResult q1 = results.get(0); |
| ... | ... | |
| 113 | 113 |
results.remove(0); |
| 114 | 114 |
results.remove(0); |
| 115 | 115 |
results.add(new QueryResult(merge_name, merge_name, corpus, null)); |
| 116 |
monitor.monitorSetWorked(1);
|
|
| 116 |
monitor.worked(1);
|
|
| 117 | 117 |
} |
| 118 | 118 |
|
| 119 | 119 |
System.out.println("Done.");
|
| tmp/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ValuesOfQuery.java (revision 2631) | ||
|---|---|---|
| 52 | 52 |
|
| 53 | 53 |
if (!(CQPSearchEngine.getCqiClient() instanceof MemCqiClient)) return false; |
| 54 | 54 |
|
| 55 |
monitor.monitorSetTask("Start querying...");
|
|
| 55 |
monitor.setTask("Start querying...");
|
|
| 56 | 56 |
|
| 57 | 57 |
File file = File.createTempFile("query", ".txt");
|
| 58 | 58 |
// ExecTimer t = new ExecTimer(); |
| ... | ... | |
| 65 | 65 |
cli.query("group " + result.getQualifiedCqpId() + " match " + prop.getName() + " > \"" + file + "\";");
|
| 66 | 66 |
// System.out.println("query done"+t.stop());t.start();
|
| 67 | 67 |
|
| 68 |
monitor.monitorSetWorked(50);
|
|
| 68 |
monitor.worked(50);
|
|
| 69 | 69 |
|
| 70 | 70 |
if (!file.exists()) return false; |
| 71 | 71 |
|
| ... | ... | |
| 102 | 102 |
break; |
| 103 | 103 |
} |
| 104 | 104 |
line = reader.readLine(); |
| 105 |
monitor.monitorSetWorked(1);
|
|
| 105 |
monitor.worked(1);
|
|
| 106 | 106 |
} |
| 107 | 107 |
reader.close(); |
| 108 | 108 |
writer.close(); |
| tmp/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ExpII.java (revision 2631) | ||
|---|---|---|
| 209 | 209 |
} |
| 210 | 210 |
keywordFileReader.close(); |
| 211 | 211 |
System.out.println("Number of keywords lines: " + keywordLines.size());
|
| 212 |
monitor.monitorSetTask("Querying keywords...");
|
|
| 212 |
monitor.setTask("Querying keywords...");
|
|
| 213 | 213 |
|
| 214 | 214 |
int nkeyword = 0; |
| 215 | 215 |
for (String line : keywordLines) {
|
| ... | ... | |
| 222 | 222 |
keywordEndPositions.put(split[1], result.getEnds()); |
| 223 | 223 |
keywordsMaxCountsLexicon.put(split[1], new int[textBoundaries.length]); |
| 224 | 224 |
idxLexicon.put(split[1], idx_lexicon_counter++); |
| 225 |
monitor.monitorSetWorked(1);
|
|
| 225 |
monitor.worked(1);
|
|
| 226 | 226 |
} |
| 227 | 227 |
} |
| 228 | 228 |
keywordFileReader.close(); |
| ... | ... | |
| 237 | 237 |
queriesFileReader.close(); |
| 238 | 238 |
|
| 239 | 239 |
System.out.println("Number of lemma lines: " + lines.size());
|
| 240 |
monitor.monitorSetTask("Querying...");
|
|
| 240 |
monitor.setTask("Querying...");
|
|
| 241 | 241 |
|
| 242 | 242 |
int nquery = 0; |
| 243 | 243 |
for (String line : lines) {
|
| ... | ... | |
| 309 | 309 |
} |
| 310 | 310 |
} |
| 311 | 311 |
} |
| 312 |
monitor.monitorSetWorked(1);
|
|
| 312 |
monitor.worked(1);
|
|
| 313 | 313 |
} |
| 314 | 314 |
|
| 315 |
monitor.monitorSetTask("Finalizing doc_word_freq_2.txt file...");
|
|
| 315 |
monitor.setTask("Finalizing doc_word_freq_2.txt file...");
|
|
| 316 | 316 |
for (String key : keywordsMaxCountsLexicon.keySet()) {
|
| 317 | 317 |
int[] keyMaxValues = keywordsMaxCountsLexicon.get(key); |
| 318 | 318 |
for (int noText = 0; noText < textBoundaries.length; noText++) {
|
| ... | ... | |
| 326 | 326 |
queriesFileReader.close(); |
| 327 | 327 |
writer.close(); |
| 328 | 328 |
|
| 329 |
monitor.monitorSetTask("Writing lexicon file...");
|
|
| 329 |
monitor.setTask("Writing lexicon file...");
|
|
| 330 | 330 |
writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(lexiconFile), "UTF-8"))); |
| 331 | 331 |
for (String query : idxLexicon.keySet()) {
|
| 332 | 332 |
String name = keywordQueriestoName.get(query); |
| tmp/org.txm.properties.core/src/org/txm/properties/core/functions/CorpusPropertiesComputer.java (revision 2631) | ||
|---|---|---|
| 455 | 455 |
@Override |
| 456 | 456 |
public boolean _compute(TXMProgressMonitor monitor) throws Exception {
|
| 457 | 457 |
|
| 458 |
monitor.monitorSetTask(props.getComputingStartMessage());
|
|
| 458 |
monitor.setTask(props.getComputingStartMessage());
|
|
| 459 | 459 |
|
| 460 | 460 |
this.stepGeneralInfos(); |
| 461 |
monitor.monitorSetWorked(34);
|
|
| 461 |
monitor.worked(34);
|
|
| 462 | 462 |
|
| 463 | 463 |
this.stepLexicalProperties(); |
| 464 |
monitor.monitorSetWorked(33);
|
|
| 464 |
monitor.worked(33);
|
|
| 465 | 465 |
|
| 466 | 466 |
this.stepStructuralUnits(); |
| 467 |
monitor.monitorSetWorked(33);
|
|
| 467 |
monitor.worked(33);
|
|
| 468 | 468 |
|
| 469 | 469 |
return true; |
| 470 | 470 |
} |
| tmp/org.txm.index.core/src/org/txm/index/core/functions/PartitionIndex.java (revision 2631) | ||
|---|---|---|
| 109 | 109 |
currentpartid++; |
| 110 | 110 |
} |
| 111 | 111 |
|
| 112 |
monitor.monitorSetWorked(30);
|
|
| 112 |
monitor.worked(30);
|
|
| 113 | 113 |
|
| 114 | 114 |
setLineCounts(); |
| 115 | 115 |
|
| ... | ... | |
| 118 | 118 |
this.filterLines(); |
| 119 | 119 |
|
| 120 | 120 |
|
| 121 |
monitor.monitorSetWorked(30);
|
|
| 121 |
monitor.worked(30);
|
|
| 122 | 122 |
|
| 123 |
monitor.monitorSetTask("Sorting...");
|
|
| 123 |
monitor.setTask("Sorting...");
|
|
| 124 | 124 |
|
| 125 | 125 |
this.sortLines(SortMode.FREQUNIT, true); |
| 126 | 126 |
|
| 127 | 127 |
this.cut(); |
| 128 | 128 |
|
| 129 |
monitor.monitorSetWorked(30);
|
|
| 129 |
monitor.worked(30);
|
|
| 130 | 130 |
|
| 131 | 131 |
this.dirty = false; |
| 132 | 132 |
this.pTopIndex = 0; |
| 133 | 133 |
|
| 134 |
monitor.monitorSetTask("Index done.");
|
|
| 134 |
monitor.setTask("Index done.");
|
|
| 135 | 135 |
|
| 136 | 136 |
return true; |
| 137 | 137 |
} |
| tmp/org.txm.index.core/src/org/txm/index/core/functions/Index.java (revision 2631) | ||
|---|---|---|
| 190 | 190 |
} |
| 191 | 191 |
// } |
| 192 | 192 |
this.filterLines(); |
| 193 |
monitor.monitorSetWorked(30);
|
|
| 193 |
monitor.worked(30);
|
|
| 194 | 194 |
|
| 195 |
monitor.monitorSetTask("Sorting...");
|
|
| 195 |
monitor.setTask("Sorting...");
|
|
| 196 | 196 |
this.sortLines(SortMode.FREQUNIT, true); |
| 197 |
monitor.monitorSetWorked(30);
|
|
| 197 |
monitor.worked(30);
|
|
| 198 | 198 |
|
| 199 | 199 |
this.cut(); |
| 200 | 200 |
|
| 201 | 201 |
this.dirty = false; |
| 202 | 202 |
this.pTopIndex = 0; |
| 203 | 203 |
|
| 204 |
monitor.monitorSetTask("Index done.");
|
|
| 204 |
monitor.setTask("Index done.");
|
|
| 205 | 205 |
|
| 206 | 206 |
return true; |
| 207 | 207 |
} |
| tmp/org.txm.index.core/src/org/txm/index/core/functions/___Lexicon2.java (revision 2631) | ||
|---|---|---|
| 197 | 197 |
protected boolean computeWithMainCorpus(MainCorpus corpus, Property property, TXMProgressMonitor monitor) throws CqiClientException {
|
| 198 | 198 |
// System.out.println("in "+this.getCqpId()+" look for cached lexicon "+property);
|
| 199 | 199 |
// System.out.println("not found");
|
| 200 |
monitor.monitorSetTask("Computing lexicon size...");
|
|
| 200 |
monitor.setTask("Computing lexicon size...");
|
|
| 201 | 201 |
Log.finest(IndexCoreMessages.lexicon + corpus.getID()); |
| 202 | 202 |
int lexiconSize; |
| 203 | 203 |
try {
|
| ... | ... | |
| 214 | 214 |
|
| 215 | 215 |
int[] freqs; |
| 216 | 216 |
try {
|
| 217 |
monitor.monitorSetTask("Computing lexicon frequencies...");
|
|
| 217 |
monitor.setTask("Computing lexicon frequencies...");
|
|
| 218 | 218 |
freqs = CorpusManager.getCorpusManager().getCqiClient().id2Freq(property.getQualifiedName(), ids); |
| 219 | 219 |
} |
| 220 | 220 |
catch (Exception e) {
|
| ... | ... | |
| 247 | 247 |
int[][] fdist = null; |
| 248 | 248 |
Subcorpus tmp = null; |
| 249 | 249 |
try {
|
| 250 |
monitor.monitorSetTask("Computing lexicon frequencies...");
|
|
| 250 |
monitor.setTask("Computing lexicon frequencies...");
|
|
| 251 | 251 |
tmp = corpus.createSubcorpus(new CQLQuery("[]"), "S" + corpus.getNextSubcorpusCounter(), true); //$NON-NLS-1$
|
| 252 | 252 |
if (tmp != null) {
|
| 253 | 253 |
fdist = CorpusManager.getCorpusManager().getCqiClient().fdist1(tmp.getQualifiedCqpId(), 0, ICqiClient.CQI_CONST_FIELD_MATCH, property.getName()); |
| tmp/org.txm.core/src/java/org/txm/objects/Project.java (revision 2631) | ||
|---|---|---|
| 212 | 212 |
try {
|
| 213 | 213 |
|
| 214 | 214 |
TXMProgressMonitor subMonitor = new TXMProgressMonitor(monitor); |
| 215 |
subMonitor.monitorSetTask("Openning project");
|
|
| 215 |
subMonitor.setTask("Openning project");
|
|
| 216 | 216 |
|
| 217 | 217 |
|
| 218 | 218 |
rcpProject.open(monitor); |
| 219 | 219 |
|
| 220 | 220 |
initRCPStuffs(subMonitor); |
| 221 | 221 |
|
| 222 |
subMonitor.monitorSetTask("loading results");
|
|
| 222 |
subMonitor.setTask("loading results");
|
|
| 223 | 223 |
|
| 224 | 224 |
this.loadResults(null); |
| 225 | 225 |
|
| ... | ... | |
| 236 | 236 |
} |
| 237 | 237 |
} |
| 238 | 238 |
|
| 239 |
subMonitor.monitorSetTask("");
|
|
| 239 |
subMonitor.setTask("");
|
|
| 240 | 240 |
} |
| 241 | 241 |
catch (CoreException e) {
|
| 242 | 242 |
e.printStackTrace(); |
| tmp/org.txm.core/src/java/org/txm/utils/TXMProgressMonitor.java (revision 2631) | ||
|---|---|---|
| 2 | 2 |
|
| 3 | 3 |
import org.eclipse.core.runtime.IProgressMonitor; |
| 4 | 4 |
import org.eclipse.core.runtime.SubMonitor; |
| 5 |
import org.eclipse.osgi.util.NLS; |
|
| 6 | 5 |
import org.txm.utils.logger.Log; |
| 7 | 6 |
|
| 8 | 7 |
/** |
| ... | ... | |
| 10 | 9 |
* Wrapper for a {@link SubMonitor} instance dedicated to computing tasks.
|
| 11 | 10 |
* The wrapper permits to protect the main root task. |
| 12 | 11 |
* |
| 12 |
* @author mdecorde |
|
| 13 | 13 |
* @author sjacquot |
| 14 | 14 |
* |
| 15 | 15 |
*/ |
| ... | ... | |
| 46 | 46 |
* |
| 47 | 47 |
* @param value |
| 48 | 48 |
*/ |
| 49 |
public void monitorSetCanceled(boolean value) {
|
|
| 49 |
public void setCanceled(boolean value) {
|
|
| 50 | 50 |
// Log.info(NLS.bind("Canceling computing of {0} ({1})...", this.getName(), this.getClass().getSimpleName()));
|
| 51 | 51 |
this.monitor.setCanceled(value); |
| 52 | 52 |
} |
| ... | ... | |
| 56 | 56 |
* |
| 57 | 57 |
* @param name |
| 58 | 58 |
*/ |
| 59 |
public void monitorSetTask(String name) {
|
|
| 59 |
public void setTask(String name) {
|
|
| 60 | 60 |
this.monitor.subTask(name); |
| 61 | 61 |
Log.fine(name); |
| 62 | 62 |
} |
| ... | ... | |
| 66 | 66 |
* |
| 67 | 67 |
* @param amount of work |
| 68 | 68 |
*/ |
| 69 |
public void monitorSetWorked(int amount) {
|
|
| 69 |
public void worked(int amount) {
|
|
| 70 | 70 |
this.monitor.worked(amount); |
| 71 | 71 |
} |
| 72 | 72 |
|
| ... | ... | |
| 76 | 76 |
* |
| 77 | 77 |
* @return true if the monitor has been canceled by the user |
| 78 | 78 |
*/ |
| 79 |
public boolean monitorIsCanceled() {
|
|
| 79 |
public boolean isCanceled() {
|
|
| 80 | 80 |
return this.monitor.isCanceled(); |
| 81 | 81 |
} |
| 82 | 82 |
|
| 83 | 83 |
/** |
| 84 | 84 |
* Sets the monitor state as done. |
| 85 | 85 |
*/ |
| 86 |
public void monitorDone() {
|
|
| 86 |
public void done() {
|
|
| 87 | 87 |
this.monitor.done(); |
| 88 | 88 |
} |
| 89 | 89 |
|
| ... | ... | |
| 92 | 92 |
* |
| 93 | 93 |
* @param workRemaining number of ticks |
| 94 | 94 |
*/ |
| 95 |
public void monitorSetWorkRemaining(int workRemaining) {
|
|
| 95 |
public void setWorkRemaining(int workRemaining) {
|
|
| 96 | 96 |
this.monitor.setWorkRemaining(workRemaining); |
| 97 | 97 |
} |
| 98 | 98 |
|
| tmp/org.txm.progression.core/src/org/txm/progression/core/functions/Progression.java (revision 2631) | ||
|---|---|---|
| 329 | 329 |
this.structurePositions = new int[0]; |
| 330 | 330 |
this.structureNames = new String[0]; |
| 331 | 331 |
|
| 332 |
monitor.monitorSetTask("Processing queries...");
|
|
| 332 |
monitor.setTask("Processing queries...");
|
|
| 333 | 333 |
if (!this.stepQueries(monitor)) {
|
| 334 | 334 |
return true; |
| 335 | 335 |
} |
| 336 | 336 |
|
| 337 |
if (monitor.monitorIsCanceled()) {
|
|
| 337 |
if (monitor.isCanceled()) {
|
|
| 338 | 338 |
return false; |
| 339 | 339 |
} |
| 340 |
monitor.monitorSetWorked(10);
|
|
| 340 |
monitor.worked(10);
|
|
| 341 | 341 |
} |
| 342 | 342 |
|
| 343 | 343 |
// Structural units |
| 344 |
monitor.monitorSetTask("Processing structural units...");
|
|
| 344 |
monitor.setTask("Processing structural units...");
|
|
| 345 | 345 |
if (!this.stepStructuralUnits(monitor)) {
|
| 346 | 346 |
return false; |
| 347 | 347 |
} |
| 348 |
monitor.monitorSetWorked(20);
|
|
| 348 |
monitor.worked(20);
|
|
| 349 | 349 |
|
| 350 | 350 |
|
| 351 | 351 |
// Finalization steps |
| 352 | 352 |
if (this.hasParameterChanged(ProgressionPreferences.QUERIES)) {
|
| 353 |
monitor.monitorSetTask("Finalizing...");
|
|
| 353 |
monitor.setTask("Finalizing...");
|
|
| 354 | 354 |
if (!stepFinalize()) {
|
| 355 | 355 |
return false; |
| 356 | 356 |
} |
| 357 |
monitor.monitorSetWorked(20);
|
|
| 357 |
monitor.worked(20);
|
|
| 358 | 358 |
} |
| 359 | 359 |
|
| 360 | 360 |
return true; |
| ... | ... | |
| 472 | 472 |
for (Match m : matches) {
|
| 473 | 473 |
positions[i++] = m.getStart(); |
| 474 | 474 |
npositions++; |
| 475 |
monitor.monitorSetWorked(1);
|
|
| 475 |
monitor.worked(1);
|
|
| 476 | 476 |
} |
| 477 | 477 |
} |
| 478 | 478 |
return npositions > 0; |
| ... | ... | |
| 557 | 557 |
|
| 558 | 558 |
i++; |
| 559 | 559 |
|
| 560 |
monitor.monitorSetWorked(1);
|
|
| 560 |
monitor.worked(1);
|
|
| 561 | 561 |
} |
| 562 | 562 |
this.bande = distmin * this.bandeMultiplier; |
| 563 | 563 |
} |
| tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/functions/TextsBalance.java (revision 2631) | ||
|---|---|---|
| 128 | 128 |
*/ |
| 129 | 129 |
protected boolean __compute(TXMProgressMonitor monitor) {
|
| 130 | 130 |
|
| 131 |
monitor.monitorSetTask("Computing balance with metadata propertyName = " + this.structuralUnitProperty + ", structural unit = " + this.structuralUnit.getName() + " and groupByTexts = " + this.countTexts); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
|
| 131 |
monitor.setTask("Computing balance with metadata propertyName = " + this.structuralUnitProperty + ", structural unit = " + this.structuralUnit.getName() + " and groupByTexts = " + this.countTexts); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
|
| 132 | 132 |
try {
|
| 133 | 133 |
this.dataset = new HashMap<Integer, Comparable[]>(); |
| 134 | 134 |
|
| tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/results/ChartResult.java (revision 2631) | ||
|---|---|---|
| 210 | 210 |
*/ |
| 211 | 211 |
protected boolean renderChart(TXMProgressMonitor monitor) throws Exception {
|
| 212 | 212 |
|
| 213 |
monitor.monitorSetTask("Rendering chart for result " + this.getClass() + " and chart type " + this.getChartType() + "...");
|
|
| 213 |
monitor.setTask("Rendering chart for result " + this.getClass() + " and chart type " + this.getChartType() + "...");
|
|
| 214 | 214 |
|
| 215 | 215 |
Log.finest("*** ChartResult.renderChart(): rendering chart for result " + this.getClass() + " and chart type " + this.getChartType() + "..."); //$NON-NLS-1$
|
| 216 | 216 |
|
| tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Partition.java (revision 2631) | ||
|---|---|---|
| 153 | 153 |
Log.finest(NLS.bind(SearchEngineCoreMessages.info_creatingNewPartition, this.userName, this.getParent())); |
| 154 | 154 |
long start = System.currentTimeMillis(); |
| 155 | 155 |
|
| 156 |
monitor.monitorSetTask("Building parts...");
|
|
| 156 |
monitor.setTask("Building parts...");
|
|
| 157 | 157 |
|
| 158 | 158 |
for (int i = 0; i < pQueries.size(); i++) {
|
| 159 | 159 |
String queryS = pQueries.get(i); |
| tmp/org.txm.querycooccurrences.rcp/src/org/txm/functions/coocmatrix/QueryAutoCooccurrence.java (revision 2631) | ||
|---|---|---|
| 77 | 77 |
public boolean _compute(TXMProgressMonitor monitor) throws Exception {
|
| 78 | 78 |
coocs = new int[queries.size()][queries.size()]; |
| 79 | 79 |
|
| 80 |
monitor.monitorSetTask("Querying cooccurrences...");
|
|
| 81 |
monitor.monitorSetWorkRemaining(nNodes);
|
|
| 80 |
monitor.setTask("Querying cooccurrences...");
|
|
| 81 |
monitor.setWorkRemaining(nNodes);
|
|
| 82 | 82 |
|
| 83 | 83 |
for (int i = 0; i < queries.size(); i++) {
|
| 84 | 84 |
int j = i; |
| 85 | 85 |
if (oriented) j = 0; // if the graph is not oriented, we don't need to evaluate all queries |
| 86 | 86 |
for (; j < queries.size(); j++) {
|
| 87 |
monitor.monitorSetWorked(1);
|
|
| 87 |
monitor.worked(1);
|
|
| 88 | 88 |
String query = null; |
| 89 | 89 |
if (oriented) {
|
| 90 | 90 |
query = "(" + queries.get(i) + "[]{0," + dist + "}" + queries.get(j) + ") " + this.struct;
|
| ... | ... | |
| 112 | 112 |
coocs[j][i] = coocs[i][j]; |
| 113 | 113 |
} |
| 114 | 114 |
} |
| 115 |
monitor.monitorDone();
|
|
| 115 |
monitor.done();
|
|
| 116 | 116 |
|
| 117 | 117 |
return true; |
| 118 | 118 |
} |
| tmp/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/functions/Cooccurrence.java (revision 2631) | ||
|---|---|---|
| 261 | 261 |
// FIXME: debug |
| 262 | 262 |
// System.out.println("cooc: "+corpus+" "+query+" "+properties+" "+limit+" "+maxLeft+" "+minLeft+" "+minRight+" "+maxRight+" "+minFreq+" "+minCof+" "+minScore+" "+includeXpivot);
|
| 263 | 263 |
|
| 264 |
monitor.monitorSetTask(CooccurrenceCoreMessages.info_buildingQueries);
|
|
| 264 |
monitor.setTask(CooccurrenceCoreMessages.info_buildingQueries);
|
|
| 265 | 265 |
|
| 266 | 266 |
// clear data |
| 267 | 267 |
try {
|
| ... | ... | |
| 285 | 285 |
return false; |
| 286 | 286 |
} |
| 287 | 287 |
|
| 288 |
monitor.monitorSetTask(CooccurrenceCoreMessages.info_retreivingMatches);
|
|
| 288 |
monitor.setTask(CooccurrenceCoreMessages.info_retreivingMatches);
|
|
| 289 | 289 |
if (!this.stepGetMatches()) {
|
| 290 | 290 |
return false; |
| 291 | 291 |
} |
| 292 |
monitor.monitorSetWorked(20);
|
|
| 292 |
monitor.worked(20);
|
|
| 293 | 293 |
|
| 294 |
monitor.monitorSetTask(CooccurrenceCoreMessages.info_buildingLineSignatures);
|
|
| 294 |
monitor.setTask(CooccurrenceCoreMessages.info_buildingLineSignatures);
|
|
| 295 | 295 |
if (!this.stepBuildSignatures()) {
|
| 296 | 296 |
return false; |
| 297 | 297 |
} |
| 298 |
monitor.monitorSetWorked(20);
|
|
| 298 |
monitor.worked(20);
|
|
| 299 | 299 |
|
| 300 |
monitor.monitorSetTask(CooccurrenceCoreMessages.info_counting);
|
|
| 300 |
monitor.setTask(CooccurrenceCoreMessages.info_counting);
|
|
| 301 | 301 |
if (!this.stepCount()) {
|
| 302 | 302 |
return false; |
| 303 | 303 |
} |
| 304 |
monitor.monitorSetWorked(20);
|
|
| 304 |
monitor.worked(20);
|
|
| 305 | 305 |
|
| 306 |
monitor.monitorSetTask(CooccurrenceCoreMessages.info_buildingLexicalTable);
|
|
| 306 |
monitor.setTask(CooccurrenceCoreMessages.info_buildingLexicalTable);
|
|
| 307 | 307 |
if (!this.stepBuildLexicalTable(monitor)) {
|
| 308 | 308 |
return false; |
| 309 | 309 |
} |
| 310 |
monitor.monitorSetWorked(10);
|
|
| 310 |
monitor.worked(10);
|
|
| 311 | 311 |
|
| 312 |
monitor.monitorSetTask(CooccurrenceCoreMessages.info_computingSpecificitiesScores);
|
|
| 312 |
monitor.setTask(CooccurrenceCoreMessages.info_computingSpecificitiesScores);
|
|
| 313 | 313 |
if (!this.stepGetScores()) {
|
| 314 | 314 |
return false; |
| 315 | 315 |
} |
| 316 | 316 |
|
| 317 | 317 |
this.clearMemory(); |
| 318 |
monitor.monitorDone();
|
|
| 318 |
monitor.done();
|
|
| 319 | 319 |
|
| 320 | 320 |
return true; |
| 321 | 321 |
} |
Formats disponibles : Unified diff