|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread eu.semaine.components.Component eu.semaine.components.dialogue.actionproposers.UtteranceProposer
public class UtteranceProposer
This class waits for the Agent to have the turn, takes the analysis of the user input and chooses a response for the agent
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 | |
---|---|
UtteranceProposer()
Creates a new UtteranceProposer + Creates the Senders and Receivers + Import response-model data + Sets a random starting personality |
Method Summary | |
---|---|
protected void |
act()
Starts the conversation if this is called for the first time |
boolean |
changeOfCharacter(DialogueAct act)
Regulates the process of changing the character |
eu.semaine.components.dialogue.actionproposers.UtteranceProposer.Personality |
choosePersonality()
Returns a random personality |
java.lang.String |
getMaxScorer(java.util.HashMap<java.lang.String,java.lang.Integer> scores)
Returns the best possible utterance from the given map with responses and scores |
eu.semaine.components.dialogue.actionproposers.UtteranceProposer.Personality |
getPersonality(java.lang.String p)
Returns the Personality based on the String representation of the character |
java.util.HashMap<java.lang.String,java.lang.Integer> |
giveResponseRatings(DialogueAct act)
Returns a map with all possible responses plus the ratings of those responses (based on the response model) |
void |
pickResponse(DialogueAct act)
Tries to pick a response based on the given DialogueAct (which contains of the detected utterance + detected features) |
protected void |
react(SEMAINEMessage m)
Called when a new message arrives Checks whether the message is an EmmaMessage containing processed input. |
void |
respond(java.lang.String response)
Sends the chosen response to the FML-channel |
boolean |
startOfConversation()
Regulates the start of a conversation (done at the start of each character) |
boolean |
systemWantsSpeakerChange()
|
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 UtteranceProposer() throws javax.jms.JMSException
javax.jms.JMSException
Method Detail |
---|
protected void act() throws javax.jms.JMSException
act
in class Component
javax.jms.JMSException
- if communication with the JMS server goes wrong.protected void react(SEMAINEMessage m) throws javax.jms.JMSException
react
in class Component
javax.jms.JMSException
- if communication with the JMS server goes wrong.public void pickResponse(DialogueAct act) throws javax.jms.JMSException
act
-
javax.jms.JMSException
public boolean startOfConversation() throws javax.jms.JMSException
javax.jms.JMSException
public boolean changeOfCharacter(DialogueAct act) throws javax.jms.JMSException
act
-
javax.jms.JMSException
public boolean systemWantsSpeakerChange()
public java.util.HashMap<java.lang.String,java.lang.Integer> giveResponseRatings(DialogueAct act)
act
-
public java.lang.String getMaxScorer(java.util.HashMap<java.lang.String,java.lang.Integer> scores)
scores
-
public eu.semaine.components.dialogue.actionproposers.UtteranceProposer.Personality choosePersonality()
public eu.semaine.components.dialogue.actionproposers.UtteranceProposer.Personality getPersonality(java.lang.String p)
p
-
public void respond(java.lang.String response) throws javax.jms.JMSException
response
-
javax.jms.JMSException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |