nlptools.span

->Span

(->Span start end type)
Positional factory function for class nlptools.span.Span.

between-span

(between-span a b)
Return a span of the area between two spans A and B. Type of new span is
:between.

contains-span?

(contains-span? s1 s2)
Return true if s1 is contains spans s2.

end-of-span?

(end-of-span? span k)
Return true if location k is the end of span.

in-span?

(in-span? span k)
Return true if location k is in span. We assume span is [i,j).

intersection-span

(intersection-span A B)
Return the intersection of two spans as a span. Type of new span is
:intersection.

make-span

(make-span start end type)
Make a native span object.

map->Span

(map->Span m__7585__auto__)
Factory function for class nlptools.span.Span, taking a map of keywords to field values.

merge-spans

(merge-spans A B)
Given two overlapping spans where the first comes before the second, return a
merged span with the type of the first.

right-of-span?

(right-of-span? span k)
Return true if location k is to the right of span.

shift-span

(shift-span span i)
Shift a span by i positions.

span-disjoint?

(span-disjoint? A B)
Return true of A does not overlap B.

span-length

(span-length s)
Return the length of the span.

span-overlaps?

(span-overlaps? A B)
Return true if A overlaps B.

subs-span

(subs-span s span)
Return the substring corresponding to the span.