* clear name of punctuation, spacing, and leading 'The' or 'A' that are common causes for word-lookup to fail

This commit is contained in:
Reinhard Pointner 2013-03-05 10:20:10 +00:00
parent 3864ee5b86
commit b7da78c942
3 changed files with 7 additions and 1 deletions

View File

@ -615,7 +615,8 @@ public class MediaDetection {
public static List<Movie> matchMovieFromStringWithoutSpacing(Collection<String> names, boolean strict) throws IOException {
Pattern spacing = Pattern.compile("[\\p{Punct}\\p{Space}]+");
// clear name of punctuation, spacing, and leading 'The' or 'A' that are common causes for word-lookup to fail
Pattern spacing = Pattern.compile("(^(?i)(The|A)\\b)|[\\p{Punct}\\p{Space}]+");
List<String> terms = new ArrayList<String>(names.size());
for (String it : names) {

View File

@ -62,8 +62,11 @@
^Sort$
^Staging$
^Storage$
^temp$
^temporary$
^Test$
^testdata$
^tmp$
^Torrent[s]?
^Tracker
^Trailer
@ -72,6 +75,7 @@
^user$
^VCD$
^VIDEO_TS$
^volume[0-9]?$
^watch$
A.Release.Lounge
ABC

View File

@ -174,6 +174,7 @@ BDr
beAst
BEEF.STEW
BeefStew
BeFree
BeStDivX
BeStDvD
BestHD