Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6237199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:59:00+00:00 2026-05-24T10:59:00+00:00

I am making an AIR project, which will need some OCR capabilities, so i

  • 0

I am making an AIR project, which will need some OCR capabilities, so i decided to use tesseract (now i try to get it working on Windows).

My problem is, that can not change the location of the language file – it always tries to look in my Tesseract installation directory (program files (x86)\Tesseract-OCR\tessdata\mylang.traineddata)

Is there a way that i can configure Tesseract to look for this file where i specify? for example in the same folder as tesseract.exe. I dont want (or perhaps event cant) install an application with the AIR installer. I’ve tried it with the 3.0 version and the latest SVN version.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T10:59:00+00:00Added an answer on May 24, 2026 at 10:59 am

    I have solved the problem by rewriting the source code of Tesseract (im using SVN 597). As nguyenq said, Tesseract tries to look for the data at the path set by the TESSDATA_PREFIX environment variable. If this is not found, then it does some trickery i dont understand 🙂 .
    So if anyone needs a portable version of Tesseract (that is not dependent on a Tesseract installation) edit mainblk.cpp around line 60, this is my version:

    // remove the stuff that Tesseract does to find the installation path
    /* if (!getenv("TESSDATA_PREFIX")) {
    #ifdef TESSDATA_PREFIX
    #define _STR(a) #a
    #define _XSTR(a) _STR(a)
        datadir = _XSTR(TESSDATA_PREFIX);
    #undef _XSTR
    #undef _STR
    #else
        if (argv0 != NULL) {
          if (getpath(argv0, dll_module_name, datadir) < 0)
    #ifdef __UNIX__
            CANTOPENFILE.error("main", ABORT, "%s to get path", argv0);
    #else
            NO_PATH.error("main", DBG, NULL);
    #endif
        } else {
          datadir = "./";
        }
    #endif
      } else {
        datadir = getenv("TESSDATA_PREFIX");
      }*/
      datadir = "./"; // look for config things in the same folder as the executable.
    

    Now you can pack things in the “tesseract executable location”\tessdata directory

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a small app in Adobe Air which I need to interact with
Making an adobe flex ui in which data that is calculated must use proprietary
for school we are making an air application and we've run into some questions,
I can't seem to get this little AIR app I'm making to work right.
I'm making a Flex AIR application that will produce a giftcard from a webcam
I'm making a small Adobe AIR app (my first) using HTML+Javascript. I need to
I'm making a game and I need to represent a layered circle in some
I am making a 2d platformer, and am trying to get some auto-terrain generation.
I am wandering what will it take to get a Adobe air app published
I'm making an App using Adobe Flex/Air. I was wondering if there is any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.