Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove predatory journal checker due to false positives #11066

Merged
merged 6 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/main/java/org/jabref/logic/integrity/IntegrityCheck.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@ public IntegrityCheck(BibDatabaseContext bibDatabaseContext,
new CitationKeyDuplicationChecker(bibDatabaseContext.getDatabase()),
new AmpersandChecker(),
new LatexIntegrityChecker(),
new JournalInAbbreviationListChecker(StandardField.JOURNAL, journalAbbreviationRepository),
new PredatoryJournalChecker(predatoryJournalRepository,
List.of(StandardField.JOURNAL, StandardField.PUBLISHER, StandardField.BOOKTITLE))
));
new JournalInAbbreviationListChecker(StandardField.JOURNAL, journalAbbreviationRepository)));

if (bibDatabaseContext.isBiblatexMode()) {
entryCheckers.add(new UTF8Checker(bibDatabaseContext.getMetaData().getEncoding().orElse(StandardCharsets.UTF_8)));
} else {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
package org.jabref.logic.journals.predatory;

import java.nio.file.Path;
import java.util.Locale;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.stream.Collectors;

import org.jabref.logic.util.strings.StringSimilarity;

import org.h2.mvstore.MVMap;
import org.h2.mvstore.MVStore;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -26,7 +23,6 @@ public class PredatoryJournalRepository implements AutoCloseable {
* Initializes the internal data based on the predatory journals found in the given MV file
*/
public PredatoryJournalRepository(Path mvStore) {
MVMap<String, PredatoryJournalInformation> predatoryJournalsMap;
Siedlerchr marked this conversation as resolved.
Show resolved Hide resolved
store = new MVStore.Builder().readOnly().fileName(mvStore.toAbsolutePath().toString()).open();
predatoryJournals = store.openMap("PredatoryJournals");
}
Expand All @@ -49,13 +45,7 @@ public boolean isKnownName(String journalName) {
LOGGER.debug("Found predatory journal {}", journal);
return true;
}

var matches = predatoryJournals.keySet().stream()
.filter(key -> match.isSimilar(journal.toLowerCase(Locale.ROOT), key.toLowerCase(Locale.ROOT)))
.collect(Collectors.toList());

LOGGER.info("Found multiple possible predatory journals {}", String.join(", ", matches));
return !matches.isEmpty();
return false;
}

@Override
Expand Down

This file was deleted.

Loading