Skip to content

Add "T/"I and T'm/I'm, etc to CP Filter - #1924

Merged
windymilla merged 3 commits into
DistributedProofreaders:masterfrom
windymilla:cp-tm-im-scannos
Aug 11, 2026
Merged

Add "T/"I and T'm/I'm, etc to CP Filter#1924
windymilla merged 3 commits into
DistributedProofreaders:masterfrom
windymilla:cp-tm-im-scannos

Conversation

@windymilla

Copy link
Copy Markdown
Collaborator

Under the "2/3 letter scannos" sub-toggle, change capital "T" to "I" for some common words, and for standalone "T" following double quotes.

Fixes #1921

Testing: should fix cases described here: https://www.pgdp.net/phpBB3/viewtopic.php?p=1403237#p1403237

Under the "2/3 letter scannos" sub-toggle, change capital
"T" to "I" for some common words, and for standalone "T"
following double quotes.

Fixes DistributedProofreaders#1921
@windymilla
windymilla requested a review from srjfoo August 9, 2026 15:23
@srjfoo

srjfoo commented Aug 11, 2026

Copy link
Copy Markdown
Member

I took the text from the forum post mentioned and added a couple based on real-life testing:

One of the common issues I see with Tesseract OCR and
certain fonts is interpreting capital I as capital T.
Would it be possible to add a few bits of regex to
either the filters or the scannos to deal with these?

The most common issues I see are at the beginning of
a line of dialogue, where

"I

is OCR'd as

"T

Edited to add: also T'll, T'm, and T'd, and Tf and Ts and Tt.

Also,

T meaning "I" at the beginning of a line with no quote
     is not changed to "I"

What about 

T'll

The results of running the filter (with the two header paragraphs stripped out:

"I

is OCR'd as

"I

Edited to add: also I, I, and I, and I and I and I.

Also,

T meaning "I" at the beginning of a line with no quote
     is not changed to "I"

What about

I

So -- testing results:

  • T'll, T'm, T'd, Tf, Ts and Tt were all changed to I with their following characters stripped
  • Standalone T at the beginning of a line, was not changed to I unless followed by one of the above, in which case it became just a standalone I as detailed above. (How likely is "T" to occur standalone, whether at the beginning of a line or in the middle, unless it's a scanno for the capital I?

@windymilla

Copy link
Copy Markdown
Collaborator Author
  • T'll, T'm, T'd, Tf, Ts and Tt were all changed to I with their following characters stripped

Oops - my replacement regex was wrong. Can't believe I didn't notice that myself! Pushed another commit that should now change T'll to I'll, etc.

  • Standalone T at the beginning of a line, was not changed to I unless followed by one of the above, in which case it became just a standalone I as detailed above. (How likely is "T" to occur standalone, whether at the beginning of a line or in the middle, unless it's a scanno for the capital I?

I don't feel happy changing all standalone T to I. The initial request was for "T to "I, which I believe the branch should do. This is a CP tool, which doesn't aim to fix all scannos, and I think should strongly err on the side of not making incorrect changes to valid OCR, especially as some CPers use it fairly automatically, not checking every change it makes. Also, the rounds need something to do!

@srjfoo

srjfoo commented Aug 11, 2026

Copy link
Copy Markdown
Member
  • Standalone T at the beginning of a line, was not changed to I unless followed by one of the above, in which case it became just a standalone I as detailed above. (How likely is "T" to occur standalone, whether at the beginning of a line or in the middle, unless it's a scanno for the capital I?

I don't feel happy changing all standalone T to I. The initial request was for "T to "I, which I believe the branch should do. This is a CP tool, which doesn't aim to fix all scannos, and I think should strongly err on the side of not making incorrect changes to valid OCR, especially as some CPers use it fairly automatically, not checking every change it makes. Also, the rounds need something to do!

That's fair. It would also pick up any standalone Ts as initials, which might be disastrous in some books.

@windymilla
windymilla requested a review from srjfoo August 11, 2026 19:15
@windymilla
windymilla merged commit 5467da1 into DistributedProofreaders:master Aug 11, 2026
1 check passed
@windymilla
windymilla deleted the cp-tm-im-scannos branch August 11, 2026 20:05
windymilla added a commit that referenced this pull request Aug 13, 2026
* Implement #1924 for "J" as well as "T"

* Allow for single quote too

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider CP fix for "I, "I'm, etc. being OCRed as "T, "T'm, etc.

2 participants