Construct a new 0-length Sentence that begins just past the current last token of the doc.asSection, and add it to the Section automatically.
Construct a new 0-length Sentence that begins just past the current last token of the doc.asSection, and add it to the Section automatically. This constructor is typically used when reading labeled training data one token at a time, where we need Sentence and Token objects.
Construct a new 0-length Sentence that begins just past the current last token of the Section, and add it to the Section automatically.
Construct a new 0-length Sentence that begins just past the current last token of the Section, and add it to the Section automatically. This constructor is typically used when reading labeled training data one token at a time, where we need Sentence and Token objects.
Value comparisons (as distinct from variable pointer equality)
Value comparisons (as distinct from variable pointer equality)
A collection of attributes, keyed by the attribute class.
A collection of attributes, keyed by the attribute class.
Returns the character offsets of this TokenSpan into the raw text of its original document.
Returns the character offsets of this TokenSpan into the raw text of its original document.
Implements ordering between two tokenspans, assumed to share the same document
Implements ordering between two tokenspans, assumed to share the same document
Returns true if the given Token is inside this Sentence.
Returns true if this span contain the words of argument span in order.
Returns true if this span contain the words of argument span in order.
Returns an iterable over tokens before and after the token span without preserving order
Returns an iterable over tokens before and after the token span without preserving order
Returns a sequence of tokens that contains @param size tokens before and after the tokenspan.
Returns a sequence of tokens that contains @param size tokens before and after the tokenspan.
If true then Diff objects will return this as their variable even when the value indicates it is not "present".
If true then Diff objects will return this as their variable even when the value indicates it is not "present".
The Document to which this TokenSpan belongs.
The Document to which this TokenSpan belongs.
Return the substring of the Document covered by this TokenSpan.
Return the substring of the Document covered by this TokenSpan. If this is a multi-Token TokenSpan, this will include all original characters in the Document, including those skipped by tokenization.
Returns the number of Sentences before this one in the Section.
Returns the sequence of NerTags attributed to the sequence of Tokens in this Sentence.
If this Sentence has a ParseTree, return it; otherwise return null.
Return the Token at the root of this Sentence's ParseTree.
Return the Token at the root of this Sentence's ParseTree. Will throw an exception if there is no ParseTree.
Returns the sequence of PennPosTags attributed to the sequence of Tokens in this Sentence.
If true, this SpanVariable will be scored by a difflist, even if it is in its deleted non-"present" state.
If true, this SpanVariable will be scored by a difflist, even if it is in its deleted non-"present" state.
Return the string often used as a prefix of the toString representation of this variable.
Return the string often used as a prefix of the toString representation of this variable.
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
The Document Section of which this TokenSpan is a subsequence.
The Document Section of which this TokenSpan is a subsequence.
The Sentence to which the first Token in this TokenSpan belongs.
The Sentence to which the first Token in this TokenSpan belongs.
Assign a new value to this variable
Assign a new value to this variable
Return a String representation of this TokenSpan, concatenating each Token.string, separated by a space.
Return a String representation of this TokenSpan, concatenating each Token.string, separated by a space. This nicely avoids newlines, HTML or other junk that might be in the phrase.documentString.
Return a short string representation of this variable, suitable for debugging messages.
The indexed sequence of tokens contained in this TokenSpan.
The indexed sequence of tokens contained in this TokenSpan.
Return a String representation of this TokenSpan, concatenating each Token.string, separated by the given separator.
Return a String representation of this TokenSpan, concatenating each Token.string, separated by the given separator.
(Changed in version 2.9.0) transpose
throws an IllegalArgumentException
if collections are not uniformly sized.
Abstract method to return the value of this variable.
Abstract method to return the value of this variable.
A span of Tokens making up a sentence within a Section of a Document. A Sentence is a special case of a TokenSpan, stored in its Section, and available through the Section.sentences method. From the Sentence you can get its sequence of Tokens, the Section that contains it, and the Document that contains it. Sentences can be added (in order) to a Section, but not removed from a Section. The index of this Sentence into the sequence of Sentences in the Section is available as 'Sentence.indexInSection'. The annotation ParseTree is stored on a Sentence. Unlike other TokenSpans, constructing a Sentence automatically add it to its Sections.