From b5bdf05f7d3bc1dfdd1237363eb3644570caab59 Mon Sep 17 00:00:00 2001 From: Tomasz Walkowiak <Tomasz.Walkowiak@pwr.edu.pl> Date: Thu, 25 Jun 2020 12:28:40 +0200 Subject: [PATCH] Fixing bug in JSON2XLSX --- .../java/pl/clarin/converter/Converter.java | 19 +++++-------------- .../java/pl/clarin/converter/JSON2XLSX.java | 2 +- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/module/src/main/java/pl/clarin/converter/Converter.java b/module/src/main/java/pl/clarin/converter/Converter.java index bf7ee2f..b9f0aa0 100644 --- a/module/src/main/java/pl/clarin/converter/Converter.java +++ b/module/src/main/java/pl/clarin/converter/Converter.java @@ -43,7 +43,6 @@ public class Converter extends Worker { new TopicModel().process(fileIn, fileOut, options); } else if (type.equals("ccl2liwc")) { new Ccl2LIWC().process(fileIn, fileOut, options); - } else if (type.equals("ccl2xlsx")) { new CCLCzasownik().process(fileIn, fileOut, options); } else if (type.equals("ccl2verbs")) { @@ -60,32 +59,24 @@ public class Converter extends Worker { new Ccl2LocJSON().process(fileIn, fileOut, options); } else if (type.equals("txt2list")) { new Txt2List().process(fileIn, fileOut, options); - /* + /* } else if (type.equals("ccls2dist")) { new Ccls2Dist(connection, "lex_").process(fileIn, fileOut, options); } else if (type.equals("ccls2worddist")) { new Ccls2WordDist(connection, "lex_").process(fileIn, fileOut, options); - */ + */ } else if (type.equals("ccl2vec")) { new Ccl2Doc2Vec(connection, "lex_").process(fileIn, fileOut, options); } else if (type.equals("ccl2stat")) { new Ccl2Stats().process(fileIn, fileOut, options); - } - - else if (type.equals("fog")) { + } else if (type.equals("fog")) { new Smog2MSXLSX().process(fileIn, fileOut, options); - } - - else if (type.equals("json2xlsx")){ + } else if (type.equals("json2xlsx")) { new JSON2XLSX().process(fileIn, fileOut, options); - } - - else { + } else { new Ccl2Loc().process(fileIn, fileOut, options); } - - } diff --git a/module/src/main/java/pl/clarin/converter/JSON2XLSX.java b/module/src/main/java/pl/clarin/converter/JSON2XLSX.java index b6e8a09..ca6d676 100644 --- a/module/src/main/java/pl/clarin/converter/JSON2XLSX.java +++ b/module/src/main/java/pl/clarin/converter/JSON2XLSX.java @@ -33,7 +33,7 @@ public class JSON2XLSX { { keys.put(key, new Integer(key_id++)); } double value = json.getDouble(key); - row.createCell(column + key_id).setCellValue(value); + row.createCell(column + keys.get(key)).setCellValue(value); } } -- GitLab