Improved deck naming removing "-" and updated pioneer deckgen data

This commit is contained in:
austinio7116
2021-04-12 13:45:09 +00:00
parent b7787c8cf6
commit 1a1057f56f
7 changed files with 3 additions and 3 deletions

View File

@@ -216,12 +216,12 @@ public final class LDAModelGenetrator {
} }
LinkedHashMap<String, Integer> wordCounts = new LinkedHashMap<>(); LinkedHashMap<String, Integer> wordCounts = new LinkedHashMap<>();
for( Deck deck: decks){ for( Deck deck: decks){
String name = deck.getName().replaceAll(".* Version - ","").replaceAll(" \\((Modern|Pioneer|Standard|Legacy|Vintage), #[0-9]+\\)",""); String name = deck.getName().replaceAll(".* Version - ","").replaceAll(" \\((Historic|Modern|Pioneer|Standard|Legacy|Vintage), #[0-9]+\\)","");
name = name.replaceAll("\\(Modern|Pioneer|Standard|Legacy|Vintage|Fuck|Shit|Cunt\\)",""); name = name.replaceAll("\\(Historic|Modern|Pioneer|Standard|Legacy|Vintage|Fuck|Shit|Cunt\\)","");
String[] tokens = name.split(" "); String[] tokens = name.split(" ");
for(String rawtoken: tokens){ for(String rawtoken: tokens){
String token = rawtoken.toLowerCase(); String token = rawtoken.toLowerCase();
if (token.matches("[0-9]+")) { if (token.matches("[0-9]+") || token.matches("\\s?\\-\\s?")) {
//skip just numbers as not useful //skip just numbers as not useful
continue; continue;
} }