Categorize text into spam and no spam and calculate the accuracy