uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Schor <...@schor.com>
Subject Re: CasIOUtils class - some meta-questions
Date Thu, 11 Aug 2016 19:34:18 GMT
I see - you're using the TS part of the TSI to do lenient loading for Compressed
Form 6.

What about an API which expresses this more directly?

E.g.

load ( InputStream casInputStream, TypeSystem compressedForm6originalTS) ?

Form 6 is always "lenient", if it is passed an original (meaning the one that
corresponds to the serialized form) type system.

Would this cover all the cases more directly (as an API)?

-Marshall

On 8/11/2016 3:22 PM, Richard Eckart de Castilho wrote:
>> On 11.08.2016, at 21:17, Marshall Schor <msa@schor.com> wrote:
>>
>> up the CAS, once (build/commit the type system, create the index repositories,
>> etc.), and then load loop would run potentially significantly faster.
> You assume that I use the TSI the reinit the CAS - but that is
> not what I do. I don't touch the CAS configuration. 
>
> I use the TSI (rather the TS) to enable lenient loading of the
> COMPRESSED_FILTERED_TSI.
>
> See CasIOUtils line 305ff. For your convenience:
>
>           if (!leniently) {
>             casImpl.setupCasFromCasMgrSerializer(casImpl, casMgrSerializer);  
>           } else {
> =>          ts = casMgrSerializer.getTypeSystem();
> =>          ts.commit();
>           }
>     ... <snip> ...
> =>        return casImpl.reinit(h, casInputStream, ts);
>
>
> Cheers,
>
> -- Richard
>
>


Mime
View raw message