Statistics
| Revision:

root / tmp / org.txm.connlu.core / groovy / org / txm / scripts / importer / connlu / connluLoader.groovy @ 2129

History | View | Annotate | Download (1.8 kB)

1
// Copyright © 2010-2013 ENS de Lyon.
2
// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
3
// Lyon 2, University of Franche-Comté, University of Nice
4
// Sophia Antipolis, University of Paris 3.
5
//
6
// The TXM platform is free software: you can redistribute it
7
// and/or modify it under the terms of the GNU General Public
8
// License as published by the Free Software Foundation,
9
// either version 2 of the License, or (at your option) any
10
// later version.
11
//
12
// The TXM platform is distributed in the hope that it will be
13
// useful, but WITHOUT ANY WARRANTY; without even the implied
14
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15
// PURPOSE. See the GNU General Public License for more
16
// details.
17
//
18
// You should have received a copy of the GNU General
19
// Public License along with the TXM platform. If not, see
20
// http://www.gnu.org/licenses.
21
//
22
//
23
//
24
// $LastChangedDate: 2015-06-03 15:04:53 +0200 (mer., 03 juin 2015) $
25
// $LastChangedRevision: 2984 $
26
// $LastChangedBy: mdecorde $
27
//
28
package org.txm.scripts.importer.connlu;
29

    
30
import javax.xml.stream.*
31

    
32
import org.txm.*
33
import org.txm.metadatas.*
34
import org.txm.objects.*
35
import org.txm.importer.scripts.xmltxm.*
36
import org.txm.utils.*
37
import org.txm.utils.i18n.*
38
import org.txm.importer.xtz.*
39

    
40
String userDir = System.getProperty("user.home");
41

    
42
def MONITOR;
43
Project project;
44

    
45
try {project=projectBinding;MONITOR=monitor} catch (Exception)
46
{        }
47
if (project == null) { println "no project set. Aborting"; return; }
48

    
49
CONNLUImport i = new CONNLUImport(project);
50
/*
51
 * To customize the XTZ import, replace the importer, compiler, annotater or pager objects before calling process()
52
                i.importer = new XTZImporter(i)
53
                i.compiler = new XTZCompiler(i)
54
                i.annotater = new TTAnnotater(i);
55
                i.pager = new XTZPager(i)
56
 */
57
i.process();
58
readyToLoad = i.isSuccessful && project.save()