Topic
  • 4 replies
  • Latest Post - ‏2011-11-24T17:06:46Z by Jochen
Santiago Montico
Santiago Montico
8 Posts

Pinned topic Custom annotator not working in omnifind and no error shown in the log

‏2011-11-11T23:57:28Z |
Hi,

I have developed a custom annotator using:

LanguageWare Resource Workbench
Version: 7.2.0.2 (internal version: 7.2.0)
Build: 201105261413

Everything works fine in the Languageware, after that i exported the project into a .pear file in order to upload the file to omnifind enterprise edition 9.1, i can upload the file correctly and the text processor engine was created succesfully.

When i use the custom annotator developed and included in the .pear file in my mapping file (im using cas2jdbc) it seems to run correct but the data related to my custom annotator is not inserted in the database table.
I have two explicitMappingRules, the one related to builtin features insert the data into the database, but the one related to my custom annotator not.

I have checked the logs and everything seems to be right... I have checked the folder /home/esadmin/esdata/logs/ and the logs related with my collection...

Here is my cas2JdbcMappingSpec section in mapping file:

<cas2JdbcMappingSpec>
<cas2JdbcMappings>
<explicitMappings>
<explicitMappingRule applyToSubtypes="false">
<type>uima.tcas.DocumentAnnotation</type>
<table>NFEPACK.DOCUMENTS_PART1</table>
<featureMappings>

<featureMapping>
<feature>docUri()</feature>
<length>200</length>
<column>URI</column>
</featureMapping>

<featureMapping>
<feature>coveredText()</feature>
<length>200</length>
<column>TEXT</column>
</featureMapping>

</featureMappings>
</explicitMappingRule>
<explicitMappingRule applyToSubtypes="false">
<type>com.aaa.languageware.FirstName</type>
<table>NFEEE.PERSON</table>
<featureMappings>
<featureMapping>
<feature>gender</feature>
<length>200</length>
<column>NAME</column>
</featureMapping>
</featureMappings>
</explicitMappingRule>
</explicitMappings>
</cas2JdbcMappings>
</cas2JdbcMappingSpec>

The annotator and the feature seems to be recognized by omnifind because if i change the names in the mapping file an error appears saying that the feature or the type is not recognized, but i dont know why the data related with the custom annotator com.aaa.languageware.FirstName is not inserted in the database table.

What could be wrong?

Any help would be appreciated.

