Skip to content

v0.5.0

Choose a tag to compare

@caufieldjh caufieldjh released this 02 Nov 16:12
· 11 commits to main since this release
fcc90e0

Breaking: stricter excerpt matching

Data that validated under 0.4.0 can fail under 0.5.0. Every change below closes a way a wrong quote used to pass.

  • Matches start and end on whole words (#150). activates no longer matches inactivates, and 5 mM no longer matches 10.5 mM. One allowance: a quote ending in a letter may still match a word with superscript citation digits welded on (suppressor12).
  • Comparisons, ± and minus signs are kept (#151). < > ≤ ≥ become lt gt le ge, ± and +/- become pm, and a minus sign stays on its number, so p < 0.05 no longer matches p > 0.05, and 2.5 fold no longer matches -2.5 fold.
  • Decimal points and commas stay in numbers (#151). Quote numbers with the source's own separators: 0.8, 7.3 does not match 0.8,7.3.
  • Publisher spellings of these count the same (#162): MEDLINE's >/= and </=, Lancet middle-dot decimals (57·4), and an en dash, Unicode hyphen or spaced − printed as a minus sign. A range dash after a word or digit (IL‐6, 1–12) is still punctuation.
  • List-valued references and excerpts are checked, not skipped (#147, #154). So are evidence objects in a keyed mapping (inlined_as_list: false). A reference with no usable identifier is now an error (#155).
  • Cache entries are served only for the reference they record (#153). An alias spelling such as pubmed:123 stored in PMID_123.md is now a miss, and the reference is fetched again.

Cache filenames

  • Names over 200 bytes are cut and end in _ plus a 16-hex-digit hash of the reference id (#153). A cache written by 0.4.0 that holds such a file (usually a long url:) will re-fetch it unless the file is renamed to the new name.
  • Distinct references that sanitize to the same name now get a hashed name of their own, instead of overwriting each other.

Other changes

  • µ matches μ, and the variant Greek forms (ϕ ϵ ϑ ϐ ϖ ϰ ϱ) match their ordinary letters (#152).
  • HTML article text is no longer truncated (#152).
  • XML extraction is now version 2 (#145). This fixes nested paragraphs being emitted twice, list items and lines welded together, and dropped HTML entities. Cached version-1 XML is refreshed on the next fetch.
  • file: references are always read from the file, under one canonical id (#148).
  • DOIs are percent-encoded in URLs (#153). DOI, JSON API and PDF sources fail as a fetch error on bad data instead of raising (#158).
  • Damaged or untitled cache files are read without crashing or losing text (#157).
  • Character-normalization repairs only replace whole symbols (#149).
  • repair data --no-dry-run --output always writes the output file and reads inlined references. --auto-fix-threshold now defaults to the config's auto_fix_threshold (#159, #160).
  • A custom slot URI counts as a reference or excerpt field only when its local name ends in that word (#161).

Full changelog: v0.4.0...v0.5.0