Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/naptha/tesseract.js.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorCharles Francoise <charles.francoise@gmail.com>2019-11-23 18:40:19 +0300
committerCharles Francoise <charles.francoise@gmail.com>2019-11-23 18:40:19 +0300
commit67ccfcfb6e33089f82be4e0649e0bf21dfe9c252 (patch)
treebce5d924caa770cd550ee61529c60df05938c441 /docs
parentebc56a18992b9b4253c955efb7535ef372a95879 (diff)
add errorHandler documentation
Diffstat (limited to 'docs')
-rw-r--r--docs/api.md23
1 files changed, 12 insertions, 11 deletions
diff --git a/docs/api.md b/docs/api.md
index 1f920dc..b9a4f43 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -42,6 +42,7 @@ createWorker is a factory function that creates a tesseract worker, a worker is
- `workerBlobURL` a boolean to define whether to use Blob URL for worker script, default: true
- `gzip` a boolean to define whether the traineddata from the remote is gzipped, default: true
- `logger` a function to log the progress, a quick example is `m => console.log(m)`
+ - `errorHandler` a function to handle worker errors, a quick example is `err => console.error(err)`
**Examples:**
@@ -143,17 +144,17 @@ Worker.setParameters() set parameters for Tesseract API (using SetVariable()), i
**Supported Paramters:**
-| name | type | default value | description |
-| ---- | ---- | ------------- | ----------- |
-| tessedit\_ocr\_engine\_mode | enum | OEM.DEFAULT | Check [HERE](https://github.com/tesseract-ocr/tesseract/blob/4.0.0/src/ccstruct/publictypes.h#L268) for definition of each mode |
-| tessedit\_pageseg\_mode | enum | PSM.SINGLE\_BLOCK | Check [HERE](https://github.com/tesseract-ocr/tesseract/blob/4.0.0/src/ccstruct/publictypes.h#L163) for definition of each mode |
-| tessedit\_char\_whitelist | string | '' | setting white list characters makes the result only contains these characters, useful the content in image is limited |
-| preserve\_interword\_spaces | string | '0' | '0' or '1', keeps the space between words |
-| tessjs\_create\_hocr | string | '1' | only 2 values, '0' or '1', when the value is '1', tesseract.js includes hocr in the result |
-| tessjs\_create\_tsv | string | '1' | only 2 values, '0' or '1', when the value is '1', tesseract.js includes tsv in the result |
-| tessjs\_create\_box | string | '0' | only 2 values, '0' or '1', when the value is '1', tesseract.js includes box in the result |
-| tessjs\_create\_unlv | string | '0' | only 2 values, '0' or '1', when the value is '1', tesseract.js includes unlv in the result |
-| tessjs\_create\_osd | string | '0' | only 2 values, '0' or '1', when the value is '1', tesseract.js includes osd in the result |
+| name | type | default value | description |
+| --------------------------- | ------ | ----------------- | ------------------------------------------------------------------------------------------------------------------------------- |
+| tessedit\_ocr\_engine\_mode | enum | OEM.DEFAULT | Check [HERE](https://github.com/tesseract-ocr/tesseract/blob/4.0.0/src/ccstruct/publictypes.h#L268) for definition of each mode |
+| tessedit\_pageseg\_mode | enum | PSM.SINGLE\_BLOCK | Check [HERE](https://github.com/tesseract-ocr/tesseract/blob/4.0.0/src/ccstruct/publictypes.h#L163) for definition of each mode |
+| tessedit\_char\_whitelist | string | '' | setting white list characters makes the result only contains these characters, useful the content in image is limited |
+| preserve\_interword\_spaces | string | '0' | '0' or '1', keeps the space between words |
+| tessjs\_create\_hocr | string | '1' | only 2 values, '0' or '1', when the value is '1', tesseract.js includes hocr in the result |
+| tessjs\_create\_tsv | string | '1' | only 2 values, '0' or '1', when the value is '1', tesseract.js includes tsv in the result |
+| tessjs\_create\_box | string | '0' | only 2 values, '0' or '1', when the value is '1', tesseract.js includes box in the result |
+| tessjs\_create\_unlv | string | '0' | only 2 values, '0' or '1', when the value is '1', tesseract.js includes unlv in the result |
+| tessjs\_create\_osd | string | '0' | only 2 values, '0' or '1', when the value is '1', tesseract.js includes osd in the result |
**Examples:**