done.inpro.system.completion
Class CompletionInstallmentIU
java.lang.Object
inpro.incremental.unit.IU
inpro.incremental.unit.InstallmentIU
inpro.incremental.unit.SysInstallmentIU
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) |
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.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 |
CompletionInstallmentIU
public CompletionInstallmentIU(java.lang.String fullUtterance)
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