Hi,

Translating the adjacency in angles onto numeric intervals, it seems logical to 
me that two annotations X and Y, where X: [0-3] and Y: [3-5], are adjacent 
(X-is-left-adjacent-to-Y) and not overlapping.
In the continuous space of number intervals, the two annotations would have a 
"common side" at 3.0(0) and thereby not overlapping. The same can be applied 
for zero-width annotations, i.e. the zero-width annotation starts and ends at 3.0(0).

However, since the index in CAS is discrete, I tend to be with Peter on this 
one and say that given the case X: [0-3]  Y: [3-3], the following applies: 
X-is-overlapping-with-Y, X-is-covering-by-Y, X-is-left-of-Y,  
X-is-left-adjacent-to-Y.
Best,
Viorel

Am 22.10.2020 um 21:53 schrieb Richard Eckart de Castilho:

Hi all,

Peter and I did a bit of brainstorming on these predicates and we'd like to 
share our thoughts.

1) Two additional predicates "starting-with" and "ending-with" would be nice. 
These would address the cse where an annotation X is covered by an annotation Y and X has the same 
begin or end as Y.

2) The most part of our attention went towards the handling of cases where 
annotations have a width of zero.


In my original proposal, I suggested e.g. that a zero width annotation at [5-5] 
should be either considered to be within the interval [..-5] or within [5-..] 
but not in both. This leads to some level of assymetry in the predicate matrix. 
E.g.

Z3)  X: [0-0]  Y: [0-3] -- X-is-overlapping-with-Y, X-is-covered-by-Y
Z4)  X: [3-3]  Y: [0-3] -- X-is-right-of-Y,         X-is-right-adjacent-to-Y
Z5)  X: [0-3]  Y: [0-0] -- X-is-overlapping-with-Y, X-is-covering-by-Y
Z7)  X: [0-3]  Y: [3-3] -- X-is-left-of-Y,          X-is-left-adjacent-to-Y

However, this assymetry allows the case where two zero-width annotations are at 
the same location
to be intuitively sane:

Z11) X: [0-0]  Y: [0-0] -- X-collocated-with-Y, X-is-covering-Y, 
X-is-covered-by-Y, X-is-overlapping-with-Y


Peter instead suggested a symmetric approach where [5-5] would be considered to 
be within [..-5] as well as within [5-..]. This would lead to a changed matrix 
as follows:

Z3*) X: [0-0]  Y: [0-3] -- X-is-overlapping-with-Y, X-is-covered-by-Y,  
X-is-left-of-Y,  X-is-left-adjacent-to-Y
Z4*) X: [3-3]  Y: [0-3] -- X-is-overlapping-with-Y, X-is-covered-by-Y,  
X-is-right-of-Y, X-is-right-adjacent-to-Y
Z5*) X: [0-3]  Y: [0-0] -- X-is-overlapping-with-Y, X-is-covering-by-Y, 
X-is-right-of-Y, X-is-right-adjacent-to-Y
Z7*) X: [0-3]  Y: [3-3] -- X-is-overlapping-with-Y, X-is-covering-by-Y, 
X-is-left-of-Y,  X-is-left-adjacent-to-Y

This would mean that the predicates could be implemented in a simpler way 
considering just the begin and end positions instead of also considering the 
width. E.g. a predicate such as right-of could simply be implemented as

[Peter]    right-of: X.begin >= Y.end
:          left-of:  X.end   <= Y.begin
:          (other predicate conditions omitted for the moment)

Whereas in my proposal, it would be more complex (although surprisingly 
symmetric if we look at the conditions):

[Richard]  right-of: X.begin >= Y.end && X.begin != Y.begin
:          left-of:  Y.begin >= X.end && X.begin != Y.begin
:          (other predicate conditions omitted for the moment)


In Peter's version, X would be right-of/left-of Y if X and Y have the same 
position (e.g. [0,0]).

In my version, X would NOT be right-of/left-of Y if X and Y have the same 
position (e.g. [0,0]).

The feeling is that the symmetric approach may be more sound. It is motivated 
by the idea that a zero-length interval should have all the properties it would 
have if it were just slightly wider. So say we want to know the properties of 
the interval X [1,1], then we'd check at what would happen if we took X 
[0.5-1.5] and reduced its width. Something along these lines:

X: [  1-1.5]  Y: [1,2] -- X-is-overlapping-with-Y, X-is-covered-by-Y
X: [0.5-1  ]  Y: [1,2] -- X-is-left-adjacent-to-Y, X-is-left-of-Y
X: [1,1]      Y: [1,2] -- X-is-overlapping-with-Y, X-is-covered-by-Y, 
X-is-left-adjacent-to-X, X-is-left-of-Y

Finally, following the symmetric approach leads to Z11 becoming a singularity 
in which all the predicates match:

Z11*)  X: [0-0]  Y: [0-0] -- X-is-left-of-Y, X-is-right-of-Y, 
X-is-left-overlapping-with-Y,
:                            X-is-right-overlapping-with-Y, 
X-is-overlapping-with-Y,
:                            X-is-collocated-with-Y, X-left-adjacent-to-Y, 
X-right-adjacent-to-Y, ...


We have added the alternative Z4*, Z7* and Z11* to the Google Sheet for 
comparison.
https://docs.google.com/spreadsheets/d/1fgMbqVlxwJSBNui7Y_phtRYEhzr_rfXQ5ZUREH1-nwI/edit#gid=0

@Peter: Did I sum it up about right?

Any thoughts?

-- Richard

--
Viorel Morari
R&D Text Mining/Machine Learning

Averbis GmbH
Salzstr. 15
79098 Freiburg
Germany

Fon: +49 761 708 394 0
Fax: +49 761 708 394 10
Email: [email protected]
Web: https://averbis.com

Headquarters: Freiburg im Breisgau
Register Court: Amtsgericht Freiburg im Breisgau, HRB 701080
Managing Directors: Dr. med. Philipp Daumke, Dr. Kornél Markó

Reply via email to