Added some optimizations and new taxonomy names
This commit is contained in:
@@ -125,9 +125,11 @@ public class Export {
|
||||
|
||||
// for (Map<MultipleHMKeys, AtomicLong> value : taxonomyResults.values()) {
|
||||
for (CalculateFor otherKey : filter.getMultipleKeys()) {
|
||||
FILE_HEADER_AL.add(otherKey.toHeaderString());
|
||||
if (otherKey.equals(CalculateFor.LEMMA))
|
||||
FILE_HEADER_AL.add("Lema male črke");
|
||||
if (num_taxonomy_frequencies.get(otherKey) > 0) {
|
||||
FILE_HEADER_AL.add(otherKey.toHeaderString());
|
||||
if (otherKey.equals(CalculateFor.LEMMA))
|
||||
FILE_HEADER_AL.add("Lema male črke");
|
||||
}
|
||||
}
|
||||
|
||||
// if(otherKey.equals(CalculateFor.LEMMA)){
|
||||
@@ -164,7 +166,7 @@ public class Export {
|
||||
// }
|
||||
FILE_HEADER_AL.add("Skupna relativna pogostost (na milijon pojavitev)");
|
||||
for (String key : taxonomyResults.keySet()) {
|
||||
if(!key.equals("Total")) {
|
||||
if(!key.equals("Total") && num_taxonomy_frequencies.get(key) > 0) {
|
||||
FILE_HEADER_AL.add("Absolutna pogostost [" + key + "]");
|
||||
FILE_HEADER_AL.add("Delež [" + key + "]");
|
||||
FILE_HEADER_AL.add("Relativna pogostost [" + key + "]");
|
||||
@@ -257,7 +259,7 @@ public class Export {
|
||||
dataEntry.add(formatNumberAsPercent((double) e.getValue() / num_frequencies));
|
||||
dataEntry.add(String.format("%.2f", ((double) e.getValue() * 1000000)/num_frequencies));
|
||||
for (String key : taxonomyResults.keySet()){
|
||||
if(!key.equals("Total")) {
|
||||
if(!key.equals("Total") && num_taxonomy_frequencies.get(key) > 0) {
|
||||
AtomicLong frequency = taxonomyResults.get(key).get(e.getKey());
|
||||
dataEntry.add(frequency.toString());
|
||||
dataEntry.add(formatNumberAsPercent((double) frequency.get() / num_taxonomy_frequencies.get(key)));
|
||||
|
||||
Reference in New Issue
Block a user