CasCompare is still kind of a work in progress;  I think eventually it might
become "reusable" but that would take more investment than it's had so far.

A lot of the debugging things are there because of the state of the code; I've
put most of these (I believe) under the control of some early static final
boolean flag, normally turned off.

re: the note in uv3.select.xml:  I'll expand on this.
I needed to include that this only works when you're using the select default
for "skipWhenSameBeginEndType".  If you specify skipWhenSameBeginEndType, then
all annotations with the same begin, end, and type as the bounding one are 
skipped.

The way this works, with the default, is as follows:
     a) imagine a bunch of annotations A1, A2, ... An, all in the annotation 
index
     b) imagine the bounding annotation is A2
     c) make a copy of A2, but don't add it to the index.  Call it A2copy. 

Now, when you iterate, use A2copy as the "bounding annotation.  The test which
says to skip if the Annotation is "identical" (meaning, has the same internal
Feature Structure ID) to the bounding Annotation  won't ever be true, because
the bounding Annotation has a unique ID, and isn't in the index.

Does that make sense? 

-Marshall

On 4/1/2019 9:11 AM, Richard Eckart de Castilho wrote:
> On 1. Apr 2019, at 14:57, Marshall Schor <[email protected]> wrote:
>> :-)  Thanks for the quick response! -M
> Well, your mail came when I was just about to review 3.1.0 :)
>
> So while I'm at it, here are some comments I had already noted down 
> (non-blockers):
>
> - CasCompare is in src/main/java but seems to contain quite a bit 
>   of debugging code / debugging messages that go directly to
>   System.out. If it is a test utility, then it would probably be good
>   to move it to the `uimaj-test-util` module so it can be used for testing
>   across different core modules. If it is meant to be
>   reusable, then it should make proper use of SLF4J to logging.
>
> - I don't understand the this in "uv3.select.xml":
>
>   ... _id()) with the bounding Annotation, it is always skipped. (Note: if 
> you do not want this,
>   just make a temporary annotation with the begin/end/type you want, and 
> don't add it to the index;
>   it will never be found while iterating.)
>
>   How does creating a temporary annotation disable identical annotations not 
> being skipped,
>   in particular if the temporary annotation shouldn't even be added to the 
> index?
>
> I guess I'll revert the changes in uimaFIT v3 related to UIMA-5869 as well.
>
> -- Richard

Reply via email to