Closed klb2 closed 2 months ago
I found a more relevant example where this issue occurs: IEEE Transactions on Automatic Control
throws the same IndexError
I did some debugging and in the case of the above example, the arguments passed to function match_capitalization_and_diacritic
are abbrv = 'control.'
and original = 'Control'
.
Since the abbreviation is longer than the original (due to the unnecessarily added .
), an IndexError is thrown in the loop. PR #14 solves this by reducing the length of the abbreviation if it is longer than the original word, i.e., not actually being an abbreviation.
I encountered a weird issue when some words are at the end of the input string.
I found the following examples:
MWE:
The following IndexError is thrown: