tesseract.js icon indicating copy to clipboard operation
tesseract.js copied to clipboard

Tesseract example is not working?

Open phamvanlinh20111993 opened this issue 4 years ago • 4 comments

I am trying to use tesseract to translate images. When I use the example given on git it doesn't work. Photo below:

  • In the browser nothing text console. image
  • Here is my code: image Am I missing anything? thanks

phamvanlinh20111993 avatar Jun 06 '20 15:06 phamvanlinh20111993

It should be working, maybe you just got a slow network or hardware, judge from your log.

jeromewu avatar Jun 06 '20 16:06 jeromewu

I don't think so, because I visit websites like facebook or instagram and even play games and everything is normal. I have tried to run the program many times but it still looks like the picture. :(.

phamvanlinh20111993 avatar Jun 07 '20 03:06 phamvanlinh20111993

try this snippet:

Tesseract.recognize(
  "https://tesseract.projectnaptha.com/img/eng_bw.png",
  "eng",
  {
    logger: (m) => console.log(m),
  }
).then((text) => {
  console.log("get  text", text.text);
});

for me works fine :)

nav1-code avatar Jun 25 '20 21:06 nav1-code

I tried it but nothing changed :( :( @nav1-code

phamvanlinh20111993 avatar Jun 30 '20 15:06 phamvanlinh20111993

Closing as this issue is >2 years old and we don't have a reproducible example to follow up on. Given that other users were able to run identical code, my guess is that OP's language data cache was corrupted (see ##666).

Balearica avatar Oct 11 '22 04:10 Balearica