*
* @return the string of words, each with the starting sample number
*/
private List<WordResult> getTimedWordTokenLastPath(Token token, boolean withFillers) {
Word word = null;
Data lastFeature = null;
Data lastWordFirstFeature = null;
List<WordResult> result = new ArrayList<WordResult>();
while (token != null) {
if (token.isWord()) {
if (word != null && lastFeature != null) {
if (withFillers || !word.isFiller()) {
TimeFrame timeFrame = new TimeFrame(((FloatData) lastFeature).getCollectTime(),
((FloatData) lastWordFirstFeature).getCollectTime());
result.add(new WordResult(word, timeFrame, token.getScore(), 1.));
}
word = token.getWord();
lastWordFirstFeature = lastFeature;
}
word = token.getWord();
}
Data feature = token.getData();
if (feature != null) {
lastFeature = feature;
if (lastWordFirstFeature == null) {
lastWordFirstFeature = lastFeature;
}