0
Reply

stop words removal and rooting

ahmad sawalha

ahmad sawalha

Jul 14 2015 7:23 AM
531
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] = " ";
}