root / tmp / org.txm.groovy.core / src / groovy / org / txm / test / Informations.groovy @ 499
History | View | Annotate | Download (1.7 kB)
1 |
/**
|
---|---|
2 |
* Main.
|
3 |
*
|
4 |
* @param args the args
|
5 |
*/
|
6 |
// Copyright © 2010-2013 ENS de Lyon.
|
7 |
// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
|
8 |
// Lyon 2, University of Franche-Comté, University of Nice
|
9 |
// Sophia Antipolis, University of Paris 3.
|
10 |
//
|
11 |
// The TXM platform is free software: you can redistribute it
|
12 |
// and/or modify it under the terms of the GNU General Public
|
13 |
// License as published by the Free Software Foundation,
|
14 |
// either version 2 of the License, or (at your option) any
|
15 |
// later version.
|
16 |
//
|
17 |
// The TXM platform is distributed in the hope that it will be
|
18 |
// useful, but WITHOUT ANY WARRANTY; without even the implied
|
19 |
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
20 |
// PURPOSE. See the GNU General Public License for more
|
21 |
// details.
|
22 |
//
|
23 |
// You should have received a copy of the GNU General
|
24 |
// Public License along with the TXM platform. If not, see
|
25 |
// http://www.gnu.org/licenses.
|
26 |
//
|
27 |
//
|
28 |
//
|
29 |
// $LastChangedDate: 2013-05-06 17:38:43 +0200 (lun. 06 mai 2013) $
|
30 |
// $LastChangedRevision: 2386 $
|
31 |
// $LastChangedBy: mdecorde $
|
32 |
//
|
33 |
package org.txm.test
|
34 |
|
35 |
|
36 |
// imports des fonctions que l'on va utiliser
|
37 |
import org.txm.Toolbox |
38 |
import org.txm.searchengine.cqp.corpus.* |
39 |
import org.txm.functions.diagnostic.Diagnostic |
40 |
import org.txm.objects.* |
41 |
|
42 |
// TODO: Auto-generated Javadoc
|
43 |
/* (non-Javadoc)
|
44 |
* @see groovy.lang.Script#run()
|
45 |
*/
|
46 |
def manualInit = false |
47 |
if (!org.txm.Toolbox.isInitialized())
|
48 |
{ |
49 |
manualInit = true
|
50 |
org.txm.Toolbox.initialize(new File(System.getProperty("user.home")+"/TXM/install.prefs")) |
51 |
} |
52 |
|
53 |
def corpus = CorpusManager.getCorpusManager().getCorpus("QUETE") |
54 |
|
55 |
try
|
56 |
{ |
57 |
def d = new Diagnostic(corpus, 20) |
58 |
d.process(); |
59 |
println d.htmldump() |
60 |
} catch(Exception e){ e.printStackTrace() } |
61 |
|
62 |
if(manualInit)
|
63 |
org.txm.Toolbox.shutdown() |
64 |
|