Text processing, which includes sentiment analysis, obviously demands a lot of resources. The extent to which resources are used to promote environmental conservation is directly impacted by code complexity or computational time. Twitter users' responses on the Indonesian Language of religious moderation and tolerance are used to test the model. The phases of doing the research include determining the research's needs, gathering data, text preprocessing (case folding, tokenizing, stopword removal, and stemming), word weighting with TF/IDF, and classification with Multinomial Naive Bayes (MNB) and Support Vector Machine (SVM), validation, and the last step was calculation of the code complexity and computation time. The validation results showed that the performance of the two models was still low, with an average accuracy of 75.5%. Based on computation time, SVM has a faster computational time than MNB. However, when compared in terms of the code complexity, the Cyclomatic Complexity in both models was the same because both models used existing libraries in Python Interpreter, and the complexity of the libraries cannot be calculated directly. Based on the Raw Metrics, it can be seen that MNB and SVM not significantly different in LOC, LLOC, and SLOC. It was evident that SVM has a greater Halstead Complexity than SVM in all measures when comparing the program code of MNB and SVM. Particularly on programming effort and volume metrics, SVM required more bits to run than an MNB program, and it also required more mental effort to convert a prepared SVM algorithm into a program than an MNB.
Read full abstract