I am reading words from a file. I want to ignore punctuation marks with the words (for eg. if Nay, then i want to read only Nay). I have written code right now to ignore only "," from the word but my requirement is to ignore all the punctuation marks and numbers. My approach is tedious and unintelligent. Please suggest how can I ignore all the punctuation marks and numbers.
Please donot decrease my rep and block my account if you think this post is irrelevant. Let me know what else you want and I will share it with you.
One of the text files I am trying to read is as follows: Text File
I have written the code like below line to ignore ","
if(wordArray[j].charAt(k)!=',')
Please find the relevant code below
for(int k=0;k<wordArray[j].length();k++)
{
if(wordArray[j].charAt(k)!=',' )
{
arrayFinal.add(wordArray[j].charAt(k));
}
}
Updated post