Revision 479 tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/StanfordTaggerMacro.groovy

StanfordTaggerMacro.groovy (revision 479)
9 9

  
10 10
import org.kohsuke.args4j.*
11 11
import groovy.transform.Field
12
import org.txm.rcp.swt.widget.parameters.*
12
import org.txm.rcpapplication.swt.widget.parameters.*
13 13

  
14 14
@Field @Option(name="inputDir", usage="input directory", widget="Folder", required=true, def="/home/mdecorde/xml/testarabe/out-s")
15 15
File inputDir
......
33 33

  
34 34
inputDir.eachFileMatch(~/.*$extension/) { inputFile ->
35 35
	String name = inputFile.getName()
36
	int idx = name.indexOf(".")
36
	int idx = name.lastIndexOf(".")
37 37
	if (idx > 0) name = name.substring(0, idx)
38 38
	
39 39
	new File(outputDir, name+".xml").withWriter("UTF-8") { writer ->

Also available in: Unified diff