General elections are an important part of the political process so that many political figures participate in the process. Electability is one of the concerns, various things are done to be able to increase the electability of political figures who participate in general elections. Media has become one of the important tools used to increase electability, one of which is online news media. Reader comments can be used as an assessment of political figures in the form of sentiment analysis. However, it is not easy to analyze sentiments from comments on online news media, because comments contain unstructured text, especially in Indonesian text. Text pre-processing in text mining is an important part of getting the basic information contained in the comments. This research uses Indonesian text pre-processing using the Gata Framework Tetmining. Then proceed with extracting information using the Naïve Bayes classification algorithm and Support Vector Machine which are optimized using Particle Swarm Optimization. Tests carried out with both methods get the results that, Particle Swarm Optimization based on Support Vector Machine is the best method with an accuracy of 78.40% and AUC 0.850. This study found an algorithm that was effective in classifying positive and negative comments related to political figures from online news media.