Standalone API Usage
This section describes the basic structure of a standalone application using the API. See the source referenced in Java API Examples. Typically, your application takes the following actions:
-
Instantiate an
EDKEngineobject.TIP: Micro Focus recommends that you program against the
TextExtractionEngineinterface to instantiateEDKEngine.You can create an engine from an appropriate configuration file and go to step 2.
Alternatively, you can create the engine without a configuration. In this case you must then also:
-
Set the license key.
-
Configure the engine, load the grammars, and select entities.
-
-
Instantiate an
EDKSessionobject and associate it with the engine.TIP: Micro Focus recommends that you program against the
TextExtractionSessioninterface to instantiateEDKSession. - Send UTF-8 encoded text to the session or pass the session a stream it can read.
-
Execute a
for eachloop to obtain anEDKMatchobject for each match in a session.NOTE: If you create your
EDKEnginefrom a configuration file that includes post-processing tasks, the post-processing tasks automatically run as part ofEDKMatchand you do not need to run them separately. - Get the properties of the match.
- Release resources when done.