Before

AQPython.Query.Before(left, right, dist=9223372036854775807, limit=0, negate=False)

Provide the ability to find annotations that are before another annotation.

The input is 2 Dataframes of AQAnnotations. We will call them A and B. The purpose is to find those annotations in A that are before B. What that means is the end offset for an annotation from A must be before (or equal to) the start offset from an annotation in B. We ultimately return the A annotations that meet this criteria. A distance operator can also be optionally specified. This would require an A annotation (endOffset) to occur n characters (or less) before the B annotation (startOffset). There is also the option of negating the query (think Not Before) so that we return only A where it is not before B.

Parameters
  • left – Dataframe of AQAnnotations, the ones we will return if they are before AQAnnotations from ‘right’.

  • right – Dataframe of AQAnnotations, the ones we are looking to see if are after AQAnnotations from ‘left’.

  • dist – Number of characters where endOffset from ‘left’ must occur before startOffset from ‘right’. Default is sys.maxsize.

  • limit – Number of AQAnnotations to return.

  • negate – Whether to negate the entire query (think NOT before). Default is false.

Returns

Dataframe of AQAnnotations