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

public final Class ConferenceUtils

extends Object
Class Inheritance
Imports
java.util.ArrayList, .List, .Optional, .Set, .TreeSet, java.util.regex.Matcher, .Pattern, org.jspecify.annotations.NonNull

Field Summary

Modifier and TypeField and Description
private static final int
private static final int
private static final String
private static final Pattern
private static final Set<String>
private static final Pattern
private static final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Optional<String>

Returns:

an Optional containing the extracted and trimmed string from the first set of parentheses, or Optional.empty() if no string is found
extractStringFromParentheses
(@NonNull String
the string to search, must not be null
input
)

Attempts to extract the string enclosed in the first deepest set of parentheses from the given input string.

public static Set<String>

Returns:

a set of acronym candidates ordered by descending length and then lexicographically, or an empty set if no valid candidates are found
generateAcronymCandidates
(@NonNull String
the raw string to extract acronym candidates from, must not be null
input
,
int
the maximum allowed length of each candidate substring; candidates longer than this are discarded
cutoff
)

Generates possible acronym candidates from the given input string by splitting on common delimiters and extracting substrings within the specified cutoff length.

private static boolean
public static String

Returns:

a normalized string representation of the input
normalize
(@NonNull String
the pre-lowercased raw string to normalize, must not be null
input
)

Normalizes a raw conference title query string into a simplified form suitable for fuzzy matching.

private static void
public static String
private static String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DELIMITER_STARTback to summary
private static final int DELIMITER_START
MAX_CANDIDATES_THRESHOLDback to summary
private static final int MAX_CANDIDATES_THRESHOLD
ORDINAL_REGEXback to summary
private static final String ORDINAL_REGEX
PARENTHESES_PATTERNback to summary
private static final Pattern PARENTHESES_PATTERN
TITLE_STOPWORDSback to summary
private static final Set<String> TITLE_STOPWORDS
YEAR_OR_ORDINAL_PATTERNback to summary
private static final Pattern YEAR_OR_ORDINAL_PATTERN
YEAR_REGEXback to summary
private static final String YEAR_REGEX

Constructor Detail

ConferenceUtilsback to summary
private ConferenceUtils()

Method Detail

extractStringFromParenthesesback to summary
public static Optional<String> extractStringFromParentheses(@NonNull String input)

Attempts to extract the string enclosed in the first deepest set of parentheses from the given input string.

This method uses a regular expression \(([^()]*)\) to find the innermost parenthesized substring. Only the first match is considered; any additional matching substrings in the input are ignored.

If a match is found, leading and trailing whitespace around the string is stripped. If the resulting string is not empty, it is returned wrapped in an Optional. Otherwise, an empty Optional is returned.

Examples:

  • "(SERA)" -> Optional.of("SERA")
  • "Conference ( ABC )" -> Optional.of("ABC")
  • "This (SERA) has multiple (CONF) acronyms" -> Optional.of("SERA")
  • "Input with empty () parentheses" -> Optional.empty()
  • "Input with empty ( ) whitespace in parens" -> Optional.empty()
  • "" -> Optional.empty()
Parameters
input:@NonNull String

the string to search, must not be null

Returns:Optional<String>

an Optional containing the extracted and trimmed string from the first set of parentheses, or Optional.empty() if no string is found

generateAcronymCandidatesback to summary
public static Set<String> generateAcronymCandidates(@NonNull String input, int cutoff)

Generates possible acronym candidates from the given input string by splitting on common delimiters and extracting substrings within the specified cutoff length.

Candidates are ordered in a TreeSet such that longer strings are positioned before shorter ones, with lexicographical ordering used to break ties. This prevents overfitting on composite acronyms during lookup (like between IEEE-IV and IV) by pushing the shorter substrings to the end. A maximum of 50 candidates are generated to avoid excessive expansion. The splitting delimiters are whitespace, ,, ', _, :, ., and -. Delimiters between acronyms are kept, if the cutoff length allows.

For example, given the input string "IEEE-IV'2022" and a cutoff of 11, this method generates the following candidates in order: "IEEE-IV", "IV'2022", "2022", "IEEE", "IV". Notice that "IEEE-IV" is positioned ahead and retains the - in between.

Parameters
input:@NonNull String

the raw string to extract acronym candidates from, must not be null

cutoff:int

the maximum allowed length of each candidate substring; candidates longer than this are discarded

Returns:Set<String>

a set of acronym candidates ordered by descending length and then lexicographically, or an empty set if no valid candidates are found

isAcronymDelimiterback to summary
private static boolean isAcronymDelimiter(char c)
normalizeback to summary
public static String normalize(@NonNull String input)

Normalizes a raw conference title query string into a simplified form suitable for fuzzy matching.

The normalization process performs the following steps:

  1. Removes all substrings enclosed in parentheses, e.g., "proceedings (ICSE 2022)" -> "Proceedings".
  2. Removes all years of form 19XX or 20xx (e.g., 1999, 2022) and ordinals in regular form (e.g., 1st, 2nd, 3rd) as well as in LaTeX syntax (e.g., 3\textsuperscript{rd} or 17\textsuperscript{th}).
  3. Splits the input into alphanumeric tokens, discarding stopwords found in the TITLE_STOPWORDS set (which includes months, or other common stopwords like proceedings, papers, etc.)
  4. Concatenates the remaining tokens into a normalized string without delimiters.
  5. Removes leading false-start tokens like "ofthe", "of", or "the".

Note that the input is expected to already be lowercased before calling this method.

An example: "proceedings of the 3rd international conference on machine learning (icml 2018)" -> "internationalconferenceonmachinelearning"

Parameters
input:@NonNull String

the pre-lowercased raw string to normalize, must not be null

Returns:String

a normalized string representation of the input

normalizeTokenAndFlushback to summary
private static void normalizeTokenAndFlush(StringBuilder currentToken, StringBuilder output)
removeAllParenthesesWithContentback to summary
public static String removeAllParenthesesWithContent(String input)
trimDelimitersback to summary
private static String trimDelimiters(String candidate)