Thanks in advance, Santiago.
Updated on 2011-11-24T17:06:46Z at 2011-11-24T17:06:46Z by Jochen
  • Santiago Montico
    Santiago Montico
    8 Posts

    Re: Custom annotator not working in omnifind and no error shown in the log

    ‏2011-11-15T16:52:51Z  
    Hi,

    I have tested the .pear file export from Languageware in the CAS Visual Debugger from the UIMA SDK and everything works fine... however the problem persist with the omnifind integration of my custom annotator...

    I have tested the cas2jdbc mapping and the mappings related to my custom annotator doesn't work however the the mapping related to the omnifind built-in annotator works like a charm...

    Nothing in the logs and no casprocessor_audit log is generated in /home/esadmin/esdata/logs/audit ...

    What could be wrong??

    Any help would be appreciated.

    Thanks in advance, Santiago
  • Jochen
    Jochen
    42 Posts

    Re: Custom annotator not working in omnifind and no error shown in the log

    ‏2011-11-15T18:05:56Z  
    Hi,

    I have tested the .pear file export from Languageware in the CAS Visual Debugger from the UIMA SDK and everything works fine... however the problem persist with the omnifind integration of my custom annotator...

    I have tested the cas2jdbc mapping and the mappings related to my custom annotator doesn't work however the the mapping related to the omnifind built-in annotator works like a charm...

    Nothing in the logs and no casprocessor_audit log is generated in /home/esadmin/esdata/logs/audit ...

    What could be wrong??

    Any help would be appreciated.

    Thanks in advance, Santiago
    Hi Santiago,

    did you do the .pear export into a pear file and subsequently manually imported it in ICA, or did you export directly to ICA?
    In the latter case the custom annotator is associated with a separate UIMA CAS view by default, and this is probably the cause why the mapping is not working for your custom annotations (at least last time when I tried it with 2.1 this was the problem).
    You can change the configuration for the custom annotator to use the default CAS view:
    Goto Parse->Configure text processing options
    The 2nd text box specifies a CAS view, make sure it is empty.
    Save, restart Parser, rebuild index.

    One caveat: if you deploy an LRW-generated PEAR this way (use default CAS view), all tokens are indexed twice, since the LanguageWare tokenizer annotator is always deployed with such a PEAR. If you use the ICA Parser just for generating the tables and you do not use the search, then this may be ok...

    BTW: if this is not the problem in your case, I would recommend that you run an export of the CAS (dumps the CAS to XMI format). You can see there all annotations that were created by your custom annotator, including the CAS views used for different annotations.
    Hope this helps.
    Cheers, /Jochen
  • Santiago Montico
    Santiago Montico
    8 Posts

    Re: Custom annotator not working in omnifind and no error shown in the log

    ‏2011-11-15T21:35:28Z  
    • Jochen
    • ‏2011-11-15T18:05:56Z
    Hi Santiago,

    did you do the .pear export into a pear file and subsequently manually imported it in ICA, or did you export directly to ICA?
    In the latter case the custom annotator is associated with a separate UIMA CAS view by default, and this is probably the cause why the mapping is not working for your custom annotations (at least last time when I tried it with 2.1 this was the problem).
    You can change the configuration for the custom annotator to use the default CAS view:
    Goto Parse->Configure text processing options
    The 2nd text box specifies a CAS view, make sure it is empty.
    Save, restart Parser, rebuild index.

    One caveat: if you deploy an LRW-generated PEAR this way (use default CAS view), all tokens are indexed twice, since the LanguageWare tokenizer annotator is always deployed with such a PEAR. If you use the ICA Parser just for generating the tables and you do not use the search, then this may be ok...

    BTW: if this is not the problem in your case, I would recommend that you run an export of the CAS (dumps the CAS to XMI format). You can see there all annotations that were created by your custom annotator, including the CAS views used for different annotations.
    Hope this helps.
    Cheers, /Jochen
    Hi Jochen, thanks for the reply!

    My comments below...
    > Jochen wrote:
    > Hi Santiago,
    >
    > did you do the .pear export into a pear file and subsequently manually imported it in ICA, or did you export directly to ICA?
    > In the latter case the custom annotator is associated with a separate UIMA CAS view by default, and this is probably the cause why the mapping is not working for your custom annotations (at least last time when I tried it with 2.1 this was the problem).
    > You can change the configuration for the custom annotator to use the default CAS view:
    > Goto Parse->Configure text processing options
    > The 2nd text box specifies a CAS view, make sure it is empty.
    > Save, restart Parser, rebuild index.
    I'm exporting the pear file manually and after that upload the file to Omnifind.

    I have checked the CAS view you mentioned and it was not empty..so i delete the information, test again and my data (a constant not a feature) was inserted magically to the database.. however it only works once!!! I don't know why.. I attempt to create all again from zero and the problem persisted, the data from my custom annotator wasn't inserted into the database...

    Why could cause this behavior?? I'm lost....

    >
    > One caveat: if you deploy an LRW-generated PEAR this way (use default CAS view), all tokens are indexed twice, since the LanguageWare tokenizer annotator is always deployed with such a PEAR. If you use the ICA Parser just for generating the tables and you do not use the search, then this may be ok...
    >

    This is the case, i'm deploying an LRW-generated PEAR but i don't know which is the default CAS view you are mentioning..

    > BTW: if this is not the problem in your case, I would recommend that you run an export of the CAS (dumps the CAS to XMI format). You can see there all annotations that were created by your custom annotator, including the CAS views used for different annotations.
    How can i export my CAS to the XMI format you are mentioning? I have tried with LanguageWare but i didn't find the option, in the CAS Visual Debugger i found the option "Write XMI CAS File" but the file exported doesn't make sense to me...

    I think that with your advice i'm close to found the solution, but i don't understand the behavior of omnifind in this case yet...

    If you could help me again i would be really appreciated.

    Thanks again, Santiago.
    > Hope this helps.
    > Cheers, /Jochen
    > Jochen wrote:
    > Hi Santiago,
    >
    > did you do the .pear export into a pear file and subsequently manually imported it in ICA, or did you export directly to ICA?
    > In the latter case the custom annotator is associated with a separate UIMA CAS view by default, and this is probably the cause why the mapping is not working for your custom annotations (at least last time when I tried it with 2.1 this was the problem).
    > You can change the configuration for the custom annotator to use the default CAS view:
    > Goto Parse->Configure text processing options
    > The 2nd text box specifies a CAS view, make sure it is empty.
    > Save, restart Parser, rebuild index.
    >
    > One caveat: if you deploy an LRW-generated PEAR this way (use default CAS view), all tokens are indexed twice, since the LanguageWare tokenizer annotator is always deployed with such a PEAR. If you use the ICA Parser just for generating the tables and you do not use the search, then this may be ok...
    >
    > BTW: if this is not the problem in your case, I would recommend that you run an export of the CAS (dumps the CAS to XMI format). You can see there all annotations that were created by your custom annotator, including the CAS views used for different annotations.
    > Hope this helps.
    > Cheers, /Jochen
    > Jochen wrote:
    > Hi Santiago,
    >
    > did you do the .pear export into a pear file and subsequently manually imported it in ICA, or did you export directly to ICA?
    > In the latter case the custom annotator is associated with a separate UIMA CAS view by default, and this is probably the cause why the mapping is not working for your custom annotations (at least last time when I tried it with 2.1 this was the problem).
    > You can change the configuration for the custom annotator to use the default CAS view:
    > Goto Parse->Configure text processing options
    > The 2nd text box specifies a CAS view, make sure it is empty.
    > Save, restart Parser, rebuild index.
    >
    > One caveat: if you deploy an LRW-generated PEAR this way (use default CAS view), all tokens are indexed twice, since the LanguageWare tokenizer annotator is always deployed with such a PEAR. If you use the ICA Parser just for generating the tables and you do not use the search, then this may be ok...
    >
    > BTW: if this is not the problem in your case, I would recommend that you run an export of the CAS (dumps the CAS to XMI format). You can see there all annotations that were created by your custom annotator, including the CAS views used for different annotations.
    > Hope this helps.
    > Cheers, /Jochen
    Hi Jochen, thanks for your reply!

    did you do the .pear export into a pear file and subsequently manually imported it in ICA, or did you export directly to ICA?
    In the latter case the custom annotator is associated with a separate UIMA CAS view by default, and this is probably the cause why the mapping is not working for your custom annotations (at least last time when I tried it with 2.1 this was the problem).
    You can change the configuration for the custom annotator to use the default CAS view:
    Goto Parse->Configure text processing options
    The 2nd text box specifies a CAS view, make sure it is empty.
    Save, restart Parser, rebuild index.

    I'm exporting the .pear file manually to Omnifind.
  • Jochen
    Jochen
    42 Posts

    Re: Custom annotator not working in omnifind and no error shown in the log

    ‏2011-11-24T17:06:46Z  
    Hi Jochen, thanks for the reply!

    My comments below...
    > Jochen wrote:
    > Hi Santiago,
    >
    > did you do the .pear export into a pear file and subsequently manually imported it in ICA, or did you export directly to ICA?
    > In the latter case the custom annotator is associated with a separate UIMA CAS view by default, and this is probably the cause why the mapping is not working for your custom annotations (at least last time when I tried it with 2.1 this was the problem).
    > You can change the configuration for the custom annotator to use the default CAS view:
    > Goto Parse->Configure text processing options
    > The 2nd text box specifies a CAS view, make sure it is empty.
    > Save, restart Parser, rebuild index.
    I'm exporting the pear file manually and after that upload the file to Omnifind.

    I have checked the CAS view you mentioned and it was not empty..so i delete the information, test again and my data (a constant not a feature) was inserted magically to the database.. however it only works once!!! I don't know why.. I attempt to create all again from zero and the problem persisted, the data from my custom annotator wasn't inserted into the database...

    Why could cause this behavior?? I'm lost....

    >
    > One caveat: if you deploy an LRW-generated PEAR this way (use default CAS view), all tokens are indexed twice, since the LanguageWare tokenizer annotator is always deployed with such a PEAR. If you use the ICA Parser just for generating the tables and you do not use the search, then this may be ok...
    >

    This is the case, i'm deploying an LRW-generated PEAR but i don't know which is the default CAS view you are mentioning..

    > BTW: if this is not the problem in your case, I would recommend that you run an export of the CAS (dumps the CAS to XMI format). You can see there all annotations that were created by your custom annotator, including the CAS views used for different annotations.
    How can i export my CAS to the XMI format you are mentioning? I have tried with LanguageWare but i didn't find the option, in the CAS Visual Debugger i found the option "Write XMI CAS File" but the file exported doesn't make sense to me...

    I think that with your advice i'm close to found the solution, but i don't understand the behavior of omnifind in this case yet...

    If you could help me again i would be really appreciated.

    Thanks again, Santiago.
    > Hope this helps.
    > Cheers, /Jochen
    > Jochen wrote:
    > Hi Santiago,
    >
    > did you do the .pear export into a pear file and subsequently manually imported it in ICA, or did you export directly to ICA?
    > In the latter case the custom annotator is associated with a separate UIMA CAS view by default, and this is probably the cause why the mapping is not working for your custom annotations (at least last time when I tried it with 2.1 this was the problem).
    > You can change the configuration for the custom annotator to use the default CAS view:
    > Goto Parse->Configure text processing options
    > The 2nd text box specifies a CAS view, make sure it is empty.
    > Save, restart Parser, rebuild index.
    >
    > One caveat: if you deploy an LRW-generated PEAR this way (use default CAS view), all tokens are indexed twice, since the LanguageWare tokenizer annotator is always deployed with such a PEAR. If you use the ICA Parser just for generating the tables and you do not use the search, then this may be ok...
    >
    > BTW: if this is not the problem in your case, I would recommend that you run an export of the CAS (dumps the CAS to XMI format). You can see there all annotations that were created by your custom annotator, including the CAS views used for different annotations.
    > Hope this helps.
    > Cheers, /Jochen
    > Jochen wrote:
    > Hi Santiago,
    >
    > did you do the .pear export into a pear file and subsequently manually imported it in ICA, or did you export directly to ICA?
    > In the latter case the custom annotator is associated with a separate UIMA CAS view by default, and this is probably the cause why the mapping is not working for your custom annotations (at least last time when I tried it with 2.1 this was the problem).
    > You can change the configuration for the custom annotator to use the default CAS view:
    > Goto Parse->Configure text processing options
    > The 2nd text box specifies a CAS view, make sure it is empty.
    > Save, restart Parser, rebuild index.
    >
    > One caveat: if you deploy an LRW-generated PEAR this way (use default CAS view), all tokens are indexed twice, since the LanguageWare tokenizer annotator is always deployed with such a PEAR. If you use the ICA Parser just for generating the tables and you do not use the search, then this may be ok...
    >
    > BTW: if this is not the problem in your case, I would recommend that you run an export of the CAS (dumps the CAS to XMI format). You can see there all annotations that were created by your custom annotator, including the CAS views used for different annotations.
    > Hope this helps.
    > Cheers, /Jochen
    Hi Jochen, thanks for your reply!

    did you do the .pear export into a pear file and subsequently manually imported it in ICA, or did you export directly to ICA?
    In the latter case the custom annotator is associated with a separate UIMA CAS view by default, and this is probably the cause why the mapping is not working for your custom annotations (at least last time when I tried it with 2.1 this was the problem).
    You can change the configuration for the custom annotator to use the default CAS view:
    Goto Parse->Configure text processing options
    The 2nd text box specifies a CAS view, make sure it is empty.
    Save, restart Parser, rebuild index.

    I'm exporting the .pear file manually to Omnifind.
    Hi Santiago,

    the CAS looks a little different when you run the annotator in Omnifind vs. in CVD, therefore the XMI export from CVD will not help you understand the problem.
    WHen I wrote "run an export of the CAS", I meant the following:
    go to the Export tab of your collection in Omnifind ESAdmin and to
    "Configure options to export crawled or analyzed documents".
    Under Analyzed documents export options select Export documents as XML and Enable CAS as XMI format export.
    After you specified the Output path (existing directory) you should stop and restart the Parser. The Exporter is a separate session that exports what is parsed, meaning you should be patient, it may take a minute or so after parsing that exporting happens.

    The XMI format is just XML, so if you rename the result files to .xml you can use your favourite XML editor on them. It is just an encoding of the (Java) CAS object.

    If you cannot get this going, please open a PMR.

    /Jochen