Standalone API Usage

The Eduction Software Development Kit (SDK) C API allows C developers to interact directly with the Eduction engine.

The Eduction engine is the core of the Eduction API. In an application, the first call of the API must create the engine. You then perform data processing in an Eduction session.

This section describes the basic structure of a stand-alone application using the API. For an example of this process, see the source code in the example files (see C API Examples).

Typically, your application takes the following actions:

  1. Include edk.h.

  2. Instantiate the engine and obtain an engine handle. You can call EdkEngineCreateFromConfigFile to create an engine from an appropriate configuration file and license. In this case, go to step 3.

    Alternatively, you can create the engine without a configuration. In this case, you must then also: 

    1. Set the license key.

    2. Configure the engine to:

      • set optional parameters.
      • load the grammar files to use for matching.
      • add specific entities from grammars to use for matching.
  3. Create a session associated with the engine, and obtain a session handle. You can create and run concurrent sessions in a multithreaded application. Each session uses the same grammars, but maintains its own state. See Concurrency Control.

  4. Send UTF-8 encoded text to the session.

  5. Call EdkGetNextMatch to obtain an entity match. You can call this method repeatedly to obtain all matches.

    NOTE: If you create your engine from a configuration file that includes post-processing tasks, the post-processing tasks automatically run as part of EdkGetNextMatch and you do not need to run them separately.

  6. If required, call EdkGetRedactedText to produce redacted output.

  7. For each match, get details and properties of the match.

  8. To process multiple documents, repeat Step 4 to Step 7.

  9. Release resources when done. You must destroy all session handles before you destroy the engine handle.