Révision 1162
tmp/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/handlers/Apply.java (revision 1162) | ||
---|---|---|
66 | 66 |
public static void apply(CQPCorpus corpus, final File model, final String[] properties, final String[] options) { |
67 | 67 |
final MainCorpus mainCorpus = corpus.getMainCorpus(); |
68 | 68 |
final File corpusBinaryDirectory = mainCorpus.getProjectDirectory(); |
69 |
final File txmDirectory = new File(corpusBinaryDirectory, "txm/"+mainCorpus.getName());
|
|
69 |
final File txmDirectory = new File(corpusBinaryDirectory, "txm/"+mainCorpus.getID());
|
|
70 | 70 |
|
71 | 71 |
if (!txmDirectory.exists()) { |
72 | 72 |
System.out.println("Can't apply TreeTagger to a corpus with no XML-TXM files."); |
tmp/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/handlers/LemmaProjection.java (revision 1162) | ||
---|---|---|
94 | 94 |
final String targetproperty, final LinkedHashSet<String> formAsLemmaPosList, final LinkedHashSet<String> sourceprioritylist) { |
95 | 95 |
final MainCorpus mainCorpus = corpus.getMainCorpus(); |
96 | 96 |
final File corpusBinaryDirectory = mainCorpus.getProjectDirectory(); |
97 |
final File txmDirectory = new File(corpusBinaryDirectory, "txm/"+mainCorpus.getName());
|
|
97 |
final File txmDirectory = new File(corpusBinaryDirectory, "txm/"+mainCorpus.getID());
|
|
98 | 98 |
|
99 | 99 |
if (!txmDirectory.exists()) { |
100 | 100 |
System.out.println("Can't process a corpus with no XML-TXM files directory: "+txmDirectory); |
tmp/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/handlers/RemoveProperties.java (revision 1162) | ||
---|---|---|
75 | 75 |
public static void apply(final CQPCorpus corpus, final HashSet<String> propertiesSet) { |
76 | 76 |
final MainCorpus mainCorpus = corpus.getMainCorpus(); |
77 | 77 |
final File corpusBinaryDirectory = mainCorpus.getProjectDirectory(); |
78 |
final File txmDirectory = new File(corpusBinaryDirectory, "txm/"+mainCorpus.getName());
|
|
78 |
final File txmDirectory = new File(corpusBinaryDirectory, "txm/"+mainCorpus.getID());
|
|
79 | 79 |
|
80 | 80 |
if (!txmDirectory.exists()) { |
81 | 81 |
System.out.println("Can't process a corpus with no XML-TXM files directory: "+txmDirectory); |
tmp/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/handlers/Train.java (revision 1162) | ||
---|---|---|
213 | 213 |
|
214 | 214 |
// create TT SRC file from CWB indexes |
215 | 215 |
|
216 |
File ttSrcFile = new File(treetaggerSrcDirectory, mainCorpus.getName()+".tt");
|
|
216 |
File ttSrcFile = new File(treetaggerSrcDirectory, mainCorpus.getID()+".tt");
|
|
217 | 217 |
System.out.println("TT SRC file: "+ttSrcFile.getAbsolutePath()); |
218 | 218 |
BufferedOutputStream fos = new BufferedOutputStream(new FileOutputStream(ttSrcFile)); |
219 | 219 |
PrintStream ps = new PrintStream(fos); |
tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/editors/TIGERSearchEditor.java (revision 1162) | ||
---|---|---|
162 | 162 |
} |
163 | 163 |
|
164 | 164 |
protected void initializeFields() { |
165 |
String id = corpus.getName();
|
|
165 |
String id = corpus.getID();
|
|
166 | 166 |
File configfile = new File(corpus.getProjectDirectory(),"tiger/tigersearch.logprop"); |
167 | 167 |
File registrydir = new File(corpus.getProjectDirectory(), "tiger"); |
168 | 168 |
|
tmp/org.txm.tigersearch.rcp/src/org/txm/searchengine/ts/TIGERSearchEngine.java (revision 1162) | ||
---|---|---|
46 | 46 |
File configfile = new File(tigerDirectory, "tigersearch.logprop"); |
47 | 47 |
TSCorpusManager manager = new TSCorpusManager(tigerDirectory, configfile); |
48 | 48 |
|
49 |
TSResult result = manager.getCorpus(corpus.getName()).query(query.getQueryString());
|
|
49 |
TSResult result = manager.getCorpus(corpus.getID()).query(query.getQueryString());
|
|
50 | 50 |
ResultForest forest = result.getForest(); |
51 | 51 |
System.out.println("TIGERSearch: forest size="+forest.getForestSize()); |
52 | 52 |
MatchResult mresult = result.getMatchResult(); |
... | ... | |
65 | 65 |
//TODO implement a corpora of TIGER corpus |
66 | 66 |
File buildDirectory = new File(corpus.getProjectDirectory(), "tiger"); |
67 | 67 |
return new File(buildDirectory, "tigersearch.logprop").exists() && |
68 |
new File(buildDirectory, corpus.getName()).exists();
|
|
68 |
new File(buildDirectory, corpus.getID()).exists();
|
|
69 | 69 |
} |
70 | 70 |
|
71 | 71 |
|
tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/commands/ExportStandoff.java (revision 1162) | ||
---|---|---|
83 | 83 |
MainCorpus corpus = (MainCorpus) s; |
84 | 84 |
String path = Toolbox.getTxmHomePath(); |
85 | 85 |
dialog.setFilterPath(path); //To set a specific path |
86 |
dialog.setFileName(corpus.getName()+"_annotations.zip");
|
|
86 |
dialog.setFileName(corpus.getID()+"_annotations.zip");
|
|
87 | 87 |
dialog.setFilterExtensions(new String[]{"*.zip"}); |
88 | 88 |
if (dialog.open() != null) { |
89 | 89 |
StatusLine.setMessage(TXMUIMessages.ExportAnnotation_0); |
tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GSERunner.java (revision 1162) | ||
---|---|---|
55 | 55 |
public static GSERunner buildDefaultGSE() { |
56 | 56 |
File rootDir = new File(Toolbox.getTxmHomePath(), "scripts/groovy/"); |
57 | 57 |
// check if script root dir was changed |
58 |
if (defaultScriptRootDir.equals(rootDir) && defaultGSE != null) { |
|
58 |
if (defaultScriptRootDir != null && defaultScriptRootDir.equals(rootDir) && defaultGSE != null) {
|
|
59 | 59 |
// try { |
60 | 60 |
// defaultGSE.getGroovyClassLoader().addURL(rootDir.toURI().toURL()); |
61 | 61 |
// } catch (MalformedURLException e) { |
tmp/org.txm.groovy.core/src/groovy/org/txm/macro/commands/CrossedPartitionBuilderMacro.groovy (revision 1162) | ||
---|---|---|
243 | 243 |
|
244 | 244 |
if (DEBUG) { |
245 | 245 |
if (index == 0) { |
246 |
println 'Pocessing Structural Unit Property "' + sup.getFullName() + '" on mother corpus "' + corpus.getName() + '"';
|
|
246 |
println 'Pocessing Structural Unit Property "' + sup.getFullName() + '" on mother corpus "' + corpus.getID() + '"';
|
|
247 | 247 |
} else { |
248 | 248 |
println 'Pocessing Structural Unit Property "' + sup.getFullName() + '" on subcorpus part "' + tmpPartName + '"'; |
249 | 249 |
} |
tmp/org.txm.groovy.core/src/groovy/org/txm/macro/prototypes/cqp/SaveSubCorpusMacro.groovy (revision 1162) | ||
---|---|---|
44 | 44 |
outputStreamBin.writeInt(36193928+1); |
45 | 45 |
outputStreamBin.writeBytes(regFile.getAbsolutePath()+"/"); |
46 | 46 |
outputStreamBin.write(0) |
47 |
outputStreamBin.writeBytes(maincorpus.getName());
|
|
47 |
outputStreamBin.writeBytes(maincorpus.getID());
|
|
48 | 48 |
//outputStreamBin.write(0) |
49 | 49 |
l2 = outputStreamBin.size()-3 |
50 | 50 |
|
tmp/org.txm.groovy.core/src/groovy/org/txm/macro/prototypes/edition/XTZEditionBuilderMacro.groovy (revision 1162) | ||
---|---|---|
40 | 40 |
// END OF PARAMETERS |
41 | 41 |
|
42 | 42 |
File binDirectory = corpus.getProject().getProjectDirectory() |
43 |
File txmDirectory = new File(binDirectory, "txm/"+corpus.getName().toUpperCase())
|
|
43 |
File txmDirectory = new File(binDirectory, "txm/"+corpus.getID().toUpperCase())
|
|
44 | 44 |
|
45 | 45 |
File HTMLDirectory = new File(binDirectory, "HTML") |
46 |
File newEditionDirectory = new File(HTMLDirectory, corpus.getName().toUpperCase()+"/"+editionName)
|
|
46 |
File newEditionDirectory = new File(HTMLDirectory, corpus.getID().toUpperCase()+"/"+editionName)
|
|
47 | 47 |
|
48 | 48 |
BaseParameters parameters = corpus.getProject().params |
49 | 49 |
|
tmp/org.txm.groovy.core/src/groovy/org/txm/macro/edition/FacsEditionBuilderMacro.groovy (revision 1162) | ||
---|---|---|
59 | 59 |
|
60 | 60 |
if (args.size() == 0) { // the "corpus" variable exists |
61 | 61 |
binDirectory = corpus.getProject().getProjectDirectory() |
62 |
txmDirectory = new File(binDirectory, "txm/"+corpus.getName().toUpperCase())
|
|
62 |
txmDirectory = new File(binDirectory, "txm/"+corpus.getID().toUpperCase())
|
|
63 | 63 |
tokenizedDirectory = new File(binDirectory, "tokenized") |
64 | 64 |
HTMLDirectory = new File(binDirectory, "HTML") |
65 |
newEditionDirectory = new File(HTMLDirectory, corpus.getName().toUpperCase()+"/"+editionName)
|
|
65 |
newEditionDirectory = new File(HTMLDirectory, corpus.getID().toUpperCase()+"/"+editionName)
|
|
66 | 66 |
params = corpus.getProject().params |
67 | 67 |
} else { // the "corpus" variable does not exist, get informations from the "args" map |
68 | 68 |
binDirectory = args["binDirectory"] |
tmp/org.txm.groovy.core/src/groovy/org/txm/macro/edition/EditionUpdaterMacro.groovy (revision 1162) | ||
---|---|---|
64 | 64 |
|
65 | 65 |
if (args.size() == 0) { // corpus informations |
66 | 66 |
defaultEditionName = corpus.getDefaultEdition() |
67 |
corpusName = corpus.getName()
|
|
67 |
corpusName = corpus.getID()
|
|
68 | 68 |
binDirectory = corpus.getProject().getProjectDirectory() |
69 | 69 |
txmDirectory = new File(binDirectory, "txm/"+corpusName.toUpperCase()) |
70 | 70 |
params = corpus.getProject().params |
tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/prototypes/advancedPartition.groovy (revision 1162) | ||
---|---|---|
244 | 244 |
// TODO : Log |
245 | 245 |
println '' |
246 | 246 |
if(index == 0) { |
247 |
println 'Pocessing Structural Unit Property "' + sup.getFullName() + '" on mother corpus "' + corpus.getName() + '"';
|
|
247 |
println 'Processing Structural Unit Property "' + sup.getFullName() + '" on mother corpus "' + corpus.getID() + '"';
|
|
248 | 248 |
} |
249 | 249 |
else { |
250 |
println 'Pocessing Structural Unit Property "' + sup.getFullName() + '" on subcorpus part "' + tmpPartName + '"'; |
|
250 |
println 'Processing Structural Unit Property "' + sup.getFullName() + '" on subcorpus part "' + tmpPartName + '"';
|
|
251 | 251 |
} |
252 | 252 |
println '' |
253 | 253 |
|
tmp/org.txm.core/src/java/org/txm/objects/Project.java (revision 1162) | ||
---|---|---|
1028 | 1028 |
return this.preferenceScope; |
1029 | 1029 |
} |
1030 | 1030 |
|
1031 |
public CorpusBuild getCorpusBuild(String name) {
|
|
1031 |
public CorpusBuild getCorpusBuild(String id) {
|
|
1032 | 1032 |
for (CorpusBuild build : getCorpusBuilds()) { |
1033 |
if (name.equals(build.getName())) {
|
|
1033 |
if (id.equals(build.getID())) {
|
|
1034 | 1034 |
return build; |
1035 | 1035 |
} |
1036 | 1036 |
} |
tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java (revision 1162) | ||
---|---|---|
1151 | 1151 |
} |
1152 | 1152 |
}); |
1153 | 1153 |
|
1154 |
// List<String> krnames = corpus.getKnowledgeRepositoryNames(); |
|
1155 |
// if (krnames==null){ |
|
1156 |
// System.out.println("Corpus "+corpus.getName()+" has no KR "); |
|
1157 |
// }else { |
|
1158 |
// |
|
1159 |
// for(String krname : krnames){ |
|
1160 |
// System.out.println("Corpus "+corpus.getName()+" has KR "+krname); |
|
1161 |
// } |
|
1162 |
// } |
|
1163 |
|
|
1164 | 1154 |
queryArea.layout(); |
1165 | 1155 |
|
1166 | 1156 |
|
tmp/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/conversion/CorpusRuledConvertion.java (revision 1162) | ||
---|---|---|
56 | 56 |
System.out.println("'txm' directory not found in "+binaryCorpusDirectory.getAbsolutePath()); |
57 | 57 |
return false; |
58 | 58 |
} |
59 |
File txmCorpusDirectory = new File(txmDirectory, corpus.getName());
|
|
59 |
File txmCorpusDirectory = new File(txmDirectory, corpus.getID());
|
|
60 | 60 |
if (!txmCorpusDirectory.exists()) { |
61 | 61 |
System.out.println("'"+corpus.getName()+"' corpus directory not found in "+txmDirectory.getAbsolutePath()); |
62 | 62 |
return false; |
tmp/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/AnnotationWriter.java (revision 1162) | ||
---|---|---|
91 | 91 |
List<String> textsIds = corpus.getProject().getTextsID(); |
92 | 92 |
System.out.println("Exporting annotations of "+StringUtils.join(textsIds, ", ")+"."); |
93 | 93 |
|
94 |
File resultDirectory = new File(Toolbox.getTxmHomePath(), "results/"+corpus.getName()+"_annotations");
|
|
94 |
File resultDirectory = new File(Toolbox.getTxmHomePath(), "results/"+corpus.getID()+"_annotations");
|
|
95 | 95 |
DeleteDir.deleteDirectory(resultDirectory); |
96 | 96 |
resultDirectory.mkdirs(); |
97 | 97 |
if (!(resultDirectory.exists() && resultDirectory.canWrite())) { |
... | ... | |
100 | 100 |
} |
101 | 101 |
|
102 | 102 |
File inputDirectory = corpus.getProjectDirectory(); |
103 |
File corpusTxmDirectory = new File(inputDirectory, "txm/"+corpus.getName());
|
|
103 |
File corpusTxmDirectory = new File(inputDirectory, "txm/"+corpus.getID());
|
|
104 | 104 |
|
105 | 105 |
System.out.println("Writing annotations XML files in "+resultDirectory); |
106 | 106 |
for (String textid : textsIds) { |
... | ... | |
143 | 143 |
List<String> textsIds = corpus.getProject().getTextsID(); |
144 | 144 |
|
145 | 145 |
File inputDirectory = corpus.getProjectDirectory(); |
146 |
File txmDirectory = new File(inputDirectory, "txm/"+corpus.getName());
|
|
146 |
File txmDirectory = new File(inputDirectory, "txm/"+corpus.getID());
|
|
147 | 147 |
|
148 | 148 |
ArrayList<Annotation> textAnnotations = new ArrayList<Annotation>(); |
149 | 149 |
HashMap<String, ArrayList<Annotation>> annotationsPerTexts = new HashMap<String, ArrayList<Annotation>>(); |
tmp/org.txm.oriflamms.rcp/groovy/org/txm/macro/oriflamms/analyse/AllographsMacro.groovy (revision 1162) | ||
---|---|---|
23 | 23 |
} |
24 | 24 |
|
25 | 25 |
Corpus corpus = corpusViewSelection; |
26 |
if (!corpus.getName().endsWith("C")) {
|
|
26 |
if (!corpus.getID().endsWith("C")) {
|
|
27 | 27 |
println "The selected Corpus is not a character corpus." |
28 | 28 |
return; |
29 | 29 |
} |
tmp/org.txm.oriflamms.rcp/src/org/txm/oriflamms/functions/UpdateCorpusImagePaths.java (revision 1162) | ||
---|---|---|
21 | 21 |
System.out.println("Error: no html directory: "+htmlDir); |
22 | 22 |
return false; |
23 | 23 |
} |
24 |
File corpushtmlDir = new File(htmlDir, corpus.getName());
|
|
24 |
File corpushtmlDir = new File(htmlDir, corpus.getID());
|
|
25 | 25 |
if (!corpushtmlDir.exists()) { |
26 | 26 |
System.out.println("Error: no html corpus directory: "+corpushtmlDir); |
27 | 27 |
return false; |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/BasesView.java (revision 1162) | ||
---|---|---|
137 | 137 |
TreeSelection selection = (TreeSelection) tv.getSelection(); |
138 | 138 |
if (selection.getFirstElement() instanceof CQPCorpus) { |
139 | 139 |
CQPCorpus corpus = (CQPCorpus)selection.getFirstElement(); |
140 |
File selectedItem = new File(corpus.getProjectDirectory(), "cqp/"+corpus.getName()+".cqp");
|
|
140 |
File selectedItem = new File(corpus.getProjectDirectory(), "cqp/"+corpus.getID()+".cqp");
|
|
141 | 141 |
if (selectedItem.exists()) |
142 | 142 |
EditFile.openfile(selectedItem.getAbsolutePath()); |
143 | 143 |
} else if (selection.getFirstElement() instanceof Text) { |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/QueriesView.java (revision 1162) | ||
---|---|---|
183 | 183 |
FileWriter writer = new FileWriter(output); |
184 | 184 |
writer.write(TXMUIMessages.QueriesView_5); |
185 | 185 |
for (MainCorpus b : CorpusManager.getCorpusManager().getCorpora()) { |
186 |
writer.write(" " + b.getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
|
186 |
writer.write(" " + b.getID() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
|
187 | 187 |
for (SavedQuery q : b.getQueriesLog()) { |
188 | 188 |
writer.write(" " + q + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ |
189 | 189 |
} |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java (revision 1162) | ||
---|---|---|
165 | 165 |
* Linked editors. |
166 | 166 |
*/ |
167 | 167 |
protected ArrayList<EditorPart> linkedEditors = null; |
168 |
|
|
169 |
/** |
|
170 |
* debug purpose variable -> easier to fetch information that the getResult() method |
|
171 |
*/ |
|
168 | 172 |
private T result; |
169 | 173 |
|
170 |
|
|
171 |
|
|
172 | 174 |
@Override |
173 | 175 |
public void init(IEditorSite site, IEditorInput input) throws PartInitException { |
174 | 176 |
this.setSite(site); |
tmp/org.txm.dictionary.rcp/src/org/txm/macro/frolex/CreateFrolexMacro.groovy (revision 1162) | ||
---|---|---|
64 | 64 |
|
65 | 65 |
bfmCorpus = cm.getCorpus("BFM2016LEX") |
66 | 66 |
for (MainCorpus corpus : cm.getCorpora()) { |
67 |
if (corpus.getName().equals("BFM2016LEX")) bfmCorpus = cm.getCorpus("BFM2016LEX")
|
|
67 |
if (corpus.getID().equals("BFM2016LEX")) bfmCorpus = cm.getCorpus("BFM2016LEX")
|
|
68 | 68 |
} |
69 | 69 |
} catch (Exception e) { |
70 | 70 |
System.out.println("Necessary corpus are missing: "+e) |
tmp/org.txm.index.core/src/org/txm/index/core/functions/___Lexicon2.java (revision 1162) | ||
---|---|---|
196 | 196 |
// System.out.println("in "+this.getCqpId()+" look for cached lexicon "+property); |
197 | 197 |
// System.out.println("not found"); |
198 | 198 |
this.subTask("Computing lexicon size..."); |
199 |
Log.finest(IndexCoreMessages.LEXICON_RESULT_TYPE + corpus.getName());
|
|
199 |
Log.finest(IndexCoreMessages.LEXICON_RESULT_TYPE + corpus.getID());
|
|
200 | 200 |
int lexiconSize; |
201 | 201 |
try { |
202 | 202 |
lexiconSize = CorpusManager.getCorpusManager().getCqiClient().lexiconSize(property.getQualifiedName()); |
tmp/org.txm.index.core/src/org/txm/index/core/functions/Lexicon.java (revision 1162) | ||
---|---|---|
195 | 195 |
// System.out.println("in "+this.getCqpId()+" look for cached lexicon "+property); |
196 | 196 |
// System.out.println("not found"); |
197 | 197 |
this.subTask("Computing lexicon size..."); |
198 |
Log.finest(IndexCoreMessages.LEXICON_RESULT_TYPE + corpus.getName());
|
|
198 |
Log.finest(IndexCoreMessages.LEXICON_RESULT_TYPE + corpus.getID());
|
|
199 | 199 |
int lexiconSize; |
200 | 200 |
try { |
201 | 201 |
lexiconSize = CorpusManager.getCorpusManager().getCqiClient().lexiconSize(property.getQualifiedName()); |
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/CorpusManager.java (revision 1162) | ||
---|---|---|
130 | 130 |
} |
131 | 131 |
|
132 | 132 |
for (MainCorpus corpus : CorpusManager.corpora) { |
133 |
if (corpus.getName().equals(corpusName)) {
|
|
133 |
if (corpus.getID().equals(corpusName)) {
|
|
134 | 134 |
// System.out.println("found corpus "+corpusName); |
135 | 135 |
return corpus; |
136 | 136 |
} |
... | ... | |
158 | 158 |
if (corpora == null) |
159 | 159 |
return false; |
160 | 160 |
for (MainCorpus c : corpora) |
161 |
if (name.equals(c.getName()))
|
|
161 |
if (name.equals(c.getID()))
|
|
162 | 162 |
return true; |
163 | 163 |
return false; |
164 | 164 |
} |
... | ... | |
225 | 225 |
corpora.remove(corpus); |
226 | 226 |
if (CQPSearchEngine.isInitialized()) { |
227 | 227 |
try { |
228 |
CQPSearchEngine.getCqiClient().dropCorpus(corpus.getName());
|
|
228 |
CQPSearchEngine.getCqiClient().dropCorpus(corpus.getID());
|
|
229 | 229 |
} catch (Exception e) { |
230 | 230 |
Log.warning("Warning while removing corpus: Failed to drop corpus "+corpus); |
231 | 231 |
Log.printStackTrace(e); |
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/core/functions/summary/Summary.java (revision 1162) | ||
---|---|---|
60 | 60 |
@Override |
61 | 61 |
protected boolean _compute() throws Exception { |
62 | 62 |
treenodes.end = corpus.getSize(); |
63 |
treenodes.id = corpus.getName();
|
|
63 |
treenodes.id = corpus.getID();
|
|
64 | 64 |
treenodes.start = 0; |
65 | 65 |
treenodes.parent = null; |
66 | 66 |
// get all type of structures |
tmp/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/CwbEncode.java (revision 1162) | ||
---|---|---|
327 | 327 |
} |
328 | 328 |
|
329 | 329 |
for (File corpus : corpora.listFiles()) { |
330 |
if (!corpus.isDirectory()) continue; |
|
331 |
|
|
330 | 332 |
System.out.println(TXMCoreMessages.CwbEncode_27 + corpus.getName()); |
331 | 333 |
File data = new File(corpus, "data"); //$NON-NLS-1$ |
332 | 334 |
|
tmp/org.txm.para.rcp/src/org/txm/para/rcp/editors/CorpusSelection.java (revision 1162) | ||
---|---|---|
296 | 296 |
+ selectedCorpus.size() + "]"); //$NON-NLS-1$ |
297 | 297 |
availableCorpusView.removeAll(); |
298 | 298 |
for (MainCorpus corpus : availableCorpus) { |
299 |
if (!corpus.getName().equals("id")) //$NON-NLS-1$ |
|
300 |
availableCorpusView.add(corpus.getName()); |
|
299 |
availableCorpusView.add(corpus.getID()); |
|
301 | 300 |
} |
302 | 301 |
selectedCorpusView.removeAll(); |
303 | 302 |
for (MainCorpus corpus : selectedCorpus) { |
304 |
if (!corpus.getName().equals("id")) //$NON-NLS-1$ |
|
305 |
selectedCorpusView.add(corpus.getName()); |
|
303 |
selectedCorpusView.add(corpus.getID()); |
|
306 | 304 |
} |
307 | 305 |
|
308 | 306 |
availableCorpusView.getParent().layout(); |
tmp/org.txm.para.rcp/src/org/txm/para/rcp/editors/ParaBrowserEditor.java (revision 1162) | ||
---|---|---|
704 | 704 |
// if (i==0){ |
705 | 705 |
MainCorpus corpus = it.next(); |
706 | 706 |
System.out.println("CORPUS ################### " //$NON-NLS-1$ |
707 |
+ corpus.getName());
|
|
707 |
+ corpus.getID());
|
|
708 | 708 |
newValue = paraBrowser.getNextOrPrevious(corpus, selectedStructuralUnit, |
709 | 709 |
selectedStructuralUnitParaId, selectedValue, findNext); |
710 | 710 |
// } |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CreationRelationsMacro.groovy (revision 1162) | ||
---|---|---|
33 | 33 |
int nCreated = 0 // count the number of created RELATION |
34 | 34 |
|
35 | 35 |
MainCorpus corpus = corpusViewSelection |
36 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName()); // analec corpus has the same name has the TXM corpus
|
|
36 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID()); // analec corpus has the same name has the TXM corpus
|
|
37 | 37 |
Structure structure = analecCorpus.getStructure() |
38 | 38 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
39 | 39 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/SchemaTypesMacro.groovy (revision 1162) | ||
---|---|---|
17 | 17 |
} |
18 | 18 |
|
19 | 19 |
MainCorpus corpus = corpusViewSelection |
20 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
20 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
21 | 21 |
|
22 | 22 |
def schemas = analecCorpus.getTousSchemas() |
23 | 23 |
def set = new HashMap() |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/SchemasListMacro.groovy (revision 1162) | ||
---|---|---|
56 | 56 |
// END OF PARAMETERS |
57 | 57 |
|
58 | 58 |
MainCorpus corpus = corpusViewSelection |
59 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
59 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
60 | 60 |
|
61 | 61 |
// check Schema parameters |
62 | 62 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitTypesMacro.groovy (revision 1162) | ||
---|---|---|
23 | 23 |
if (!ParametersDialog.open(this)) return; |
24 | 24 |
|
25 | 25 |
MainCorpus corpus = corpusViewSelection |
26 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
26 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
27 | 27 |
def map = new HashMap() |
28 | 28 |
def unitesInSchema = [] |
29 | 29 |
def n = 0 |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/SchemaTypesMacro.groovy (revision 1162) | ||
---|---|---|
17 | 17 |
} |
18 | 18 |
|
19 | 19 |
MainCorpus corpus = corpusViewSelection |
20 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
20 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
21 | 21 |
|
22 | 22 |
def schemas = analecCorpus.getTousSchemas() |
23 | 23 |
def set = new HashMap() |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/CompUnitPropertiesMacro.groovy (revision 1162) | ||
---|---|---|
41 | 41 |
MainCorpus corpus = corpusViewSelection |
42 | 42 |
AbstractCqiClient CQI = CQPSearchEngine.getCqiClient(); |
43 | 43 |
def word = corpus.getWordProperty() |
44 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
44 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
45 | 45 |
|
46 | 46 |
def units = analecCorpus.getUnites(unit_type) |
47 | 47 |
units.sort() { a, b -> a.getDeb() <=> b.getDeb() ?: a.getFin() <=> b.getFin() } |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/RelationsListMacro.groovy (revision 1162) | ||
---|---|---|
35 | 35 |
MainCorpus corpus = corpusViewSelection |
36 | 36 |
AbstractCqiClient CQI = CQPSearchEngine.getCqiClient(); |
37 | 37 |
def word = corpus.getWordProperty() |
38 |
visuAnalec.donnees.Corpus analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
38 |
visuAnalec.donnees.Corpus analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
39 | 39 |
|
40 | 40 |
int n = 1; |
41 | 41 |
def relations = null |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitTypesInSchemaMacro.groovy (revision 1162) | ||
---|---|---|
23 | 23 |
if (!ParametersDialog.open(this)) return; |
24 | 24 |
|
25 | 25 |
MainCorpus corpus = corpusViewSelection |
26 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
26 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
27 | 27 |
def map = new HashMap() |
28 | 28 |
def unitesInSchema = [] |
29 | 29 |
def n = 0 |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitTypesNotInSchemaMacro.groovy (revision 1162) | ||
---|---|---|
22 | 22 |
if (!ParametersDialog.open(this)) return; |
23 | 23 |
|
24 | 24 |
MainCorpus corpus = corpusViewSelection |
25 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
25 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
26 | 26 |
|
27 | 27 |
def unitesInSchema = new HashSet() |
28 | 28 |
for (def schema : analecCorpus.getSchemas(schema_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitsProgressionMacro.groovy (revision 1162) | ||
---|---|---|
93 | 93 |
if (limit_cql != null && !limit_cql.getQueryString().equals("\"\"")) query += limit_cql |
94 | 94 |
if (schema_ursql != null && schema_ursql.length() > 0) { if (query.length() > 0) query += " & "; query += ""+schema_ursql+ " >"} |
95 | 95 |
if (unit_ursql != null && unit_ursql.length() > 0) query += " "+unit_ursql |
96 |
if (query == "") query = corpus.getName() |
|
97 | 96 |
query = new CQLQuery(query) |
98 | 97 |
int[] starts = new int[selectedUnits.size()]; |
99 | 98 |
int[] ends = new int[selectedUnits.size()]; |
... | ... | |
105 | 104 |
unitsinformations << AnalecUtils.toString(CQI, word, unite); |
106 | 105 |
n++ |
107 | 106 |
} |
108 |
def queryResult = new FakeQueryResult(corpus.getName(), corpus, query, starts, ends, null)
|
|
107 |
def queryResult = new FakeQueryResult(corpus.getID(), corpus, query, starts, ends, null)
|
|
109 | 108 |
queries << query |
110 | 109 |
queryResults << queryResult |
111 | 110 |
informations << unitsinformations |
... | ... | |
123 | 122 |
|
124 | 123 |
for (def v : propvalues.keySet().sort()) { |
125 | 124 |
selectedUnits = propvalues[v] |
126 |
query = corpus.getName()+" "+limit_cql
|
|
125 |
query = corpus.getID()+" "+limit_cql
|
|
127 | 126 |
query = new CQLQuery(v) |
128 | 127 |
starts = new int[selectedUnits.size()]; |
129 | 128 |
ends = new int[selectedUnits.size()]; |
... | ... | |
135 | 134 |
unitsinformations << AnalecUtils.toString(CQI, word, unite); |
136 | 135 |
n++ |
137 | 136 |
} |
138 |
queryResult = new FakeQueryResult(corpus.getName(), corpus, query, starts, ends, null)
|
|
137 |
queryResult = new FakeQueryResult(corpus.getID(), corpus, query, starts, ends, null)
|
|
139 | 138 |
queries << query |
140 | 139 |
queryResults << queryResult |
141 | 140 |
informations << unitsinformations |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/NombreDeChainesMacro.groovy (revision 1162) | ||
---|---|---|
44 | 44 |
// END OF PARAMETERS |
45 | 45 |
|
46 | 46 |
MainCorpus corpus = corpusViewSelection |
47 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
47 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
48 | 48 |
|
49 | 49 |
// check Schema parameters |
50 | 50 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/DistanceInterMaillonnaireMacro.groovy (revision 1162) | ||
---|---|---|
43 | 43 |
if (!ParametersDialog.open(this)) return; |
44 | 44 |
|
45 | 45 |
MainCorpus corpus = corpusViewSelection |
46 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
46 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
47 | 47 |
|
48 | 48 |
// check Schema parameters |
49 | 49 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/NatureDuPremierMaillonMacro.groovy (revision 1162) | ||
---|---|---|
48 | 48 |
// END OF PARAMETERS |
49 | 49 |
|
50 | 50 |
MainCorpus corpus = corpusViewSelection |
51 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
51 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
52 | 52 |
|
53 | 53 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
54 | 54 |
println "No schema with name=$schema_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/LongueurMoyenneMacro.groovy (revision 1162) | ||
---|---|---|
48 | 48 |
// END OF PARAMETERS |
49 | 49 |
|
50 | 50 |
MainCorpus corpus = corpusViewSelection |
51 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
51 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
52 | 52 |
|
53 | 53 |
// check Schema parameters |
54 | 54 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/UnitTypesNotInSchemaMacro.groovy (revision 1162) | ||
---|---|---|
22 | 22 |
if (!ParametersDialog.open(this)) return; |
23 | 23 |
|
24 | 24 |
MainCorpus corpus = corpusViewSelection |
25 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
25 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
26 | 26 |
|
27 | 27 |
def unitesInSchema = new HashSet() |
28 | 28 |
for (def schema : analecCorpus.getSchemas(schema_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/Frpos2CategorieMacro.groovy (revision 1162) | ||
---|---|---|
179 | 179 |
println "Error: CQP corpus does not contains the word property with name=$pos_property_name" |
180 | 180 |
return |
181 | 181 |
} |
182 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
182 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
183 | 183 |
vue = AnalecCorpora.getVue(corpus.getName()) |
184 | 184 |
structure = analecCorpus.getStructure() |
185 | 185 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CreationChainesMacro.groovy (revision 1162) | ||
---|---|---|
28 | 28 |
int nUpdated = 0 // count the number of updated CHAINE |
29 | 29 |
|
30 | 30 |
MainCorpus corpus = corpusViewSelection |
31 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName()); // analec corpus has the same name has the TXM corpus
|
|
31 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID()); // analec corpus has the same name has the TXM corpus
|
|
32 | 32 |
Structure structure = analecCorpus.getStructure() |
33 | 33 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
34 | 34 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/ResetAnnotationsMacro.groovy (revision 1162) | ||
---|---|---|
20 | 20 |
if (!ParametersDialog.open(this)) return; |
21 | 21 |
|
22 | 22 |
MainCorpus corpus = corpusViewSelection |
23 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
23 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
24 | 24 |
def structure = analecCorpus.getStructure() |
25 | 25 |
|
26 | 26 |
Class[] classes = [Unite.class, Relation.class, Schema.class] |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/RelationsMacro.groovy (revision 1162) | ||
---|---|---|
35 | 35 |
MainCorpus corpus = corpusViewSelection |
36 | 36 |
AbstractCqiClient CQI = CQPSearchEngine.getCqiClient(); |
37 | 37 |
def word = corpus.getWordProperty() |
38 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
38 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
39 | 39 |
|
40 | 40 |
int n = 1; |
41 | 41 |
def relations = analecCorpus.getRelations(relation_type) |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/DensiteReferentielleMacro.groovy (revision 1162) | ||
---|---|---|
29 | 29 |
// END OF PARAMETERS |
30 | 30 |
|
31 | 31 |
MainCorpus corpus = corpusViewSelection |
32 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
32 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
33 | 33 |
|
34 | 34 |
// check unit parameters |
35 | 35 |
if (!analecCorpus.getStructure().getUnites().contains(unit_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/UnitsMacro.groovy (revision 1162) | ||
---|---|---|
30 | 30 |
MainCorpus corpus = corpusViewSelection |
31 | 31 |
AbstractCqiClient CQI = CQPSearchEngine.getCqiClient(); |
32 | 32 |
def word = corpus.getWordProperty() |
33 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
33 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
34 | 34 |
|
35 | 35 |
int n = 1; |
36 | 36 |
def units = analecCorpus.getUnites(unit_type) |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/UnitTypesMacro.groovy (revision 1162) | ||
---|---|---|
23 | 23 |
if (!ParametersDialog.open(this)) return; |
24 | 24 |
|
25 | 25 |
MainCorpus corpus = corpusViewSelection |
26 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
26 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
27 | 27 |
def map = new HashMap() |
28 | 28 |
def unitesInSchema = [] |
29 | 29 |
def n = 0 |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CategorieGrammaticaleMacro.groovy (revision 1162) | ||
---|---|---|
52 | 52 |
// END OF PARAMETERS |
53 | 53 |
|
54 | 54 |
MainCorpus corpus = corpusViewSelection |
55 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
55 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
56 | 56 |
|
57 | 57 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
58 | 58 |
println "No schema with name=$schema_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CheckAnnotationStructureValuesMacro.groovy (revision 1162) | ||
---|---|---|
28 | 28 |
// END OF PARAMETERS |
29 | 29 |
|
30 | 30 |
MainCorpus corpus = corpusViewSelection |
31 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
31 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
32 | 32 |
def structure = analecCorpus.getStructure() |
33 | 33 |
|
34 | 34 |
def unit_types = structure.getTypes(Unite.class); |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/ChainesMacro.groovy (revision 1162) | ||
---|---|---|
56 | 56 |
// END OF PARAMETERS |
57 | 57 |
|
58 | 58 |
MainCorpus corpus = corpusViewSelection |
59 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
59 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
60 | 60 |
|
61 | 61 |
// check Schema parameters |
62 | 62 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/export/ExportToGlozz1_0_0Macro.groovy (revision 1162) | ||
---|---|---|
97 | 97 |
// CORPUS ANALEC (GET THE ANNOTATIONS) |
98 | 98 |
|
99 | 99 |
// note that unit_type has been defined with an option of the dialog at the beginning |
100 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
100 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
101 | 101 |
|
102 | 102 |
// list of properties |
103 | 103 |
|
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/export/ExportToGlozz1_1_0Macro.groovy (revision 1162) | ||
---|---|---|
136 | 136 |
// CORPUS ANALEC (GET THE ANNOTATIONS) |
137 | 137 |
|
138 | 138 |
// note that unit_type has been defined with an option of the dialog at the beginning |
139 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
139 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
140 | 140 |
|
141 | 141 |
// list of properties |
142 | 142 |
|
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/export/ExportToGlozzMacro.groovy (revision 1162) | ||
---|---|---|
97 | 97 |
// CORPUS ANALEC (GET THE ANNOTATIONS) |
98 | 98 |
|
99 | 99 |
// note that unit_type has been defined with an option of the dialog at the beginning |
100 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
100 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
101 | 101 |
|
102 | 102 |
// list of properties |
103 | 103 |
|
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CompUnitPropertiesMacro.groovy (revision 1162) | ||
---|---|---|
38 | 38 |
MainCorpus corpus = corpusViewSelection |
39 | 39 |
AbstractCqiClient CQI = CQPSearchEngine.getCqiClient(); |
40 | 40 |
def word = corpus.getWordProperty() |
41 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
41 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
42 | 42 |
|
43 | 43 |
def units = analecCorpus.getUnites(unit_type) |
44 | 44 |
units.sort() { a, b -> a.getDeb() <=> b.getDeb() ?: a.getFin() <=> b.getFin() } |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/UnitTypesInSchemaMacro.groovy (revision 1162) | ||
---|---|---|
23 | 23 |
if (!ParametersDialog.open(this)) return; |
24 | 24 |
|
25 | 25 |
MainCorpus corpus = corpusViewSelection |
26 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
26 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
27 | 27 |
def map = new HashMap() |
28 | 28 |
def unitesInSchema = [] |
29 | 29 |
def n = 0 |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/Fropos2CategorieMacro.groovy (revision 1162) | ||
---|---|---|
84 | 84 |
println "Error: CQP corpus does not contains the word property with name=$pos_property_name" |
85 | 85 |
return |
86 | 86 |
} |
87 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
87 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
88 | 88 |
vue = AnalecCorpora.getVue(corpus.getName()) |
89 | 89 |
structure = analecCorpus.getStructure() |
90 | 90 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/StructuresIndexMacro.groovy (revision 1162) | ||
---|---|---|
260 | 260 |
|
261 | 261 |
selection.each { corpus -> |
262 | 262 |
|
263 |
corpusName = corpus.getName()
|
|
264 |
mainCorpusName = corpus.getMainCorpus().getName()
|
|
263 |
corpusName = corpus.getID()
|
|
264 |
mainCorpusName = corpus.getMainCorpus().getID()
|
|
265 | 265 |
println "Corpus = "+corpusName |
266 | 266 |
println "Corpus QualifiedCqpId = "+corpus.getCqpId() |
267 | 267 |
println "MainCorpus = "+mainCorpusName |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/SchemasProgressionMacro.groovy (revision 1162) | ||
---|---|---|
174 | 174 |
|
175 | 175 |
|
176 | 176 |
|
177 |
def queryResult = new FakeQueryResult(corpus.getName(), corpus, query, starts, ends, null)
|
|
177 |
def queryResult = new FakeQueryResult(corpus.getID(), corpus, query, starts, ends, null)
|
|
178 | 178 |
|
179 | 179 |
queries << query |
180 | 180 |
queryResults << queryResult |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/UnitsListMacro.groovy (revision 1162) | ||
---|---|---|
126 | 126 |
for (def corpus : allResults.keySet()) { |
127 | 127 |
def selectedUnits = allResults[corpus] |
128 | 128 |
println "$corpus units: "+selectedUnits.size() |
129 |
println AnalecUtils.getCQL(corpus.getName(), selectedUnits)
|
|
129 |
println AnalecUtils.getCQL(corpus.getID(), selectedUnits)
|
|
130 | 130 |
} |
131 | 131 |
} else if (output_mode == "CONCORDANCE") { |
132 | 132 |
|
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/CategorieGrammaticaleMacro.groovy (revision 1162) | ||
---|---|---|
52 | 52 |
// END OF PARAMETERS |
53 | 53 |
|
54 | 54 |
MainCorpus corpus = corpusViewSelection |
55 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
55 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
56 | 56 |
|
57 | 57 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
58 | 58 |
println "No schema with name=$schema_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/LongueurMoyenneMacro.groovy (revision 1162) | ||
---|---|---|
46 | 46 |
// END OF PARAMETERS |
47 | 47 |
|
48 | 48 |
MainCorpus corpus = corpusViewSelection |
49 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
49 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
50 | 50 |
|
51 | 51 |
// check Schema parameters |
52 | 52 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
... | ... | |
153 | 153 |
r.addVectorToWorkspace("freq", slens2.values() as int[]) |
154 | 154 |
r.addVectorToWorkspace("flen", flens as int[]) |
155 | 155 |
|
156 |
def corpusName = corpus.getName()
|
|
156 |
def corpusName = corpus.getID()
|
|
157 | 157 |
|
158 | 158 |
def PNGFile = File.createTempFile("txm", ".png", new File(Toolbox.getTxmHomePath(), "results")) |
159 | 159 |
def PNGFilePath = PNGFile.getAbsolutePath() |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/AllMesuresMacro.groovy (revision 1162) | ||
---|---|---|
51 | 51 |
for (def corpus : corpusViewSelections) { // for each corpus selected in the corpora view |
52 | 52 |
if (!(corpus instanceof MainCorpus)) continue; // check if the corpus is a maincorpus |
53 | 53 |
def line = [] ; table << line // create and add a new table line |
54 |
line << corpus.getName() // add the corpus name in the first column
|
|
54 |
line << corpus.getID() // add the corpus name in the first column
|
|
55 | 55 |
|
56 | 56 |
println "*** Computing mesures for $corpus" // each macro return a "result" and a "data" |
57 | 57 |
|
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/CoefficientStabiliteMacro.groovy (revision 1162) | ||
---|---|---|
51 | 51 |
// END OF PARAMETERS |
52 | 52 |
|
53 | 53 |
MainCorpus corpus = corpusViewSelection |
54 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
54 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
55 | 55 |
|
56 | 56 |
// check Schema parameters |
57 | 57 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/DensiteReferentielleMacro.groovy (revision 1162) | ||
---|---|---|
29 | 29 |
// END OF PARAMETERS |
30 | 30 |
|
31 | 31 |
MainCorpus corpus = corpusViewSelection |
32 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
32 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
33 | 33 |
|
34 | 34 |
// check unit parameters |
35 | 35 |
if (!analecCorpus.getStructure().getUnites().contains(unit_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/NombreDeChainesMacro.groovy (revision 1162) | ||
---|---|---|
44 | 44 |
// END OF PARAMETERS |
45 | 45 |
|
46 | 46 |
MainCorpus corpus = corpusViewSelection |
47 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
47 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
48 | 48 |
|
49 | 49 |
// check Schema parameters |
50 | 50 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/DistanceInterMaillonnaireMacro.groovy (revision 1162) | ||
---|---|---|
43 | 43 |
if (!ParametersDialog.open(this)) return; |
44 | 44 |
|
45 | 45 |
MainCorpus corpus = corpusViewSelection |
46 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
46 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
47 | 47 |
|
48 | 48 |
// check Schema parameters |
49 | 49 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/NatureDuPremierMaillonMacro.groovy (revision 1162) | ||
---|---|---|
48 | 48 |
// END OF PARAMETERS |
49 | 49 |
|
50 | 50 |
MainCorpus corpus = corpusViewSelection |
51 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
51 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
52 | 52 |
|
53 | 53 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
54 | 54 |
println "No schema with name=$schema_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/CQPUtils.groovy (revision 1162) | ||
---|---|---|
9 | 9 |
def getCorpusByName(name) { |
10 | 10 |
def cl = CorpusManager.getCorpusManager().getCorpora() |
11 | 11 |
def rc = cl.find { |
12 |
it.getName() == name
|
|
12 |
it.getID() == name
|
|
13 | 13 |
} |
14 | 14 |
|
15 | 15 |
if (rc) return rc |
... | ... | |
18 | 18 |
rc = cl.find { c -> |
19 | 19 |
def scl = c.getSubcorpora() |
20 | 20 |
def rrsc = scl.find { sc -> |
21 |
sc.getName() == name
|
|
21 |
sc.getID() == name
|
|
22 | 22 |
} |
23 | 23 |
rsc = rrsc |
24 | 24 |
} |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CoefficientStabiliteMacro.groovy (revision 1162) | ||
---|---|---|
51 | 51 |
// END OF PARAMETERS |
52 | 52 |
|
53 | 53 |
MainCorpus corpus = corpusViewSelection |
54 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
54 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
55 | 55 |
|
56 | 56 |
// check Schema parameters |
57 | 57 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/PremierMaillonMacro.groovy (revision 1162) | ||
---|---|---|
31 | 31 |
if (!ParametersDialog.open(this)) return; |
32 | 32 |
|
33 | 33 |
MainCorpus corpus = corpusViewSelection |
34 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
34 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
35 | 35 |
Structure structure = analecCorpus.getStructure() |
36 | 36 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
37 | 37 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/CreationChainesMacro.groovy (revision 1162) | ||
---|---|---|
30 | 30 |
int nUpdated = 0 // count the number of updated CHAINE |
31 | 31 |
|
32 | 32 |
MainCorpus corpus = corpusViewSelection |
33 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName()); // analec corpus has the same name has the TXM corpus
|
|
33 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID()); // analec corpus has the same name has the TXM corpus
|
|
34 | 34 |
Structure structure = analecCorpus.getStructure() |
35 | 35 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
36 | 36 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/ResetAnnotationsMacro.groovy (revision 1162) | ||
---|---|---|
20 | 20 |
if (!ParametersDialog.open(this)) return; |
21 | 21 |
|
22 | 22 |
MainCorpus corpus = corpusViewSelection |
23 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
23 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
24 | 24 |
def structure = analecCorpus.getStructure() |
25 | 25 |
|
26 | 26 |
Class[] classes = [Unite.class, Relation.class, Schema.class] |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Fropos2CattexMacro.groovy (revision 1162) | ||
---|---|---|
172 | 172 |
println "Error: CQP corpus does not contains the word property with name=$pos_property_name" |
173 | 173 |
return |
174 | 174 |
} |
175 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
176 |
vue = AnalecCorpora.getVue(corpus.getName())
|
|
175 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
176 |
vue = AnalecCorpora.getVue(corpus.getID())
|
|
177 | 177 |
structure = analecCorpus.getStructure() |
178 | 178 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
179 | 179 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/AccessibiliteMacro.groovy (revision 1162) | ||
---|---|---|
45 | 45 |
corpus = corpusViewSelection |
46 | 46 |
CQI = CQPSearchEngine.getCqiClient() |
47 | 47 |
|
48 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
49 |
vue = AnalecCorpora.getVue(corpus.getName())
|
|
48 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
49 |
vue = AnalecCorpora.getVue(corpus.getID())
|
|
50 | 50 |
structure = analecCorpus.getStructure() |
51 | 51 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
52 | 52 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/RetoucheComplementDuNomMacro.groovy (revision 1162) | ||
---|---|---|
41 | 41 |
CQI = CQPSearchEngine.getCqiClient() |
42 | 42 |
word = corpus.getWordProperty() |
43 | 43 |
|
44 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
45 |
vue = AnalecCorpora.getVue(corpus.getName())
|
|
44 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
45 |
vue = AnalecCorpora.getVue(corpus.getID())
|
|
46 | 46 |
structure = analecCorpus.getStructure() |
47 | 47 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
48 | 48 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/CheckAnnotationStructureValuesMacro.groovy (revision 1162) | ||
---|---|---|
28 | 28 |
// END OF PARAMETERS |
29 | 29 |
|
30 | 30 |
MainCorpus corpus = corpusViewSelection |
31 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
31 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
32 | 32 |
def structure = analecCorpus.getStructure() |
33 | 33 |
|
34 | 34 |
def unit_types = structure.getTypes(Unite.class); |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/LongueurDesMentionsMacro.groovy (revision 1162) | ||
---|---|---|
67 | 67 |
println "Error: CQP corpus does not contains the word property with name=$pos_property_name" |
68 | 68 |
return |
69 | 69 |
} |
70 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
71 |
vue = AnalecCorpora.getVue(corpus.getName())
|
|
70 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
71 |
vue = AnalecCorpora.getVue(corpus.getID())
|
|
72 | 72 |
structure = analecCorpus.getStructure() |
73 | 73 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
74 | 74 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Fropos2CategorieMacro.groovy (revision 1162) | ||
---|---|---|
84 | 84 |
println "Error: CQP corpus does not contains the word property with name=$pos_property_name" |
85 | 85 |
return |
86 | 86 |
} |
87 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
88 |
vue = AnalecCorpora.getVue(corpus.getName())
|
|
87 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
88 |
vue = AnalecCorpora.getVue(corpus.getID())
|
|
89 | 89 |
structure = analecCorpus.getStructure() |
90 | 90 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
91 | 91 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Frpos2CategorieDemocratMacro.groovy (revision 1162) | ||
---|---|---|
179 | 179 |
println "Error: CQP corpus does not contains the word property with name=$pos_property_name" |
180 | 180 |
return |
181 | 181 |
} |
182 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
183 |
vue = AnalecCorpora.getVue(corpus.getName())
|
|
182 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
183 |
vue = AnalecCorpora.getVue(corpus.getID())
|
|
184 | 184 |
structure = analecCorpus.getStructure() |
185 | 185 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
186 | 186 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/PremierMaillonMacro.groovy (revision 1162) | ||
---|---|---|
31 | 31 |
if (!ParametersDialog.open(this)) return; |
32 | 32 |
|
33 | 33 |
MainCorpus corpus = corpusViewSelection |
34 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
34 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
35 | 35 |
Structure structure = analecCorpus.getStructure() |
36 | 36 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
37 | 37 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Si2SingletonMacro.groovy (revision 1162) | ||
---|---|---|
35 | 35 |
corpus = corpusViewSelection |
36 | 36 |
CQI = CQPSearchEngine.getCqiClient() |
37 | 37 |
word = corpus.getWordProperty() |
38 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
39 |
vue = AnalecCorpora.getVue(corpus.getName())
|
|
38 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
39 |
vue = AnalecCorpora.getVue(corpus.getID())
|
|
40 | 40 |
structure = analecCorpus.getStructure() |
41 | 41 |
if (!structure.getUnites().contains(unitType)) { // check if the structure contains the unitType units |
42 | 42 |
println "Error: corpus structure does not contains unit with name=$unitType" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/ConcordanceToUnitMacro.groovy (revision 1162) | ||
---|---|---|
47 | 47 |
|
48 | 48 |
// check the analec corpus is ready |
49 | 49 |
MainCorpus corpus = concordance.getCorpus().getMainCorpus(); |
50 |
String name = corpus.getName()
|
|
50 |
String name = corpus.getID()
|
|
51 | 51 |
if (!AnalecCorpora.isAnnotationStructureReady(name)) { |
52 | 52 |
println "Annotation structure is not ready." |
53 | 53 |
return |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/AjoutDefinitudeMacro.groovy (revision 1162) | ||
---|---|---|
38 | 38 |
MainCorpus corpus = corpusViewSelection |
39 | 39 |
AbstractCqiClient CQI = CQPSearchEngine.getCqiClient(); |
40 | 40 |
def word = corpus.getWordProperty() |
41 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
41 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
42 | 42 |
Structure structure = analecCorpus.getStructure() |
43 | 43 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
44 | 44 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Frpos2CattexMacro.groovy (revision 1162) | ||
---|---|---|
185 | 185 |
println "Error: CQP corpus does not contains the word property with name=$pos_property_name" |
186 | 186 |
return |
187 | 187 |
} |
188 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
189 |
vue = AnalecCorpora.getVue(corpus.getName())
|
|
188 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
189 |
vue = AnalecCorpora.getVue(corpus.getID())
|
|
190 | 190 |
structure = analecCorpus.getStructure() |
191 | 191 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
192 | 192 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/CreationRelationsMacro.groovy (revision 1162) | ||
---|---|---|
33 | 33 |
int nCreated = 0 // count the number of created RELATION |
34 | 34 |
|
35 | 35 |
MainCorpus corpus = corpusViewSelection |
36 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName()); // analec corpus has the same name has the TXM corpus
|
|
36 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID()); // analec corpus has the same name has the TXM corpus
|
|
37 | 37 |
Structure structure = analecCorpus.getStructure() |
38 | 38 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
39 | 39 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/PROPERanaphoriquesMacro.groovy (revision 1162) | ||
---|---|---|
48 | 48 |
println "Error: CQP corpus does not contains the word property with name=$pos_property_name" |
49 | 49 |
return |
50 | 50 |
} |
51 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
52 |
vue = AnalecCorpora.getVue(corpus.getName())
|
|
51 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
52 |
vue = AnalecCorpora.getVue(corpus.getID())
|
|
53 | 53 |
structure = analecCorpus.getStructure() |
54 | 54 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
55 | 55 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Frpos2CategorieMacro.groovy (revision 1162) | ||
---|---|---|
179 | 179 |
println "Error: CQP corpus does not contains the word property with name=$pos_property_name" |
180 | 180 |
return |
181 | 181 |
} |
182 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
|
|
183 |
vue = AnalecCorpora.getVue(corpus.getName())
|
|
182 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
183 |
vue = AnalecCorpora.getVue(corpus.getID())
|
|
184 | 184 |
structure = analecCorpus.getStructure() |
185 | 185 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
186 | 186 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/AnalecUtils.groovy (revision 1162) | ||
---|---|---|
122 | 122 |
|
123 | 123 |
def matches = null |
124 | 124 |
if (limit_cql != null && !limit_cql.getQueryString().equals("\"\"")) { |
125 |
Subcorpus limitssubcorpus = corpus.createSubcorpus(limit_cql, corpus.getName().toUpperCase())
|
|
125 |
Subcorpus limitssubcorpus = corpus.createSubcorpus(limit_cql, corpus.getID().toUpperCase())
|
|
126 | 126 |
matches = limitssubcorpus.getMatches(); |
127 | 127 |
limitssubcorpus.delete(); |
128 | 128 |
} else { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/AjoutDefinitudeMacro.groovy (revision 1162) | ||
---|---|---|
38 | 38 |
MainCorpus corpus = corpusViewSelection |
39 | 39 |
AbstractCqiClient CQI = CQPSearchEngine.getCqiClient(); |
40 | 40 |
def word = corpus.getWordProperty() |
41 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
|
|
41 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
42 | 42 |
Structure structure = analecCorpus.getStructure() |
43 | 43 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
44 | 44 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/analec/commands/SaveVue.java (revision 1162) | ||
---|---|---|
36 | 36 |
corpus = AnalecCorpora.getCorpus(mainCorpus); |
37 | 37 |
|
38 | 38 |
File binaryCorpusDirectory = mainCorpus.getProjectDirectory(); |
39 |
File fichierVue = new File(binaryCorpusDirectory, "/analec/"+mainCorpus.getName()+".ecv"); //$NON-NLS-1$ //$NON-NLS-2$
|
|
39 |
File fichierVue = new File(binaryCorpusDirectory, "/analec/"+mainCorpus.getID()+".ecv"); //$NON-NLS-1$ //$NON-NLS-2$
|
|
40 | 40 |
System.out.println(Messages.SaveVue_3+corpus+Messages.SaveVue_4+fichierVue); |
41 | 41 |
|
42 | 42 |
if (!FichiersJava.enregistrerCorpus(corpus, fichierVue)) { |
tmp/org.txm.analec.rcp/src/org/txm/analec/commands/ExportTEICorpus.java (revision 1162) | ||
---|---|---|
81 | 81 |
} |
82 | 82 |
|
83 | 83 |
public static boolean export(boolean standoffAnnotations, File outputDirectory, boolean createArchive, IProgressMonitor monitor, MainCorpus mainCorpus, Corpus analecCorpus, Vue vue) throws Exception { |
84 |
String name = mainCorpus.getName();
|
|
84 |
String name = mainCorpus.getID();
|
|
85 | 85 |
File finalOutputDirectory = new File(outputDirectory, name); |
86 | 86 |
int n = 2; |
87 | 87 |
while (finalOutputDirectory.exists()) { |
tmp/org.txm.analec.rcp/src/org/txm/analec/commands/SaveStructure.java (revision 1162) | ||
---|---|---|
39 | 39 |
Corpus corpus = AnalecCorpora.getCorpus(mainCorpus); |
40 | 40 |
|
41 | 41 |
File binaryCorpusDirectory = mainCorpus.getProjectDirectory(); |
42 |
File fichierStructure = new File(binaryCorpusDirectory, "/analec/"+mainCorpus.getName()+".ecs"); //$NON-NLS-1$ //$NON-NLS-2$
|
|
42 |
File fichierStructure = new File(binaryCorpusDirectory, "/analec/"+mainCorpus.getID()+".ecs"); //$NON-NLS-1$ //$NON-NLS-2$
|
|
43 | 43 |
System.out.println(Messages.SaveStructure_3+corpus+Messages.SaveStructure_4+fichierStructure); |
44 | 44 |
|
45 | 45 |
if (!FichiersJava.enregistrerStructure(corpus, fichierStructure)) { |
tmp/org.txm.analec.rcp/src/org/txm/analec/commands/SaveCorpus.java (revision 1162) | ||
---|---|---|
45 | 45 |
|
46 | 46 |
public static boolean save(final MainCorpus mainCorpus, ExecutionEvent event) { |
47 | 47 |
File binaryCorpusDirectory = mainCorpus.getProjectDirectory(); |
48 |
File fichierCorpus = new File(binaryCorpusDirectory, "/analec/"+mainCorpus.getName()+".ec"); //$NON-NLS-1$ //$NON-NLS-2$
|
|
48 |
File fichierCorpus = new File(binaryCorpusDirectory, "/analec/"+mainCorpus.getID()+".ec"); //$NON-NLS-1$ //$NON-NLS-2$
|
|
49 | 49 |
Corpus corpus = AnalecCorpora.getCorpus(mainCorpus); |
50 | 50 |
System.out.println(Messages.SaveCorpus_3+corpus+Messages.SaveCorpus_1+fichierCorpus); |
51 | 51 |
if (!AnalecCorpora.saveCorpus(mainCorpus)) { |
tmp/org.txm.analec.rcp/src/org/txm/analec/commands/ExportGlozzCorpus.java (revision 1162) | ||
---|---|---|
73 | 73 |
|
74 | 74 |
public static void export(File exportDirectory, MainCorpus mainCorpus, String unit_type) throws NumberFormatException, IOException, CqiServerError, CqiClientException { |
75 | 75 |
ExportToGlozzMacro exporter = new ExportToGlozzMacro(); |
76 |
File exportFile = new File(exportDirectory, mainCorpus.getName());
|
|
76 |
File exportFile = new File(exportDirectory, mainCorpus.getID());
|
|
77 | 77 |
exporter.doExport(mainCorpus, unit_type, exportFile.getAbsolutePath()); |
78 | 78 |
return; |
79 | 79 |
} |
tmp/org.txm.properties.core/src/org/txm/properties/core/functions/Properties.java (revision 1162) | ||
---|---|---|
289 | 289 |
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>" + //$NON-NLS-1$ |
290 | 290 |
"</head>" + //$NON-NLS-1$ |
291 | 291 |
"<body>\n"); //$NON-NLS-1$ |
292 |
buff.append("<h2 style'font-family:\"Arial\";'>"+PropertiesCoreMessages.Properties_3 + this.corpus.getName() + "</h2>\n"); //$NON-NLS-2$ //$NON-NLS-1$
|
|
292 |
buff.append("<h2 style'font-family:\"Arial\";'>"+PropertiesCoreMessages.Properties_3 + this.corpus.getName() +"(id="+this.corpus.getID()+")</h2>\n"); //$NON-NLS-2$ //$NON-NLS-1$
|
|
293 | 293 |
|
294 | 294 |
if (corpus.getDescription() != null && corpus.getDescription().length() > 0) { |
295 | 295 |
buff.append("<p>"+corpus.getDescription()+"</p>"); //$NON-NLS-1$ //$NON-NLS-2$ |
... | ... | |
621 | 621 |
String txmhome = Toolbox.getTxmHomePath(); |
622 | 622 |
String filename = corpus.getMainCorpus() + "-" + corpus.getName(); //$NON-NLS-1$ |
623 | 623 |
if (corpus instanceof MainCorpus) { |
624 |
filename = corpus.getName(); //$NON-NLS-1$
|
|
624 |
filename = corpus.getID(); //$NON-NLS-1$
|
|
625 | 625 |
} |
626 | 626 |
|
627 | 627 |
filename = AsciiUtils.buildId(filename); |
Formats disponibles : Unified diff