Init TypeSystem

30 views
Skip to first unread message

eisior...@gmail.com

unread,
Dec 13, 2012, 11:43:09 AM12/13/12
to uimafi...@googlegroups.com
Hello,

i try to init a type system before i initialize a collection reader:

TypeSystemDescription ts = TypeSystemDescriptionFactory.createTypeSystemDescriptionFromPath("path", "path", "path");
CollectionReader reader =CollectionReaderFactory.createCollectionReader(EpolMongoDbReader.class,ts,

The problem is that i do not understand why the typeSystemInit method of my reader is not called by the CollectionReaderFactory. furthermore it seems that there is no TypeSystem within the TypeSystemDescription.

Can somebody help to figure out how to load a UIMA type system into a CollectionReader with uimaFit. All the paths that i use are correct but nothing happens to the CollectionReader while initialisation.

Thank you all

Andreas


Richard Eckart de Castilho

unread,
Dec 13, 2012, 12:03:32 PM12/13/12
to uimafi...@googlegroups.com
> TypeSystemDescription ts = TypeSystemDescriptionFactory.createTypeSystemDescriptionFromPath("path", "path", "path");
> CollectionReader reader =CollectionReaderFactory.createCollectionReader(EpolMongoDbReader.class,ts,
>
> The problem is that i do not understand why the typeSystemInit method of my reader is not called by the CollectionReaderFactory.

The typeSystemInit() doesn't seem to be supported for collection readers by uimaFIT SimplePipeline at the moment. I suppose we never needed that. It should work if you use a CPE. You can build one with the CpeBuilder.

> furthermore it seems that there is no TypeSystem within the TypeSystemDescription.
> Can somebody help to figure out how to load a UIMA type system into a CollectionReader with uimaFit. All the paths that i use are correct but nothing happens to the CollectionReader while initialisation.

I recommend you avoid instantiating components directly, better stick to the "create*Descriptor" methods. Try using

CollectionReaderDescription reader = CollectionReaderFactory.createDescription(EpolMongoDbReader.class,ts,…

and run it as a CPE and not via SimplePipeline.

Can you report this as a bug please, either in the Google Code issue tracker or preferably in the Apache Jira, as uimaFIT has been transferred to the Apache foundation.

Cheers,

-- Richard


eisior...@gmail.com

unread,
Dec 13, 2012, 12:57:01 PM12/13/12
to uimafi...@googlegroups.com, richard...@googlemail.com
Thank you very much.

Richard Eckart de Castilho

unread,
Dec 14, 2012, 4:57:19 AM12/14/12
to eisior...@gmail.com, uimafi...@googlegroups.com
Btw. unless the reader has to be dynamically configurable for different types, I'd just use JCasCollectionReader_ImplBase and JCas and have much less boiler-plate code.

-- Richard
Reply all
Reply to author
Forward
0 new messages