public void LoadCompleteInformation(classificationReportCollectionSettings setup, folderNode folder, ILogBuilder logger)
        {
            DeployPath(folder.path);

            rootFolder = new folderStructure(rootPath, "Root", "Root directory with experiment reports");

            var resultFiles = rootFolder.findFiles(setup.FILENAME_CLASSIFICATION_RESULTS, SearchOption.AllDirectories);

            String basePath = rootPath;

            foreach (String rFile in resultFiles)
            {
                String dirPath    = Path.GetDirectoryName(rFile);
                String dirSubPath = dirPath.Substring(basePath.Length);

                classificationReportExpanded rep = classificationReportExpanded.LoadSimpleReport(rFile, logger);


                folderNode reportFolder = rootFolder.Add(dirSubPath, rep.Name, "Experiment [" + rep.Name + "] data");

                rep.folder = reportFolder;



                String subCollectionDirPath = reportFolder.parent.path.Substring(rootFolder.path.Length);

                classificationReportCollection hostCollection = this;

                if (!subCollectionDirPath.isNullOrEmpty())
                {
                    if (reportFolder.parent != rootFolder)
                    {
                        hostCollection = AddOrGetChild(subCollectionDirPath);
                    }
                }

                classificationReportExpanded rep_existing = hostCollection.FirstOrDefault(x => x.filepath == rep.filepath);

                if (rep_existing != null)
                {
                    if (rep.filecreation > rep_existing.filecreation)
                    {
                        hostCollection.Remove(rep_existing);
                        logger.log("Replacing older report [" + rep_existing.filepath + "] with new version");
                    }
                }

                hostCollection.Add(rep);

                reportCompleteList.Add(rep);
                //if (LoadExtraInformation != null)
                //{
                //    LoadExtraInformation.Invoke(rep, hostCollection, setup, logger);
                //}
            }

            logger.log("Reports (" + Count + ") directly imported from [" + rootPath + "] - Total reports, including [" + Children.Count + "] sub collections is [" + resultFiles.Count + "]");
        }
Example #2
0
        protected void deploy()
        {
            DirectoryInfo di = Directory.CreateDirectory(reportPath);

            folder = new folderStructure(reportPath, name, "Direct reporter root folder");


            deployCustomFolders();
            folder.Add(DRFolderEnum.logs, "Logs", "Exported logs");
            folder.generateReadmeFiles(notation);
        }
Example #3
0
        /// <summary>
        /// Starts the construction --- prepares all files and structure
        /// </summary>
        public void startConstruction(string __path = "")
        {
            string projectDir = "projects\\" + settings.corpusProjectName;

            if (!__path.isNullOrEmpty())
            {
                projectDir = __path;
            }

            //   projectDirectory = Directory.CreateDirectory(projectDir);

            aceLog.consoleControl.setAsOutput(output, "lexConst");


            //fileOpsBase. = settings.fileTextSearchBlockSize;
            if (projectFolderStructure == null)
            {
                projectFolderStructure = new folderStructure(projectDir, "Corpus project", "Corpus construction project root directory");
                projectFolderStructure.Add(lexiconConstructorProjectFolder.links, "Links", "Text file link lists for later semantic link constructions. Corpus project: " + settings.corpusProjectName);
                projectFolderStructure.Add(lexiconConstructorProjectFolder.metadata, "MetaData", "Serialized termExploreModel instances created by S1 and updated by other stages. Corpus project: " + settings.corpusProjectName);
                projectFolderStructure.Add(lexiconConstructorProjectFolder.splits, "Splits", "Splited parts from the input corpus corpus. Corpus project: " + settings.corpusProjectName);
                projectFolderStructure.Add(lexiconConstructorProjectFolder.scripts, "Scripts", "Repositorium of console and constructor execution scripts. Corpus project: " + settings.corpusProjectName);
                projectFolderStructure.Add(lexiconConstructorProjectFolder.logs, "Logs", "Execution and crash logs. Corpus project: " + settings.corpusProjectName);
                projectFolderStructure.Add(lexiconConstructorProjectFolder.stages, "Stages", "Stage task states and task list files. Corpus project: " + settings.corpusProjectName);
                projectFolderStructure.Add(lexiconConstructorProjectFolder.documents, "Input documents", "Documents (txt, html,csv) used as wordload sources during development and testing. Corpus project: " + settings.corpusProjectName);
                projectFolderStructure.generateReadmeFiles(null);
            }

            output.outputPath = projectFolderStructure[lexiconConstructorProjectFolder.logs].pathFor("lexConstructor.log");

            output.AppendLine("Lexicon construction project directory: " + projectFolderStructure.path);

            if (!tasks.Any())
            {
                tasks.Add("s0", new lexiconConstructTaskZero());
                tasks.Add("s1", new lexiconConstructTaskOne());
                tasks.Add("s2", new lexiconConstructTaskTwo());
                tasks.Add("s3", new lexiconConstructTaskThree());
                tasks.Add("s4", new lexiconConstructTaskFour());
                tasks.Add("s5", new lexiconConstructTaskFive());
            }
            output.AppendLine("--- Lexicon Construction ready to start");
        }