A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/naptha/tesseract.js/issues/414 below:

Worker loading language traineddata progress 0 · Issue #414 · naptha/tesseract.js · GitHub

Describe the bug
Using a basic example code I'm unable to get an extracted text from an image.

Object { status: "loading tesseract core", progress: 0 }
Object { status: "loading tesseract core", progress: 1 }
Object { workerId: "Worker-0-ac418", status: "initializing tesseract", progress: 0 }
Object { workerId: "Worker-0-ac418", status: "initialized tesseract", progress: 1 }
Object { workerId: "Worker-0-ac418", status: "loading language traineddata", progress: 0 }

after this point nothing happen.

To Reproduce

<template>
    <div>
        <button v-on:click="recognize">recognize</button>
    </div>
</template>

<script>
import { createWorker } from "tesseract.js";

const worker = createWorker({
    logger: m => console.log(m)
});

export default {
    name: "ocr-reader",

    methods: {
        "recognize": function() {
            await worker.load();
            await worker.loadLanguage("eng");
            await worker.initialize("eng");
            await worker.initialize("eng");
            const {
                data: { text }
            } = await worker.recognize("http://localhost:8000/WEZK8.png");
            console.log(text);
            await worker.terminate();
        }
    }
};
</script>

simplest Vue component

Expected behavior
I expect to see a text message on console

Additional context
I'm doing a test on my localhost. I checked everything is correctly loaded. even traineddata file is correctly downloaded with status 200


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4