Revision 479 tmp/org.txm.groovy.core/src/groovy/org/txm/tal/stanford/StanfordTaggerMacro.groovy

StanfordTaggerMacro.groovy (revision 479)
6 6

  
7 7
import org.kohsuke.args4j.*
8 8
import groovy.transform.Field
9
import org.txm.rcp.swt.widget.parameters.*
9
import org.txm.rcpapplication.swt.widget.parameters.*
10 10

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

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

Also available in: Unified diff