Giter VIP home page Giter VIP logo

Comments (4)

DavideViolante avatar DavideViolante commented on June 19, 2024

Please explain the problem, error you get, image or pdf you use, etc.
See the official docs for more info.

from ocr-space-api-wrapper.

aedikyamac avatar aedikyamac commented on June 19, 2024

const res1 = await ocrSpace(MY_IMAGE_URL, {language: 'tur'}).then(res => { console.log(res) })
this code succesfully works but when i use OCREngine 2

const res1 = await ocrSpace("MY_IMAGE_URL", {language: 'tur', OCREngine: 2}).then(res => { console.log(res) })
it prints: { OCRExitCode: 99, IsErroredOnProcessing: true, ErrorMessage: [ "Value for parameter 'language' is invalid" ], ProcessingTimeInMilliseconds: '31' }

from ocr-space-api-wrapper.

DavideViolante avatar DavideViolante commented on June 19, 2024

First of all you don't need to use .then if you are using await.
The correct code is:

async function main() {
  const res = await ocrSpace(MY_IMAGE_URL, {language: 'tur'})
  console.log(res)
}

Then the exit code is not dependant to this repository, but this is just a wrapper to the OCR Space service.
Maybe the tur language is not supported by OCREngine 2, try using Engine 1.

From the docs about Engine 2:

Engine2 has automatic Western language detection, so this value (language) will be ignored.
...
- Language auto-detect. It does not matter what OCR language you select, as long as it uses Latin characters

By the way I'm always using Engine 1 and is super efficient for me.

from ocr-space-api-wrapper.

aedikyamac avatar aedikyamac commented on June 19, 2024

Yeah, i removed language value and it worked, thanks sir.

from ocr-space-api-wrapper.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.