ahmad sawalha

ahmad sawalha

  • NA
  • 41
  • 2.7k

stop words removal and rooting

Jul 14 2015 7:23 AM
I have thousands of files, I need to remove all stop words, and get each words' Root. I have this code, but it is very slow, how to speed up my code to get this on the fly? thanks
for (int i = 0; i < Terms.Count(); i++)
{
Terms[i] = RemovePuctuations(Terms[i]);
Terms[i] = RemoveDiacrities(Terms[i]);
if (!IsArabicWord(Terms[i]))
{
Terms[i] = " ";
continue;
}
stemmer.initComponents();
Terms[i] = stemmer.stemWord(Terms[i]);
if (StopWordsBLL.StopWords.Contains(Terms[i]))
Terms[i] = " ";
}