Statistics
| Revision:

root / tmp / org.txm.groovy.core / src / groovy / org / txm / test / Informations.groovy @ 499

History | View | Annotate | Download (1.7 kB)

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