Verified Owner
Top Description Fields Constructors Methods
org.jabref.logic.icore

public Class ConferenceRepository

extends Object
Class Inheritance
Imports
java.io.BufferedReader, .IOException, .InputStream, .InputStreamReader, java.util.HashMap, .Map, .Optional, .Set, org.jabref.logic.JabRefException, org.jabref.logic.util.strings.StringSimilarity, org.jabref.model.icore.ConferenceEntry, org.apache.commons.csv.CSVFormat, .CSVRecord, org.jspecify.annotations.NonNull, org.slf4j.Logger, .LoggerFactory

A Repository that loads and stores the latest ICORE Conference Ranking Data and allows lookups using a conference's acronym or title.

The ranking data is sourced from the ICORE Conference Ranking Portal. Since the website does not expose an API endpoint to fetch this data programmatically, it must be manually exported from the website and stored as a resource. This means that when new ranking data is released, the old data must be replaced and the ICORE_RANK_DATA_FILE variable must be modified to point to the new data file.

Field Summary

Modifier and TypeField and Description
private final Map<String, ConferenceEntry>
private static final double
private static final double
private static final String
private static final StringSimilarity
private static final double
private static final Logger
private int
private final Map<String, ConferenceEntry>
private final Map<String, ConferenceEntry>

Constructor Summary

AccessConstructor and Description
public
public
ConferenceRepository(InputStream testFileInputStream)

Constructor to allow loading in test data

Method Summary

Modifier and TypeMethod and Description
private Optional<ConferenceEntry>

Returns:

an Optional conference entry, if found or Optional.empty() if no conference entry is found
fuzzySearchConferenceTitles
(String
The query string to be searched
query
)

Searches the conference data for the given query string using a combination of Levenshtein similarity StringSimilarity#similarity and Longest Common Substring (LCS) similarity StringSimilarity#LCSSimilarity.

private Optional<ConferenceEntry>
public Optional<ConferenceEntry>

Returns:

an Optional conference entry, if found or Optional.empty() if no conference entry is found
getConferenceFromBookTitle
(@NonNull String
the string to search, must not be null
bookTitle
)

Searches the given query against the ICORE conference ranking data and returns a match, if found.

private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

acronymToConferenceback to summary
private final Map<String, ConferenceEntry> acronymToConference
COMBINED_LCS_LEV_THRESHOLDback to summary
private static final double COMBINED_LCS_LEV_THRESHOLD
EPSILONback to summary
private static final double EPSILON
ICORE_RANK_DATA_FILEback to summary
private static final String ICORE_RANK_DATA_FILE
LEVENSHTEIN_MATCHERback to summary
private static final StringSimilarity LEVENSHTEIN_MATCHER
LEVENSHTEIN_THRESHOLDback to summary
private static final double LEVENSHTEIN_THRESHOLD
LOGGERback to summary
private static final Logger LOGGER
maxAcronymLengthback to summary
private int maxAcronymLength
normalizedTitleToConferenceback to summary
private final Map<String, ConferenceEntry> normalizedTitleToConference
titleToConferenceback to summary
private final Map<String, ConferenceEntry> titleToConference

Constructor Detail

ConferenceRepositoryback to summary
public ConferenceRepository() throws JabRefException
ConferenceRepositoryback to summary
public ConferenceRepository(InputStream testFileInputStream) throws JabRefException

Constructor to allow loading in test data

Method Detail

fuzzySearchConferenceTitlesback to summary
private Optional<ConferenceEntry> fuzzySearchConferenceTitles(String query)

Searches the conference data for the given query string using a combination of Levenshtein similarity StringSimilarity#similarity and Longest Common Substring (LCS) similarity StringSimilarity#LCSSimilarity.

The input query is first fed through the normalizer at ConferenceUtils#normalize which strips away much of the noise.

While searching, the function computes Levenshtein similarity and LCS similarity between the query and the current conference title (also normalized) and prioritizes them in the following order:

  1. Whenever LCS similarity returns 1.0, i.e., a conference title is found entirely as a substring in the query.
  2. Whenever Levenshtein similarity exceeds the threshold defined by the LEVENSHTEIN_THRESHOLD constant.
  3. The combined weighted score of both LCS and Levenshtein similarities exceeds the COMBINED_LCS_LEV_THRESHOLD.

The combined score is calculated as follows: (0.6 * Levenshtein similarity) + (0.4 * LCS similarity)

Parameters
query:String

The query string to be searched

Returns:Optional<ConferenceEntry>

an Optional conference entry, if found or Optional.empty() if no conference entry is found

getConferenceFromAcronymback to summary
private Optional<ConferenceEntry> getConferenceFromAcronym(String query)
getConferenceFromBookTitleback to summary
public Optional<ConferenceEntry> getConferenceFromBookTitle(@NonNull String bookTitle)

Searches the given query against the ICORE conference ranking data and returns a match, if found.

While searching, we first look for a conference acronym present inside parentheses, like (ICSE) or (ICSE 2022). If acronym lookup fails, the query is processed further and matched against the list of conference titles.

Implementation Note

see ConferenceRepository#fuzzySearchConferenceTitles for more details on matching

Parameters
bookTitle:@NonNull String

the string to search, must not be null

Returns:Optional<ConferenceEntry>

an Optional conference entry, if found or Optional.empty() if no conference entry is found

loadConferenceDataFromInputStreamback to summary
private void loadConferenceDataFromInputStream(InputStream inputStream) throws JabRefException