Browse Source

undocument languiches

pull/12/head
Kevin Kwok 8 years ago
parent
commit
090d0c786e
  1. 9
      src/index.js

9
src/index.js

@ -18,8 +18,13 @@ class TesseractWorker { @@ -18,8 +18,13 @@ class TesseractWorker {
recognize(image, options){
return this._delay(job => {
options = options || {}
options.lang = options.lang || 'eng';
if(typeof options === 'string'){
options = { lang: options };
}else{
options = options || {}
options.lang = options.lang || 'eng';
}
job._send('recognize', { image: image, options: options, workerOptions: this.workerOptions })
})
}

Loading…
Cancel
Save