@ Deprecated public Process getTokenizationProcess ( File inputFile ) throws IOException { // assemble a command line for the tokenization script and execute it ArrayList < String > command = new ArrayList < String > ( ) ; command . add ( "perl" ) ; if ( this . utf8Switch != "" ) command . add ( this . utf8Switch ) ; command . add ( this . rootPath + this . fileSeparator + "cmd" + this . fileSeparator + this . tokScriptName ) ; if ( this . languageSwitch != "" ) command . add ( this . languageSwitch ) ; if ( new File ( this . rootPath + this . fileSeparator + "lib" + this . fileSeparator , this . abbFileName ) . exists ( ) ) { command . add ( "-a" ) ; command . add ( this . rootPath + this . fileSeparator + "lib" + this . fileSeparator + this . abbFileName ) ; } command . add ( inputFile . getAbsolutePath ( ) ) ; String [ ] commandStr = new String [ command . size ( ) ] ; command . toArray ( commandStr ) ; Process p = Runtime . getRuntime ( ) . exec ( commandStr ) ; return p ; }
This method creates a process with some parameters for the tokenizer script .