public static SummarizedDocument Summarize(IContentProvider contentProvider, ISummarizerArguments args)
        {
            if (contentProvider == null || args == null)
            {
                return new SummarizedDocument();
            }

            var engine = new SummarizingEngine();

            var parsedDocument = engine.ParseContent(contentProvider, args.ContentParser());
            var analyzedDocument = engine.AnalyzeParsedContent(parsedDocument, args.ContentAnalyzer());
            var summaryAnalysisDocument = engine.SummarizeAnalysedContent(analyzedDocument, args.ContentSummarizer(), args);

            return summaryAnalysisDocument;
        }
Пример #2
0
        public static SummarizedDocument Summarize(IContentProvider contentProvider, ISummarizerArguments args)
        {
            if (contentProvider == null || args == null)
            {
                return(new SummarizedDocument());
            }

            SummarizingEngine engine = new SummarizingEngine();

            ParsedDocument     parsedDocument          = engine.ParseContent(contentProvider, args.ContentParser());
            AnalyzedDocument   analyzedDocument        = engine.AnalyzeParsedContent(parsedDocument, args.ContentAnalyzer());
            SummarizedDocument summaryAnalysisDocument = engine.SummarizeAnalyzedContent(analyzedDocument, args.ContentSummarizer(), args);

            return(summaryAnalysisDocument);
        }