done.inpro.system.completion
Class CompletionInstallmentIU

java.lang.Object
  extended by inpro.incremental.unit.IU
      extended by inpro.incremental.unit.InstallmentIU
          extended by inpro.incremental.unit.SysInstallmentIU
              extended by done.inpro.system.completion.CompletionInstallmentIU
All Implemented Interfaces:
java.lang.Comparable<IU>

public class CompletionInstallmentIU
extends SysInstallmentIU


Nested Class Summary
 class CompletionInstallmentIU.FuzzyMatchResult
          class that describes the result of (fuzzily) matching this installment against a list of words that potentially form a prefix of this installment
private static class CompletionInstallmentIU.Prefix
          a prefix of a list of words, which also includes the remainder (i.e. the part of the original list that is not part of this prefix)
 
Nested classes/interfaces inherited from class inpro.incremental.unit.IU
IU.IUUpdateListener, IU.Progress
 
Field Summary
 
Fields inherited from class inpro.incremental.unit.InstallmentIU
tts
 
Fields inherited from class inpro.incremental.unit.IU
creationTime, FIRST_IU, groundedIn, grounds, nextSameLevelLinks, previousSameLevelLink
 
Constructor Summary
CompletionInstallmentIU(java.lang.String fullUtterance)
           
 
Method Summary
 CompletionInstallmentIU.FuzzyMatchResult fuzzyMatching(java.util.List<WordIU> otherPrefix, double maxWER, int matchingLastWords)
          Is this SysInstallmentIU similar(*) to the given words?
private static
<T> java.util.List<T>
getLastNElements(java.util.List<T> list, int n)
          utility to return the last N elements from a list as an unmodifiable list
private  java.util.List<CompletionInstallmentIU.Prefix> getPrefixesMatchingLastWords(java.util.List<WordIU> lastWords)
          return all prefixes of this installment that end in the given last words
 
Methods inherited from class inpro.incremental.unit.SysInstallmentIU
getAudio, getFinalWord, getFullPStream, getInitialWord, getSegments, getWords, scaleDeepCopyAndStartAtZero, toLabelLines, toMarkedUpString, toMaryXML, toMbrola, toPayLoad
 
Methods inherited from class inpro.incremental.unit.InstallmentIU
systemProduced, userProduced
 
Methods inherited from class inpro.incremental.unit.IU
addNextSameLevelLink, addUpdateListener, commit, compareTo, connectSLL, deepToString, duration, endTime, equals, getAge, getAmongNextSameLevelLinks, getCreationTime, getID, getNextSameLevelLink, getNextSameLevelLinks, getOngoingGroundedIU, getProgress, getSameLevelLink, ground, groundedIn, groundIn, groundIn, grounds, hashCode, isCommitted, isCompleted, isOngoing, isRevoked, isUpcoming, notifyListeners, payloadEquals, removeAllNextSameLevelLinks, removeGrin, removeGrin, reorderNextSameLevelLink, revoke, setAsTopNextSameLevelLink, setSameLevelLink, startTime, toLabelLine, toString, toTEDviewXML, updateOnGrinUpdates
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompletionInstallmentIU

public CompletionInstallmentIU(java.lang.String fullUtterance)
Method Detail

fuzzyMatching

public CompletionInstallmentIU.FuzzyMatchResult fuzzyMatching(java.util.List<WordIU> otherPrefix,
                                                              double maxWER,
                                                              int matchingLastWords)
Is this SysInstallmentIU similar(*) to the given words? (*) similarity is parameterizable:
- the WER between the two sequences must be <= maxWER
- a number of ultimate words in the prefix must be identical
silence words are ignored in the comparison


getPrefixesMatchingLastWords

private java.util.List<CompletionInstallmentIU.Prefix> getPrefixesMatchingLastWords(java.util.List<WordIU> lastWords)
return all prefixes of this installment that end in the given last words


getLastNElements

private static <T> java.util.List<T> getLastNElements(java.util.List<T> list,
                                                      int n)
utility to return the last N elements from a list as an unmodifiable list