tests/selfCorrect.R

library(Rtesseract)

words = c("giving", "give", "giving", "gave", "giver", "govern")

if(require(Aspell)) {

Rtesseract:::spellFix("giviag", words) # from the corpus, 'sdagiving'

Rtesseract:::spellFix("giviag") # from the aspell alternatives
}


Rtesseract:::selfCorrect(wrong = "giviag", words = words)
duncantl/Rtesseract documentation built on Sept. 8, 2024, 8:38 a.m.