コード例 #1
0
        public async Task <ActionResult <BodyData> > GetBodyData([Required][FromBody] ScrapeRequest request)
        {
            var scrapedData = await CheckForScrapedDataExistsInCacheAsync(request.Text);

            var stopwords = await _stopwordsRepository.GetStopwords();

            var bodyData = new BodyData
            {
                Body          = scrapedData.BodyContent ?? string.Empty,
                BodyOccurence = _linkScraperService.GetWordOccurences(scrapedData.BodyContent ?? string.Empty, stopwords)
            };

            return(Ok(bodyData));
        }
コード例 #2
0
        public async Task <ActionResult <List <Stopwords> > > GetStopwords()
        {
            var stopwords = await _stopwordsRepository.GetStopwords();

            return(stopwords);
        }