Révision 3008
| tmp/org.txm.groovy.core/src/groovy/org/txm/macro/r/PlotSpecifMacro.groovy (revision 3008) | ||
|---|---|---|
| 4 | 4 |
// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of |
| 5 | 5 |
// Lyon 2, University of Franche-Comté, University of Nice |
| 6 | 6 |
// Sophia Antipolis, University of Paris 3. |
| 7 |
//
|
|
| 7 |
// |
|
| 8 | 8 |
// The TXM platform is free software: you can redistribute it |
| 9 | 9 |
// and/or modify it under the terms of the GNU General Public |
| 10 | 10 |
// License as published by the Free Software Foundation, |
| 11 | 11 |
// either version 2 of the License, or (at your option) any |
| 12 | 12 |
// later version. |
| 13 |
//
|
|
| 13 |
// |
|
| 14 | 14 |
// The TXM platform is distributed in the hope that it will be |
| 15 | 15 |
// useful, but WITHOUT ANY WARRANTY; without even the implied |
| 16 | 16 |
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 17 | 17 |
// PURPOSE. See the GNU General Public License for more |
| 18 | 18 |
// details. |
| 19 |
//
|
|
| 19 |
// |
|
| 20 | 20 |
// You should have received a copy of the GNU General |
| 21 | 21 |
// Public License along with the TXM platform. If not, see |
| 22 | 22 |
// http://www.gnu.org/licenses. |
| 23 |
//
|
|
| 23 |
// |
|
| 24 | 24 |
// $LastChangedDate:$ |
| 25 | 25 |
// $LastChangedRevision:$ |
| 26 |
// $LastChangedBy:$
|
|
| 26 |
// $LastChangedBy:$ |
|
| 27 | 27 |
// |
| 28 | 28 |
|
| 29 | 29 |
import org.kohsuke.args4j.* |
| ... | ... | |
| 42 | 42 |
* Robespierre 'peuple' word in D9 part example (see Figure 1), pp 140-141. |
| 43 | 43 |
* <http://www.persee.fr/web/revues/home/prescript/article/mots_0243-6450_1980_num_1_1_1008>. |
| 44 | 44 |
* |
| 45 |
**/ |
|
| 45 |
**/
|
|
| 46 | 46 |
|
| 47 | 47 |
@Field @Option(name="f", usage="La fréquence de la forme dans la partie", widget="Integer", required=true, def="11") |
| 48 |
def f; |
|
| 48 |
def f;
|
|
| 49 | 49 |
|
| 50 | 50 |
@Field @Option(name="F", usage="La fréquence totale de la forme dans le corpus", widget="Integer", required=true, def="296") |
| 51 |
def F; |
|
| 51 |
def F;
|
|
| 52 | 52 |
|
| 53 | 53 |
@Field @Option(name="t", usage="Le nombre d'occurrences de la partie", widget="Integer", required=true, def="1084") |
| 54 |
def t; |
|
| 54 |
def t;
|
|
| 55 | 55 |
|
| 56 | 56 |
@Field @Option(name="T", usage="Le nombre total d'occurrences du corpus", widget="Integer", required=true, def="61449") |
| 57 |
def T; |
|
| 57 |
def T;
|
|
| 58 | 58 |
|
| 59 |
@Field @Option(name="display_chart", usage="Display the SVG file in a new Window.", widget="Boolean", required=true, def="true") |
|
| 60 |
def display_chart; |
|
| 61 |
|
|
| 59 | 62 |
// Open the parameters input dialog box |
| 60 | 63 |
if (!ParametersDialog.open(this)) return; |
| 61 | 64 |
|
| ... | ... | |
| 95 | 98 |
println "Result saved in: "+file.getAbsolutePath() |
| 96 | 99 |
|
| 97 | 100 |
//display the graphic |
| 98 |
monitor.syncExec(new Runnable() {
|
|
| 99 |
@Override |
|
| 100 |
public void run() { OpenSVGGraph.OpenSVGFile(file.getAbsolutePath(), "Specificity distribution") }
|
|
| 101 |
}); |
|
| 101 |
if (display_chart) {
|
|
| 102 |
monitor.syncExec(new Runnable() {
|
|
| 103 |
@Override |
|
| 104 |
public void run() { OpenSVGGraph.OpenSVGFile(file.getAbsolutePath(), "Specificity distribution") }
|
|
| 105 |
}); |
|
| 106 |
} |
|
Formats disponibles : Unified diff