Skip to content

Instantly share code, notes, and snippets.

@8bit-pixies
Created May 13, 2019 01:36
Show Gist options
  • Save 8bit-pixies/75c7e52187f08d81e32ea03ce8307a18 to your computer and use it in GitHub Desktop.
Save 8bit-pixies/75c7e52187f08d81e32ea03ce8307a18 to your computer and use it in GitHub Desktop.
<script src='https://unpkg.com/tesseract.js@v2.0.0-alpha.3/dist/tesseract.min.js'></script>
<input type="file" onchange="getRego(this.files)">
<script>
function getRego(files) {
const worker = new Tesseract.TesseractWorker();
worker.recognize(files[0]).then(function(data){
// construct something which glues all the words together...
console.log(data.text);
})
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment