From b6e4f309670c13fde8cf8f45459757b431fae9aa Mon Sep 17 00:00:00 2001 From: Jerome Wu Date: Mon, 13 May 2019 22:59:32 +0800 Subject: [PATCH] Add FAQ for questions --- README.md | 3 ++- docs/faq.md | 8 ++++++++ docs/{ => images}/demo.gif | Bin 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 docs/faq.md rename docs/{ => images}/demo.gif (100%) diff --git a/README.md b/README.md index 90c8b9c..dc4eab3 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Tesseract.js is a javascript library that gets words in [almost any language](./docs/tesseract_lang_list.md) out of images. ([Demo](http://tesseract.projectnaptha.com/)) -[![fancy demo gif](./docs/demo.gif)](http://tesseract.projectnaptha.com) +[![fancy demo gif](./docs/images/demo.gif)](http://tesseract.projectnaptha.com) Tesseract.js works with script tags, [webpack](https://webpack.js.org/), and [Node.js](https://nodejs.org/en/). [After you install it](#installation), using it is as simple as @@ -80,6 +80,7 @@ or * [Image Format](./docs/image-format.md) * [API](./docs/api.md) * [Local Installation](./docs/local-installation.md) +* [FAQ](./docs/faq.md) # Contributing diff --git a/docs/faq.md b/docs/faq.md new file mode 100644 index 0000000..f1ba09e --- /dev/null +++ b/docs/faq.md @@ -0,0 +1,8 @@ +FAQ +=== + +## How does tesseract.js download and keep \*.traineddata? + +When you execute recognize() function (ex: `recognize(image, 'eng')`), the language model to download is determined by the 2nd argument of recognize(). (`eng` in the example) + +Tesseract.js will first check if \*.traineddata already exists. (browser: [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API), Node.js: fs, in the folder you execute the command) If the \*.traineddata doesn't exist, it will fetch \*.traineddata.gz from [tessdata](https://github.com/naptha/tessdata), ungzip and store in IndexedDB or fs, you can delete it manually and it will download again for you. diff --git a/docs/demo.gif b/docs/images/demo.gif similarity index 100% rename from docs/demo.gif rename to docs/images/demo.gif