Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

178
Vistas
Tesseract.js doesn't recognize Arabic language

I'm using tesseract.js ORC library to read what is written on an image and write it in console or on a text file so I found this library and it's working find with English word or characters but when I tried to read what is written on the image in Arabic language it doesn't work so this is the image that I'm trying to read

enter image description here

and this is my code :-

Head Tag:-

<script src='https://unpkg.com/tesseract.js@v2.1.0/dist/tesseract.min.js'</script>

Body Tag:-

    <script>
        Tesseract.recognize(
        'image.png',
        'ara',
  { logger: m => console.log(m) }
).then(({ data: { text } }) => {

})
</script>
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You need to handle the result inside the .then() block.

Here's a working example :

<!DOCTYPE html>
<meta charset="utf-8">
<title> OCR TEST </title>
<script src="https://unpkg.com/tesseract.js@v2.1.0/dist/tesseract.min.js"></script>
<output id="result">Processing...</output>
<script>
  const output = document.querySelector('output#result');
  Tesseract.recognize(
    'https://i.imgur.com/mdzmK4w.png', 'ara'
  ).then(result => {
    output.value = result.data.text;
  }).catch(err => {
    output.value = 'Processing Failed';
    console.log(err);
  });
</script>

It can take some time to process, especially on the first load because the WASM module and OCR training data will be fetched in the background first. You can see this happening in the Network tab of your Dev Tools.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda