public TableExtractionTaskScoreEntry CreateNewEntry(HtmlSourceAndUrl source, ExtractionTaskEngineMode _executionMode)
        {
            executionMode = _executionMode;

            TaskRuns.Add(new TableExtractionTaskScoreEntry()
            {
                executionMode = _executionMode,
                source        = source
            });
            return(TaskRuns.Last());
        }
        public void Publish(Dictionary <HtmlNode, HtmlSourceAndUrl> documentNodeDictionary, folderNode folderWithResults, ITextRender output)
        {
            HtmlSourceAndUrl sourceA = documentNodeDictionary[itemA];
            HtmlSourceAndUrl sourceB = documentNodeDictionary[itemB];


            output.AppendLine("A: " + sourceA.filepath);
            output.AppendLine("B: " + sourceB.filepath);
            output.nextTabLevel();
            output.AppendLine("CS: " + ContentSimilarity.ToString("F3"));
            output.AppendLine("SS: " + StructureSimilarity.ToString("F3"));
            output.AppendLine("OS: " + OverallSimilarity.ToString("F3"));
            output.prevTabLevel();
        }
        public void Publish(Dictionary <HtmlNode, String> labelsByDocument, Dictionary <HtmlNode, HtmlSourceAndUrl> documentNodeDictionary, folderNode folderWithResults, DocumentSimilarityResult result)
        {
            var        cluster = this;
            folderNode cFolder = folderWithResults.Add(cluster.name, cluster.name, "Directory for cluster " + cluster.name);

            result.Publish(documentNodeDictionary, cFolder, cluster.items);

            builderForText reporter = new builderForText();

            reporter.AppendHeading("Name: " + cluster.name);
            reporter.AppendPair("Items", cluster.items.Count);

            if (cluster.ClusterSeed != null)
            {
                reporter.AppendPair("Seed", labelsByDocument[cluster.ClusterSeed]);
            }
            foreach (var pair in cluster.range.GetDictionary())
            {
                reporter.AppendPair(pair.Key, pair.Value.ToString("F3"));
            }

            foreach (var item in cluster.items)
            {
                if (item != cluster.ClusterSeed)
                {
                    if (cluster.scoreDictionary.ContainsKey(item))
                    {
                        String           label  = labelsByDocument[item];
                        Double           score  = cluster.scoreDictionary[item];
                        HtmlSourceAndUrl source = documentNodeDictionary[item];
                        reporter.AppendLine("-----------------------------------");
                        reporter.AppendLine(label + " => " + score.ToString("F3"));
                        reporter.AppendLine("Filepath: " + source.filepath);
                        reporter.AppendLine("Url: " + source.url);
                    }
                }
            }

            String reportPath    = cFolder.pathFor("report.txt", imbSCI.Data.enums.getWritableFileMode.overwrite);
            String reportContent = reporter.GetContent();

            File.WriteAllText(reportPath, reportContent);
        }