Some functionality from OneWord copied to StringAnalysis and fixed

This commit is contained in:
2018-08-22 09:11:14 +02:00
parent e140a9538b
commit a8d147de52
12 changed files with 289 additions and 89 deletions

View File

@@ -22,6 +22,7 @@ public class Filter {
IS_CVV,
STRING_LENGTH,
TAXONOMY,
DISPLAY_TAXONOMY,
MSD,
HAS_MSD,
SOLAR_FILTERS,
@@ -102,6 +103,14 @@ public class Filter {
}
}
public void setDisplayTaxonomy(boolean displayTaxonomy) {
filter.put(DISPLAY_TAXONOMY, displayTaxonomy);
}
public boolean getDisplayTaxonomy() {
return (boolean) filter.get(DISPLAY_TAXONOMY);
}
public void setMsd(ArrayList<Pattern> msd) {
filter.put(MSD, msd);
if (!ValidationUtil.isEmpty(msd)) {

View File

@@ -48,7 +48,7 @@ public class StatisticsNew {
this.taxonomyResult.put("Total", new ConcurrentHashMap<>());
// create table for counting word occurances per taxonomies
if (this.corpus.getTaxonomy() != null) {
if (this.corpus.getTaxonomy() != null && filter.getDisplayTaxonomy()) {
if (this.filter.getTaxonomy().isEmpty()) {
for (int i = 0; i < this.corpus.getTaxonomy().size(); i++) {
this.taxonomyResult.put(this.corpus.getTaxonomy().get(i), new ConcurrentHashMap<>());