Révision 1398
| tmp/org.txm.progression.rcp/plugin.xml (revision 1398) | ||
|---|---|---|
| 102 | 102 |
</command> |
| 103 | 103 |
</menuContribution> |
| 104 | 104 |
<menuContribution |
| 105 |
locationURI="popup:org.txm.index.rcp.editors.DictionnaryEditor">
|
|
| 105 |
locationURI="popup:org.txm.index.rcp.editors.LexiconEditor">
|
|
| 106 | 106 |
<command |
| 107 | 107 |
commandId="org.txm.progression.rcp.handlers.ComputeProgression" |
| 108 | 108 |
icon="icons/functions/progression.png" |
| tmp/org.txm.concordance.rcp/plugin.xml (revision 1398) | ||
|---|---|---|
| 121 | 121 |
</command> |
| 122 | 122 |
</menuContribution> |
| 123 | 123 |
<menuContribution |
| 124 |
locationURI="popup:org.txm.index.rcp.editors.DictionnaryEditor">
|
|
| 124 |
locationURI="popup:org.txm.index.rcp.editors.LexiconEditor">
|
|
| 125 | 125 |
<command |
| 126 | 126 |
commandId="org.txm.concordance.rcp.handlers.ComputeConcordance" |
| 127 | 127 |
icon="icons/concordance.png" |
| tmp/org.txm.index.rcp/plugin.xml (revision 1398) | ||
|---|---|---|
| 131 | 131 |
</command> |
| 132 | 132 |
</menuContribution> |
| 133 | 133 |
<menuContribution |
| 134 |
locationURI="popup:org.txm.index.rcp.editors.DictionnaryEditor">
|
|
| 134 |
locationURI="popup:org.txm.index.rcp.editors.LexiconEditor">
|
|
| 135 | 135 |
<command |
| 136 | 136 |
commandId="org.txm.index.rcp.handlers.ComputeIndex" |
| 137 | 137 |
icon="icons/index.png" |
| tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTable.java (revision 1398) | ||
|---|---|---|
| 22 | 22 |
import org.txm.searchengine.cqp.corpus.CQPCorpus; |
| 23 | 23 |
import org.txm.searchengine.cqp.corpus.CQPLexicon; |
| 24 | 24 |
import org.txm.searchengine.cqp.corpus.Partition; |
| 25 |
import org.txm.searchengine.cqp.corpus.Property; |
|
| 26 | 25 |
import org.txm.searchengine.cqp.corpus.Subcorpus; |
| 27 | 26 |
import org.txm.searchengine.cqp.corpus.WordProperty; |
| 28 |
import org.txm.statsengine.core.StatException; |
|
| 29 | 27 |
import org.txm.statsengine.core.data.Vector; |
| 30 | 28 |
import org.txm.statsengine.r.core.RWorkspace; |
| 31 | 29 |
import org.txm.statsengine.r.core.exceptions.RWorkspaceException; |
| ... | ... | |
| 37 | 35 |
* @author mdecorde |
| 38 | 36 |
* @author sjacquot |
| 39 | 37 |
* |
| 40 |
* |
|
| 41 | 38 |
*/ |
| 42 | 39 |
public class LexicalTable extends TXMResult {
|
| 43 | 40 |
|
| tmp/org.txm.cooccurrence.rcp/plugin.xml (revision 1398) | ||
|---|---|---|
| 114 | 114 |
</command> |
| 115 | 115 |
</menuContribution> |
| 116 | 116 |
<menuContribution |
| 117 |
locationURI="popup:org.txm.index.rcp.editors.DictionnaryEditor">
|
|
| 117 |
locationURI="popup:org.txm.index.rcp.editors.LexiconEditor">
|
|
| 118 | 118 |
<command |
| 119 | 119 |
commandId="org.txm.cooccurrence.rcp.handlers.ComputeCooccurrences" |
| 120 | 120 |
icon="icons/cooccurrences.png" |
| tmp/org.txm.index.core/src/org/txm/index/core/functions/Index.java (revision 1398) | ||
|---|---|---|
| 159 | 159 |
|
| 160 | 160 |
|
| 161 | 161 |
@Override |
| 162 |
protected boolean _compute() throws Exception {
|
|
| 162 |
protected final boolean _compute() throws Exception {
|
|
| 163 | 163 |
|
| 164 | 164 |
// reset all stored data |
| 165 | 165 |
if (lines != null) {
|
| ... | ... | |
| 173 | 173 |
// It works but the problem is the cut() method that really cut the lines rather than doing getLines() that could filtering and returns only the lines between fmin/fmax |
| 174 | 174 |
// if(this.hasParameterChanged(TXMPreferences.QUERY) || this.hasParameterChanged(TXMPreferences.UNIT_PROPERTIES)) {
|
| 175 | 175 |
|
| 176 |
if (parent instanceof CQPCorpus) {
|
|
| 177 |
|
|
| 178 |
if (!scanCorpus((CQPCorpus)parent)) {
|
|
| 179 |
lines = new ArrayList<Line>(); |
|
| 180 |
return false; |
|
| 181 |
} |
|
| 182 |
|
|
| 183 |
setLineCounts(); |
|
| 184 |
|
|
| 185 |
getAllLines(); |
|
| 186 |
|
|
| 187 |
} |
|
| 188 |
else {
|
|
| 189 |
Log.severe("Error: Index parent is not a corpus.");
|
|
| 176 |
if (!_computeLines()) {
|
|
| 177 |
Log.severe("Error while computing lines. Aborting.");
|
|
| 190 | 178 |
return false; |
| 191 | 179 |
} |
| 192 | 180 |
// } |
| ... | ... | |
| 208 | 196 |
} |
| 209 | 197 |
|
| 210 | 198 |
|
| 199 |
/** |
|
| 200 |
* Extends this method to change the way the line are computed. the lines are sorted and filterd afterward |
|
| 201 |
* @return true if the index lines hae been computed |
|
| 202 |
* @throws Exception |
|
| 203 |
*/ |
|
| 204 |
protected boolean _computeLines() throws Exception {
|
|
| 205 |
if (parent instanceof CQPCorpus) {
|
|
| 211 | 206 |
|
| 207 |
if (!scanCorpus((CQPCorpus)parent)) {
|
|
| 208 |
lines = new ArrayList<Line>(); |
|
| 209 |
return false; |
|
| 210 |
} |
|
| 211 |
|
|
| 212 |
setLineCounts(); |
|
| 213 |
|
|
| 214 |
getAllLines(); |
|
| 215 |
return true; |
|
| 216 |
} |
|
| 217 |
else {
|
|
| 218 |
Log.severe("Error: Index parent is not a corpus.");
|
|
| 219 |
return false; |
|
| 220 |
} |
|
| 221 |
} |
|
| 222 |
|
|
| 212 | 223 |
/** |
| 213 | 224 |
* Creates a CQL query string from the specified Index lines. |
| 214 | 225 |
* |
| tmp/org.txm.index.core/src/org/txm/index/core/functions/___Lexicon2.java (revision 1398) | ||
|---|---|---|
| 169 | 169 |
} |
| 170 | 170 |
|
| 171 | 171 |
@Override |
| 172 |
protected boolean _compute() throws Exception {
|
|
| 172 |
protected boolean _computeLines() throws Exception {
|
|
| 173 | 173 |
if (this.getParent() instanceof MainCorpus) {
|
| 174 | 174 |
return computeWithMainCorpus((MainCorpus)this.getParent(), pProperty, monitor); |
| 175 | 175 |
} |
| tmp/org.txm.index.core/src/org/txm/index/core/functions/Lexicon.java (revision 1398) | ||
|---|---|---|
| 62 | 62 |
} |
| 63 | 63 |
|
| 64 | 64 |
@Override |
| 65 |
protected boolean _compute() {
|
|
| 65 |
protected boolean _computeLines() {
|
|
| 66 | 66 |
try {
|
| 67 | 67 |
|
| 68 | 68 |
// this.query = new Query("[]"); //$NON-NLS-1$
|
| ... | ... | |
| 104 | 104 |
} |
| 105 | 105 |
} |
| 106 | 106 |
} |
| 107 |
|
|
| 107 | 108 |
} catch (Exception e) {
|
| 108 | 109 |
System.out.println(TXMCoreMessages.bind(TXMCoreMessages.errorColonP0, e.getLocalizedMessage())); |
| 109 | 110 |
Log.printStackTrace(e); |
Formats disponibles : Unified diff