Exemplo n.º 1
0
        public string[] ExtractSentences(string url)
        {
            var htmlWeb      = new HtmlWeb();
            var htmlDocument = htmlWeb.Load(url);

            var text = _htmlSanitizer.SanitizeHtmlDocument(htmlDocument);

            return(_textSentenceSplitter.SplitTextToSentences(text));
        }
Exemplo n.º 2
0
        private bool HasRelevantSentences(string personFullName, string evaluationCategory,
                                          SearchEngineResult searchEngineResult)
        {
            HtmlDocument htmlDocument = _htmlDocumentLoader.LoadFromUrl(searchEngineResult.Url);
            string       text         = _htmlSanitizer.SanitizeHtmlDocument(htmlDocument);

            string[] sentences            = _textSentenceSplitter.SplitTextToSentences(text);
            bool     hasRelevantSentences = sentences.Any(s => s.Contains(personFullName) && s.Contains(evaluationCategory));

            return(hasRelevantSentences);
        }