Treated Unicode spaces, such as the no-break space and the ideographic
space, as whitespace. is_scholid() and classify_scholid() no longer
accept a DOI or SWHID with such a space inside, and extract_scholid()
no longer runs a DOI into the next word. normalize_scholid(),
detect_scholid_type(), and extract_scholid() now trim these spaces
and accept them after labels and between digit groups.
Fixed detect_scholid_type() reporting a bare 8-digit PMID as issn
when an invisible character was inside it.
Added locate_scholid(), which finds identifiers of all types, or of
the types given, in free text. It returns a data frame with one row per
identifier: the text element, the type, the token extract_scholid()
returns, the identifier as written, and its start and end positions.
Where the spans of hits of different types overlap, such as an ISBN and
the PMID-like digits inside it, it keeps the longer one.
Added scholid_key(), which gives keys for comparing identifiers, so
that values written differently match in duplicated(), match(), and
merge(). It normalizes values like normalize_scholid() and then
applies the type's key rule: an ISBN-10 gets the key of its ISBN-13,
arXiv, RefSeq, and genome assembly keys leave out the version, DOI keys
uppercase ASCII letters, and SWHID keys leave out the qualifiers. Keys
are not identifiers, and some don't pass is_scholid(). The rules are
in the definitions vignette.
Added format_scholid(), which writes identifiers as resolver URLs, as
CURIEs, or, for arXiv, as the DOIs that arXiv registers, such as
10.48550/arXiv.2101.00001, without the version. It normalizes values
like normalize_scholid() first, and normalize_scholid() reads back
what it writes. DOI URLs percent-encode %, #, and ?; everything
else is written as it is. Asking for a form that a type doesn't have,
such as a URL for an ISBN, is an error that names the forms it has. The
forms of each type are in the definitions vignette.
Accepted each type's resolver URL and Bioregistry CURIE, older resolver
URLs that still resolve, and arXiv DOIs in normalize_scholid(). Inputs
such as https://pubmed.ncbi.nlm.nih.gov/12345678/, pubmed:12345678,
https://pmc.ncbi.nlm.nih.gov/articles/PMC1234567/,
https://portal.issn.org/resource/ISSN/0317-8471,
openalex:W2741809807, and, for "arxiv", 10.48550/arXiv.2101.00001
now normalize instead of giving NA. URLs may use http or https,
any case, and a slash at the end. detect_scholid_type() detects these
forms too, and still reports arXiv DOIs as doi. The forms and their
sources are in the definitions vignette.
Accepted Unicode dashes, such as U+2010 and the en dash, in ORCID, ISBN,
ISNI, and ISSN values, and full-width digits in every type except DOI,
ARK, SWHID, and RRID, in normalize_scholid(), extract_scholid(), and
detect_scholid_type(). They are read as their ASCII forms.
extract_scholid() doesn't read dashes in ISSNs, because an en dash in
free text usually marks a range, and is_scholid() still accepts only
ASCII. The per-type rules are under "Input characters" in the
definitions vignette.
Percent-decoded doi.org and dx.doi.org URLs in
normalize_scholid(x, "doi"), so https://doi.org/10.1000%2F182 gives
10.1000/182.
Added "Input characters", "Comparison keys", and "Resolver URLs and CURIEs" to the definitions vignette, and a table of resolver URL and CURIE forms, with their sources, to each type's section.
Added sections on scholid_key(), format_scholid(), and
locate_scholid() to the Get started vignette.
Rejected identifiers containing invisible characters, such as soft
hyphens and byte order marks, in is_scholid() and
classify_scholid(). normalize_scholid(), detect_scholid_type(),
and extract_scholid() now remove those characters before
normalizing or matching.
Fixed detect_scholid_type() reporting bare 8-digit PMIDs such as
29456894 as issn when their digits happened to pass the ISSN checksum.
Bare compact strings are now detected as ISSN only with a hyphen
(2434-561X) or an ISSN label, so a bare 2434561X is no longer
detected. normalize_scholid(x, "issn") is unchanged.
classify_scholid(), detect_scholid_type(), and
extract_scholid() by checking whole vectors instead of one string
at a time.The package now supports 20 identifier types (up from 7 in 0.1.1). Each type
provides structural validation, normalization from URLs and labels, and
extraction from free text via the existing is_scholid(), normalize_scholid(),
extract_scholid(), classify_scholid(), and detect_scholid_type() APIs.
New types in this release:
W, A, S, …)orcid)ark:/NAAN/Name)SRR, SRX, SRP, …)GSE, GSM, GPL, GDS)PRJNA, PRJEB, …)GCA_, GCF_, versioned)Identifier definitions and validation rules are documented in the
scholid_definitions vignette.
is_<type>, normalize_<type>, extract_<type>).classify_scholid() and detect_scholid_type() to avoid redundant
work when resolving types.Initial release.