diff --git a/forge-gui/src/main/java/forge/deck/CardArchetypeLDAGenerator.java b/forge-gui/src/main/java/forge/deck/CardArchetypeLDAGenerator.java index 93c8ff3099a..2c98efa511b 100644 --- a/forge-gui/src/main/java/forge/deck/CardArchetypeLDAGenerator.java +++ b/forge-gui/src/main/java/forge/deck/CardArchetypeLDAGenerator.java @@ -47,10 +47,25 @@ public final class CardArchetypeLDAGenerator { } } ldaPools.put(format, formatMap); - ldaArchetypes.put(format, lda); + ldaArchetypes.put(format, pruneArchetypes(lda)); return true; } + public static List pruneArchetypes(List archetypes){ + List pruned = new ArrayList<>(); + float deckCount=0; + for(Archetype archetype : archetypes){ + deckCount = deckCount + archetype.getDeckCount(); + } + for(Archetype archetype : archetypes){ + float metaPercent = archetype.getDeckCount().floatValue()/deckCount; + if( metaPercent > 0.001 ){ + pruned.add(archetype); + } + } + return pruned; + } + public static Map>>> loadFormat(List lda) throws Exception{ List>> topics = new ArrayList<>();