XmiCollectionReader

This is a discussion on XmiCollectionReader within the Apache forums in Application Servers & Tools category; Is it possible to use XmiCollectionReader in a CPE? I don't see any way to configure a type system, and without a type system I of course get "unknown type" errors. -Aaron...

Go Back   Application Development Forum > Application Servers & Tools > Apache

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-27-2008, 07:56 AM
Aaron Kaplan
Guest
 
Default XmiCollectionReader

Is it possible to use XmiCollectionReader in a CPE? I don't see any way
to configure a type system, and without a type system I of course get
"unknown type" errors.

-Aaron


Reply With Quote
  #2  
Old 08-27-2008, 09:53 AM
Eddie Epstein
Guest
 
Default Re: XmiCollectionReader

Hi Aaron,

The XmiCollectionReader add no new types, but the CPE type system is created
by merging the TS from all CPE components. Do your other CPE components
include TS entries for the XmiCas content?

Eddie


On Wed, Aug 27, 2008 at 7:56 AM, Aaron Kaplan
<Aaron.Kaplan-axt8Ybl0NPViK979QBapAg@public.gmane.org>wrote:

> Is it possible to use XmiCollectionReader in a CPE? I don't see any way to
> configure a type system, and without a type system I of course get "unknown
> type" errors.
>
> -Aaron
>
>


Reply With Quote
  #3  
Old 08-27-2008, 10:34 AM
Aaron Kaplan
Guest
 
Default Re: XmiCollectionReader

Eddie Epstein wrote:
> The XmiCollectionReader add no new types, but the CPE type system is created
> by merging the TS from all CPE components. Do your other CPE components
> include TS entries for the XmiCas content?


Oh, right, I see. The annotator only knows about some of the types in
the XMI file, not all of them. This is directly related to the
suggestion I made recently on the issue tracker that the CVD should
ignore types it doesn't know about when loading an XMI CAS (use the
"lenient" option of the deserialize method). Maybe the same thing would
be a good idea for the XmiCollectionReader.

In any case, now I see how I can work around the problem.
Thanks
-Aaron


Reply With Quote
  #4  
Old 08-27-2008, 11:48 AM
Eddie Epstein
Guest
 
Default Re: XmiCollectionReader

You could also just modify the one line of code in
$UIMA_HOME/examples/src/org/apache/uima/examples/xmi/XmiCollectionReader.java

from
XmiCasDeserializer.deserialize(inputStream, aCAS);
to
XmiCasDeserializer.deserialize(inputStream, aCAS, true);

Eddie

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 08:27 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.