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
EDKEngine
object.TIP: Micro Focus recommends that you program against the
TextExtractionEngine
interface 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
EDKSession
object and associate it with the engine.TIP: Micro Focus recommends that you program against the
TextExtractionSession
interface to instantiateEDKSession
. - Send UTF-8 encoded text to the session or pass the session a stream it can read.
-
Execute a
for each
loop to obtain anEDKMatch
object for each match in a session.NOTE: If you create your
EDKEngine
from a configuration file that includes post-processing tasks, the post-processing tasks automatically run as part ofEDKMatch
and you do not need to run them separately. - Get the properties of the match.
- Release resources when done.