Fixed slow combination of words and lemmas presentation
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
package data;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/*
|
||||
Created for when words are sorted by multiple keys, i.e. not just lemmas but lemmas and msd simultaneously.
|
||||
*/
|
||||
public final class MultipleHMKeys {
|
||||
private final String key, lemma, wordType, msd;
|
||||
|
||||
private MultipleHMKeys actual_obj;
|
||||
public MultipleHMKeys(String key) {
|
||||
this.key = key;
|
||||
this.lemma = "";
|
||||
@@ -37,12 +40,7 @@ public final class MultipleHMKeys {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
// if(key2 == null){
|
||||
// return key1.hashCode();
|
||||
// } else if (key3 == null){
|
||||
// return key1.hashCode() ^ key2.hashCode();
|
||||
// }
|
||||
return key.hashCode() ^ lemma.hashCode() ^ wordType.hashCode() ^ msd.hashCode();
|
||||
return Objects.hash(key, lemma, wordType, msd);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -304,6 +304,10 @@ public class StatisticsNew {
|
||||
|
||||
}
|
||||
|
||||
public Map<String, Map<MultipleHMKeys, AtomicLong>> getTaxonomyResult() {
|
||||
return taxonomyResult;
|
||||
}
|
||||
|
||||
public void updateResults(String o) {
|
||||
// if not in map
|
||||
AtomicLong r = result.putIfAbsent(o, new AtomicLong(1));
|
||||
|
||||
Verwijs in nieuw issue
Block a user