Fixed slow combination of words and lemmas presentation
This commit is contained in:
@@ -44,11 +44,14 @@ public class Ngrams {
|
||||
|
||||
// generate proper MultipleHMKeys depending on filter data
|
||||
String key = wordToString(ngramCandidate, stats.getFilter().getCalculateFor());
|
||||
// String key = "aaaaaaaaaaaaaaaaaaaaaaa";
|
||||
|
||||
String lemma = "";
|
||||
String wordType = "";
|
||||
String msd = "";
|
||||
for (CalculateFor otherKey : stats.getFilter().getMultipleKeys()){
|
||||
if(otherKey.toString().equals("lema")){
|
||||
// lemma = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
|
||||
lemma = wordToString(ngramCandidate, otherKey);
|
||||
} else if(otherKey.toString().equals("besedna vrsta")){
|
||||
wordType = wordToString(ngramCandidate, otherKey).substring(0, 1);
|
||||
@@ -222,7 +225,8 @@ public class Ngrams {
|
||||
private static void validateAndCountSkipgramCandidate(ArrayList<Word> skipgramCandidate, StatisticsNew stats) {
|
||||
// count if no regex is set or if it is & candidate passes it
|
||||
if (!stats.getFilter().hasMsd() || passesRegex(skipgramCandidate, stats.getFilter().getMsd())) {
|
||||
stats.updateResults(wordToString(skipgramCandidate, stats.getFilter().getCalculateFor()));
|
||||
stats.updateTaxonomyResults(new MultipleHMKeys(wordToString(skipgramCandidate, stats.getFilter().getCalculateFor()), "", "", ""),
|
||||
stats.getCorpus().getTaxonomy());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user