Class SpanNotQuery


  • public final class SpanNotQuery
    extends SpanQuery
    Removes matches which overlap with another SpanQuery or which are within x tokens before or y tokens after another SpanQuery.
    • Constructor Detail

      • SpanNotQuery

        public SpanNotQuery​(SpanQuery include,
                            SpanQuery exclude)
        Construct a SpanNotQuery matching spans from include which have no overlap with spans from exclude.
      • SpanNotQuery

        public SpanNotQuery​(SpanQuery include,
                            SpanQuery exclude,
                            int dist)
        Construct a SpanNotQuery matching spans from include which have no overlap with spans from exclude within dist tokens of include. Inversely, a negative dist value may be used to specify a certain amount of allowable overlap.
      • SpanNotQuery

        public SpanNotQuery​(SpanQuery include,
                            SpanQuery exclude,
                            int pre,
                            int post)
        Construct a SpanNotQuery matching spans from include which have no overlap with spans from exclude within pre tokens before or post tokens of include. Inversely, negative values for pre and/or post allow a certain amount of overlap to occur.