tesseract.js icon indicating copy to clipboard operation
tesseract.js copied to clipboard

Fix types for setting Tesseract parameters in `recognize`

Open Balearica opened this issue 7 months ago • 0 comments

Since Version 4, Tesseract.js has allowed for setting parameters for a single recognition job (see #665). However, it does not look like the types were ever updated--the following code results in a type error.

const res = await tessScheduler.addJob('recognize', inputImage, {
    tessedit_pageseg_mode: "6" // "Single block"
  });

Additionally, the api.md file does not clearly describe this capability, so we should make sure this feature is well documented.

Balearica avatar Nov 27 '23 02:11 Balearica