|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdemo.inpro.system.greifarm.NLU
public class NLU
this encapsulates natural language understanding
Field Summary | |
---|---|
private org.apache.log4j.Logger |
logger
|
private java.util.Deque<ActionIU> |
performedActions
|
private java.util.Deque<WordIU> |
unusedWords
|
Constructor Summary | |
---|---|
NLU(java.util.Deque<WordIU> unusedWords,
java.util.Deque<ActionIU> performedActions)
|
Method Summary | |
---|---|
private ActionType |
actionType(WordIU iu)
|
private void |
addRepetitiveMaxAction()
if people say a direction many times in a row, we initiate a MAX-action in that direction, in order to speed things up (and to force them to use the STOP command more often... ) |
private ActionStrength |
getModifierValue(WordIU word,
ActionStrength strengthModifier)
we only interpret the very last modifier word; that is, things like "sehr weit" are handled just like "weit" "ganz weit nach" should really be interpreted like "ganz nach", not like "weit nach" at the same time, "ganz bisschen" *should* be interpreted like "bisschen" in other words: max followed by strong should remain strong. |
void |
incrementallyUnderstandUnusedWords()
after each hypothesis, we try to find one (or more) "commands", which we define as "(contentlessWord | modifierWord)* actionWord", i.e. a sequence of words leading up to and including an actionWord. |
private boolean |
isActionWord(WordIU iu)
|
private boolean |
isModifierWord(WordIU iu)
|
void |
understandUnusedWordsOnCommit()
on commit, we try a little harder to interpret any remaining words of the utterance: if no explicit action word is available, we simply assume that CONTINUE was meant and interpret only the WEAK, NORMAL, and STRONG modifiers;; also, and only on commit, we execute a MAX action, if there have been at least three consecutive NORMAL or STRONG actions |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final org.apache.log4j.Logger logger
private final java.util.Deque<WordIU> unusedWords
private final java.util.Deque<ActionIU> performedActions
Constructor Detail |
---|
public NLU(java.util.Deque<WordIU> unusedWords, java.util.Deque<ActionIU> performedActions)
Method Detail |
---|
public void incrementallyUnderstandUnusedWords()
public void understandUnusedWordsOnCommit()
private boolean isActionWord(WordIU iu)
private boolean isModifierWord(WordIU iu)
private void addRepetitiveMaxAction()
private ActionStrength getModifierValue(WordIU word, ActionStrength strengthModifier)
word
- the word to be interpretedstrengthModifier
- the previous modifier valueprivate ActionType actionType(WordIU iu)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |