|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
eu.semaine.components.Component
eu.semaine.components.dialogue.interpreters.UtteranceInterpreter
public class UtteranceInterpreter
This class interprets the dialog and extends it with detected semantic features
Nested Class Summary |
---|
Nested classes/interfaces inherited from class eu.semaine.components.Component |
---|
Component.State |
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class eu.semaine.components.Component |
---|
inputWaiting, isInput, isOutput, log, meta, receivers, senders, state, waitingTime |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
UtteranceInterpreter()
Constructor DialogInterpreter |
Method Summary | |
---|---|
void |
act()
Overrides the act()-method of Component, does nothing currently |
void |
addDialogueActToUserState(DialogueAct act)
Creates an EmmaMessage with the utterance and all detected features |
DialogueAct |
analyseData(java.lang.String data)
Analyses the given data (the utterance) for features |
boolean |
checkUserFinished(SEMAINEMessage m)
Checks if the user is finished talking and the agent has the turn now If so, it sends the utterance further to be analysed |
boolean |
detectAboutCurrentCharacter(DialogueAct act)
Detects the 'aboutCurrentCharacter'-feature in the given DialogueAct |
boolean |
detectAboutOtherCharacter(DialogueAct act)
Detects the 'aboutOtherCharacter'-feature in the given DialogueAct Not implemented yet |
boolean |
detectAboutOtherPeople(DialogueAct act)
Detects the 'aboutOtherPeople'-feature in the given DialogueAct |
boolean |
detectAboutOwnFeelings(DialogueAct act)
Detects the 'aboutOwnFeelings'-feature in the given DialogueAct |
boolean |
detectAction(DialogueAct act)
Detects talking about an action in the given DialogueAct |
boolean |
detectAgree(DialogueAct act)
Detects agreement in the given DialogueAct |
boolean |
detectChangeSpeaker(DialogueAct act)
Detects a request to change the speaker in the given DialogueAct |
boolean |
detectDisagree(DialogueAct act)
Detects disagreement in the given DialogueAct |
boolean |
detectEvent(DialogueAct act)
Detects talking about an event in the given DialogueAct |
boolean |
detectFuture(DialogueAct act)
Detects talking about the future in the given DialogueAct |
boolean |
detectPast(DialogueAct act)
Detects talking about the past in the given DialogueAct |
int |
detectPolarity(DialogueAct act)
Detects the polarity in the given DialogueAct |
boolean |
detectPragmatic(DialogueAct act)
Detects the 'pragmatic'-feature in the given DialogueAct |
boolean |
detectTalkAboutSelf(DialogueAct act)
Detects the 'talkAboutSelf'-feature in the given DialogueAct |
java.lang.String |
detectTargetCharacter(DialogueAct act)
Detects the target character in the given DialogueAct |
int |
getNumberOfNegWords(java.lang.String utteranceOriginal)
Returns the number of negative words/phrases in the given string |
int |
getNumberOfPosWords(java.lang.String utteranceOriginal)
Returns the number of positive words/phrases in the given string |
java.lang.String |
getSentence(SEMAINEMessage m)
Returns the detected sentence in the SEMAINEMessage m |
java.lang.String |
getTaggedUtterance(java.lang.String str)
Returns the utterance tagged with PoS-tags |
java.lang.String[] |
getTags(java.lang.String taggedUtterance)
Returns an array with all tags found in the given tagged utterance |
boolean |
isSentence(SEMAINEMessage m)
Checks if the Message is ASR output and if it contains a sentence. |
void |
processUtterance()
Processes the complete utterance of the user for features and User goals |
void |
react(SEMAINEMessage m)
Called when a new message is received * Checks if the message contains an input-sentence. * Also checks if the user is finished speaking |
Methods inherited from class eu.semaine.components.Component |
---|
customStartIO, exitRequested, messageAvailableFrom, requestExit, run |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UtteranceInterpreter() throws javax.jms.JMSException, java.io.IOException
javax.jms.JMSException
java.io.IOException
Method Detail |
---|
public void act() throws javax.jms.JMSException
act
in class Component
javax.jms.JMSException
- if communication with the JMS server goes wrong.public void react(SEMAINEMessage m) throws javax.jms.JMSException
react
in class Component
javax.jms.JMSException
- if communication with the JMS server goes wrong.public boolean isSentence(SEMAINEMessage m) throws javax.jms.JMSException
m
- the message to check
javax.jms.JMSException
public java.lang.String getSentence(SEMAINEMessage m) throws javax.jms.JMSException
m
- the message to detect the sentence in
javax.jms.JMSException
public boolean checkUserFinished(SEMAINEMessage m) throws javax.jms.JMSException
m
- the latest message
javax.jms.JMSException
public void processUtterance() throws javax.jms.JMSException
javax.jms.JMSException
public void addDialogueActToUserState(DialogueAct act) throws javax.jms.JMSException
act
-
javax.jms.JMSException
public DialogueAct analyseData(java.lang.String data)
data
-
public int detectPolarity(DialogueAct act)
act
-
public boolean detectAgree(DialogueAct act)
act
-
public boolean detectDisagree(DialogueAct act)
act
-
public boolean detectAboutOtherPeople(DialogueAct act)
act
-
public boolean detectAboutOtherCharacter(DialogueAct act)
act
-
public boolean detectAboutCurrentCharacter(DialogueAct act)
act
-
public boolean detectAboutOwnFeelings(DialogueAct act)
act
-
public boolean detectPragmatic(DialogueAct act)
act
-
public boolean detectTalkAboutSelf(DialogueAct act)
act
-
public boolean detectFuture(DialogueAct act)
act
-
public boolean detectPast(DialogueAct act)
act
-
public boolean detectEvent(DialogueAct act)
act
-
public boolean detectAction(DialogueAct act)
act
-
public boolean detectChangeSpeaker(DialogueAct act)
act
-
public java.lang.String detectTargetCharacter(DialogueAct act)
act
-
public java.lang.String getTaggedUtterance(java.lang.String str)
str
-
public java.lang.String[] getTags(java.lang.String taggedUtterance)
taggedUtterance
-
public int getNumberOfPosWords(java.lang.String utteranceOriginal)
utteranceOriginal
-
public int getNumberOfNegWords(java.lang.String utteranceOriginal)
utteranceOriginal
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |