From 26807f69d2227fcaa261ece801d071fe1c4149d3 Mon Sep 17 00:00:00 2001 From: austin Date: Tue, 31 Dec 2024 20:07:08 -0500 Subject: [PATCH] comment work --- .../conversation/tracking/Conversation.java | 8 +++++ .../ai/conversation/tracking/Quote.java | 16 ++++++++++ .../ai/conversation/tracking/Sentence.java | 32 +++++++++++++++++++ .../studiorailgun/ai/knowledge/Relation.java | 19 +++++++++++ 4 files changed, 75 insertions(+) diff --git a/src/main/java/org/studiorailgun/ai/conversation/tracking/Conversation.java b/src/main/java/org/studiorailgun/ai/conversation/tracking/Conversation.java index 5bedeed..d4147d1 100644 --- a/src/main/java/org/studiorailgun/ai/conversation/tracking/Conversation.java +++ b/src/main/java/org/studiorailgun/ai/conversation/tracking/Conversation.java @@ -102,10 +102,18 @@ public class Conversation { return other; } + /** + * Gets the goal data for the conversation + * @return The goal data + */ public GoalData getGoalData() { return goalData; } + /** + * Sets the goal data for the conversation + * @param goalData The goal data + */ public void setGoalData(GoalData goalData) { this.goalData = goalData; } diff --git a/src/main/java/org/studiorailgun/ai/conversation/tracking/Quote.java b/src/main/java/org/studiorailgun/ai/conversation/tracking/Quote.java index a6a82f1..ae7da4f 100644 --- a/src/main/java/org/studiorailgun/ai/conversation/tracking/Quote.java +++ b/src/main/java/org/studiorailgun/ai/conversation/tracking/Quote.java @@ -49,18 +49,34 @@ public class Quote { return raw; } + /** + * Gets the parsed document + * @return The parsed document + */ public CoreDocument getParsedDocument() { return parsedDocument; } + /** + * Sets the parsed document + * @param parsedDocument The parsed document + */ public void setParsedDocument(CoreDocument parsedDocument) { this.parsedDocument = parsedDocument; } + /** + * Gets the sentences in the quote + * @return The list of sentences in the quote + */ public List getSentences(){ return sentences; } + /** + * Adds a sentence to the quote + * @param sentence The sentence to add + */ public void addSentence(Sentence sentence){ this.sentences.add(sentence); } diff --git a/src/main/java/org/studiorailgun/ai/conversation/tracking/Sentence.java b/src/main/java/org/studiorailgun/ai/conversation/tracking/Sentence.java index dbd1598..760ea87 100644 --- a/src/main/java/org/studiorailgun/ai/conversation/tracking/Sentence.java +++ b/src/main/java/org/studiorailgun/ai/conversation/tracking/Sentence.java @@ -35,6 +35,10 @@ public class Sentence { */ Quote parent; + /** + * Constructor + * @param raw The raw text for the sentence + */ public Sentence(String raw){ this.raw = raw; } @@ -55,30 +59,58 @@ public class Sentence { return function; } + /** + * Sets the function of the sentence + * @param function The function + */ public void setFunction(SentenceFunction function){ this.function = function; } + /** + * Gets the parser graph for the sentence + * @return The graph + */ public SemanticGraph getGraph() { return graph; } + /** + * Sets the parser graph for the sentence + * @param graph The graph + */ public void setGraph(SemanticGraph graph) { this.graph = graph; } + /** + * Sets the parent quote of the sentence + * @param parent The quote + */ public void setParent(Quote parent){ this.parent = parent; } + /** + * Gets the parent quote of the sentence + * @return The quote + */ public Quote getParent(){ return parent; } + /** + * Gets the main clause of the sentence + * @return The main clause + */ public Clause getMainClause() { return mainClause; } + /** + * Sets the main clause of the sentence + * @param mainClause The main clause + */ public void setMainClause(Clause mainClause) { this.mainClause = mainClause; } diff --git a/src/main/java/org/studiorailgun/ai/knowledge/Relation.java b/src/main/java/org/studiorailgun/ai/knowledge/Relation.java index 247dd74..fb4f714 100644 --- a/src/main/java/org/studiorailgun/ai/knowledge/Relation.java +++ b/src/main/java/org/studiorailgun/ai/knowledge/Relation.java @@ -2,6 +2,9 @@ package org.studiorailgun.ai.knowledge; import org.studiorailgun.Globals; +/** + * A relation in the knowledge web + */ public class Relation { /** @@ -63,18 +66,34 @@ public class Relation { this.child = child.getId(); } + /** + * Gets the id of the relation + * @return The id + */ public int getId() { return id; } + /** + * Gets the name of the relation + * @return The name + */ public String getName() { return name; } + /** + * Gets the parent node of the relation + * @return The parent node + */ public Node getParent() { return Globals.web.getNode(this.parent); } + /** + * Gets the child node of the relation + * @return The child node + */ public Node getChild() { return Globals.web.getNode(this.child); }