diff --git a/build-data/BuildData.groovy b/build-data/BuildData.groovy index 8a985867..f987d63a 100755 --- a/build-data/BuildData.groovy +++ b/build-data/BuildData.groovy @@ -88,16 +88,11 @@ def getNamePermutations(names) { def out = names*.trim().unique().collectMany{ original -> def s = original.trim() - s = s.replaceAll(/([,]\s(The|A)$)/, '').trim() + s = s.replaceAll(/([,]\s(The|A)$)/, '') s = s.replaceAll(/\s&\s/, ' and ') s = s.replaceAll(/\s\([^\)]*\)$/, '').trim() - - // e.g. The Walking Dead => Walking Dead, The Voice => The Voice - def sn = s.replaceAll(/^(?i:The|A)\s/, '').trim() - if (sn ==~ /\w+/) { - return [original, s] - } - return [original, sn] + s = s.replaceAll(/^(?i:The|A)\s/, '').trim() + return [original, s] }.unique{ normalize(it) }.findAll{ it.length() > 0 } out = out.findAll{ it.length() >= 2 && !(it ==~ /[1][0-9][1-9]/) && !(it =~ /^[a-z]/) && it =~ /^[@.\p{L}\p{Digit}]/ } // MUST START WITH UNICODE LETTER