Revision 1137 tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/TTAnnotater.groovy

TTAnnotater.groovy (revision 1137)
6 6
import org.txm.importer.xtz.*
7 7
import org.txm.Toolbox
8 8
import org.txm.core.engines.*
9

  
9 10
/**
10 11
 * Wraps current Annotate class into the import workflow
11 12
 * 
......
22 23
	public void process() {
23 24

  
24 25
		//String model = module.getParameters().get(ImportKeys.TTMODEL);
25
		String cleanDirectories = module.getParameters().getKeyValueParameters().get(ImportKeys.CLEAN);
26
		boolean cleanDirectories = module.getProject().getCleanAfterBuild();
26 27
		
27
		String corpusname = module.getParameters().getCorpusName();
28
		def corpusElem = module.getParameters().getCorpora().get(corpusname);
29
		String lang = corpusElem.getAttribute("lang");
28
		String corpusname = module.getProject().getName();
29
		String lang = module.getProject().getLang();
30 30

  
31 31
		def engine = Toolbox.getEngineManager(EngineType.ANNOTATION).getEngine("TreeTagger")
32 32
		if (module.isMultiThread()) {
......
43 43
			}
44 44
		}
45 45
		
46
		if ("true".equals(cleanDirectories)) {
46
		if (cleanDirectories) {
47 47
			new File(module.getBinaryDirectory(), "treetagger").deleteDir()
48 48
			new File(module.getBinaryDirectory(), "annotations").deleteDir()
49 49
		}

Also available in: Unified diff