|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.ucsb.nmsl.tools.Transcript.TranscriptIterator
protected class Transcript.TranscriptIterator
The responsibility of this inner class is to provide an iterator interface to the transcript class for the purpose of breaking a transcript into its individual chunks. These interators operate both forwards and backwards and across each individual segement of the transcript. The main purpose of this class is to allow the estimation process to count words between words that were recognized during the recognition phase and those that were not.
Field Summary | |
---|---|
protected static int |
BACKWARD
Indicates the iterator is currently moving backwards. |
protected java.util.ListIterator |
currCaption
|
protected java.util.ListIterator |
currWord
|
protected int |
Direction
Indicates the current direction of the iterator as indicated by the last call to either previous() or next(). |
protected static int |
FORWARD
Indicates the iterator is currently moving forward. |
protected int |
Index
Index of the current word in the current segment in the transcript. |
Constructor Summary | |
---|---|
Transcript.TranscriptIterator(java.util.ListIterator i,
int index)
This constructor creates a new instances of the Transcript iterator from a ListIterator instance and the index of the current chunk in the list. |
Method Summary | |
---|---|
void |
add(java.lang.Object o)
This method add a chunk at the current index within the transcript. |
boolean |
hasNext()
This method determines whether another caption chunk exists if a subsequent call to next() is made. |
boolean |
hasPrevious()
This method determines whether another caption chunk exists if a subsequent call to previous() is made. |
java.lang.Object |
next()
This method returns the next transcript chunk if one exists. |
protected void |
nextCaptionWord()
This method is a helper function that moves the current transcript segment forward to the next segment. |
int |
nextIndex()
This method returns the index of the transcript chunk for the next call to the next() method. |
java.lang.Object |
previous()
This method returns the previous transcript chunk if one exists. |
protected void |
previousCaptionWord()
This method is a helper function that moves the current transcript segment backward to the previous segment. |
int |
previousIndex()
This method returns the index of the transcript chunk for the next call to the previous() method. |
void |
remove()
This method removes a chunk at the current index within the transcript. |
void |
set(java.lang.Object o)
This method sets a chunk at the current index within the transcript to the value passed into the method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int Index
protected static final int BACKWARD
protected static final int FORWARD
protected int Direction
protected java.util.ListIterator currCaption
protected java.util.ListIterator currWord
Constructor Detail |
---|
public Transcript.TranscriptIterator(java.util.ListIterator i, int index)
i
- - The ListIterator that points to the current segment in the
Transcript, offset by "index" words.index
- - The index of the current word within the segment passed
as i.Method Detail |
---|
public java.lang.Object next()
next
in interface java.util.Iterator
next
in interface java.util.ListIterator
public java.lang.Object previous()
previous
in interface java.util.ListIterator
public int nextIndex()
nextIndex
in interface java.util.ListIterator
public int previousIndex()
previousIndex
in interface java.util.ListIterator
public boolean hasNext()
hasNext
in interface java.util.Iterator
hasNext
in interface java.util.ListIterator
next().
public boolean hasPrevious()
hasPrevious
in interface java.util.ListIterator
previous().
public void add(java.lang.Object o)
add
in interface java.util.ListIterator
o
- - The caption chunk to be inserted into the transcript.public void remove()
remove
in interface java.util.Iterator
remove
in interface java.util.ListIterator
public void set(java.lang.Object o)
set
in interface java.util.ListIterator
o
- - The caption chunk to be set at the current location.protected void nextCaptionWord()
protected void previousCaptionWord()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |