Beispiel #1
0
        private string UseNode(JackEngineNode node, LuisResult result)
        {
            var nodeData = GetNodeData(node);
            var message  = node.HandleRequest(result, nodeData, Data);

            SaveNodeData(node, nodeData);
            return(message);
        }
Beispiel #2
0
        private JackEngineDataNode GetNodeData(JackEngineNode node)
        {
            var key = node.GetNodeKey();
            JackEngineDataNode nodeData = null;

            if (Data.NodeData.ContainsKey(key))
            {
                nodeData = Data.NodeData[key];
            }
            return(nodeData ?? new JackEngineDataNode());
        }
Beispiel #3
0
        private void SaveNodeData(JackEngineNode node, JackEngineDataNode data)
        {
            var key = node.GetNodeKey();

            if (Data.NodeData.ContainsKey(key))
            {
                Data.NodeData[key] = data;
            }
            else
            {
                Data.NodeData.Add(key, data);
            }
        }