breakout speech nodes from root
All checks were successful
studiorailgun/trpg/pipeline/head This commit looks good

This commit is contained in:
austin 2024-12-30 15:08:40 -05:00
parent 413be570f3
commit b740431717
8 changed files with 63 additions and 29 deletions

View File

@ -0,0 +1,9 @@
{
"tag" : "conversation",
"nodes" : {
"0" : {
"id" : 0,
"name" : "conversation"
}
}
}

View File

@ -2,6 +2,8 @@
"tag": "linguistics",
"dependencies" : [
"./data/webs/philosophy/philosophy.json",
"./data/webs/linguistics/name.json"
"./data/webs/linguistics/name.json",
"./data/webs/linguistics/speech.json",
"./data/webs/linguistics/conversation.json"
]
}

View File

@ -15,5 +15,8 @@
"parentWeb" : "concept",
"child" : 0
}
},
"anchors" : {
"name" : 0
}
}

View File

@ -0,0 +1,9 @@
{
"tag" : "speech",
"nodes" : {
"0" : {
"id" : 0,
"name" : "quote"
}
}
}

View File

View File

@ -1,6 +1,39 @@
{
"tag" : "convo1",
"nodes" : {
"0" : {
"id" : 0,
"name" : "CurrentConversation"
}
},
"relations" : {
"0" : {
"comment" : "The current conversation is an instance of a conversation",
"id" : 0,
"name" : "instanceOf",
"parent" : 0,
"parentWeb" : "conversation",
"child" : 0
},
"4" : {
"comment" : "The current conversation has the other as a participant",
"id" : 4,
"name" : "participantOf",
"parent" : 0,
"child" : 4,
"childWeb" : "root"
},
"5" : {
"comment" : "The current conversation has the self as a participant",
"id" : 5,
"name" : "participantOf",
"parent" : 0,
"child" : 2,
"childWeb" : "root"
}
},
"dependencies" : [
"./data/webs/physical-instances/characters/bert-self.json"
"./data/webs/physical-instances/characters/bert-self.json",
"./data/webs/root.json"
]
}

View File

@ -13,18 +13,6 @@
"id" : 4,
"name" : "Other"
},
"5" : {
"id" : 5,
"name" : "Quote"
},
"6" : {
"id" : 6,
"name" : "Conversation"
},
"7" : {
"id" : 7,
"name" : "CurrentConversation"
},
"8" : {
"id" : 8,
"name" : "hat"
@ -45,20 +33,6 @@
"parent" : 3,
"child" : 4
},
"4" : {
"comment" : "The current conversation has the other as a participant",
"id" : 4,
"name" : "participantOf",
"parent" : 7,
"child" : 4
},
"5" : {
"comment" : "The current conversation has the self as a participant",
"id" : 5,
"name" : "participantOf",
"parent" : 7,
"child" : 2
},
"8" : {
"comment" : "hat is an instance of a concept",
"id" : 8,

View File

@ -104,7 +104,11 @@ public class KnowledgeWeb {
} else {
lookupId = "node-" + relation.webTag + relation.child;
}
nodeId = crossRelationLookupMap.get(lookupId);
try {
nodeId = crossRelationLookupMap.get(lookupId);
} catch(NullPointerException ex){
throw new Error("Failed to find node link " + lookupId + " in relation in web " + relation.webTag);
}
if(nodeId == relation.parent){
throw new Error("Child node id same as parent! " + relation.parent + " " + nodeId + " " + relation.child);
}