breakout speech nodes from root
All checks were successful
studiorailgun/trpg/pipeline/head This commit looks good
All checks were successful
studiorailgun/trpg/pipeline/head This commit looks good
This commit is contained in:
parent
413be570f3
commit
b740431717
9
data/webs/linguistics/conversation.json
Normal file
9
data/webs/linguistics/conversation.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"tag" : "conversation",
|
||||
"nodes" : {
|
||||
"0" : {
|
||||
"id" : 0,
|
||||
"name" : "conversation"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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"
|
||||
]
|
||||
}
|
||||
@ -15,5 +15,8 @@
|
||||
"parentWeb" : "concept",
|
||||
"child" : 0
|
||||
}
|
||||
},
|
||||
"anchors" : {
|
||||
"name" : 0
|
||||
}
|
||||
}
|
||||
9
data/webs/linguistics/speech.json
Normal file
9
data/webs/linguistics/speech.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"tag" : "speech",
|
||||
"nodes" : {
|
||||
"0" : {
|
||||
"id" : 0,
|
||||
"name" : "quote"
|
||||
}
|
||||
}
|
||||
}
|
||||
0
data/webs/philosophy/set/set_theory.json
Normal file
0
data/webs/philosophy/set/set_theory.json
Normal 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"
|
||||
]
|
||||
}
|
||||
@ -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,
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user