From 84a9b80c465dda2fd31b4735b7d0647caea012f2 Mon Sep 17 00:00:00 2001 From: Jerome Wu Date: Sun, 26 May 2019 01:12:59 +0800 Subject: [PATCH] Update faq.md --- docs/faq.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/faq.md b/docs/faq.md index 5bc381b..1698ff3 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -12,3 +12,25 @@ Tesseract.js will first check if \*.traineddata already exists. (browser: [Index For tesseract.js v2, check [TrainingTesseract 4.00](https://github.com/tesseract-ocr/tesseract/wiki/TrainingTesseract-4.00) For tesseract.js v1, check [Training Tesseract 3.03–3.05](https://github.com/tesseract-ocr/tesseract/wiki/Training-Tesseract-3.03%E2%80%933.05) + +## How can I get HOCR, TSV, Box, UNLV, OSD? + +Starting from 2.0.0-alpha.10, you can get all these information in the final result. + +```javascript +import Tesseract from 'tesseract.js'; + +const { TesseractWorker } = Tesseract; +const worker = new TesseractWorker(); + +worker + .recognize('https://tesseract.projectnaptha.com/img/eng_bw.png') + .then((result) => { + console.log(result.text); + console.log(result.hocr); + console.log(result.tsv); + console.log(result.box); + console.log(result.unlv); + console.log(result.osd); + }); +```