◆ SegmentedDocument()
grammarscope.document.SegmentedDocument.SegmentedDocument |
( |
final IDocumentFactory |
documentFactory, |
|
|
final URL |
url, |
|
|
final String |
text |
|
) |
| |
|
protected |
Constructor
- Parameters
-
documentFactory | document factory |
url | document url |
text | document text |
◆ getCurrentSentenceIdx()
int grammarscope.document.SegmentedDocument.getCurrentSentenceIdx |
( |
| ) |
|
◆ getCurrentSentenceSegment()
SentenceSegment grammarscope.document.SegmentedDocument.getCurrentSentenceSegment |
( |
| ) |
|
◆ getPath()
String grammarscope.document.SegmentedDocument.getPath |
( |
| ) |
|
Get document path
- Returns
- document path
◆ getSentenceCount()
int grammarscope.document.SegmentedDocument.getSentenceCount |
( |
| ) |
|
◆ getSentences()
List<SentenceSegment> grammarscope.document.SegmentedDocument.getSentences |
( |
| ) |
|
◆ getSentenceSegment()
SentenceSegment grammarscope.document.SegmentedDocument.getSentenceSegment |
( |
final int |
sentenceIndex | ) |
|
Get current sentence
- Parameters
-
sentenceIndex | sentence index |
- Returns
- current sentence
◆ getString()
String grammarscope.document.SegmentedDocument.getString |
( |
final Segment |
segment | ) |
|
Get segment string
- Parameters
-
- Returns
- string for segment
◆ getText()
String grammarscope.document.SegmentedDocument.getText |
( |
| ) |
|
◆ getWords()
List<WordSegment> grammarscope.document.SegmentedDocument.getWords |
( |
| ) |
|
◆ merge() [1/2]
static Segment grammarscope.document.SegmentedDocument.merge |
( |
final List< Segment > |
segments | ) |
|
|
static |
Merge segments to segment
- Parameters
-
- Returns
- segment
◆ merge() [2/2]
static Segment grammarscope.document.SegmentedDocument.merge |
( |
final Segment... |
segments | ) |
|
|
static |
Merge segments to segment
- Parameters
-
- Returns
- segment
◆ nextSentence()
int grammarscope.document.SegmentedDocument.nextSentence |
( |
| ) |
|
◆ previousSentence()
int grammarscope.document.SegmentedDocument.previousSentence |
( |
| ) |
|
◆ segment()
void grammarscope.document.SegmentedDocument.segment |
( |
| ) |
|
◆ sentenceToString()
static String grammarscope.document.SegmentedDocument.sentenceToString |
( |
final List< Segment > |
sentence, |
|
|
final int |
lineLen |
|
) |
| |
|
static |
Convert sentence to string
- Parameters
-
sentence | sentence |
lineLen | line length to wrap at |
- Returns
- sentence string
◆ setSentenceIdx()
void grammarscope.document.SegmentedDocument.setSentenceIdx |
( |
final int |
sentenceIdx | ) |
|
◆ split() [1/2]
List<Segment> grammarscope.document.SegmentedDocument.split |
( |
final Segment |
leftSegment, |
|
|
final Segment |
rightSegment |
|
) |
| |
Make intermediate segment list
- Parameters
-
leftSegment | start segment |
rightSegment | finish segment |
- Returns
- list of segments
◆ split() [2/2]
List<Segment> grammarscope.document.SegmentedDocument.split |
( |
final Segment |
segment | ) |
|
Split segment into word segments
- Parameters
-
- Returns
- list of word segments
◆ toString()
String grammarscope.document.SegmentedDocument.toString |
( |
| ) |
|
◆ currentSentenceIdx
int grammarscope.document.SegmentedDocument.currentSentenceIdx |
|
private |
◆ documentFactory
◆ isSegmented
boolean grammarscope.document.SegmentedDocument.isSegmented |
|
protected |
◆ sentences
◆ text
String grammarscope.document.SegmentedDocument.text |
|
protected |
◆ url
final URL grammarscope.document.SegmentedDocument.url |
|
protected |
◆ words
List<WordSegment> grammarscope.document.SegmentedDocument.words |
|
private |
The documentation for this class was generated from the following file: