Skip to content

Commit

Permalink
remove parentheses often seen in callouts, for better callout to refe…
Browse files Browse the repository at this point in the history
…rence match
  • Loading branch information
mash committed Aug 2, 2020
1 parent ff10968 commit 11cbbcf
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,8 @@ private static int matchCount(List<LayoutToken> toks, Pattern p) {
private List<BibDataSet> postFilterMatches(String c, List<BibDataSet> matches) {
if (c.toLowerCase().contains("et al") || c.toLowerCase().contains(" and ")) {
String[] sp = c.trim().split(" ");
final String author = sp[0].toLowerCase();
//callouts often include parentheses as seen in https://grobid.readthedocs.io/en/latest/training/fulltext/
final String author = sp[0].replaceAll("[\\(\\[]", "").toLowerCase();

ArrayList<BibDataSet> bibDataSets = Lists.newArrayList(Iterables.filter(matches, new Predicate<BibDataSet>() {
@Override
Expand Down

0 comments on commit 11cbbcf

Please sign in to comment.