Operational systems: Quick start guide to OCR on Mac OS

If you are writing an application that will perform text recognition on Mac OS, try out ABBYY Cloud OCR SDK. The service provides a Web API accessed via HTTP requests, which makes it virtually independent of programming language.

Check out our ready-to-use code samples on GitHub, available for many languages including Bash, Python, Ruby, and Java. In this article, we will use the Java sample to illustrate how our service can be used for OCR on Mac OS.

Please note that Cloud OCR SDK requires registration before use. It is only a few clicks, and after registering you will be able to create Application ID and Password for each of your applications. The server requires the ID and Password for each request. More details can be found in Authentication.

  1. Install Java Development Kit if your machine does not already have it. It can be downloaded from Oracle website.
  2. Download our Java sample and unzip it.
  3. Customize the URL for HTML requests. To do this, open the Abbyy.Ocrsdk.client/src/com/abbyy/ocrsdk/Client.java file and set the value tag of the ServerAddress setting according to the location center. For example, for processing data in Europe, set the value as following:
    public String serverUrl = "https://cloud-eu.ocrsdk.com";
  4. Open the Abbyy.Ocrsdk.client/src/ClientSettings.java file and provide the Application ID and Password you received after registration:
    // Name of application you created
    public static final String APPLICATION_ID = "";
    // Password should be sent to your e-mail after application was created
    public static final String PASSWORD = "";
  5. Build the sample application and run it to recognize an image and save the result as a plain text file:
    By default, the sample recognizes texts in English. If you need other recognition languages, put the comma-separated list in --lang command line option.
  6. To display help on all possible processing options, run java TestApp without any arguments:
  7. After you have tested the capabilities of Cloud OCR SDK, start modifying the sample to fit your needs. Take a look also at ProcessManyFiles.java, which implements the batch recognition procedure, with the images taken either from a specified folder or from the specified URLs.

Consult How to Work with Cloud OCR SDK for a step-by-step description of the simplest scenario, and API Reference for detailed information about any of the methods used by the sample and mentioned in guides.

Have more questions? Submit a request



Please sign in to leave a comment.

Recently viewed