|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--kinetic.util.Segmenter
|
+--kinetic.util.LineSegmenter
Segments text base on sentence on end line delimiters (\n\r\f)
| Field Summary | |
protected double |
BaseDuration
base duration for a segment |
protected double |
CommaDelay
delay inserted for commas |
protected int |
currentOffset
current time offset |
protected double |
EndCharacterDelay
delays inserted for sentence end punctuation characters |
protected java.util.StringTokenizer |
tokenizer
string tokenizer |
protected double |
UnitDelay
duration per "unit" used when calculating a the full delay based on square root of the number of characters |
| Fields inherited from class kinetic.util.Segmenter |
document, documentLength, documentStart, text |
| Constructor Summary | |
LineSegmenter()
creates a new intance of the line segmenter |
|
LineSegmenter(kinetic.util.Segment seg)
creates a new instance of the segmenter with an optionally decorated segment object |
|
LineSegmenter(java.lang.String t)
creates a new instance of the line segmenter from a string of text |
|
| Method Summary | |
kinetic.util.Segment |
getNextSegment()
gets the next segment from the text |
void |
segmentText(java.lang.String t)
sets the text string that will be segmented |
| Methods inherited from class kinetic.util.Segmenter |
hasMoreSegements, segmentSegment |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.util.StringTokenizer tokenizer
protected double BaseDuration
protected double UnitDelay
protected double EndCharacterDelay
protected double CommaDelay
protected int currentOffset
| Constructor Detail |
public LineSegmenter()
public LineSegmenter(java.lang.String t)
t - text stringpublic LineSegmenter(kinetic.util.Segment seg)
seg - segment object| Method Detail |
public void segmentText(java.lang.String t)
segmentText in class Segmentert - text string
public kinetic.util.Segment getNextSegment()
throws java.util.NoSuchElementException
getNextSegment in class Segmenterjava.util.NoSuchElementException - thorws this if no more segments are available
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||