← Back to all sparks
C

contentanalysis

ANALYTICS
Velocity0.0

R package contentanalysis by massimoaria — release notes from GitHub.

A scientific-text analysis package moved from counting citations to classifying argument structure.

text-analysisbibliometricsscientific-writingr-packagepdf-parsingllm-assisted
Current state
contentanalysis parses scientific papers from PDF and analyses their content — citation clustering, reference extraction and matching, word distribution, TF-IDF summaries by section. The most recent release adds a different kind of analysis: sentence-level classification of rhetorical moves, built on Swales' CARS model and extended to literature review and discussion sections, using rules by default with an optional Google Gemini path. PDF handling has been reworked in parallel for multi-column layouts and running header removal.
Where it's heading
The arc runs from surface features toward discourse structure. Early releases were about getting references matched correctly and plots readable; the current one asks what function each sentence performs in the argument, which is a categorically harder question and one the package answers with rules first and a language model second. The optional-LLM design is worth noting for what it avoids — the analysis still runs without an API key, and the package has already had to prune retired Gemini model versions once, which is the maintenance cost of depending on a hosted model. Reference parsing is being made format-aware rather than pattern-guessing, with CrossRef enrichment filling in what the PDF omits.
Prediction
Expect the rhetorical move classification to widen to more section types and the rule-based path to keep being the default, given the package has already been forced to track model deprecations on the optional one.

Recent moves

  1. 3mo ago

    Sentence-level rhetorical move classification arrives

    ⚡ SPARK

    The package gains an analysis type it did not previously have: classify_rhetorical_moves() labels what each sentence is doing argumentatively, using Swales' CARS model extended to literature review and discussion sections. It runs rule-based by default with Gemini as an optional enhancement, and slots into the main analysis function through new arguments rather than standing apart from it.

    View source ↗
  2. 5mo ago

    PDF import reworked and citation cluster plots relaid out

    A 1.0.0 that is more consolidation than statement: PDF import improvements, a two-column TF-IDF chart with colour-coded section annotations, and several packaging fixes. It reads as the release that made the existing analysis presentable before the following one changed what analysis means here.

    View source ↗
  3. 8mo ago

    Author surname normalisation, and old Gemini models dropped

    Reference matching improves by normalising first author surnames — the unglamorous work that decides whether extracted references resolve at all. Retiring Gemini 1.5 and 2.0 in the same release is the first visible instance of this package tracking a hosted model's deprecation schedule, a dependency the rhetorical move feature later leans on.

    View source ↗