-
Notifications
You must be signed in to change notification settings - Fork 34
RefExtract: Update eprint extraction in engine and regex #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
aa4bff8 to
de51e2f
Compare
refextract/references/regexs.py
Outdated
| [\s.-]*(?P<num>\d{4})(?!\d)(?:[\s-]*V(?P<version>\d))? | ||
| \s*(?P<suffix>\[[A-Z.-]+\])? """, re.VERBOSE | re.UNICODE | re.IGNORECASE) | ||
| \s*(?P<suffix>\[[A-Z.-]+\])? | ||
| (?:\.pdf)? """, re.VERBOSE | re.UNICODE | re.IGNORECASE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is non-sensical -- I wouldn't expect a .pdf after the category, the regexp is meant to match e.g. arxiv:1103.01234v5 [hep-th], which is a common way to refer to arXiv papers.
however I don't think
http://arxiv.org/pdf/arxiv:1103.01234v5 [hep-th].pdf is a thing to look for
refextract/references/engine.py
Outdated
|
|
||
| def arxiv_urls_to_report_numbers(citation_elements): | ||
| arxiv_url_prefix = 'http://arxiv.org/abs/' | ||
| arxiv_url_prefix = re.compile('^https?:\/\/(?:(?:cn\.|de\.|in\.|lanl\.)?arxiv\.org|xxx\.lanl\.gov)\/(?:abs|pdf)\/(\S+\d{4})(?:v\d)?(?:\.pdf)?', re.UNICODE | re.IGNORECASE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version can be >9 e.g. v13. (?:v\d)? is not matching that
refextract/references/regexs.py
Outdated
| [\s.-]*(?P<num>\d{5})(?!\d) | ||
| (?:[\s-]*V(?P<version>\d))? | ||
| \s*(?P<suffix>\[[A-Z.-]+\])? | ||
| (?:\.pdf)? """, re.VERBOSE | re.UNICODE | re.IGNORECASE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as line 80
refextract/references/regexs.py
Outdated
| (?:https?://(?:xxx\.)?lanl\.gov/(?:abs|pdf)/)| | ||
| (?:ARXIV[\s:-]*))(?P<year>(1[3-9]|[2-8][0-9]))-?(?P<month>(0[1-9]|1[0-2])) | ||
| [\s.-]*(?P<num>\d{5})(?!\d) | ||
| (?:[\s-]*V(?P<version>\d))? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\d+ for version > 9 ?
00777cc to
bcdc081
Compare
Signed-off-by: Melissa Clegg <[email protected]>
Signed-off-by: Melissa Clegg [email protected]