comment work
All checks were successful
studiorailgun/trpg/pipeline/head This commit looks good

This commit is contained in:
austin 2024-12-31 20:07:08 -05:00
parent ee73ebc3b3
commit 26807f69d2
4 changed files with 75 additions and 0 deletions

View File

@ -102,10 +102,18 @@ public class Conversation {
return other; return other;
} }
/**
* Gets the goal data for the conversation
* @return The goal data
*/
public GoalData getGoalData() { public GoalData getGoalData() {
return goalData; return goalData;
} }
/**
* Sets the goal data for the conversation
* @param goalData The goal data
*/
public void setGoalData(GoalData goalData) { public void setGoalData(GoalData goalData) {
this.goalData = goalData; this.goalData = goalData;
} }

View File

@ -49,18 +49,34 @@ public class Quote {
return raw; return raw;
} }
/**
* Gets the parsed document
* @return The parsed document
*/
public CoreDocument getParsedDocument() { public CoreDocument getParsedDocument() {
return parsedDocument; return parsedDocument;
} }
/**
* Sets the parsed document
* @param parsedDocument The parsed document
*/
public void setParsedDocument(CoreDocument parsedDocument) { public void setParsedDocument(CoreDocument parsedDocument) {
this.parsedDocument = parsedDocument; this.parsedDocument = parsedDocument;
} }
/**
* Gets the sentences in the quote
* @return The list of sentences in the quote
*/
public List<Sentence> getSentences(){ public List<Sentence> getSentences(){
return sentences; return sentences;
} }
/**
* Adds a sentence to the quote
* @param sentence The sentence to add
*/
public void addSentence(Sentence sentence){ public void addSentence(Sentence sentence){
this.sentences.add(sentence); this.sentences.add(sentence);
} }

View File

@ -35,6 +35,10 @@ public class Sentence {
*/ */
Quote parent; Quote parent;
/**
* Constructor
* @param raw The raw text for the sentence
*/
public Sentence(String raw){ public Sentence(String raw){
this.raw = raw; this.raw = raw;
} }
@ -55,30 +59,58 @@ public class Sentence {
return function; return function;
} }
/**
* Sets the function of the sentence
* @param function The function
*/
public void setFunction(SentenceFunction function){ public void setFunction(SentenceFunction function){
this.function = function; this.function = function;
} }
/**
* Gets the parser graph for the sentence
* @return The graph
*/
public SemanticGraph getGraph() { public SemanticGraph getGraph() {
return graph; return graph;
} }
/**
* Sets the parser graph for the sentence
* @param graph The graph
*/
public void setGraph(SemanticGraph graph) { public void setGraph(SemanticGraph graph) {
this.graph = graph; this.graph = graph;
} }
/**
* Sets the parent quote of the sentence
* @param parent The quote
*/
public void setParent(Quote parent){ public void setParent(Quote parent){
this.parent = parent; this.parent = parent;
} }
/**
* Gets the parent quote of the sentence
* @return The quote
*/
public Quote getParent(){ public Quote getParent(){
return parent; return parent;
} }
/**
* Gets the main clause of the sentence
* @return The main clause
*/
public Clause getMainClause() { public Clause getMainClause() {
return mainClause; return mainClause;
} }
/**
* Sets the main clause of the sentence
* @param mainClause The main clause
*/
public void setMainClause(Clause mainClause) { public void setMainClause(Clause mainClause) {
this.mainClause = mainClause; this.mainClause = mainClause;
} }

View File

@ -2,6 +2,9 @@ package org.studiorailgun.ai.knowledge;
import org.studiorailgun.Globals; import org.studiorailgun.Globals;
/**
* A relation in the knowledge web
*/
public class Relation { public class Relation {
/** /**
@ -63,18 +66,34 @@ public class Relation {
this.child = child.getId(); this.child = child.getId();
} }
/**
* Gets the id of the relation
* @return The id
*/
public int getId() { public int getId() {
return id; return id;
} }
/**
* Gets the name of the relation
* @return The name
*/
public String getName() { public String getName() {
return name; return name;
} }
/**
* Gets the parent node of the relation
* @return The parent node
*/
public Node getParent() { public Node getParent() {
return Globals.web.getNode(this.parent); return Globals.web.getNode(this.parent);
} }
/**
* Gets the child node of the relation
* @return The child node
*/
public Node getChild() { public Node getChild() {
return Globals.web.getNode(this.child); return Globals.web.getNode(this.child);
} }