Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
courville committed Jun 6, 2024
1 parent ed6c029 commit 5a84a50
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/com/archos/mediascraper/preprocess/ParseUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class ParseUtils {

// matches "[space or punctuation/brackets etc]year", year is group 1
private static final Pattern YEAR_PATTERN = Pattern.compile("(.*)[\\s\\p{Punct}]((?:19|20)\\d{2})(?!\\d)");

private static final Pattern YEAR_PATTERN_END_STRING = Pattern.compile("(.*)[\\s\\p{Punct}]((?:19|20)\\d{2})(?!\\d)$");
private static final Pattern PARENTHESIS_YEAR_PATTERN = Pattern.compile("(.*)[\\s\\p{Punct}]+\\(((?:19|20)\\d{2})\\)");

// Strip out everything after empty parenthesis (after year pattern removal)
Expand Down Expand Up @@ -129,6 +129,11 @@ public static Pair<String, String> yearExtractor(String input) {
return twoPatternExtractor2(input, YEAR_PATTERN);
}

public static Pair<String, String> yearExtractorEndString(String input) {
log.debug("yearExtractor input: " + input);
return twoPatternExtractor2(input, YEAR_PATTERN_END_STRING);
}

// matches "[space or punctuation/brackets etc](year)", year is group 1
public static Pair<String, String> parenthesisYearExtractor(String input) {
log.debug("parenthesisYearExtractor input: " + input);
Expand Down

0 comments on commit 5a84a50

Please sign in to comment.