Skip to content

solution for Github issue 71#73

Merged
ehenneken merged 1 commit intoadsabs:masterfrom
ehenneken:github_71
May 29, 2025
Merged

solution for Github issue 71#73
ehenneken merged 1 commit intoadsabs:masterfrom
ehenneken:github_71

Conversation

@ehenneken
Copy link
Member

This change deals with the problem described in issue #71. The problem is caused by date strings of the form Jun-2024. The regular expression in the crf.py parser includes the year with the tag |na_month| (as described in the issue). The logic is such that when a month is detected, using the regular expression, code expects the tag to be present in the ref_words list and therefore expects to be able to get the location of the tag in the list through ref_words.index('|na_month|').

The solution is to make the regular expression ignore month expressions directly followed by a hyphen. Having the month really is not all the crucial anyway for matching references.

@ehenneken ehenneken requested a review from kelockhart May 21, 2025 14:32
@ehenneken ehenneken added the bug Something isn't working label May 21, 2025
Copy link
Member

@kelockhart kelockhart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, as long as you really don't need the month here.

@ehenneken ehenneken merged commit c8d5365 into adsabs:master May 29, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants