public void start() throws LiveIOProgramExecutionException { if (OS.isWindows()) { // C&C's craziness on Windows... this.modelsDir = this.modelsDir.replaceAll("\\\\", "\\\\\\\\"); } System.out.println("["+this.getClass().getName()+"] models directory = " +this.modelsDir); LinkedList<String> programAndArgs = new LinkedList<String>(); programAndArgs.add(this.programName); programAndArgs.add("--models"); programAndArgs.add(this.modelsDir); execution = new LiveIOProgramExecution(programAndArgs); execution.start(); converter = new TextToPennTreeBankConverter(); }
/** * Parser initializations. * @throws LiveIOProgramExecutionException */ private void start() throws LiveIOProgramExecutionException { if (OS.isWindows()) { // C&C's craziness on Windows... this.modelsDir = this.modelsDir.replaceAll("\\\\", "\\\\\\\\"); } System.out.println("["+this.getClass().getName()+"] models directory = " +this.modelsDir); LinkedList<String> programAndArgs = new LinkedList<String>(); programAndArgs.add(this.exec); programAndArgs.add(MODELS_ARG_SPECIFIER); programAndArgs.add(this.modelsDir); //execution = new LiveIOProgramExecution(programAndArgs,Charset.forName(C_AND_C_CHARSET),true); execution = new LiveIOProgramExecution(programAndArgs,java.nio.charset.Charset.forName(C_AND_C_CHARSET),false,false,true); //execution = new LiveIOProgramExecution(programAndArgs,null,true,false,true); //execution = new LiveIOProgramExecution(programAndArgs); execution.start(); converter = new eu.excitementproject.eop.lap.biu.en.tokenizer.TextToPennTreeBankConverter(); }
public static String getRedisServerCmd() throws RedisRunException { if (OS.isLinux() || OS.isUnix() || OS.isMac()) return "redis-server"; if (OS.isWindows()) return "redis-server.exe"; throw new RedisRunException("Current operating system does not support Redis servewr execution"); }
File file=null; if (bSort) { if (OS.isWindows()) throw new Exception("numeric sort of files is not supported at Windows"); file = new java.io.File(infiles[i] + ".sorted");