Skip to content
This repository was archived by the owner on Sep 17, 2019. It is now read-only.

Commit 2bf2b94

Browse files
committed
clean up
1 parent f1c4dee commit 2bf2b94

4 files changed

Lines changed: 0 additions & 54 deletions

File tree

src/main/java/roboy/dialog/personality/SmallTalkPersonality.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,11 @@ public SmallTalkPersonality(Verbalizer verbalizer) {
6767
questions.put("movies", moviesQuestions);
6868
questions.put("occupation", occupationQuestions);
6969

70-
// InquiryState inquiry = new InquiryState("How are you?", positive, "That's not good enough. Again: ");
71-
// InquiryState inquiry2 = new InquiryState("So, anything else you want to talk about?", Lists.stringList(), "");
72-
// GenerativeCommunicationState generative = new GenerativeCommunicationState();
73-
// QuestionAnsweringState answer = new QuestionAnsweringState();
74-
// SegueState segue = new SegueState(answer);
75-
// CelebrityState celeb = new CelebrityState(segue);
76-
//TODO detect goodbye from all the states
77-
7870
// build state machine
7971
GreetingState greetings = new GreetingState();
8072
IntroductionState intro = new IntroductionState();
8173
FarewellState farewell = new FarewellState();
8274
WildTalkState wild = new WildTalkState();
83-
GenerativeCommunicationState generative = new GenerativeCommunicationState();
8475
IdleState idle = new IdleState();
8576

8677
QuestionAnsweringState answer = new QuestionAnsweringState(wild);
@@ -94,8 +85,6 @@ public SmallTalkPersonality(Verbalizer verbalizer) {
9485
greetings.setNextState(intro);
9586
intro.setNextState(ask);
9687
wild.setNextState(answer);
97-
// wild.setSuccess(wild);
98-
// wild.setFailure(farewell);
9988

10089
state = greetings;
10190
}

src/main/java/roboy/dialog/personality/states/QuestionAnsweringState.java

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -128,39 +128,6 @@ public Reaction react(Interpretation input) {
128128
return new Reaction(this, result);
129129
}
130130

131-
132-
/**
133-
* Checks all its memories (currently only the DBpedia) for an answer to the given
134-
* question.
135-
*
136-
* @param input The interpretation of all inputs
137-
* @param result The list of answers that is possibly replaced
138-
* @return the reaction to the question
139-
*/
140-
@SuppressWarnings("unchecked")
141-
private Reaction innerReaction(Interpretation input,List<Interpretation> result){
142-
// Map<String, Object> pas = (Map<String, Object>) input.getFeature(Linguistics.PAS);
143-
// if(pas!=null && !pas.isEmpty()){
144-
// Relation relation = PASInterpreter.pas2DBpediaRelation(pas);
145-
//// System.out.println("Relation: "+relation);
146-
// for(Memory<Relation> mem : memories){
147-
// try{
148-
// List<Relation> rememberedList = mem.retrieve(relation);
149-
// for (Relation remembered: rememberedList)
150-
// {
151-
// if(remembered!=null&&remembered.object!=null){ // TODO: check for proper role
152-
// result.add(new Interpretation((String)remembered.object.getAttribute(Linguistics.NAME)));
153-
// return new Reaction(top,result);
154-
// }
155-
// }
156-
//
157-
// } catch(Exception e){}
158-
// }
159-
// }
160-
// return inner.react(input);
161-
return new Reaction(this,Lists.interpretationList(new Interpretation("oh man, no idea what to say")));
162-
}
163-
164131
private List<Triple> remember(String predicate, String agens, String patiens){
165132
List<Triple> triples = new ArrayList<>();
166133
for(Triple t: memory){

src/main/java/roboy/dialog/personality/states/QuestionAskingState.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,8 @@ public Reaction react(Interpretation input)
129129
}
130130

131131
// react to the answer of the person
132-
133132
List<Interpretation> reply = checkOwnMemory(input); // if the question was about Roboy
134133

135-
// if (!reply.isEmpty())
136-
// {
137-
// return new Reaction(determineNextState(input), reply);
138-
// }
139134

140135
reply.add(checkRoboyMind()); // in case Roboy knows a person with same name, hobby, etc.
141136
return new Reaction(determineNextState(input), reply);

src/main/java/roboy/dialog/personality/states/WildTalkState.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,8 @@ public List<Interpretation> act() {
3131

3232
@Override
3333
public Reaction react(Interpretation input) {
34-
// String sentence = (String) input.getFeatures().get(Linguistics.SENTENCE);
35-
// if(!sentence.isEmpty()) {
36-
// return new Reaction(super.this, Lists.interpretationList(new Interpretation(callGenerativeModel(sentence))));
37-
// }
3834
//get out of the talking mode when leave the state
3935
talking = false;
40-
// return new Reaction(failure,Lists.interpretationList(new Interpretation(callGenerativeModel(sentence))));
4136
return super.react(input);
4237
}
4338

0 commit comments

Comments
 (0)