Overview   Class List   Class Hierarchy   Class Members   Functions & Constants   Defines   Header Files  

UIMA C++ API Documentation

v2.4.0

Useful Links

Annotator interfaces:
uima::Annotator

Configuration parameters access:
uima::AnnotatorContext

CAS and TypeSystem APIs:
uima::CAS
uima::TypeSystem

Generic feature structure access:
uima::FSIndex
uima::FSIterator
uima::FeatureStructure

Specalized annotation access:
uima::ANIndex
uima::ANIterator
uima::AnnotationFS
uima::DocumentFS

Sofa access:
uima::SofaFS
uima::SofaDataStream

Application:
uima::ResourceManager
uima::Framework
uima::AnalysisEngine

The C++ Enablement for UIMA provides transparent interoperability for UIMA C++ analytics to run with the Java UIMA SDK platform. Supported components include primitive and aggregate Analysis Engines and Cas Consumers.

Please refer to the UIMA SDK User's Guide and Reference for an introduction to the UIMA SDK and as well as instructions on how to create, run and manage UIMA analytics. The important APIs that support development of UIMA C++ analytics are described below.

The Annotator ( uima::Annotator ) class defines the interface that must be implemented by primitive UIMA C++ components. The C++ component descriptor must specify the framework implementation as follows:

   <frameworkImplementation>org.apache.uima.cpp</frameworkImplementation> 

An application that runs a UIMA analysis engine must instantiate a uima::AnalysisEngine from a UIMA component descriptor and call its process method using APIs shown below:
 (void) ResourceManager::createInstance("My UIMA Application"); //singleton
 AnalysisEngine * pEngine =
  Framework::createAnalysisEngine(descriptorfn, errorInfo); //engine
    CAS* cas = pEngine-newCAS(); //create a CAS
 //use CAS APIs to add data to be analysed
 TyErrorId utErrorId = pEngine->process(*cas);//call process
 cas->reset(); //reset CAS before reuse
 utErrorId = pEngine->destroy();  //free resources
Example annotator and application code can be found in the docs/example directory of the UIMACPP distribution.

The AnnotatorContext ( uima::AnnotatorContext ) class associated with an AnalysisEngine provides access to the configuration parameters and other metadata about the Analysis Engine.

The CAS ( uima::CAS ) object consists of the data structure and set of APIs to support the representation of the TypeSystem and instances of these types FeatureStructures. The CAS APIs are virtually identical to those in the Java implementation. To support interoperability, the CAS is serialized into the native environment through the JNI.

The Subject of Analysis or Sofa capability is supported by the uima::SofaFS class. Use uima::CAS::createView() to create a view of a Sofa and uima::CAS::getView() to access the view.

The SofaDataStream ( uima::SofaDataStream ) class provides stream access to Sofa data. Use the method uima::SofaFS::getSofaDataStream() to get a handle to a uima::SofaDataStream object. The support for stream access to local sofa data is built into the UIMACPP library. Handlers for other URI schemes must be registered with the framework. The handler for the file URI scheme can be found in the UIMACPP distribution. To develop custom URI schemes, implement the interface defined in sofastreamhandler.hpp and build a DLL. To make the handlers available to the framework, register the handler by setting the UIMACPP_STREAMHANDLERS environment variable as follows:

   Windows:
 set UIMACPP_STREAMHANDLERS=file:SofaStreamHandlerFile myscheme:mylibrary
   Linux:
 export UIMACPP_STREAMHANDLERS=file:SofaStreamHandlerFile myscheme:mylibrary


Generated on Mon Oct 1 16:04:12 2012 for UIMACPP API by  doxygen 1.3.9.1