Révision 788
| tmp/org.txm.searchengine.core/src/org/txm/searchengine/core/SearchEnginesManager.java (revision 788) | ||
|---|---|---|
| 16 | 16 |
* |
| 17 | 17 |
* @return |
| 18 | 18 |
*/ |
| 19 |
public static SearchEngine getCQPEngine() {
|
|
| 20 |
return (SearchEngine) Toolbox.getEngineManager(EngineType.SEARCH).getEngine("CQP");
|
|
| 19 |
public static SearchEngine getCQPSearchEngine() {
|
|
| 20 |
return (SearchEngine) Toolbox.getEngineManager(EngineType.SEARCH).getEngine("CQP"); //$NON-NLS-1$
|
|
| 21 | 21 |
} |
| 22 | 22 |
|
| 23 | 23 |
/** |
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java (revision 788) | ||
|---|---|---|
| 266 | 266 |
@Override |
| 267 | 267 |
public void run() {
|
| 268 | 268 |
try {
|
| 269 |
SearchEnginesManager.getCQPEngine().stop(); |
|
| 270 |
SearchEnginesManager.getCQPEngine().start(monitor); |
|
| 269 |
SearchEnginesManager.getCQPSearchEngine().stop();
|
|
| 270 |
SearchEnginesManager.getCQPSearchEngine().start(monitor);
|
|
| 271 | 271 |
CorporaView.refresh(); |
| 272 | 272 |
} catch (Exception e) {
|
| 273 | 273 |
// TODO Auto-generated catch block |
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/LoadBinaryCorpus.java (revision 788) | ||
|---|---|---|
| 232 | 232 |
// DeleteDir.deleteDirectory(backup); |
| 233 | 233 |
// } catch (Exception e) {
|
| 234 | 234 |
// System.out.println(Messages.LoadBinaryCorpus_3+e+Messages.LoadBinaryCorpus_7); |
| 235 |
// //CQPEngine.getCqiClient().dropCorpus(name); |
|
| 235 |
// //CQPSearchEngine.getCqiClient().dropCorpus(name);
|
|
| 236 | 236 |
// //Log.info(NLS.bind(Messages.AddBase_23, basename.toUpperCase())); |
| 237 | 237 |
// Log.info(Log.toString(e)); |
| 238 | 238 |
// //restoreCorpus(backup, corpusdir); |
| tmp/org.txm.tigersearch.rcp/src/org/txm/function/tigersearch/TSIndex.java (revision 788) | ||
|---|---|---|
| 98 | 98 |
// get the cqp result of the query |
| 99 | 99 |
// long time = System.currentTimeMillis(); |
| 100 | 100 |
// QueryResult result = corp.query(getQuery(), "index", true); //$NON-NLS-1$ |
| 101 |
boolean isTargetUsed = false;//CQPEngine.getCqiClient().subCorpusHasField(result.getQualifiedCqpId(), ICqiClient.CQI_CONST_FIELD_TARGET); |
|
| 101 |
boolean isTargetUsed = false;//CQPSearchEngine.getCqiClient().subCorpusHasField(result.getQualifiedCqpId(), ICqiClient.CQI_CONST_FIELD_TARGET);
|
|
| 102 | 102 |
|
| 103 | 103 |
// System.out.println("nLines : "+nLines);
|
| 104 | 104 |
List<Match> matches; |
| tmp/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ContextSubcorpus.java (revision 788) | ||
|---|---|---|
| 11 | 11 |
import org.txm.core.results.TXMParameters; |
| 12 | 12 |
import org.txm.core.results.TXMResult; |
| 13 | 13 |
import org.eclipse.core.runtime.IProgressMonitor; |
| 14 |
import org.txm.searchengine.cqp.CQPEngine; |
|
| 14 |
import org.txm.searchengine.cqp.CQPSearchEngine;
|
|
| 15 | 15 |
import org.txm.searchengine.cqp.MemCqiClient; |
| 16 | 16 |
import org.txm.searchengine.cqp.clientExceptions.CqiClientException; |
| 17 | 17 |
import org.txm.searchengine.cqp.clientExceptions.InvalidCqpIdException; |
| ... | ... | |
| 72 | 72 |
|
| 73 | 73 |
@Override |
| 74 | 74 |
public boolean compute(IProgressMonitor monitor) throws IOException, CqiClientException, CqiServerError, InvalidCqpIdException {
|
| 75 |
if (!(CQPEngine.getCqiClient() instanceof MemCqiClient)); |
|
| 75 |
if (!(CQPSearchEngine.getCqiClient() instanceof MemCqiClient));
|
|
| 76 | 76 |
|
| 77 |
MemCqiClient CQI = (MemCqiClient) CQPEngine.getCqiClient(); |
|
| 77 |
MemCqiClient CQI = (MemCqiClient) CQPSearchEngine.getCqiClient();
|
|
| 78 | 78 |
|
| 79 | 79 |
BufferedReader keywordFileReader = new BufferedReader(new InputStreamReader( |
| 80 | 80 |
new FileInputStream(keywordsFile), "UTF-8")); //$NON-NLS-1$ |
| tmp/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ValuesOfQuery.java (revision 788) | ||
|---|---|---|
| 13 | 13 |
import org.txm.core.results.TXMParameters; |
| 14 | 14 |
import org.txm.core.results.TXMResult; |
| 15 | 15 |
import org.eclipse.core.runtime.IProgressMonitor; |
| 16 |
import org.txm.searchengine.cqp.CQPEngine; |
|
| 16 |
import org.txm.searchengine.cqp.CQPSearchEngine;
|
|
| 17 | 17 |
import org.txm.searchengine.cqp.MemCqiClient; |
| 18 | 18 |
import org.txm.searchengine.cqp.clientExceptions.CqiClientException; |
| 19 | 19 |
import org.txm.searchengine.cqp.corpus.Corpus; |
| ... | ... | |
| 47 | 47 |
|
| 48 | 48 |
public boolean compute(File outputFile) throws CqiClientException, IOException, CqiServerError {
|
| 49 | 49 |
|
| 50 |
if (!(CQPEngine.getCqiClient() instanceof MemCqiClient)) return false; |
|
| 50 |
if (!(CQPSearchEngine.getCqiClient() instanceof MemCqiClient)) return false;
|
|
| 51 | 51 |
|
| 52 | 52 |
monitor.beginTask("Start querying...", 100);
|
| 53 | 53 |
|
| ... | ... | |
| 58 | 58 |
//System.out.println("query done"+t.stop());t.start();
|
| 59 | 59 |
|
| 60 | 60 |
//System.out.println("group query "+query+" and save in "+file.getAbsolutePath());t.start();
|
| 61 |
MemCqiClient cli = (MemCqiClient)CQPEngine.getCqiClient(); |
|
| 61 |
MemCqiClient cli = (MemCqiClient)CQPSearchEngine.getCqiClient();
|
|
| 62 | 62 |
cli.query("group "+result.getQualifiedCqpId()+" match "+prop.getName()+" > \""+file+"\";");
|
| 63 | 63 |
//System.out.println("query done"+t.stop());t.start();
|
| 64 | 64 |
|
| ... | ... | |
| 125 | 125 |
|
| 126 | 126 |
String[] values = null; |
| 127 | 127 |
if (prop instanceof StructuralUnitProperty) {
|
| 128 |
int[] structs = CQPEngine.getCqiClient().cpos2Struc(prop.getQualifiedName(), positions); |
|
| 128 |
int[] structs = CQPSearchEngine.getCqiClient().cpos2Struc(prop.getQualifiedName(), positions);
|
|
| 129 | 129 |
positions = null; |
| 130 | 130 |
structs = uniquify(structs); |
| 131 |
values = CQPEngine.getCqiClient().struc2Str(prop.getQualifiedName(), structs); |
|
| 131 |
values = CQPSearchEngine.getCqiClient().struc2Str(prop.getQualifiedName(), structs);
|
|
| 132 | 132 |
structs = null; |
| 133 | 133 |
} else {
|
| 134 |
int[] indexes = CQPEngine.getCqiClient().cpos2Id(prop.getQualifiedName(), positions); |
|
| 134 |
int[] indexes = CQPSearchEngine.getCqiClient().cpos2Id(prop.getQualifiedName(), positions);
|
|
| 135 | 135 |
positions = null; |
| 136 | 136 |
indexes = uniquify(indexes); |
| 137 |
values = CQPEngine.getCqiClient().id2Str(prop.getQualifiedName(), indexes); |
|
| 137 |
values = CQPSearchEngine.getCqiClient().id2Str(prop.getQualifiedName(), indexes);
|
|
| 138 | 138 |
indexes = null; |
| 139 | 139 |
} |
| 140 | 140 |
|
| tmp/org.txm.index.rcp/src/org/txm/index/rcp/handlers/IndexToConcordance.java (revision 788) | ||
|---|---|---|
| 118 | 118 |
//// String queryname = "Q"+Corpus.getNextQueryCounter(); |
| 119 | 119 |
//// String interQueryString = queryname+"=intersect "+indexResult.getQualifiedCqpId()+" "+indexOccResult.getQualifiedCqpId()+";"; |
| 120 | 120 |
//// System.out.println("Compute inter query: "+interQueryString);
|
| 121 |
//// ((MemCqiClient)CQPEngine.getCqiClient()).query(interQueryString); |
|
| 121 |
//// ((MemCqiClient)CQPSearchEngine.getCqiClient()).query(interQueryString);
|
|
| 122 | 122 |
//// |
| 123 | 123 |
//// QueryResult inter = new QueryResult(queryname, queryname, corpus, new Query(interQueryString)); |
| 124 | 124 |
//// System.out.println("indexResult size: "+indexResult.getNMatch());
|
| ... | ... | |
| 130 | 130 |
//// } catch (Exception e) {
|
| 131 | 131 |
//// e.printStackTrace(); |
| 132 | 132 |
//// try {
|
| 133 |
//// System.out.println("CQP error: "+CQPEngine.getCqiClient().getLastError());
|
|
| 133 |
//// System.out.println("CQP error: "+CQPSearchEngine.getCqiClient().getLastError());
|
|
| 134 | 134 |
//// } catch (Exception e1) {
|
| 135 | 135 |
//// e1.printStackTrace(); |
| 136 | 136 |
//// } |
| tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/clientExceptions/CqiClientException.java (revision 788) | ||
|---|---|---|
| 61 | 61 |
super(cause); |
| 62 | 62 |
if(cause instanceof java.net.SocketException){
|
| 63 | 63 |
if (counter++ < 5) {
|
| 64 |
//if(!CQPEngine.getCqiClient().reconnect()) CQPEngine.restart();
|
|
| 64 |
//if(!CQPSearchEngine.getCqiClient().reconnect()) CQPSearchEngine.restart();
|
|
| 65 | 65 |
} |
| 66 | 66 |
} |
| 67 | 67 |
} |
| ... | ... | |
| 78 | 78 |
super(message, cause); |
| 79 | 79 |
if (cause instanceof java.net.SocketException) |
| 80 | 80 |
{
|
| 81 |
//if(!CQPEngine.getCqiClient().reconnect()) CQPEngine.restart();
|
|
| 81 |
//if(!CQPSearchEngine.getCqiClient().reconnect()) CQPSearchEngine.restart();
|
|
| 82 | 82 |
} |
| 83 | 83 |
} |
| 84 | 84 |
|
| tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/importer/XTZImporterMacro.groovy (revision 788) | ||
|---|---|---|
| 237 | 237 |
println "Error: could not create a copy of metadata file "+allmetadatasfile.getAbsoluteFile(); |
| 238 | 238 |
return; |
| 239 | 239 |
} |
| 240 |
metadatas = new Metadatas(copy, Toolbox.getParam(Toolbox.METADATA_ENCODING), Toolbox.getParam(Toolbox.METADATA_COLSEPARATOR), Toolbox.getParam(Toolbox.METADATA_TXTSEPARATOR), 1)
|
|
| 240 |
metadatas = new Metadatas(copy, Toolbox.getMetadataEncoding(), Toolbox.getMetadataColumnSeparator(), Toolbox.getMetadataTextSeparator(), 1)
|
|
| 241 | 241 |
} else {
|
| 242 | 242 |
println "no metadata file: "+allmetadatasfile |
| 243 | 243 |
} |
| tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/export/ExportTextsMetadataMacro.groovy (revision 788) | ||
|---|---|---|
| 24 | 24 |
|
| 25 | 25 |
// BEGINNING |
| 26 | 26 |
def Corpus corpus = corpusViewSelection |
| 27 |
def CQI = CQPEngine.getCqiClient() |
|
| 27 |
def CQI = CQPSearchEngine.getCqiClient()
|
|
| 28 | 28 |
def writer = tsvFile.newWriter("UTF-8")
|
| 29 | 29 |
def internalTextProperties = ["project", "base", "path"] |
| 30 | 30 |
|
| tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/export/ExportTextsContentMacro.groovy (revision 788) | ||
|---|---|---|
| 32 | 32 |
if (!exportDir.exists()) exportDir.mkdirs() |
| 33 | 33 |
|
| 34 | 34 |
Corpus corpus = corpusViewSelection |
| 35 |
CQI = CQPEngine.getCqiClient(); |
|
| 35 |
CQI = CQPSearchEngine.getCqiClient();
|
|
| 36 | 36 |
|
| 37 | 37 |
def lineSeparatorStructure = corpus.getStructuralUnit(lineSeparatorStructureName) |
| 38 | 38 |
|
| tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/teitxm/Xml2Ana.groovy (revision 788) | ||
|---|---|---|
| 145 | 145 |
def anabalises = []; |
| 146 | 146 |
protected void processStartElement() |
| 147 | 147 |
{
|
| 148 |
println "checkTags=$checkTags"; |
|
| 149 |
println "parser=$parser"; |
|
| 148 |
// println "checkTags=$checkTags";
|
|
| 149 |
// println "parser=$parser";
|
|
| 150 | 150 |
firstElement++; |
| 151 |
if (checkTags.containsKey(parser.getLocalName())) {
|
|
| 152 |
checkTags.put(parser.getLocalName(), true);
|
|
| 151 |
if (getCheckTags().containsKey(parser.getLocalName())) {
|
|
| 152 |
getCheckTags().put(parser.getLocalName(), true);
|
|
| 153 | 153 |
} |
| 154 | 154 |
|
| 155 | 155 |
switch (parser.getLocalName()) {
|
| ... | ... | |
| 387 | 387 |
public String checkResp() |
| 388 | 388 |
{
|
| 389 | 389 |
String rez ="found tags : \n"; |
| 390 |
for (String key : checkTags) |
|
| 390 |
for (String key : checkTags.keySet())
|
|
| 391 | 391 |
rez += "\t"+key+"\n"; |
| 392 | 392 |
return rez; |
| 393 | 393 |
} |
| tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/XMLStatistics.groovy (revision 788) | ||
|---|---|---|
| 101 | 101 |
for (File infile : srcdir.listFiles()) {
|
| 102 | 102 |
if (!infile.getName().endsWith(".xml")) continue
|
| 103 | 103 |
|
| 104 |
XMLStatistics diag = new XMLStatistics(infile.toURI().toURL())
|
|
| 104 |
XMLStatistics diag = new XMLStatistics(infile.toURI().toURL()) |
|
| 105 | 105 |
diag.setUsePaths(usePaths) |
| 106 | 106 |
diag.setUseAttributes(useAttributes) |
| 107 | 107 |
diag.setUseAttributeValues(useAttributeValues) |
| ... | ... | |
| 180 | 180 |
} |
| 181 | 181 |
} |
| 182 | 182 |
} |
| 183 |
|
|
| 183 | 184 |
public static void main(String[] args) {
|
| 184 | 185 |
File srcdir = new File("/home/mdecorde/xml/temoignagesnice/corpus Matrice - fichiers xmlisés/");
|
| 185 | 186 |
File outdir = new File("/home/mdecorde/xml/temoignagesnice/corpus Matrice - fichiers xmlisés/stats");
|
| tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/XMLFileStatistics.groovy (revision 788) | ||
|---|---|---|
| 1 |
package org.txm.scripts |
|
| 2 |
|
|
| 3 |
import javax.xml.stream.*; |
|
| 4 |
|
|
| 5 |
import org.txm.importer.StaxIdentityParser; |
|
| 6 |
|
|
| 7 |
|
|
| 8 |
path = "" |
|
| 9 |
paths = [:] |
|
| 10 |
|
|
| 11 |
usePaths=true |
|
| 12 |
useAttributes=true |
|
| 13 |
useAttributeValues=false |
|
| 14 |
|
|
| 15 |
inputFile = new File("/home/mdecorde/xml/xmlw/test.xml")
|
|
| 16 |
|
|
| 17 |
try {
|
|
| 18 |
usePaths=args["usePaths"] |
|
| 19 |
useAttributes=args["useAttributes"] |
|
| 20 |
useAttributeValues=args["useAttributeValues"] |
|
| 21 |
inputFile=args["inputFile"] |
|
| 22 |
} catch(Exception e) { } // set the "args" map binding to set usePaths, useAttributes,useAttributeValues, inputFile
|
|
| 23 |
|
|
| 24 |
inputFile = new File("/home/mdecorde/xml/xmlw/test.xml")
|
|
| 25 |
|
|
| 26 |
|
|
| 27 |
inputurl = inputFile.toURI().toURL() |
|
| 28 |
inputData = inputurl.openStream() |
|
| 29 |
factory = XMLInputFactory.newInstance() |
|
| 30 |
parser = factory.createXMLStreamReader(inputData) |
|
| 31 |
|
|
| 32 |
try {
|
|
| 33 |
for (int event = parser.next(); event != XMLStreamConstants.END_DOCUMENT; event = parser.next()) {
|
|
| 34 |
switch (event) {
|
|
| 35 |
case XMLStreamConstants.NAMESPACE: |
|
| 36 |
break |
|
| 37 |
case XMLStreamConstants.START_ELEMENT: |
|
| 38 |
localname = parser.getLocalName() |
|
| 39 |
processStartElement() |
|
| 40 |
break |
|
| 41 |
case XMLStreamConstants.CHARACTERS: |
|
| 42 |
break |
|
| 43 |
case XMLStreamConstants.END_ELEMENT: |
|
| 44 |
localname = parser.getLocalName() |
|
| 45 |
processEndElement() |
|
| 46 |
break |
|
| 47 |
case XMLStreamConstants.PROCESSING_INSTRUCTION: |
|
| 48 |
break |
|
| 49 |
case XMLStreamConstants.DTD: |
|
| 50 |
break |
|
| 51 |
case XMLStreamConstants.CDATA: |
|
| 52 |
break |
|
| 53 |
case XMLStreamConstants.COMMENT: |
|
| 54 |
break |
|
| 55 |
case XMLStreamConstants.END_DOCUMENT: |
|
| 56 |
break |
|
| 57 |
case XMLStreamConstants.ENTITY_REFERENCE: |
|
| 58 |
break |
|
| 59 |
} |
|
| 60 |
} |
|
| 61 |
} catch(Exception e) {
|
|
| 62 |
println("Unexpected error while parsing file "+inputurl+" : "+e);
|
|
| 63 |
e.printStackTrace(); |
|
| 64 |
parser.close(); |
|
| 65 |
return false; |
|
| 66 |
} |
|
| 67 |
|
|
| 68 |
return paths |
|
| 69 |
|
|
| 70 |
public void processEndElement() {
|
|
| 71 |
if (usePaths) {
|
|
| 72 |
path = path.substring(0, path.lastIndexOf("/"))
|
|
| 73 |
} |
|
| 74 |
} |
|
| 75 |
|
|
| 76 |
public void processStartElement() {
|
|
| 77 |
String localname = parser.getLocalName(); |
|
| 78 |
if (usePaths) {
|
|
| 79 |
path = path + "/$localname" |
|
| 80 |
} else {
|
|
| 81 |
path = localname; |
|
| 82 |
} |
|
| 83 |
|
|
| 84 |
if (useAttributes) {
|
|
| 85 |
if (useAttributeValues) {
|
|
| 86 |
for(int i = 0 ; i < parser.getAttributeCount() ; i++) |
|
| 87 |
if (!parser.getAttributeLocalName(i).matches(UNICATTRS)) |
|
| 88 |
path += "@"+parser.getAttributeLocalName(i)+"="+parser.getAttributeValue(i) |
|
| 89 |
} else {
|
|
| 90 |
for(int i = 0 ; i < parser.getAttributeCount() ; i++) |
|
| 91 |
path += "@"+parser.getAttributeLocalName(i) |
|
| 92 |
} |
|
| 93 |
} |
|
| 94 |
|
|
| 95 |
println "++" |
|
| 96 |
plusOne() |
|
| 97 |
//super.processStartElement() // don't write :) |
|
| 98 |
} |
|
| 99 |
|
|
| 100 |
private void plusOne() {
|
|
| 101 |
if (!paths.containsKey(path)) {
|
|
| 102 |
paths[path] = 1 |
|
| 103 |
} else {
|
|
| 104 |
paths[path] = paths[path]+1 |
|
| 105 |
} |
|
| 106 |
} |
|
| 107 |
|
|
| 108 |
|
|
| tmp/org.txm.groovy.core/src/groovy/org/txm/functions/mesures/Diversity.groovy (revision 788) | ||
|---|---|---|
| 52 | 52 |
Property p = corpus.getProperty(property); |
| 53 | 53 |
QueryResult result = corpus.query(new Query(query), "TMP", false); |
| 54 | 54 |
int[] starts = result.getStarts(); |
| 55 |
int[] ids = CQPEngine.getCqiClient().cpos2Id(p.getQualifiedName(), starts); |
|
| 55 |
int[] ids = CQPSearchEngine.getCqiClient().cpos2Id(p.getQualifiedName(), starts);
|
|
| 56 | 56 |
HashSet<Integer> set = new HashSet<Integer>(); |
| 57 | 57 |
for (int i : ids) set.add(i); // no double |
| 58 | 58 |
return set.size(); |
| tmp/org.txm.groovy.core/src/groovy/org/txm/importer/factiva/factivaLoader.groovy (revision 788) | ||
|---|---|---|
| 180 | 180 |
println "Error: could not create a copy of metadata file "+allmetadatasfile.getAbsoluteFile(); |
| 181 | 181 |
return; |
| 182 | 182 |
} |
| 183 |
metadatas = new Metadatas(copy, Toolbox.getParam(Toolbox.METADATA_ENCODING), Toolbox.getParam(Toolbox.METADATA_COLSEPARATOR), Toolbox.getParam(Toolbox.METADATA_TXTSEPARATOR), 1)
|
|
| 183 |
metadatas = new Metadatas(copy, Toolbox.getMetadataEncoding(), Toolbox.getMetadataColumnSeparator(), Toolbox.getMetadataTextSeparator(), 1)
|
|
| 184 | 184 |
} else |
| 185 | 185 |
println "no metadata file: "+allmetadatasfile |
| 186 | 186 |
|
| tmp/org.txm.groovy.core/src/groovy/org/txm/importer/doc/docLoader.groovy (revision 788) | ||
|---|---|---|
| 212 | 212 |
println "Error: could not create a copy of the metadata.csv file "+allmetadatasfile.getAbsoluteFile(); |
| 213 | 213 |
return; |
| 214 | 214 |
} |
| 215 |
metadatas = new Metadatas(copy, Toolbox.getParam(Toolbox.METADATA_ENCODING), Toolbox.getParam(Toolbox.METADATA_COLSEPARATOR), Toolbox.getParam(Toolbox.METADATA_TXTSEPARATOR), 1) |
|
| 215 |
metadatas = new Metadatas(copy, Toolbox.getMetadataEncoding(), |
|
| 216 |
Toolbox.getMetadataColumnSeparator(), |
|
| 217 |
Toolbox.getMetadataTextSeparator(), 1) |
|
| 216 | 218 |
} else {
|
| 217 | 219 |
println "no $allmetadatasfile metadata file found." |
| 218 | 220 |
} |
| tmp/org.txm.groovy.core/src/groovy/org/txm/importer/transcriber/pager.groovy (revision 788) | ||
|---|---|---|
| 653 | 653 |
writer.close(); |
| 654 | 654 |
output.close(); |
| 655 | 655 |
|
| 656 |
File txmhome = new File(org.txm.Toolbox.getParam(org.txm.Toolbox.USER_TXM_HOME));
|
|
| 656 |
File txmhome = new File(org.txm.Toolbox.getTXMHOMEPATH());
|
|
| 657 | 657 |
File xlsDir = new File(txmhome, "xsl"); |
| 658 | 658 |
File xslfile = new File(xlsDir,"breakByMilestone.xsl"); |
| 659 | 659 |
if (!xslfile.exists()) {
|
| tmp/org.txm.groovy.core/src/groovy/org/txm/importer/xtz/XTZImporter.groovy (revision 788) | ||
|---|---|---|
| 6 | 6 |
|
| 7 | 7 |
import net.sf.saxon.style.XSLParam; |
| 8 | 8 |
|
| 9 |
import org.txm.core.preferences.TBXPreferences; |
|
| 9 | 10 |
import org.txm.importer.ApplyXsl2 |
| 10 | 11 |
import org.txm.importer.CleanFile |
| 11 | 12 |
import org.txm.importer.MileStoneProjection |
| ... | ... | |
| 109 | 110 |
return; |
| 110 | 111 |
} |
| 111 | 112 |
metadata = new Metadatas(copy, |
| 112 |
Toolbox.getPreference(Toolbox.METADATA_ENCODING),
|
|
| 113 |
Toolbox.getPreference(Toolbox.METADATA_COLSEPARATOR),
|
|
| 114 |
Toolbox.getPreference(Toolbox.METADATA_TXTSEPARATOR), 1)
|
|
| 113 |
Toolbox.getPreference(TBXPreferences.METADATA_ENCODING),
|
|
| 114 |
Toolbox.getPreference(TBXPreferences.METADATA_COLSEPARATOR),
|
|
| 115 |
Toolbox.getPreference(TBXPreferences.METADATA_TXTSEPARATOR), 1)
|
|
| 115 | 116 |
} |
| 116 | 117 |
|
| 117 | 118 |
String cleanDirectories = module.getParameters().getKeyValueParameters().get(ImportKeys.CLEAN); |
| tmp/org.txm.groovy.core/src/groovy/org/txm/importer/xmltxm/xmltxmLoader.groovy (revision 788) | ||
|---|---|---|
| 136 | 136 |
// println "Error: could not create a copy of metadata file "+allmetadatasfile.getAbsoluteFile(); |
| 137 | 137 |
// return; |
| 138 | 138 |
// } |
| 139 |
// metadatas = new Metadatas(copy, Toolbox.getParam(Toolbox.METADATA_ENCODING), Toolbox.getParam(Toolbox.METADATA_COLSEPARATOR), Toolbox.getParam(Toolbox.METADATA_TXTSEPARATOR), 1)
|
|
| 139 |
// metadatas = new Metadatas(copy, Toolbox.getMetadataEncoding(), Toolbox.getMetadataColumnSeparator(), Toolbox.getMetadataTextSeparator(), 1)
|
|
| 140 | 140 |
//} else {
|
| 141 | 141 |
// println "no metadata file: "+allmetadatasfile |
| 142 | 142 |
//} |
| tmp/org.txm.groovy.core/src/groovy/org/txm/importer/discours/importer.groovy (revision 788) | ||
|---|---|---|
| 38 | 38 |
|
| 39 | 39 |
import javax.xml.stream.*; |
| 40 | 40 |
|
| 41 |
import org.txm.core.preferences.TBXPreferences |
|
| 41 | 42 |
import java.io.BufferedWriter; |
| 42 | 43 |
import java.io.File; |
| 43 | 44 |
import java.io.FileInputStream; |
| ... | ... | |
| 95 | 96 |
println "Error: could not create a copy of metadata file "+csvfile.getAbsoluteFile(); |
| 96 | 97 |
return; |
| 97 | 98 |
} |
| 98 |
metadatas = new Metadatas(copy, Toolbox.getPreference(Toolbox.METADATA_ENCODING), Toolbox.getPreference(Toolbox.METADATA_COLSEPARATOR), Toolbox.getPreference(Toolbox.METADATA_TXTSEPARATOR), 1)
|
|
| 99 |
metadatas = new Metadatas(copy, Toolbox.getPreference(TBXPreferences.METADATA_ENCODING), Toolbox.getPreference(Toolbox.METADATA_COLSEPARATOR), Toolbox.getPreference(Toolbox.METADATA_TXTSEPARATOR), 1)
|
|
| 99 | 100 |
} else {
|
| 100 | 101 |
println "No metadata file: "+csvfile |
| 101 | 102 |
println "Aborting" |
| tmp/org.txm.groovy.core/src/groovy/org/txm/importer/xml/xmlLoader.groovy (revision 788) | ||
|---|---|---|
| 191 | 191 |
println "Error: could not create a copy of metadata file "+allmetadatasfile.getAbsoluteFile(); |
| 192 | 192 |
return; |
| 193 | 193 |
} |
| 194 |
metadatas = new Metadatas(copy, Toolbox.getParam(Toolbox.METADATA_ENCODING), Toolbox.getParam(Toolbox.METADATA_COLSEPARATOR), Toolbox.getParam(Toolbox.METADATA_TXTSEPARATOR), 1)
|
|
| 194 |
metadatas = new Metadatas(copy, Toolbox.getMetadataEncoding(), Toolbox.getMetadataColumnSeparator(), Toolbox.getMetadataTextSeparator(), 1)
|
|
| 195 | 195 |
} else {
|
| 196 | 196 |
println " No metadata file: "+allmetadatasfile |
| 197 | 197 |
} |
| tmp/org.txm.groovy.core/src/groovy/org/txm/macro/xml/ForceWordIDsMacro.groovy (revision 788) | ||
|---|---|---|
| 1 |
// STANDARD DECLARATIONS |
|
| 2 |
package org.txm.macro.xml |
|
| 3 |
|
|
| 4 |
import org.kohsuke.args4j.* |
|
| 5 |
import groovy.transform.Field |
|
| 6 |
import org.txm.rcp.swt.widget.parameters.* |
|
| 7 |
import org.txm.importer.StaxIdentityParser |
|
| 8 |
import javax.xml.stream.XMLStreamException |
|
| 9 |
|
|
| 10 |
@Field @Option(name="inputFile", usage="input XML file", widget="FileOpen", required=true, def="input.xml") |
|
| 11 |
def inputFile |
|
| 12 |
|
|
| 13 |
@Field @Option(name="outputFile", usage="output XML file", widget="FileSave", required=true, def="ouput.xml") |
|
| 14 |
def outputFile |
|
| 15 |
|
|
| 16 |
// Open the parameters input dialog box |
|
| 17 |
if (!ParametersDialog.open(this)) return; |
|
| 18 |
|
|
| 19 |
// END OF PARAMETERS |
|
| 20 |
|
|
| 21 |
if (!(inputFile.exists() && inputFile.canRead())) { println "Error: cannot found $inputFile"; return false;}
|
|
| 22 |
|
|
| 23 |
outputFile.getParentFile().mkdirs() |
|
| 24 |
|
|
| 25 |
// build text id |
|
| 26 |
textid = inputFile.getName(); |
|
| 27 |
if (textid.indexOf(".xml") > 0) {
|
|
| 28 |
textid = textid.substring(0, textid.indexOf(".xml"))
|
|
| 29 |
} |
|
| 30 |
|
|
| 31 |
def parser = new StaxIdentityParser(inputFile) {
|
|
| 32 |
|
|
| 33 |
int wordnumber = 1; |
|
| 34 |
|
|
| 35 |
protected void writeAttributes() throws XMLStreamException {
|
|
| 36 |
if (localname == "w") { // a word
|
|
| 37 |
boolean idwritten = false; |
|
| 38 |
for (int i = 0 ; i < parser.getAttributeCount() ; i++) {
|
|
| 39 |
if (parser.getAttributeLocalName(i) == "id") { // update & backup
|
|
| 40 |
writeAttribute(parser.getAttributePrefix(i), parser.getAttributeLocalName(i), "w_"+textid+"_"+(wordnumber++)); // force id |
|
| 41 |
writeAttribute(parser.getAttributePrefix(i), "foreign-id", parser.getAttributeValue(i)); // backup |
|
| 42 |
idwritten = true; |
|
| 43 |
} else {
|
|
| 44 |
writeAttribute(parser.getAttributePrefix(i), parser.getAttributeLocalName(i), parser.getAttributeValue(i)); |
|
| 45 |
} |
|
| 46 |
} |
|
| 47 |
|
|
| 48 |
if (!idwritten) { // create id
|
|
| 49 |
writeAttribute(null, "id", "w_"+textid+"_"+(wordnumber++)); |
|
| 50 |
} |
|
| 51 |
} else {
|
|
| 52 |
super.writeAttributes() |
|
| 53 |
} |
|
| 54 |
} |
|
| 55 |
} |
|
| 56 |
|
|
| 57 |
return parser.process(outputFile) |
|
| tmp/org.txm.groovy.core/src/groovy/org/txm/macro/export/ExportTextContentMacro.groovy (revision 788) | ||
|---|---|---|
| 32 | 32 |
if (!exportDir.exists()) exportDir.mkdirs() |
| 33 | 33 |
|
| 34 | 34 |
Corpus corpus = corpusViewSelection |
| 35 |
CQI = CQPEngine.getCqiClient(); |
|
| 35 |
CQI = CQPSearchEngine.getCqiClient();
|
|
| 36 | 36 |
|
| 37 | 37 |
def lineSeparatorStructure = corpus.getStructuralUnit(lineSeparatorStructureName) |
| 38 | 38 |
|
| tmp/org.txm.groovy.core/src/groovy/org/txm/macro/oriflamms/analyse/AbbreviationsAndLinesMacro.groovy (revision 788) | ||
|---|---|---|
| 90 | 90 |
int start = first_match.getStart() |
| 91 | 91 |
int end = last_match.getEnd() |
| 92 | 92 |
|
| 93 |
def CQI = CQPEngine.getCqiClient(); |
|
| 93 |
def CQI = CQPSearchEngine.getCqiClient();
|
|
| 94 | 94 |
int[] positions; |
| 95 | 95 |
def r = corpus.query(new Query("[pbstart=\"0\"]"), "ABBRORI1", false)
|
| 96 | 96 |
def pb_pos = r.starts |
| ... | ... | |
| 176 | 176 |
|
| 177 | 177 |
int[] positions = new int[length] |
| 178 | 178 |
for (int i = 0 ; i < length ; i++) positions[i] = from++; |
| 179 |
def CQI = CQPEngine.getCqiClient(); |
|
| 179 |
def CQI = CQPSearchEngine.getCqiClient();
|
|
| 180 | 180 |
|
| 181 | 181 |
def abbrNs = CQI.cpos2Str(abbrn.getQualifiedName(), positions); |
| 182 | 182 |
def allLetters = CQI.cpos2Str(lettersAll.getQualifiedName(), positions); |
| tmp/org.txm.groovy.core/src/groovy/org/txm/macro/oriflamms/analyse/AllographsMacro.groovy (revision 788) | ||
|---|---|---|
| 55 | 55 |
signRegExp = ~/$sign/ |
| 56 | 56 |
characterRegExp = ~/$allograph/ |
| 57 | 57 |
|
| 58 |
CQI = CQPEngine.getCqiClient(); |
|
| 58 |
CQI = CQPSearchEngine.getCqiClient();
|
|
| 59 | 59 |
text_su = corpus.getStructuralUnit("text")
|
| 60 | 60 |
text_id = text_su.getProperty("id")
|
| 61 | 61 |
pb_id = corpus.getProperty("pbid")
|
| tmp/org.txm.groovy.core/src/groovy/org/txm/macro/oriflamms/analyse/AbbreviationsAndSemanticsMacro.groovy (revision 788) | ||
|---|---|---|
| 35 | 35 |
println "corpora selection: "+corpusViewSelection |
| 36 | 36 |
|
| 37 | 37 |
def corpus = corpusViewSelection |
| 38 |
CQI = CQPEngine.getCqiClient(); |
|
| 38 |
CQI = CQPSearchEngine.getCqiClient();
|
|
| 39 | 39 |
def w = corpus.getStructuralUnit("w");
|
| 40 | 40 |
|
| 41 | 41 |
def wordCorpus = (w == null) |
| ... | ... | |
| 95 | 95 |
int start = first_match.getStart() |
| 96 | 96 |
int end = last_match.getEnd() |
| 97 | 97 |
|
| 98 |
def CQI = CQPEngine.getCqiClient(); |
|
| 98 |
def CQI = CQPSearchEngine.getCqiClient();
|
|
| 99 | 99 |
int[] positions; |
| 100 | 100 |
def r = corpus.query(new Query("[pbstart=\"0\"]"), "ABBRORI1", false)
|
| 101 | 101 |
def pb_pos = r.starts |
| tmp/org.txm.core/src/java/org/txm/core/engines/EngineType.java (revision 788) | ||
|---|---|---|
| 14 | 14 |
STATS("statistics"),
|
| 15 | 15 |
CHARTS("charts"),
|
| 16 | 16 |
SCRIPT("scripts"),
|
| 17 |
ANNOTATION("annotations");
|
|
| 17 |
ANNOTATION("annotations"),
|
|
| 18 |
OTHER("others engines");
|
|
| 18 | 19 |
|
| 19 | 20 |
/** |
| 20 | 21 |
* Description. |
| tmp/org.txm.core/src/java/org/txm/Toolbox.java (revision 788) | ||
|---|---|---|
| 648 | 648 |
super.finalize(); |
| 649 | 649 |
} |
| 650 | 650 |
} |
| 651 |
|
|
| 652 |
public static String getMetadataEncoding() {
|
|
| 653 |
return TBXPreferences.getString(TBXPreferences.METADATA_ENCODING, TBXPreferences.PREFERENCES_NODE); |
|
| 654 |
} |
|
| 655 |
public static String getMetadataColumnSeparator(){
|
|
| 656 |
return TBXPreferences.getString(TBXPreferences.METADATA_COLSEPARATOR, TBXPreferences.PREFERENCES_NODE); |
|
| 657 |
} |
|
| 658 |
public static String getMetadataTextSeparator() {
|
|
| 659 |
return TBXPreferences.getString(TBXPreferences.METADATA_TXTSEPARATOR, TBXPreferences.PREFERENCES_NODE); |
|
| 660 |
} |
|
| 651 | 661 |
} |
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/AjoutDefinitudeMacro.groovy (revision 788) | ||
|---|---|---|
| 36 | 36 |
if (!ParametersDialog.open(this)) return; |
| 37 | 37 |
|
| 38 | 38 |
MainCorpus corpus = corpusViewSelection |
| 39 |
AbstractCqiClient CQI = CQPEngine.getCqiClient(); |
|
| 39 |
AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
|
|
| 40 | 40 |
def word = corpus.getWordProperty() |
| 41 | 41 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName()); |
| 42 | 42 |
Structure structure = analecCorpus.getStructure() |
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/CompUnitPropertiesMacro.groovy (revision 788) | ||
|---|---|---|
| 39 | 39 |
int n = 1; |
| 40 | 40 |
int nDiff = 0; |
| 41 | 41 |
MainCorpus corpus = corpusViewSelection |
| 42 |
AbstractCqiClient CQI = CQPEngine.getCqiClient(); |
|
| 42 |
AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
|
|
| 43 | 43 |
def word = corpus.getWordProperty() |
| 44 | 44 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName()); |
| 45 | 45 |
|
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/RelationsListMacro.groovy (revision 788) | ||
|---|---|---|
| 33 | 33 |
if (!ParametersDialog.open(this)) return; |
| 34 | 34 |
|
| 35 | 35 |
MainCorpus corpus = corpusViewSelection |
| 36 |
AbstractCqiClient CQI = CQPEngine.getCqiClient(); |
|
| 36 |
AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
|
|
| 37 | 37 |
def word = corpus.getWordProperty() |
| 38 | 38 |
visuAnalec.donnees.Corpus analecCorpus = AnalecCorpora.getCorpus(corpus.getName()); |
| 39 | 39 |
|
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitsProgressionMacro.groovy (revision 788) | ||
|---|---|---|
| 74 | 74 |
if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3 |
| 75 | 75 |
|
| 76 | 76 |
|
| 77 |
def CQI = CQPEngine.getCqiClient() |
|
| 77 |
def CQI = CQPSearchEngine.getCqiClient()
|
|
| 78 | 78 |
|
| 79 | 79 |
def queries = [] |
| 80 | 80 |
def queryResults = [] |
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/EmptyPropValuesMacro.groovy (revision 788) | ||
|---|---|---|
| 51 | 51 |
debug |
| 52 | 52 |
if (!ParametersDialog.open(this)) return |
| 53 | 53 |
|
| 54 |
def CQI = CQPEngine.getCqiClient() |
|
| 54 |
def CQI = CQPSearchEngine.getCqiClient()
|
|
| 55 | 55 |
|
| 56 | 56 |
//corpus = corpusViewSelection |
| 57 | 57 |
for (def corpus : selection) {
|
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/SchemasListMacro.groovy (revision 788) | ||
|---|---|---|
| 88 | 88 |
} |
| 89 | 89 |
} |
| 90 | 90 |
|
| 91 |
def CQI = CQPEngine.getCqiClient() |
|
| 91 |
def CQI = CQPSearchEngine.getCqiClient()
|
|
| 92 | 92 |
|
| 93 | 93 |
if (buildCQL) {
|
| 94 | 94 |
word_prop = corpus.getProperty("id")
|
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitsCorrelationMacro.groovy (revision 788) | ||
|---|---|---|
| 69 | 69 |
if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3 |
| 70 | 70 |
|
| 71 | 71 |
|
| 72 |
def CQI = CQPEngine.getCqiClient() |
|
| 72 |
def CQI = CQPSearchEngine.getCqiClient()
|
|
| 73 | 73 |
|
| 74 | 74 |
def correlations = [:] |
| 75 | 75 |
def values1 = new HashSet() |
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/NatureDuPremierMaillonMacro.groovy (revision 788) | ||
|---|---|---|
| 78 | 78 |
} |
| 79 | 79 |
} |
| 80 | 80 |
|
| 81 |
def CQI = CQPEngine.getCqiClient() |
|
| 81 |
def CQI = CQPSearchEngine.getCqiClient()
|
|
| 82 | 82 |
|
| 83 | 83 |
def prop = corpus.getProperty(word_property) |
| 84 | 84 |
|
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/RelationsMacro.groovy (revision 788) | ||
|---|---|---|
| 33 | 33 |
if (!ParametersDialog.open(this)) return; |
| 34 | 34 |
|
| 35 | 35 |
MainCorpus corpus = corpusViewSelection |
| 36 |
AbstractCqiClient CQI = CQPEngine.getCqiClient(); |
|
| 36 |
AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
|
|
| 37 | 37 |
def word = corpus.getWordProperty() |
| 38 | 38 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName()); |
| 39 | 39 |
|
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/UnitsMacro.groovy (revision 788) | ||
|---|---|---|
| 28 | 28 |
if (!ParametersDialog.open(this)) return; |
| 29 | 29 |
|
| 30 | 30 |
MainCorpus corpus = corpusViewSelection |
| 31 |
AbstractCqiClient CQI = CQPEngine.getCqiClient(); |
|
| 31 |
AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
|
|
| 32 | 32 |
def word = corpus.getWordProperty() |
| 33 | 33 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName()); |
| 34 | 34 |
|
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CategorieGrammaticaleMacro.groovy (revision 788) | ||
|---|---|---|
| 82 | 82 |
} |
| 83 | 83 |
} |
| 84 | 84 |
|
| 85 |
def CQI = CQPEngine.getCqiClient() |
|
| 85 |
def CQI = CQPSearchEngine.getCqiClient()
|
|
| 86 | 86 |
|
| 87 | 87 |
def prop = corpus.getProperty(word_property) |
| 88 | 88 |
if (prop == null) {
|
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/ChainesMacro.groovy (revision 788) | ||
|---|---|---|
| 88 | 88 |
} |
| 89 | 89 |
} |
| 90 | 90 |
|
| 91 |
def CQI = CQPEngine.getCqiClient() |
|
| 91 |
def CQI = CQPSearchEngine.getCqiClient()
|
|
| 92 | 92 |
|
| 93 | 93 |
if (buildCQL) {
|
| 94 | 94 |
word_prop = corpus.getProperty("id")
|
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CompUnitPropertiesMacro.groovy (revision 788) | ||
|---|---|---|
| 36 | 36 |
int n = 1; |
| 37 | 37 |
int nDiff = 0; |
| 38 | 38 |
MainCorpus corpus = corpusViewSelection |
| 39 |
AbstractCqiClient CQI = CQPEngine.getCqiClient(); |
|
| 39 |
AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
|
|
| 40 | 40 |
def word = corpus.getWordProperty() |
| 41 | 41 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName()); |
| 42 | 42 |
|
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/SchemasProgressionMacro.groovy (revision 788) | ||
|---|---|---|
| 74 | 74 |
if (!ParametersDialog.open(this)) return |
| 75 | 75 |
if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3 |
| 76 | 76 |
|
| 77 |
def CQI = CQPEngine.getCqiClient() |
|
| 77 |
def CQI = CQPSearchEngine.getCqiClient()
|
|
| 78 | 78 |
|
| 79 | 79 |
def limit_cql_matches = null; |
| 80 | 80 |
if (limit_cql != null && !limit_cql.getQueryString().equals("\"\"")) {
|
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/UnitsListMacro.groovy (revision 788) | ||
|---|---|---|
| 62 | 62 |
if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3 |
| 63 | 63 |
|
| 64 | 64 |
|
| 65 |
def CQI = CQPEngine.getCqiClient() |
|
| 65 |
def CQI = CQPSearchEngine.getCqiClient()
|
|
| 66 | 66 |
|
| 67 | 67 |
//corpus = corpusViewSelection |
| 68 | 68 |
def allResults = [:] |
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/NatureDuPremierMaillonMacro.groovy (revision 788) | ||
|---|---|---|
| 78 | 78 |
} |
| 79 | 79 |
} |
| 80 | 80 |
|
| 81 |
def CQI = CQPEngine.getCqiClient() |
|
| 81 |
def CQI = CQPSearchEngine.getCqiClient()
|
|
| 82 | 82 |
|
| 83 | 83 |
def prop = corpus.getProperty(word_property) |
| 84 | 84 |
|
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/CategorieGrammaticaleMacro.groovy (revision 788) | ||
|---|---|---|
| 82 | 82 |
} |
| 83 | 83 |
} |
| 84 | 84 |
|
| 85 |
def CQI = CQPEngine.getCqiClient() |
|
| 85 |
def CQI = CQPSearchEngine.getCqiClient()
|
|
| 86 | 86 |
|
| 87 | 87 |
def prop = corpus.getProperty(word_property) |
| 88 | 88 |
if (prop == null) {
|
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/CoefficientStabiliteMacro.groovy (revision 788) | ||
|---|---|---|
| 83 | 83 |
} |
| 84 | 84 |
} |
| 85 | 85 |
|
| 86 |
def CQI = CQPEngine.getCqiClient() |
|
| 86 |
def CQI = CQPSearchEngine.getCqiClient()
|
|
| 87 | 87 |
|
| 88 | 88 |
def prop = corpus.getProperty(word_property) |
| 89 | 89 |
|
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/UnitsSummaryMacro.groovy (revision 788) | ||
|---|---|---|
| 56 | 56 |
if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3 |
| 57 | 57 |
|
| 58 | 58 |
|
| 59 |
def CQI = CQPEngine.getCqiClient() |
|
| 59 |
def CQI = CQPSearchEngine.getCqiClient()
|
|
| 60 | 60 |
|
| 61 | 61 |
def allresults = new LinkedHashMap() |
| 62 | 62 |
def props = new HashSet() |
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/SchemasSummaryMacro.groovy (revision 788) | ||
|---|---|---|
| 45 | 45 |
if (!ParametersDialog.open(this)) return |
| 46 | 46 |
if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3 |
| 47 | 47 |
|
| 48 |
def CQI = CQPEngine.getCqiClient() |
|
| 48 |
def CQI = CQPSearchEngine.getCqiClient()
|
|
| 49 | 49 |
|
| 50 | 50 |
def allresults = new LinkedHashMap() |
| 51 | 51 |
def props = new HashSet() |
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/UnitsIndexMacro.groovy (revision 788) | ||
|---|---|---|
| 83 | 83 |
return |
| 84 | 84 |
} |
| 85 | 85 |
|
| 86 |
def CQI = CQPEngine.getCqiClient() |
|
| 86 |
def CQI = CQPSearchEngine.getCqiClient()
|
|
| 87 | 87 |
|
| 88 | 88 |
def allresults = [:] |
| 89 | 89 |
for (def corpus : selection) {
|
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/StructuresIndexMacro.groovy (revision 788) | ||
|---|---|---|
| 126 | 126 |
// Open the parameters input dialog box |
| 127 | 127 |
if (!ParametersDialog.open(this)) return; |
| 128 | 128 |
|
| 129 |
def CQI = CQPEngine.getCqiClient() |
|
| 129 |
def CQI = CQPSearchEngine.getCqiClient()
|
|
| 130 | 130 |
|
| 131 | 131 |
def corpusStructs = structures.split(",") // ["act", "scene"]
|
| 132 | 132 |
structProperties = structProperties.trim() |
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CoefficientStabiliteMacro.groovy (revision 788) | ||
|---|---|---|
| 83 | 83 |
} |
| 84 | 84 |
} |
| 85 | 85 |
|
| 86 |
def CQI = CQPEngine.getCqiClient() |
|
| 86 |
def CQI = CQPSearchEngine.getCqiClient()
|
|
| 87 | 87 |
|
| 88 | 88 |
def prop = corpus.getProperty(word_property) |
| 89 | 89 |
|
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/AjoutDefinitudeMacro.groovy (revision 788) | ||
|---|---|---|
| 36 | 36 |
if (!ParametersDialog.open(this)) return; |
| 37 | 37 |
|
| 38 | 38 |
MainCorpus corpus = corpusViewSelection |
| 39 |
AbstractCqiClient CQI = CQPEngine.getCqiClient(); |
|
| 39 |
AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
|
|
| 40 | 40 |
def word = corpus.getWordProperty() |
| 41 | 41 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getName()); |
| 42 | 42 |
Structure structure = analecCorpus.getStructure() |
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/CheckDuplicatesInSchemasMacro.groovy (revision 788) | ||
|---|---|---|
| 38 | 38 |
if (!ParametersDialog.open(this)) return |
| 39 | 39 |
if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3 |
| 40 | 40 |
|
| 41 |
def CQI = CQPEngine.getCqiClient() |
|
| 41 |
def CQI = CQPSearchEngine.getCqiClient()
|
|
| 42 | 42 |
|
| 43 | 43 |
def corpus = corpusViewSelection |
| 44 | 44 |
mainCorpus = corpus.getMainCorpus() |
| tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/UnitsAnnotateMacro.groovy (revision 788) | ||
|---|---|---|
| 57 | 57 |
if (!ParametersDialog.open(this)) return |
| 58 | 58 |
if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3 |
| 59 | 59 |
|
| 60 |
def CQI = CQPEngine.getCqiClient() |
|
| 60 |
def CQI = CQPSearchEngine.getCqiClient()
|
|
| 61 | 61 |
|
| 62 | 62 |
if (unit_property_to_set.length() == 0) {
|
| 63 | 63 |
println "unit_property_to_set not set: aborting." |
| tmp/org.txm.analec.rcp/src/org/txm/analec/toolbar/AnnotationToolbar.java (revision 788) | ||
|---|---|---|
| 102 | 102 |
List<Match> matches = result.getMatches(); |
| 103 | 103 |
int start, end; |
| 104 | 104 |
// try {
|
| 105 |
// int[] indexes = CQPEngine.getCqiClient().str2Id(c.getProperty("id").getQualifiedName(), ids);
|
|
| 106 |
// int[] positions = CQPEngine.getCqiClient().id2Cpos(c.getProperty("id").getQualifiedName(), indexes);
|
|
| 105 |
// int[] indexes = CQPSearchEngine.getCqiClient().str2Id(c.getProperty("id").getQualifiedName(), ids);
|
|
| 106 |
// int[] positions = CQPSearchEngine.getCqiClient().id2Cpos(c.getProperty("id").getQualifiedName(), indexes);
|
|
| 107 | 107 |
// |
| 108 | 108 |
// } catch (Exception e) {
|
| 109 | 109 |
// |
| tmp/org.txm.treetagger.core/src/org/txm/treetagger/core/preferences/TreeTaggerPreferences.java (revision 788) | ||
|---|---|---|
| 49 | 49 |
// Default preferences |
| 50 | 50 |
Preferences preferences = DefaultScope.INSTANCE.getNode(PREFERENCES_NODE); |
| 51 | 51 |
|
| 52 |
String installPath = System.getProperty("osgi.user.area") + "/TXM/treetagger"; //$NON-NLS-1$ //$NON-NLS-2$
|
|
| 52 |
String installPath = "/usr/lib/treetagger"; //"System.getProperty("osgi.user.area") + "/TXM/treetagger"; //$NON-NLS-1$ //$NON-NLS-2$
|
|
| 53 |
if (System.getProperty("os.name").contains("Windows")) {
|
|
| 54 |
installPath = "C:/Program Files/TreeTagger"; |
|
| 55 |
} else if (System.getProperty("os.name").contains("Mac")) {
|
|
| 56 |
installPath = "/Applications/TreeTagger"; |
|
| 57 |
} |
|
| 53 | 58 |
|
| 54 | 59 |
preferences.put(INSTALL_PATH, installPath); |
| 55 | 60 |
preferences.put(MODELS_PATH, installPath + "/models"); //$NON-NLS-1$ |
Formats disponibles : Unified diff