Hi Richard,

its seems to work now. Thanks. As I was only at testing stage, I forgot to
add other descriptors (OpenNlpTagger, etc) prior to that Ruta descriptor in
pipeline. Those were needed so that the CAS can find all types.

Though, its a little hectic solution (copy and paste), but is workable and
therefore is great.

Piyush

On Thu, Oct 23, 2014 at 8:10 AM, Richard Eckart de Castilho <[email protected]>
wrote:

> On 23.10.2014, at 00:39, Piyush Paliwal <[email protected]> wrote:
>
> > As an example, I wish to import the following types from TypeSystem.xml
> > descriptor which also resides in same folder as script (both files now in
> > Java project).
> >
> > //import the additional annotations types and alias in short name
> >
> > IMPORT de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.NN FROM
> > uima.ruta.example.TypeSystem  AS _NN;
> >
> > IMPORT de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.PP FROM
> > uima.ruta.example.TypeSystem AS _PP;
>
> I assume you are invoking Ruta via uimaFIT? If yes, then you should make
> sure that uimaFIT can find all necessary type systems via the type
> detection
> mechanism [1].
>
> If you not using uimaFIT or if you have some special way to create your
> CASes, make sure that when the CAS is created, all types that all your
> scripts need are already loaded at that point.
>
> UIMA does not allow to change the type system while a pipeline is running.
> Thus the IMPORT declarations will normally not be interpreted when the
> script
> is executed.
>
> I do not know how the IMPORT (type) AS (alias) is implemented. If the alias
> is set up at execution time and not at CAS initialization time, it should
> work.
>
> Alexandre?
>
> Cheers,
>
> -- Richard
>
> [1]
> http://uima.apache.org/d/uimafit-current/tools.uimafit.book.html#d5e531
>



-- 
Piyush Paliwal

Reply via email to