Commit 247bdba1 authored by Javi Corvi's avatar Javi Corvi
Browse files

different folder for csv format

parent 83bfe25e
Pipeline #28871 passed with stage
in 2 minutes and 6 seconds
......@@ -127,6 +127,11 @@ public class App {
File outputDirectory = new File(outputFilePath);
if(!outputDirectory.exists())
outputDirectory.mkdirs();
String outputFilePathCSV = outputFilePath + File.separator + "csv_format";
File outputDirectoryCSV = new File(outputFilePathCSV);
if(!outputDirectoryCSV.exists())
outputDirectoryCSV.mkdirs();
Set<String> processedFiles = null;
try {
......@@ -149,7 +154,7 @@ public class App {
}
try {
process(inputFilePath, outputFilePath,workdirPath, annotationSet, annotationSetRelationExtraction, processedFiles);
process(inputFilePath, outputFilePath, outputFilePathCSV, workdirPath, annotationSet, annotationSetRelationExtraction, processedFiles);
} catch (IOException e) {
e.printStackTrace();
}
......@@ -160,7 +165,7 @@ public class App {
* @param properties_parameters_path
* @throws IOException
*/
public static void process(String inputDirectoryPath, String outputDirectoryPath, String workdir, String annotationSet, String annotationSetRelationExtraction, Set<String> processedFiles) throws IOException {
public static void process(String inputDirectoryPath, String outputDirectoryPath, String outputDirectoryCSV, String workdir, String annotationSet, String annotationSetRelationExtraction, Set<String> processedFiles) throws IOException {
System.out.println("App::processTagger :: INIT ");
if (java.nio.file.Files.isDirectory(Paths.get(inputDirectoryPath))) {
File inputDirectory = new File(inputDirectoryPath);
......@@ -174,8 +179,8 @@ public class App {
String fileOutPutName = file.getName();
File outputAbstractFile = new File (outputDirectoryPath + File.separator + fileOutPutName.replace(".xml", "_documents.json"));
File outputAnnotationsFile = new File (outputDirectoryPath + File.separator + fileOutPutName.replace(".xml", "_annotations.json"));
File cvsFindingsOutputFile = new File (outputDirectoryPath + File.separator + fileOutPutName.replace(".xml", "_FINDINGS.csv"));
File cvsSRDomainOutputFile = new File (outputDirectoryPath + File.separator + fileOutPutName.replace(".xml", "_SRDOMAIN.csv"));
File cvsFindingsOutputFile = new File (outputDirectoryCSV + File.separator + fileOutPutName.replace(".xml", "_FINDINGS.csv"));
File cvsSRDomainOutputFile = new File (outputDirectoryCSV + File.separator + fileOutPutName.replace(".xml", "_SRDOMAIN.csv"));
processDocument(file, outputAbstractFile, outputAnnotationsFile, cvsFindingsOutputFile, cvsSRDomainOutputFile,annotationSet, annotationSetRelationExtraction);
} catch (ResourceInstantiationException e) {
System.out.println("App::process :: error with document " + file.getAbsolutePath());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment