From 872284b112acc0dccebba93e5435eb25df2e9a12 Mon Sep 17 00:00:00 2001 From: Kevin Kwok Date: Wed, 12 Oct 2016 03:53:30 -0400 Subject: [PATCH] adding lnaguage selector --- examples/file-input/demo.html | 76 ++++++++++++++++++++++++++++++++++- 1 file changed, 74 insertions(+), 2 deletions(-) diff --git a/examples/file-input/demo.html b/examples/file-input/demo.html index 0b65a86..39a696e 100644 --- a/examples/file-input/demo.html +++ b/examples/file-input/demo.html @@ -36,7 +36,11 @@ function progressUpdate(packet){ } function recognizeFile(file){ - Tesseract.recognize(file) + document.querySelector("#log").innerHTML = '' + + Tesseract.recognize(file, { + lang: document.querySelector('#langsel').value + }) .progress(function(packet){ console.info(packet) progressUpdate(packet) @@ -48,7 +52,75 @@ function recognizeFile(file){ }) } - + +