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 March 25, 2022, 5:50 a.m.