theoryminer

Python package that turns papers into causal maps of the claims they make

theoryminer assembles theories from text. It reads a PDF or a folder of PDFs, finds the sentences that make causal claims, extracts each cause and effect pair, and groups the different names authors give to the same construct. The result is an interactive causal map in which every arrow leads back to the sentences, and the papers, that claim it.

The package brings several of my earlier projects into one pipeline:

  • Extraction: causal relations come from the SocioCausaNet model.
  • Harmonisation: similar constructs are grouped by clustering and named from their own words, or mapped to the ELSST thesaurus, following the construct harmonization work.
  • Snowballing: it collects the DOIs a set of papers cites and downloads the open-access copies, with a licence check, for the next round of reading.
  • The map: a single offline HTML page. You can search and filter by paper, role and evidence count, click an arrow to read its sentences with their DOIs, and export the map as PNG, SVG or GraphML.

The thumbnail is the map built from the seven open-access sample papers that ship with the package.