Rather than edit AggregatePlainTextUMLSProcessor.xml directly, I tried to keep
things clean by creating a copy of it and editing that. I made the two
additions you recommend, and provided the new name and updated description
under <analysisEngineMetaData>. Then told CVD to load that new AE specifier
file.
Sadly, that produced a "SEVERE" exception when trying to find or load
DictionaryLookupAnnotatorCSV.xml, which has not changed from the downloaded
version. I looked at the stacktrace in the log file (the top of which is shown
below), and used a browser to confirm that the path to that file is correct and
the file appears to be valid XML. Since the stacktrace is silent as to _why_
the Initialization failed, as far as I can see, I'm not sure how to resolve
this.
Any suggestions?
-- stacktrace --
1/8/14 4:41:04 PM - 14:
org.apache.uima.tools.cvd.MainFrame.handleException(527): SEVERE:
Initialization of annotator class
"org.apache.ctakes.dictionary.lookup.ae.DictionaryLookupAnnotator" failed.
(Descriptor:
file:/.../apache-ctakes-3.1.1/desc/ctakes-dictionary-lookup/desc/analysis_engine/DictionaryLookupAnnotatorCSV.xml)
org.apache.uima.resource.ResourceInitializationException: Initialization of
annotator class
"org.apache.ctakes.dictionary.lookup.ae.DictionaryLookupAnnotator" failed.
(Descriptor:
file:/.../apache-ctakes-3.1.1/desc/ctakes-dictionary-lookup/desc/analysis_engine/DictionaryLookupAnnotatorCSV.xml)
at
org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:252)
...
-----Original Message-----
From: Masanz, James J. [mailto:[email protected]]
Sent: Mon, 06 Jan, 2014 16:50
To: '[email protected]'
Subject: [External] RE: How to augment/modify UMLS resources?
Hi Lee,
As you have discovered, the dictionary1.csv is not used by
AggregatePlainTextProcessor.xml
AggregatePlainTextProcessor.xml uses a (tiny) lucene index for the few words
like knee and pain that are annotated without using the larger UMLS resource.
I think to use the csv instead of the other methods, you would modified
AggregatePlainTextProcessor.xml to refer to DictionaryLookupAnnotatorCSV.xml
instead of DictionaryLookupAnnotator.xml where there currently is the line
<import
location="../../../ctakes-dictionary-lookup/desc/analysis_engine/DictionaryLookupAnnotator.xml"/>
I can't remember offhand if there are parameters you have to update too, but I
don't think so.
Hopefully that will give you an idea then of what to add to
AggregatePlainTextUMLSProcessor.xml to get both the UMLS and your csv
dictionary in effect.
(You would add the following to the delegateAnalysisEngine list of
AggregatePlainTextUMLSProcessor.xml
<delegateAnalysisEngine key="DictionaryLookupAnnotator"> <import
location="../../../ctakes-dictionary-lookup/desc/analysis_engine/DictionaryLookupAnnotatorCSV.xml"/>
</delegateAnalysisEngine>
And then add
<node>DictionaryLookupAnnotator</node>
Just before or just after
<node>DictionaryLookupAnnotatorDB</node>
-- James