Can anyone say if it is currently possibly to add a C++ annotator into a
UIMA Java pipeline.

I have a dummy annotator written in C++ which works within a UIMA C++
framework.

Also when inserted into a UIMA Java framework by specifying C++ in the
AE descriptor together with the path to the AE DLL,
the pipeline runs and calls to the C++ initialize and process methods
can be seen.  So far so good.

However when trying to call any methods on the parameters passed to
initialize or process rather ugly access violation
exceptions result.

For example, this blows up just after the breakpoint 

TyErrorId CppPrimitiveAE::process( CAS& cas, ResultSpecification const&
crResultSpecification)
{
    cout << "CppPrimitiveAE::process" << endl;

    __asm int 3 // this inserts a breakpoint so that the VC++ debugger
can be envoked in JNI world

    CAS* pAudioView = cas.getView( "AudioView");

    if ( pAudioView)
    {
        cout << "got audio view" << endl;
    }

    return (TyErrorId) UIMA_ERR_NONE;
}

Upon step-by-step debugging into cas.getView

  CAS* CAS::getView(const icu::UnicodeString & localViewName) {
    SofaID* sid;
    bool deleteSofaID = false;
    if (0 != iv_baseCas->iv_componentInfo) {
      sid = const_cast<SofaID*>
(&iv_baseCas->iv_componentInfo->mapToSofaID(localViewName));
    } else {
      sid = new SofaID();
      deleteSofaID = true;
      sid->setSofaId(localViewName);
    }
  ...

It is found that the CAS member variable (a pointer) iv_baseCas is NULL
thus explaining the access violation exception.

Does this indicate a binary incompatibility or version problem with
respect to UIMA Java & C++ framework?

Is it valid to add a C++ annotator into essentially a Java-based UIMA
pipeline?  I imagine that the UIMA would aspire to allow this but
perhaps given the current state of Apache UIMA is it not possible?

Can the list enlighten me on the general state of Apache UIMA C++ in any
case or is this still early days?

Thanks for your help,

Justin

IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


Reply via email to