public class SentenceNumberAdder
extends java.lang.Object
Reads an adorned XML file and adds word and sentence numbers
numbers to each
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
LINE_SEPARATOR
Line separator.
|
protected static java.lang.String |
milestoneFormat
Milestone formats.
|
protected static java.lang.String |
milestoneWithPathFormat |
Constructor and Description |
---|
SentenceNumberAdder(java.lang.String inputFileName,
java.lang.String outputFileName,
SortedArrayList<SentenceAndWordNumber> sortedWords,
MorphAdornerSettings morphAdornerSettings)
Add sentence and word numbers to adorned output.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
makeMilestone(java.lang.String position,
int number,
java.lang.String indent,
java.lang.String path)
Make a milestone marker for a sentence.
|
protected static final java.lang.String LINE_SEPARATOR
protected static java.lang.String milestoneFormat
protected static java.lang.String milestoneWithPathFormat
public SentenceNumberAdder(java.lang.String inputFileName, java.lang.String outputFileName, SortedArrayList<SentenceAndWordNumber> sortedWords, MorphAdornerSettings morphAdornerSettings)
inputFileName
- Adorned input file name.outputFileName
- Updated adorned output file name.sortedWords
- Sentence and word number data.morphAdornerSettings
- MorphAdorner settings.protected java.lang.String makeMilestone(java.lang.String position, int number, java.lang.String indent, java.lang.String path)
position
- Position ("start" or "end").number
- The sentence number.indent
- Leading indentation.path
- Associated word path.