Skip to content

Regex Search/Replace for unrecognized footnote labels in referenceSegmenter training documents #38

Description

@cboulanger

Problem

In particular for short "ibib." footnote, the label is not recognized and put at the end of the previous <bibl>. Example from https://pdf-tei-editor.panya.de/#pdf=4vx8jr&xml=5nu8eg

      <bibl><label>192</label> Ibid., at 36.<lb/> 193 </bibl>
      <bibl>Ibid.<lb/></bibl>
      <bibl><label>194</label> Ibid., at 38.<lb/> 195 </bibl>
      <bibl>House of Commons Environmental Audit Committee, Greening<lb/> Finance: Embedding Sustainability in Financial Decision Making, Seventh<lb/> Report of Session 2017-2019 (4 June 2018).<lb/></bibl>
      <bibl><label>196</label> Ibid., at 9.<lb/> 197 </bibl>
      <bibl>Ibid.<lb/></bibl>
      <bibl><label>198</label> Ibid.<lb/></bibl>
      <bibl><label>199</label> Ibid., at 3.<lb/> 200 </bibl>
      <bibl>Ibid.<lb/> 201 </bibl>
      <bibl>Ibid.<lb/></bibl>

Correcting this manually is tedious.

Solution:

  • Download/ copy&paste into an editor that supports regex search/replace
  • Search <lb/> (\d+)(\s+?)</bibl>\n <bibl>
  • Replace <lb/></bibl>\n <bibl><label>$1</label>$2
  • Upload/copy&paste into PDF-TEI-Editor

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions