Preceding

AQPython.Query.Preceding(annot, anchor, container=None, cnt=3)

Provide the ability to find the preceding sibling annotations for every annotation in the anchor Dataframe of AQAnnotations.

The preceding sibling annotations can optionally be required to be contained in a container Dataframe of AQAnnotations. The return type of this function is different from other functions. Instead of returning a Dataframe of AQAnnotations this function returns a Dataframe of (AQAnnotation,Array[AQAnnotation]).

Parameters
  • annot – Dataframe of AQAnnotations, the ones we will be using to look for preceding sibling annotations.

  • anchor – Dataframe of AQAnnotations starting point for using to look for preceding sibling annotations (use the startOffset and docId).

  • container – Dataframe of AQAnnotations to use when requiring the preceding sibling annotations to be contained in a specific annotation.

  • cnt – Number of preceding sibling AQAnnotations to return.

Returns

Dataframe of (AQAnnotation,Array[AQAnnotation])