Exemple #1
0
        public void scrapeSentence(String keyword)
        {
            foreach (string kodas in htmlRepository.retrieve())
            {
                String htmlkodas = kodas;
                htmlkodas = Regex.Replace(htmlkodas, @"\s+| |…|'|&#8217|–|·", " ");
                string[] sentences = Regex.Split(htmlkodas, @"(?<=[\.!\?])\s+");

                foreach (string item in sentences)
                {
                    String itemHolder = item.ToLower();
                    if (itemHolder.Contains(keyword.ToLower()))
                    {
                        sentenceRepository.addItem(item);
                    }
                }
            }
            sentenceRepository.removeDubs();
        }
Exemple #2
0
 public List <String> retrieveHtml()
 {
     return(htmlRepository.retrieve());
 }