Open topic with navigation

# Standalone API Usage

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

At the core of the API is an eduction engine. The first call of the API in an application should create the engine. You must then set a valid license for the engine.

After you create it, you can optionally configure an engine to determine its matching behavior. You must load one or more resource files that contain the eduction grammars, and you must add one or more entities, from the loaded resource files, to match against.

Data processing is performed in an eduction session. You can create multiple sessions for each eduction engine. All sessions use the same loaded grammars and entities. Each session maintains its own state so that the sessions can run concurrently in a multithreaded application.

You can use the session to process multiple documents. You can pull (stream) or push (add) data. You call a function to get the next available match. You can call this function repeatedly to cycle through all the matches. For each match, you can access the associated text and properties by using several function calls.

You can keep a session alive for as long as necessary. However, you must destroy it before you destroy the engine that is associated with it. The call to destroy the engine should be the last call of this API in an application.

This section describes the skeletal structure of a stand-alone application using the API. See the source code in C API Examples. Typically, your application takes the following actions:

1. Include `edk.h`.
2. Instantiate the engine and obtain an engine handle.
3. Set the license key.

4. Configure the engine to:

   - set optional parameters.
   - load the grammar files to use for matching.
   - add specific entities from grammars to use for matching.
5. 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.
6. Feed UTF-8 encoded text to the session.
7. Call `EdkGetNextMatch` to obtain an entity match. You can call this method repeatedly to obtain all matches.
8. If required, call `EdkGetRedactedText` to produce redacted output.
9. For each match, get details and properties of the match.
10. To process multiple documents, repeat Step 6 to Step 9.
11. Release resources when done. You must destroy all session handles before destroying the engine handle.

© Copyright 2013-2018 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm