text-fabric icon indicating copy to clipboard operation
text-fabric copied to clipboard

k-relations

Open dirkroorda opened this issue 7 years ago • 3 comments

There are various relaxed spatial relations, see nearness relations.

A <k: B meaning A adjacent before B

A =k: B meaning A and B start at the same slot

A :k= B meaning A and B end at the same slot

A :k: B meaning A and B have the same boundary slots

but up to a fuzziness of k slots.

The first relation is asymmetrial, the others are symmetrical.

The k-fuzziness leads to unexpected cases:

If A = [1, 2, 3] and B = [5, 6, 7] it holds that A <1: B

And if C = [2, 4, 5] it also holds that A <2: B, now the fuzziness works in the other direction.

It even holds that A <3: A, strangely enough.

dirkroorda avatar Nov 30 '18 20:11 dirkroorda

With the asymmetrical relations, the fuzziness can work in two directions: the adjacency can be relaxed by admitting a widening gap, or by admitting an increasing overlap.

When you use the adjacency relation in real world situations, you probably want to give leeway in one direction, or in the other, but not both at the same time.

In particular, when you work with single slot, the direction of increasing overlap makes little sense.

We have then that 5 <: 6 and 5 <1: 5 and 5 <2: 4, etc. Still it can be useful.

dirkroorda avatar Nov 30 '18 20:11 dirkroorda

After this length introduction, here is a proposal: let for the asymmetric relations the k be signed:

A <+k: B meaning A stops just before B with possibly a gap of at most k slots in between

A <-k: B meaning A stops just before B with possibly B starting k slots before A ends

A <k: B meaning: A stops before B with a leeway of at most k slots in both directions.

dirkroorda avatar Nov 30 '18 20:11 dirkroorda

Then A <k: B retains the semantics it already has, and we ask for four new relations:

A <+k: B and A <-k: B and A :+k> B and A :-k> B

dirkroorda avatar Nov 30 '18 21:11 dirkroorda

I do not feel the urgency to do this.

dirkroorda avatar Sep 12 '22 18:09 dirkroorda