uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Eckart de Castilho <...@apache.org>
Subject Re: changing edge case impl details in casCopiers
Date Tue, 12 Apr 2016 20:00:58 GMT
I'll answer inline below.

> On 04.04.2016, at 22:41, Marshall Schor <msa@schor.com> wrote:
> The existing CasCopier code, when copying a FS which is a subtype of
> AnnotationBase, copies the sofa ref by getting the "corresponding" sofa in the
> target CAS.  It does this by getting the sofa whose sofa number is the same. 
> In the use case:
> * view A contains a text
> * view B is created through a transformation of the text from A
> * annotations are created in view B
> * annotations are copied back to view A
> * offsets in the copied annotations are updated based on a reverse of the transformation
operation in the second step
> it would seem that step 3 (annotations created in view B) would create them in
> view "B".   So the sofa references of annotations (which are subtypes of
> AnnotationBase) would refer to the sofa associated with view "B".
> In the code example above, a cas copier is created to go from view "B" as the
> source to view "A".  (I'm assuming the cas copier creation call is passing in
> two CAS "views", the source being some CAS's view "B", and the target being some
> CAS's view "A".   It's ambiguous whether or not these are two separate CASes, or
> two views of the same CAS (can you clarify?).

Well, actually we aim to support both. We have an older implementation following the
example above which uses different views in the same CAS. A newer one presently 
is based as a CAS multiplier and copies between CASes. We plan to extend the new
version in the future to also support view-to-view transformations.

> In an earlier note, I said maybe we could add an API to allow updating the sofa
> reference.  The DKPro code above found a way using existing APIs to do this; we
> could just keep this.

Definitely +1

-- Richard

View raw message