fixing code complaints
This commit is contained in:
parent
69dd00dae9
commit
e751f36f54
@ -6,7 +6,8 @@ sitting in a tavern by a fireplace
|
||||
|
||||
|
||||
|
||||
|
||||
When generating conversation openers, check if the ai "knows" the player
|
||||
- if they do not, use a broad profile query (ie "who are you?")
|
||||
|
||||
|
||||
|
||||
|
||||
@ -229,7 +229,6 @@ public class FileUtils {
|
||||
try {
|
||||
Files.delete(file.toPath());
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,15 +1,9 @@
|
||||
package org.studiorailgun.conversation.evaluators.query;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.studiorailgun.Globals;
|
||||
import org.studiorailgun.conversation.tracking.Conversation;
|
||||
import org.studiorailgun.conversation.tracking.Quote;
|
||||
import org.studiorailgun.conversation.tracking.Sentence;
|
||||
import org.studiorailgun.knowledge.Node;
|
||||
import org.studiorailgun.knowledge.query.InstanceQuery;
|
||||
import org.studiorailgun.knowledge.query.QualityQuery;
|
||||
import org.studiorailgun.knowledge.query.filter.PossessionQueryFilter;
|
||||
|
||||
/**
|
||||
* Interrogatives available
|
||||
@ -46,17 +40,6 @@ public class Interrogative {
|
||||
*/
|
||||
public static void evalWhichQuery(Conversation conversation, Quote quote, Sentence sentence, NounStack interrogative, NounStack items){
|
||||
if(QualityQuery.isQualityClarificationQuery(interrogative)){
|
||||
Node finalQualifier = InstanceQuery.getConcept(items.indexedWord.originalText());
|
||||
|
||||
if(items.possessive != null){
|
||||
List<Node> qualifierInstances = InstanceQuery.getInstances(finalQualifier);
|
||||
finalQualifier = PossessionQueryFilter.withPossessor(qualifierInstances, Globals.web.getAnchors().getSelfNode());
|
||||
}
|
||||
|
||||
List<Node> qualitiesOfInstance = QualityQuery.getQualitiesOfInstance(finalQualifier);
|
||||
|
||||
Node qualityType = QualityQuery.getRequestedQualityType(interrogative);
|
||||
|
||||
conversation.getGoalData().getQueryData().getRecentQueries().add(sentence);
|
||||
} else {
|
||||
throw new Error("Unknown query type!");
|
||||
@ -73,17 +56,6 @@ public class Interrogative {
|
||||
*/
|
||||
public static void evalWhatQuery(Conversation conversation, Quote quote, Sentence sentence, NounStack interrogative, NounStack items){
|
||||
if(QualityQuery.isQualityClarificationQuery(interrogative)){
|
||||
Node finalQualifier = InstanceQuery.getConcept(items.indexedWord.originalText());
|
||||
|
||||
if(items.possessive != null){
|
||||
List<Node> qualifierInstances = InstanceQuery.getInstances(finalQualifier);
|
||||
finalQualifier = PossessionQueryFilter.withPossessor(qualifierInstances, Globals.web.getAnchors().getSelfNode());
|
||||
}
|
||||
|
||||
List<Node> qualitiesOfInstance = QualityQuery.getQualitiesOfInstance(finalQualifier);
|
||||
|
||||
Node qualityType = QualityQuery.getRequestedQualityType(interrogative);
|
||||
|
||||
conversation.getGoalData().getQueryData().getRecentQueries().add(sentence);
|
||||
} else {
|
||||
throw new Error("Unknown query type!");
|
||||
|
||||
@ -53,7 +53,6 @@ public class CSVExport {
|
||||
writer.println(node.getId() + ",\"" + node.getName() + "\",");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@ -68,7 +67,6 @@ public class CSVExport {
|
||||
writer.println(relation.getParent().getId() + "," + relation.getChild().getId() + ",\"" + relation.getName() + "\"," + relation.getId() + ",\"" + relation.getName() + "\",,");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,16 +93,12 @@ public class KoboldRequest {
|
||||
// System.out.println("parsed: " + responseParsed);
|
||||
// }
|
||||
} catch (MalformedURLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (ProtocolException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (URISyntaxException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -140,16 +136,12 @@ public class KoboldRequest {
|
||||
}
|
||||
}
|
||||
} catch (MalformedURLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (ProtocolException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (URISyntaxException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user