I have a long list of words and I am trying to print the nouns only to the output. The method in which I am trying to do this is :
IF THE WORD IS A PROPER NOUN , JUST PRINT IT {
// THIS IS DONE USING REGULAR EXPRESSION
}
ELSE{
// GO TO ONLINE DICTIONARY http://www.thefreedictionary.com/WORD AND SEE IF CHECK IF THE WORD IS NOUN BY HAVING ANOTHER REGULAR EXPRESSION CHECKING FOR THE NOUN IN THE SOURCE CODE OF THIS PAGE
}
I have unit tested the else part and it is working fine for individual words. Without the else part, the program is printing 4000+ words but when i integrated the else part, the program is only printing around 80 words, which is wrong.
Can someone point out what the problem could be? Is there some parallel way of processing these requests for many words?