Hello,

at my first try using the ConceptMapper with the sample dictionary (testDict.xml) I ran into some difficulties. The only documentation I found was a docbook on the UIMA Sandbox SVN (not linked to the apache sandbox yet) which I managed to compile with the docbook libraries. It describes more the general parameters. So I assumed the AggregatEngine descriptor files can be directly load into CAS Visual Debugger. After doing this I got an resulting error of:

SEVERE: Initialization of annotator class "org.apache.uima.conceptMapper.ConceptMapper" failed

I executed the following steps:

create new project in Eclipse
add UIMA nature to the project
add the necessary librariy jar files
uima-core.jar
uima-tools.jar (CAS Visual Debugger)
xercesImpl-2.9.1.jar (SAX Parser)
Otherwise I get a java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser Exception from in org .apache .uima .conceptMapper.support.dictionaryResource.DictionaryResource_impl.load
add ConceptMapper source files to project
uima.tt
org.apache.uima.conceptMapper
add descriptor files to project
analysis_engine/primitive/ConceptMapperOffsetTokenizer.xml
analysis_engine/primitive/DictTerm.xml
analysis_engine/primitive/OffsetTokenizer.xml
analysis_engine/aggregate/OffsetTokenizerMatcher.xml
add the test dictionary
resources/dict/testDict.xml
change the path of the DictionaryFileName in resources of "analysis_engine/aggregate/OffsetTokenizerMatcher.xml" from "file:dict/ testDict.xml" to "file:resources/dict/testDict.xml". otherwise it would not load the dictionary and I got a org.apache.uima.resource.ResourceInitialzationException with "Could not access the resource data at file:dict/testDict.xml".
start CAS Visual Debuggger.
load aggregate engine "analysis_engine/aggregate/ OffsetTokenizerMatcher.xml" in CVD

Then I get:

org.apache.uima.resource.ResourceInitializationException: Error initializing "org.apache.uima.resource.impl.DataResource_impl" from descriptor ..../desc/analysis_engine/aggregate/ OffsetTokenizerMatcher.xml

with the appended error log. In the error log somehow the path names got mixed up e.g. "/OtherStuff/IBM/eclipse-apacheuima/conceptMapper/ descriptors/analysis_engine/primitive/OffsetTokenizer.xml". Is it maybe the xerces library (xercesImpl-2.9.1.jar) I attached manually. Which SAX parser is recommended to use?

As far as I understood the "OffsetTokenizerMatcher"-AggregateEngine loads the "OffsetTokenizer"-AnalysisEngine and the the "ConceptMapperOffsetTokenizer"-AnalysisEngine. The dictionary file is defined in the latter one. Is that correct?

I hope the problem description is not to overdetailed :)

Any help or suggestions are appreciated.

Regards,
Toby


ERROR LOG
---------------------------------------------------------------

4/20/09 10:29:54 AM - 10: org.apache.uima.conceptMapper.Logger.log(46): INFO: ConceptMapper INFO: Loading Dictionary... 4/20/09 10:29:54 AM - 10: org.apache.uima.conceptMapper.Logger.log(46): INFO: ConceptMapper INFO: Loading dictionary 4/20/09 10:29:54 AM - 10: org.apache.uima.tools.cvd.MainFrame.handleException(575): SEVERE: Initialization of annotator class "org.apache.uima.conceptMapper.ConceptMapper" failed. (Descriptor: file:/Users/tobys/Documents/workspace/exampleConceptMapper2/desc/ analysis_engine/primitive/ConceptMapperOffsetTokenizer.xml) org.apache.uima.resource.ResourceInitializationException: Initialization of annotator class "org.apache.uima.conceptMapper.ConceptMapper" failed. (Descriptor: file:/Users/tobys/Documents/workspace/exampleConceptMapper2/desc/ analysis_engine/primitive/ConceptMapperOffsetTokenizer.xml) at org .apache .uima .analysis_engine .impl .PrimitiveAnalysisEngine_impl .initializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:253) at org .apache .uima .analysis_engine .impl .PrimitiveAnalysisEngine_impl .initialize(PrimitiveAnalysisEngine_impl.java:157) at org .apache .uima .impl .AnalysisEngineFactory_impl .produceResource(AnalysisEngineFactory_impl.java:94) at org .apache .uima .impl .CompositeResourceFactory_impl .produceResource(CompositeResourceFactory_impl.java:62) at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java: 258) at org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java: 352) at org.apache.uima.analysis_engine.asb.impl.ASB_impl.setup(ASB_impl.java: 243) at org .apache .uima .analysis_engine .impl .AggregateAnalysisEngine_impl .initASB(AggregateAnalysisEngine_impl.java:413) at org .apache .uima .analysis_engine .impl .AggregateAnalysisEngine_impl .initializeAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java: 361) at org .apache .uima .analysis_engine .impl .AggregateAnalysisEngine_impl .initialize(AggregateAnalysisEngine_impl.java:183) at org .apache .uima .impl .AnalysisEngineFactory_impl .produceResource(AnalysisEngineFactory_impl.java:94) at org .apache .uima .impl .CompositeResourceFactory_impl .produceResource(CompositeResourceFactory_impl.java:62) at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java: 258) at org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java: 326)
        at org.apache.uima.tools.cvd.MainFrame.setupAE(MainFrame.java:1527)
