Révision 1968
tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenSVGGraph.java (revision 1968) | ||
---|---|---|
117 | 117 |
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); |
118 | 118 |
IWorkbenchPage page = window.getActivePage(); |
119 | 119 |
try { |
120 |
SVGGraphicEditor editor = (SVGGraphicEditor) page.openEditor(editorInput, "org.txm.rcp.editors.SVGGraphicEditor"); //$NON-NLS-1$ |
|
121 |
return editor; |
|
120 |
IEditorPart e = page.openEditor(editorInput, "org.txm.rcp.editors.SVGGraphicEditor"); //$NON-NLS-1$ |
|
121 |
if (e != null && e instanceof SVGGraphicEditor) { |
|
122 |
SVGGraphicEditor editor = (SVGGraphicEditor) e; |
|
123 |
return editor; |
|
124 |
} else { |
|
125 |
return null; |
|
126 |
} |
|
122 | 127 |
} |
123 | 128 |
catch (Exception e) { |
124 | 129 |
// TODO Auto-generated catch block |
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/exploit/mesures1/MeanDistanceMacro.groovy (revision 1968) | ||
---|---|---|
10 | 10 |
import groovy.transform.Field |
11 | 11 |
import org.txm.rcp.swt.widget.parameters.* |
12 | 12 |
import org.txm.annotation.urs.* |
13 |
import org.txm.macro.urs.AnalecUtils |
|
14 |
import visuAnalec.elements.* |
|
13 | 15 |
import org.txm.searchengine.cqp.corpus.* |
14 | 16 |
import org.txm.Toolbox |
15 | 17 |
import org.txm.rcp.commands.* |
16 |
import org.txm.macro.urs.AnalecUtils
|
|
18 |
import org.txm.statsengine.r.core.RWorkspace
|
|
17 | 19 |
|
20 |
if (!(corpusViewSelection instanceof CQPCorpus)) { |
|
21 |
println "Corpora selection is not a Corpus" |
|
22 |
return; |
|
23 |
} |
|
24 |
|
|
18 | 25 |
@Field @Option(name="schema_ursql", usage="TYPE@PROP=REGEX", widget="String", required=true, def="CHAINE") |
19 | 26 |
String schema_ursql |
20 | 27 |
|
... | ... | |
27 | 34 |
@Field @Option(name="unit_ursql", usage="TYPE@PROP=REGEX", widget="String", required=false, def="MENTION") |
28 | 35 |
String unit_ursql |
29 | 36 |
|
30 |
if (!(corpusViewSelection instanceof CQPCorpus)) { |
|
31 |
println "Corpora selection is not a Corpus" |
|
32 |
return; |
|
33 |
} |
|
37 |
@Field @Option(name="debug", usage="Show internal variable content", widget="StringArray", metaVar="OFF ON ALL REALLY ALL", required=true, def="OFF") |
|
38 |
debug |
|
34 | 39 |
|
35 | 40 |
if (!ParametersDialog.open(this)) return; |
36 |
// END OF PARAMETERS
|
|
41 |
if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3
|
|
37 | 42 |
|
38 | 43 |
def corpus = corpusViewSelection |
39 | 44 |
def analecCorpus = URSCorpora.getCorpus(corpus) |
... | ... | |
58 | 63 |
|
59 | 64 |
def allUnites = schema.getUnitesSousjacentesNonTriees() |
60 | 65 |
|
61 |
def units = AnalecUtils.filterElements(false, allUnites, unit_ursql)
|
|
66 |
def units = AnalecUtils.filterElements(debug, allUnites, unit_ursql)
|
|
62 | 67 |
|
63 | 68 |
int nUnites = units.size(); |
64 | 69 |
|
... | ... | |
122 | 127 |
|
123 | 128 |
// execute R script |
124 | 129 |
r.plot(PNGFile, "png(file = \"${PNGFilePath}\"); "+script) |
125 |
r.plot(SVGFile, "svg(file = \"${SVGFilePath}\"); "+script) |
|
130 |
r.plot(SVGFile, "svglite(file = \"${SVGFilePath}\"); "+script)
|
|
126 | 131 |
|
127 | 132 |
//display the SVG results graphic |
128 | 133 |
monitor.syncExec(new Runnable() { |
129 | 134 |
@Override |
130 |
public void run() { OpenSVGGraph.OpenSVGFile(SVGFilePath, corpusName+" Longueur des chaînes") }
|
|
135 |
public void run() { OpenBrowser.openfile(SVGFilePath, corpusName+" Longueur des chaînes") }
|
|
131 | 136 |
}) |
132 | 137 |
|
133 | 138 |
return ["result":coef, "data":lens] |
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/exploit/mesures1/InterDistanceMacro.groovy (revision 1968) | ||
---|---|---|
8 | 8 |
import org.kohsuke.args4j.* |
9 | 9 |
import groovy.transform.Field |
10 | 10 |
import org.txm.* |
11 |
import org.txm.macro.urs.AnalecUtils |
|
12 |
import visuAnalec.elements.* |
|
11 | 13 |
import org.txm.rcp.swt.widget.parameters.* |
12 | 14 |
import org.txm.annotation.urs.* |
13 | 15 |
import org.txm.searchengine.cqp.corpus.* |
14 | 16 |
import org.apache.commons.lang.StringUtils; |
15 | 17 |
|
18 |
if (!(corpusViewSelection instanceof CQPCorpus)) { |
|
19 |
println "Corpora selection is not a Corpus" |
|
20 |
return; |
|
21 |
} |
|
22 |
|
|
16 | 23 |
// BEGINNING OF PARAMETERS |
17 | 24 |
@Field @Option(name="schema_ursql", usage="TYPE@PROP=REGEX", widget="String", required=true, def="CHAINE") |
18 | 25 |
String schema_ursql |
... | ... | |
26 | 33 |
@Field @Option(name="unit_ursql", usage="TYPE@PROP=REGEX", widget="String", required=false, def="MENTION") |
27 | 34 |
String unit_ursql |
28 | 35 |
|
29 |
if (!(corpusViewSelection instanceof CQPCorpus)) { |
|
30 |
println "Corpora selection is not a Corpus" |
|
31 |
return; |
|
32 |
} |
|
36 |
@Field @Option(name="debug", usage="Show internal variable content", widget="StringArray", metaVar="OFF ON ALL REALLY ALL", required=true, def="OFF") |
|
37 |
debug |
|
33 | 38 |
|
34 | 39 |
if (!ParametersDialog.open(this)) return; |
40 |
if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3 |
|
35 | 41 |
|
36 | 42 |
CQPCorpus corpus = corpusViewSelection |
37 | 43 |
def analecCorpus = URSCorpora.getCorpus(corpus) |
... | ... | |
54 | 60 |
|
55 | 61 |
def allUnites = schema.getUnitesSousjacentesNonTriees() |
56 | 62 |
|
57 |
def units = AnalecUtils.filterElements(false, allUnites, unit_ursql)
|
|
63 |
def units = AnalecUtils.filterElements(debug, allUnites, unit_ursql)
|
|
58 | 64 |
|
59 | 65 |
Collections.sort(units) |
60 | 66 |
|
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/exploit/mesures1/NatureOfTheFirstUnitMacro.groovy (revision 1968) | ||
---|---|---|
8 | 8 |
import org.kohsuke.args4j.* |
9 | 9 |
import groovy.transform.Field |
10 | 10 |
import org.txm.* |
11 |
import org.txm.macro.urs.AnalecUtils |
|
12 |
import visuAnalec.elements.* |
|
11 | 13 |
import org.txm.rcp.swt.widget.parameters.* |
12 | 14 |
import org.txm.annotation.urs.* |
13 | 15 |
import org.txm.searchengine.cqp.corpus.* |
16 |
import org.txm.searchengine.cqp.CQPSearchEngine |
|
14 | 17 |
import org.apache.commons.lang.StringUtils; |
15 | 18 |
|
19 |
if (!(corpusViewSelection instanceof CQPCorpus)) { |
|
20 |
println "Corpora selection is not a Corpus" |
|
21 |
return; |
|
22 |
} |
|
23 |
|
|
16 | 24 |
// BEGINNING OF PARAMETERS |
17 | 25 |
@Field @Option(name="schema_ursql", usage="TYPE@PROP=REGEX", widget="String", required=true, def="CHAINE") |
18 | 26 |
String schema_ursql |
... | ... | |
26 | 34 |
@Field @Option(name="word_property", usage="", widget="String", required=false, def="CATEGORIE") |
27 | 35 |
String word_property |
28 | 36 |
|
29 |
if (!(corpusViewSelection instanceof CQPCorpus)) { |
|
30 |
println "Corpora selection is not a Corpus" |
|
31 |
return; |
|
32 |
} |
|
37 |
@Field @Option(name="debug", usage="Show internal variable content", widget="StringArray", metaVar="OFF ON ALL REALLY ALL", required=true, def="OFF") |
|
38 |
debug |
|
33 | 39 |
|
34 |
// Open the parameters input dialog box |
|
35 | 40 |
if (!ParametersDialog.open(this)) return; |
36 |
// END OF PARAMETERS
|
|
41 |
if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3
|
|
37 | 42 |
|
43 |
|
|
38 | 44 |
CQPCorpus corpus = corpusViewSelection |
39 | 45 |
def analecCorpus = URSCorpora.getCorpus(corpus) |
40 | 46 |
|
... | ... | |
61 | 67 |
|
62 | 68 |
def allUnites = schema.getUnitesSousjacentesNonTriees() |
63 | 69 |
|
64 |
def units = AnalecUtils.filterElements(false, allUnites, unit_ursql)
|
|
70 |
def units = AnalecUtils.filterElements(debug, allUnites, unit_ursql)
|
|
65 | 71 |
|
66 | 72 |
int nUnites = units.size(); |
67 | 73 |
|
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/exploit/mesures1/NumberOfSchemaMacro.groovy (revision 1968) | ||
---|---|---|
9 | 9 |
import groovy.transform.Field |
10 | 10 |
import org.txm.rcp.swt.widget.parameters.* |
11 | 11 |
import org.txm.annotation.urs.* |
12 |
import visuAnalec.elements.* |
|
12 | 13 |
import org.txm.searchengine.cqp.corpus.* |
14 |
import org.txm.macro.urs.AnalecUtils |
|
13 | 15 |
|
16 |
if (!(corpusViewSelection instanceof CQPCorpus)) { |
|
17 |
println "Corpora selection is not a Corpus" |
|
18 |
return; |
|
19 |
} |
|
14 | 20 |
|
15 | 21 |
// BEGINNING OF PARAMETERS |
16 | 22 |
@Field @Option(name="schema_ursql", usage="TYPE@PROP=REGEX", widget="String", required=true, def="CHAINE") |
... | ... | |
22 | 28 |
@Field @Option(name="unit_ursql", usage="TYPE@PROP=REGEX", widget="String", required=false, def="MENTION") |
23 | 29 |
String unit_ursql |
24 | 30 |
|
25 |
if (!(corpusViewSelection instanceof CQPCorpus)) { |
|
26 |
println "Corpora selection is not a Corpus" |
|
27 |
return; |
|
28 |
} |
|
31 |
@Field @Option(name="debug", usage="Show internal variable content", widget="StringArray", metaVar="OFF ON ALL REALLY ALL", required=true, def="OFF") |
|
32 |
debug |
|
29 | 33 |
|
30 |
// Open the parameters input dialog box |
|
31 | 34 |
if (!ParametersDialog.open(this)) return; |
32 |
// END OF PARAMETERS
|
|
35 |
if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3
|
|
33 | 36 |
|
37 |
|
|
34 | 38 |
CQPCorpus corpus = corpusViewSelection |
35 | 39 |
def analecCorpus = URSCorpora.getCorpus(corpus) |
36 | 40 |
|
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/exploit/mesures1/GrammaticalCategoryMacro.groovy (revision 1968) | ||
---|---|---|
8 | 8 |
import org.kohsuke.args4j.* |
9 | 9 |
import groovy.transform.Field |
10 | 10 |
import org.txm.* |
11 |
import org.txm.macro.urs.AnalecUtils |
|
12 |
import visuAnalec.elements.* |
|
11 | 13 |
import org.txm.rcp.swt.widget.parameters.* |
12 | 14 |
import org.txm.annotation.urs.* |
13 | 15 |
import org.txm.searchengine.cqp.* |
... | ... | |
29 | 31 |
String unit_ursql |
30 | 32 |
|
31 | 33 |
@Field @Option(name="property", usage="", widget="String", required=false, def="CATEGORIE") |
32 |
|
|
33 | 34 |
String property |
34 | 35 |
|
36 |
@Field @Option(name="debug", usage="Show internal variable content", widget="StringArray", metaVar="OFF ON ALL REALLY ALL", required=true, def="OFF") |
|
37 |
debug |
|
38 |
|
|
35 | 39 |
if (!(corpusViewSelection instanceof CQPCorpus)) { |
36 | 40 |
println "Corpora selection is not a Corpus" |
37 | 41 |
return; |
... | ... | |
39 | 43 |
|
40 | 44 |
// Open the parameters input dialog box |
41 | 45 |
if (!ParametersDialog.open(this)) return; |
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 |
|
|
42 | 48 |
// END OF PARAMETERS |
43 | 49 |
|
44 | 50 |
MainCorpus corpus = corpusViewSelection |
... | ... | |
70 | 76 |
|
71 | 77 |
def allUnites = schema.getUnitesSousjacentesNonTriees() |
72 | 78 |
|
73 |
def units = AnalecUtils.filterElements(false, allUnites, unit_ursql)
|
|
79 |
def units = AnalecUtils.filterElements(debug, allUnites, unit_ursql)
|
|
74 | 80 |
|
75 | 81 |
for (def unit : units) { // no need to sort units |
76 | 82 |
|
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/exploit/mesures1/ReferentialDensityMacro.groovy (revision 1968) | ||
---|---|---|
9 | 9 |
import groovy.transform.Field |
10 | 10 |
import org.txm.rcp.swt.widget.parameters.* |
11 | 11 |
import org.txm.annotation.urs.* |
12 |
import visuAnalec.elements.* |
|
12 | 13 |
import org.txm.searchengine.cqp.corpus.* |
14 |
import org.txm.macro.urs.AnalecUtils |
|
13 | 15 |
|
14 | 16 |
if (!(corpusViewSelection instanceof CQPCorpus)) { |
15 | 17 |
println "Corpora selection is not a Corpus" |
... | ... | |
24 | 26 |
strict_inclusion |
25 | 27 |
@Field @Option(name="limit_distance", usage="Unit distance to structure limit (0 = no selection, 1 = first after limit, -1 = last before limit, etc.)", widget="Integer", required=true, def="0") |
26 | 28 |
limit_distance |
29 |
|
|
30 |
@Field @Option(name="debug", usage="Show internal variable content", widget="StringArray", metaVar="OFF ON ALL REALLY ALL", required=true, def="OFF") |
|
31 |
debug |
|
32 |
|
|
27 | 33 |
if (!ParametersDialog.open(this)) return; |
28 |
// END OF PARAMETERS
|
|
34 |
if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3
|
|
29 | 35 |
|
36 |
|
|
30 | 37 |
CQPCorpus corpus = corpusViewSelection |
31 | 38 |
def analecCorpus = URSCorpora.getCorpus(corpus); |
32 | 39 |
|
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/exploit/mesures1/StabilityScoreMacro.groovy (revision 1968) | ||
---|---|---|
12 | 12 |
import org.txm.annotation.urs.* |
13 | 13 |
import org.txm.searchengine.cqp.corpus.* |
14 | 14 |
import org.apache.commons.lang.StringUtils; |
15 |
import org.txm.macro.urs.AnalecUtils |
|
16 |
import visuAnalec.elements.* |
|
17 |
import org.txm.searchengine.cqp.CQPSearchEngine |
|
15 | 18 |
|
19 |
if (!(corpusViewSelection instanceof CQPCorpus)) { |
|
20 |
println "Corpora selection is not a Corpus" |
|
21 |
return; |
|
22 |
} |
|
23 |
|
|
16 | 24 |
@Field @Option(name="schema_ursql", usage="TYPE@PROP=REGEX", widget="String", required=true, def="CHAINE") |
17 | 25 |
String schema_ursql |
18 | 26 |
|
... | ... | |
28 | 36 |
@Field @Option(name="word_property", usage="", widget="String", required=false, def="word") |
29 | 37 |
String word_property |
30 | 38 |
|
31 |
if (!(corpusViewSelection instanceof CQPCorpus)) { |
|
32 |
println "Corpora selection is not a Corpus" |
|
33 |
return; |
|
34 |
} |
|
39 |
@Field @Option(name="debug", usage="Show internal variable content", widget="StringArray", metaVar="OFF ON ALL REALLY ALL", required=true, def="OFF") |
|
40 |
debug |
|
35 | 41 |
|
36 |
// Open the parameters input dialog box |
|
37 | 42 |
if (!ParametersDialog.open(this)) return; |
38 |
// END OF PARAMETERS
|
|
43 |
if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3
|
|
39 | 44 |
|
45 |
|
|
40 | 46 |
def corpus = corpusViewSelection |
41 | 47 |
def analecCorpus = URSCorpora.getCorpus(corpus) |
42 | 48 |
|
... | ... | |
65 | 71 |
|
66 | 72 |
def allUnites = schema.getUnitesSousjacentesNonTriees() |
67 | 73 |
|
68 |
def units = AnalecUtils.filterElements(false, allUnites, unit_ursql)
|
|
69 |
|
|
74 |
def units = AnalecUtils.filterElements(debug, allUnites, unit_ursql)
|
|
75 |
def nUnites = units.size() |
|
70 | 76 |
for (def unit : units) { |
71 | 77 |
|
72 | 78 |
String forme = null; |
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/exploit/mesures1/SchemasMacro.groovy (revision 1968) | ||
---|---|---|
10 | 10 |
import groovy.transform.Field |
11 | 11 |
import org.txm.rcp.swt.widget.parameters.* |
12 | 12 |
import org.txm.annotation.urs.* |
13 |
import visuAnalec.elements.* |
|
13 | 14 |
import org.txm.searchengine.cqp.corpus.* |
15 |
import org.txm.macro.urs.AnalecUtils |
|
14 | 16 |
import org.txm.Toolbox |
15 | 17 |
import org.txm.rcp.commands.* |
16 | 18 |
import org.apache.commons.lang.StringUtils |
19 |
import org.txm.searchengine.cqp.CQPSearchEngine |
|
17 | 20 |
|
21 |
if (!(corpusViewSelection instanceof CQPCorpus)) { |
|
22 |
println "Corpus view selection is not a Corpus" |
|
23 |
return; |
|
24 |
} |
|
25 |
|
|
18 | 26 |
// BEGINNING OF PARAMETERS |
19 | 27 |
@Field @Option(name="schema_ursql", usage="TYPE@PROP=VALUE", widget="String", required=true, def="CHAINE") |
20 | 28 |
String schema_ursql |
... | ... | |
34 | 42 |
@Field @Option(name="buildCQL", usage="générer la requête des unités", widget="Boolean", required=true, def='false') |
35 | 43 |
def buildCQL |
36 | 44 |
|
45 |
@Field @Option(name="debug", usage="Show internal variable content", widget="StringArray", metaVar="OFF ON ALL REALLY ALL", required=true, def="OFF") |
|
46 |
debug |
|
37 | 47 |
|
38 |
if (!(corpusViewSelection instanceof CQPCorpus)) { |
|
39 |
println "Corpus view selection is not a Corpus" |
|
40 |
return; |
|
41 |
} |
|
42 |
|
|
43 | 48 |
if (!ParametersDialog.open(this)) return; |
44 |
// END OF PARAMETERS
|
|
49 |
if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3
|
|
45 | 50 |
|
51 |
|
|
46 | 52 |
CQPCorpus corpus = corpusViewSelection |
47 | 53 |
def analecCorpus = URSCorpora.getCorpus(corpus) |
48 | 54 |
|
... | ... | |
72 | 78 |
for (def schema : schemas) { |
73 | 79 |
|
74 | 80 |
def allUnites = schema.getUnitesSousjacentesNonTriees() |
75 |
def units = AnalecUtils.filterElements(false, allUnites, unit_ursql)
|
|
81 |
def units = AnalecUtils.filterElements(debug, allUnites, unit_ursql)
|
|
76 | 82 |
|
77 | 83 |
print schema.getProps().toString()+ ": " |
78 | 84 |
def first = true |
tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/Messages.java (revision 1968) | ||
---|---|---|
14 | 14 |
public static String DoInstallStep_2; |
15 | 15 |
public static String DoInstallStep_5; |
16 | 16 |
public static String DoInstallStep_6; |
17 |
public static String DoInstallStep_7; |
|
18 | 17 |
public static String DoInstallStep_9; |
19 | 18 |
public static String EditStructure_0; |
20 | 19 |
public static String ExportGlozzCorpus_0; |
tmp/org.txm.edition.rcp/src/org/txm/edition/rcp/editors/EditionPanel.java (revision 1968) | ||
---|---|---|
625 | 625 |
} |
626 | 626 |
|
627 | 627 |
public void setURL(String url) { |
628 |
super.setURL(url); |
|
628 |
if (!this.browser.isDisposed()) { |
|
629 |
super.setURL(url); |
|
630 |
} |
|
629 | 631 |
} |
630 | 632 |
|
631 | 633 |
/** |
Formats disponibles : Unified diff