/** * Performs some basic processing of the input source and target files. The input files are also * copied to the /input folder. This is necessary because the some tools (e.g., the MADA * morphological analyser) produce their output in the same folder as the input file, which may * cause problems if the right access rights are not available for that particular folder */ protected void preprocessing() { String sourceInputFolder = input + File.separator + sourceLang; String targetInputFolder = input + File.separator + targetLang; File origSourceFile = new File(getSourceFile()); File inputSourceFile = new File(sourceInputFolder + File.separator + origSourceFile.getName()); System.out.println("source input:" + getSourceFile()); System.out.println("target input:" + getTargetFile()); File origTargetFile = new File(getTargetFile()); File inputTargetFile = new File(targetInputFolder + File.separator + origTargetFile.getName()); try { System.out.println("copying input to " + inputSourceFile.getPath()); copyFile(origSourceFile, inputSourceFile); System.out.println("copying input to " + inputTargetFile.getPath()); copyFile(origTargetFile, inputTargetFile); setSourceFile(inputSourceFile.getPath()); setTargetFile(inputTargetFile.getPath()); } catch (Exception e) { e.printStackTrace(); } }