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)); }
public async Task <ActionResult <List <Stopwords> > > GetStopwords() { var stopwords = await _stopwordsRepository.GetStopwords(); return(stopwords); }