uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Schor <...@schor.com>
Subject Re: UIMA Addons ConceptMapper - where to start
Date Sun, 02 Mar 2014 20:30:02 GMT

On 3/2/2014 1:04 AM, Debbie Zhang wrote:
> Thanks Marshall. I have no problem of following the UIMA getting_started
> tutorial and have successfully created my own applications with my own
> annotators. I think I should ask my question more specifically.
>
> I created a new project called: ConceptMapperTest. I added UIMA nature to
> the project. 
Well, adding the UIMA nature to your project, surprised me a bit.  You would do
this if you wanted to package the results of your work as a PEAR package, after
you've finished creating an annotator pipeline you wish to deliver to others to use.

> I copied every files under desc and resources folders in the
> downloaded package to the desc and resources folders in the
> ConceptMapperTest project. 

This seems not right. 

I think the confusion is around "packaging".  UIMA provides add-ons as basic
annotators you can add, but also as "PEAR" packages, which have to be
"installed", if you use the PEAR form.  See
http://uima.apache.org/d/uimaj-2.5.0/references.html#ugr.ref.pear.installing .

If you're going to use the PEAR packaging form, first "install" the pear package
in some (new) directory.  UIMA provides a script to do this, called
runPearInstaller.   The installation process creates a UIMA descriptor inside
the install directory that you can then use in your project, for example, as a
delegate in an aggregate.
 
> I can use "Component Descriptor Editor" to open
> DictTerm.xml and OffsetTokenizer.xml. However, when I use "Component
> Descriptor Editor" to open ConceptMapperOffsetTokenizer.xml and
> OffsetTokenizerMatcher.xml, I have the following error:
>
> The descriptor has one or more errors. Please fix in the source editor.
> ResourceInitializationException: An import could not be resolved. No file
> with name
> "org/apache/uima/conceptMapper/DictTerm.xml" was found in the class path or 
> data path.
> (Descriptor:file:/C/Work/Java_Workspace/ConceptMapperTest/desc/analysis_engi
> ne/primitive
> /ConceptMapperOffsetTokenizer.xml)
>
> Therefore, I created all subfolders org/apache/uima/conceptMapper under
> desc, and then put all xml files to there. However, I still have the above
> error when I try to open ConceptMapperOffsetTokenizer.xml and
> OffsetTokenizerMatcher.xml files with "Component Descriptor Editor".

The Component Descriptor Editor needs to be able to find descriptors that are
references.  Descriptors are referenced in two ways: by name and by location. 
By location is a relative reference; by name looks things up in the classpath
(in this case in the classpath Eclipse uses for the project containing the
descriptor being edited).  See: 
http://uima.apache.org/d/uimaj-2.5.0/references.html#ugr.ref.xml.component_descriptor.imports

The simplest thing to do to correct this kind of error is to put the directory
containing the referenced descriptor on Eclipse's source class path.  (you do
this by some menu action - like right clicking the directory containing the
descriptors you want to be able to find, in the PackageExplorer view of Eclipse,
and selecting "Build Path" -> "add to Build Path".

Hope that helps.

-Marshall
>
> Would you please let me know what I did wrong? Thank you very much for your
> help!
>
> Regards,
>
> Debbie
>
>
> -----Original Message-----
> From: Marshall Schor [mailto:msa@schor.com] 
> Sent: Sunday, 2 March 2014 2:30 AM
> To: user@uima.apache.org
> Subject: Re: UIMA Addons ConceptMapper - where to start
>
> Hi Debbie,
>
> On 2/28/2014 2:35 AM, Debbie Zhang wrote:
>> Hi all,
>>
>>  
>>
>> I would like to learn how to use ConceptMapper in the UIMA Addons. So 
>> far, what I have done was to add ConceptMapper jar file to my project 
>> path and attach the doc jar file to the jar file. I have read through 
>> the documentation came with the package. However, I still don't have  
>> a clue how to use ConceptMapper in a Java program.
> Concept Mapper is a UIMA Annotator - you use it as a component within a UIMA
> Pipeline.
> There's a quick start for UIMA here:
> http://uima.apache.org/documentation.html#getting_started
>
> Hope that Helps!  -Marshall
>
>> Can anyone point me to the
>> direction? A "Hello World" program would be greatly appreciated. Thank
> you.
>>  
>>
>> Regards,
>>
>>  
>>
>> Debbie
>>
>>
>
>
>


Mime
View raw message