at org.apache.uima.tools.cvd.MainFrame.loadAEDescriptor(MainFrame.java:524) at org .apache .uima .tools .cvd .control .AnnotatorOpenEventHandler .actionPerformed(AnnotatorOpenEventHandler.java:52) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java: 2028) at javax.swing.AbstractButton $Handler.actionPerformed(AbstractButton.java:2351) at javax .swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java: 387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java: 242)
        at javax.swing.AbstractButton.doClick(AbstractButton.java:389)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java: 1220)
        at apple.laf.CUIAquaMenuItem.doClick(CUIAquaMenuItem.java:119)
at javax.swing.plaf.basic.BasicMenuItemUI $Handler.mouseReleased(BasicMenuItemUI.java:1261)
        at java.awt.Component.processMouseEvent(Component.java:6126)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
        at java.awt.Component.processEvent(Component.java:5891)
        at java.awt.Container.processEvent(Container.java:2102)
        at java.awt.Component.dispatchEventImpl(Component.java:4497)
        at java.awt.Container.dispatchEventImpl(Container.java:2160)
        at java.awt.Component.dispatchEvent(Component.java:4327)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java: 4366) at java.awt.LightweightDispatcher.processMouseEvent(Container.java: 4030)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3960)
        at java.awt.Container.dispatchEventImpl(Container.java:2146)
        at java.awt.Window.dispatchEventImpl(Window.java:2440)
        at java.awt.Component.dispatchEvent(Component.java:4327)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java .awt .EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java: 300) at java .awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java: 210) at java .awt .EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java: 200) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java: 195) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java: 187)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Caused by: org.apache.uima.resource.ResourceInitializationException
at org .apache .uima .analysis_engine .impl.compatibility.AnnotatorAdapter.initialize(AnnotatorAdapter.java: 113) at org .apache .uima .analysis_engine .impl .PrimitiveAnalysisEngine_impl .initializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:251)
        ... 44 more
Caused by: org .apache.uima.analysis_engine.annotator.AnnotatorConfigurationException at org .apache.uima.conceptMapper.ConceptMapper.initialize(ConceptMapper.java: 343) at org .apache .uima .analysis_engine .impl.compatibility.AnnotatorAdapter.initialize(AnnotatorAdapter.java: 109)
        ... 45 more
Caused by: org.apache.uima.resource.ResourceInitializationException
at org .apache .uima .conceptMapper .support .dictionaryResource .DictionaryResource_impl .loadDictionaryContents(DictionaryResource_impl.java:278) at org .apache.uima.conceptMapper.ConceptMapper.initialize(ConceptMapper.java: 335)
        ... 46 more
Caused by: org .apache .uima .conceptMapper.support.dictionaryResource.DictionaryLoaderException: java.io.FileNotFoundException: /OtherStuff/IBM/eclipse-apacheuima/ conceptMapper/descriptors/analysis_engine/primitive/ OffsetTokenizer.xml (No such file or directory) at org .apache .uima .conceptMapper .support .dictionaryResource .annotatorAdaptor.AnnotatorAdaptor.<init>(AnnotatorAdaptor.java:84) at org .apache .uima.conceptMapper.support.dictionaryResource.DictionaryResource_impl $DictLoader.setDictionary(DictionaryResource_impl.java:938) at org .apache .uima .conceptMapper .support .dictionaryResource .DictionaryResource_impl .loadDictionaryContents(DictionaryResource_impl.java:263)
        ... 47 more
Caused by: java.io.FileNotFoundException: /OtherStuff/IBM/eclipse- apacheuima/conceptMapper/descriptors/analysis_engine/primitive/ OffsetTokenizer.xml (No such file or directory)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at java.io.FileInputStream.<init>(FileInputStream.java:66)
at sun .net .www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70) at sun .net .www .protocol.file.FileURLConnection.getInputStream(FileURLConnection.java: 161)
        at java.net.URL.openStream(URL.java:1009)
        at org.apache.uima.util.XMLInputSource.<init>(XMLInputSource.java:83)
at org .apache .uima .conceptMapper .support .dictionaryResource .annotatorAdaptor.AnnotatorAdaptor.<init>(AnnotatorAdaptor.java:73)
        ... 49 more

Reply via email to