| Modifier and Type | Class and Description |
|---|---|
| private static class | LtwaRepository.
Listener to apply abbreviation rules to the parsed title |
| Modifier and Type | Field and Description |
|---|---|
| private static final Pattern | |
| private static final Pattern | |
| private static final Logger | |
| private final PrefixTree | |
| private static final String | |
| private final PrefixTree | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public | |
| public | LtwaRepository(Path
Path to the LTWA MVStore file ltwaListFile)Creates a new LtwaRepository from an MV store file. |
| Modifier and Type | Method and Description |
|---|---|
| public Optional | Returns: The abbreviated titleThe title to be abbreviated title)Abbreviates a given title using the ISO4 rules. |
| private static boolean | |
| private static boolean | |
| private static boolean | |
| private static void | preserveOriginalCharacterProperties(int normalizedChar, int originalChar, int[] resultCodePoints, int index)
Helper method to preserve original character properties (case, diacritics) |
| private static Optional | restoreCapitalizationAndDiacritics(String abbreviation, String original)
Restore capitalization and diacritics from the original text to the abbreviation |
| private static String |
| BOUNDARY | back to summary |
|---|---|
| private static final Pattern BOUNDARY | |
| INFLECTION | back to summary |
|---|---|
| private static final Pattern INFLECTION | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| prefix | back to summary |
|---|---|
| private final PrefixTree<LtwaEntry> prefix | |
| PREFIX_MAP_NAME | back to summary |
|---|---|
| private static final String PREFIX_MAP_NAME | |
| suffix | back to summary |
|---|---|
| private final PrefixTree<LtwaEntry> suffix | |
| SUFFIX_MAP_NAME | back to summary |
|---|---|
| private static final String SUFFIX_MAP_NAME | |
| LtwaRepository | back to summary |
|---|---|
| public LtwaRepository() Creates an empty LtwaRepository. | |
| LtwaRepository | back to summary |
|---|---|
| public LtwaRepository(Path ltwaListFile) Creates a new LtwaRepository from an MV store file.
| |
| abbreviate | back to summary |
|---|---|
| public Optional Abbreviates a given title using the ISO4 rules. | |
| handleRemainingText | back to summary |
|---|---|
| private static boolean handleRemainingText(String title, int titlePosition) Handle remaining text after initial match | |
| matches | back to summary |
|---|---|
| private static boolean matches(String title, LtwaEntry entry) Determines if a title matches an LTWA entry | |
| matchesInternal | back to summary |
|---|---|
| private static boolean matchesInternal(String title, String word) Internal matching logic after handling special cases | |
| preserveOriginalCharacterProperties | back to summary |
|---|---|
| private static void preserveOriginalCharacterProperties(int normalizedChar, int originalChar, int[] resultCodePoints, int index) Helper method to preserve original character properties (case, diacritics) | |
| restoreCapitalizationAndDiacritics | back to summary |
|---|---|
| private static Optional Restore capitalization and diacritics from the original text to the abbreviation | |
| reverse | back to summary |
|---|---|
| private static String reverse(String str) | |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private boolean | |
| private boolean | |
| private boolean | |
| private int | |
| private final String | |
| private final PrefixTree | |
| private final StringBuilder | |
| private final PrefixTree |
| Access | Constructor and Description |
|---|---|
| public | AbbreviationListener(String originalTitle, PrefixTree<LtwaEntry> prefix, PrefixTree<LtwaEntry> suffix)
|
| abbreviatedTitlePosition | back to summary |
|---|---|
| private int abbreviatedTitlePosition | |
| addSpace | back to summary |
|---|---|
| private boolean addSpace | |
| error | back to summary |
|---|---|
| private boolean error | |
| isFirstElement | back to summary |
|---|---|
| private boolean isFirstElement | |
| lastPartPosition | back to summary |
|---|---|
| private int lastPartPosition | |
| originalTitle | back to summary |
|---|---|
| private final String originalTitle | |
| prefix | back to summary |
|---|---|
| private final PrefixTree<LtwaEntry> prefix | |
| result | back to summary |
|---|---|
| private final StringBuilder result | |
| suffix | back to summary |
|---|---|
| private final PrefixTree<LtwaEntry> suffix | |
| AbbreviationListener | back to summary |
|---|---|
| public AbbreviationListener(String originalTitle, PrefixTree<LtwaEntry> prefix, PrefixTree<LtwaEntry> suffix) | |
| addAbbreviation | back to summary |
|---|---|
| private void addAbbreviation(int position, String initialText) | |
| appendWithSpace | back to summary |
|---|---|
| private void appendWithSpace(String text) | |
| exitAbbreviationElement | back to summary |
|---|---|
| public void exitAbbreviationElement(LtwaParser. Overrides org. Implements org. Doc from org. Exit a parse tree produced by the The default implementation does nothing.
| |
| exitAnyPlusSymbolsFull | back to summary |
|---|---|
| public void exitAnyPlusSymbolsFull(LtwaParser. Overrides org. Implements org. Doc from org. Exit a parse tree produced by the The default implementation does nothing.
| |
| exitArticleElement | back to summary |
|---|---|
| public void exitArticleElement(LtwaParser. Overrides org. Implements org. Doc from org. Exit a parse tree produced by the The default implementation does nothing.
| |
| exitEveryRule | back to summary |
|---|---|
| public void exitEveryRule(ParserRuleContext ctx) Overrides org. Implements org. Doc from org.
The default implementation does nothing.
| |
| exitHyphenElement | back to summary |
|---|---|
| public void exitHyphenElement(LtwaParser. Overrides org. Implements org. Doc from org. Exit a parse tree produced by the The default implementation does nothing.
| |
| exitOrdinalElement | back to summary |
|---|---|
| public void exitOrdinalElement(LtwaParser. Overrides org. Implements org. Doc from org. Exit a parse tree produced by the The default implementation does nothing.
| |
| exitPartElement | back to summary |
|---|---|
| public void exitPartElement(LtwaParser. Overrides org. Implements org. Doc from org. Exit a parse tree produced by the The default implementation does nothing.
| |
| exitSingleWordTitleFull | back to summary |
|---|---|
| public void exitSingleWordTitleFull(LtwaParser. Overrides org. Implements org. Doc from org. Exit a parse tree produced by the The default implementation does nothing.
| |
| exitStopwordElement | back to summary |
|---|---|
| public void exitStopwordElement(LtwaParser. Overrides org. Implements org. Doc from org. Exit a parse tree produced by the The default implementation does nothing.
| |
| exitStopwordPlusTitleFull | back to summary |
|---|---|
| public void exitStopwordPlusTitleFull(LtwaParser. Overrides org. Implements org. Doc from org. Exit a parse tree produced by the The default implementation does nothing.
| |
| exitSymbolsElement | back to summary |
|---|---|
| public void exitSymbolsElement(LtwaParser. Overrides org. Implements org. Doc from org. Exit a parse tree produced by the The default implementation does nothing.
| |
| exitWordElement | back to summary |
|---|---|
| public void exitWordElement(LtwaParser. Overrides org. Implements org. Doc from org. Exit a parse tree produced by the The default implementation does nothing.
| |
| findBestEntry | back to summary |
|---|---|
| private Optional Find the best entry based on prioritization criteria | |
| findMatchingEntries | back to summary |
|---|---|
| private List Find matching entries from prefix and suffix trees | |
| getResult | back to summary |
|---|---|
| public Optional | |