Refactored results - moved to taxonomyResults
This commit is contained in:
@@ -108,9 +108,11 @@ public class Export {
|
||||
}
|
||||
FILE_HEADER_AL.add("Skupna relativna pogostost");
|
||||
for (String key : taxonomyResults.keySet()) {
|
||||
FILE_HEADER_AL.add("Absolutna pogostost [" + key + "]");
|
||||
FILE_HEADER_AL.add("Delež [" + key + "]");
|
||||
FILE_HEADER_AL.add("Relativna pogostost [" + key + "]");
|
||||
if(!key.equals("Total")) {
|
||||
FILE_HEADER_AL.add("Absolutna pogostost [" + key + "]");
|
||||
FILE_HEADER_AL.add("Delež [" + key + "]");
|
||||
FILE_HEADER_AL.add("Relativna pogostost [" + key + "]");
|
||||
}
|
||||
}
|
||||
FILE_HEADER = new String[ FILE_HEADER_AL.size() ];
|
||||
FILE_HEADER_AL.toArray(FILE_HEADER);
|
||||
@@ -160,11 +162,12 @@ public class Export {
|
||||
dataEntry.add(formatNumberAsPercent((double) e.getValue() / num_frequencies));
|
||||
dataEntry.add(String.format("%.2f", ((double) e.getValue() * 10000)/num_frequencies));
|
||||
for (String key : taxonomyResults.keySet()){
|
||||
AtomicLong frequency = taxonomyResults.get(key).get(e.getKey());
|
||||
dataEntry.add(frequency.toString());
|
||||
dataEntry.add(formatNumberAsPercent((double) frequency.get() / num_taxonomy_frequencies.get(key)));
|
||||
dataEntry.add(String.format("%.2f", ((double) frequency.get() * 10000) / num_taxonomy_frequencies.get(key)));
|
||||
|
||||
if(!key.equals("Total")) {
|
||||
AtomicLong frequency = taxonomyResults.get(key).get(e.getKey());
|
||||
dataEntry.add(frequency.toString());
|
||||
dataEntry.add(formatNumberAsPercent((double) frequency.get() / num_taxonomy_frequencies.get(key)));
|
||||
dataEntry.add(String.format("%.2f", ((double) frequency.get() * 10000) / num_taxonomy_frequencies.get(key)));
|
||||
}
|
||||
}
|
||||
|
||||
csvFilePrinter.printRecord(dataEntry);
|
||||
|
||||
Reference in New Issue
Block a user