Ejemplo n.º 1
0
        public DataQuerier(string datastoreName, RUNNINGMODE runningMode)
        {
            log = Log.Logger.ForContext <DataQuerier>();

            this.dsFrame      = DataStoreManager.GetInstance().GetDataStore(datastoreName);
            this.msgGenerator = new MessageGenerator(runningMode);
        }
Ejemplo n.º 2
0
        public NLUProcessor(string datastoreName)
        {
            DataStoreFrame dsFrame = DataStoreManager.GetInstance().GetDataStore(datastoreName);

            if (dsFrame != null)
            {
                this.nluDF = DataStoreManager.GetInstance().GetDataStore(datastoreName).GetNLU();
            }
        }
Ejemplo n.º 3
0
        public ConfigExecutor(string user, string dsName)
        {
            log = Log.Logger.ForContext <ConfigExecutor>();
            DataStoreFrame dsFrame = dsMgmt.GetDataStore(dsName);

            this.kgConfigFrame = dsFrame.GetKGConfig();

            this.user   = user;
            this.dsName = dsName;
        }
Ejemplo n.º 4
0
        public GraphExecutor(string datastoreName)
        {
            log = Log.Logger.ForContext <GraphExecutor>();

            DataStoreFrame dsFrame = DataStoreManager.GetInstance().GetDataStore(datastoreName);

            if (dsFrame != null)
            {
                this.kgDF = dsFrame.GetKG();
            }
        }
Ejemplo n.º 5
0
        public List <DataStoreFrame> Load()
        {
            List <string> datastoreNames = dataAccessor.GetDataStoreList();

            List <DataStoreFrame> datastores = new List <DataStoreFrame>();

            foreach (string dsName in datastoreNames)
            {
                DataStoreFrame dsFrame = this.LoadDataStore(dsName);

                if (dsFrame != null)
                {
                    datastores.Add(dsFrame);
                }
            }

            return(datastores);
        }
Ejemplo n.º 6
0
        public DataStoreFrame LoadDataStore(string dsName)
        {
            List <Vertex>             vList  = null;
            List <Edge>               eList  = null;
            List <VisulizationConfig> vcList = null;

            List <NLUIntentRule>       iList  = null;
            List <EntityData>          enList = null;
            List <EntityAttributeData> eaList = null;

            (vList, eList, vcList, iList, enList, eaList) = this.dataAccessor.Load(dsName);

            if (vcList == null || vList == null || eList == null)
            {
                log.Here().Warning("No KG Data loaded from persistence");
                return(null);
            }

            DataPersistanceKGParser kgParser      = new DataPersistanceKGParser();
            KnowledgeGraphDataFrame kgDF          = kgParser.ParseKG(vList, eList);
            KGConfigFrame           kgConfigFrame = kgParser.ParseKGConfig(vcList);

            log.Information("Knowledge Graph is parsed.");
            Console.WriteLine("Knowledge Graph is parsed.");

            NLUDataFrame nluDF = null;

            if (iList == null || enList == null)
            {
                log.Here().Warning("No NLU Data loaded from persistence");
            }
            else
            {
                DataPersistanceNLUParser nluParser = new DataPersistanceNLUParser();
                nluDF = nluParser.Parse(iList, enList, eaList);

                log.Information("NLU materials is parsed.");
                Console.WriteLine("NLU materials is parsed.");
            }

            DataStoreFrame dsFrame = new DataStoreFrame(dsName, kgDF, kgConfigFrame, nluDF);

            return(dsFrame);
        }