Pemrosesan Query dan Pemeringkatan Judul Berita Terkait Gubernur Jawa Barat Menggunakan TF-IDF dan Cosine Similarity

  • Saputra C
  • Wilcent W
  • Irsyad H
  • et al.
N/ACitations
Citations of this article
26Readers
Mendeley users who have this article in their library.

Abstract

Increasing efficiency and relevance in searching for news information is a pressing need in the digital era. This study aims to develop a news title ranking system based on keywords (queries) by combining the Term Frequency-Inverse Document Frequency (TF-IDF) and cosine similarity methods. The data used are 2,507 news titles from four of the most popular news sites in Indonesia, namely Kompas.com, Detik.com, CNNIndonesia.com, and Tempo.com in the last one year. The stages carried out include web scraping, pre-processing (case folding, tokenizing, stopwords removal, and stemming), word weighting using TF-IDF, similarity calculation using cosine similarity, to system performance evaluation with accuracy, precision, recall, and f1-score metrics. The test results on three different queries show that the system is able to provide very good results with an average accuracy of 99.75%, precision 96.67%, recall 100%, and f1-score 98.33%. This study shows that the combination of TF-IDF and cosine similarity is effective in optimizing the search for news titles that are relevant to the entered query.Peningkatan efisiensi dan relevansi dalam pencarian informasi berita menjadi kebutuhan penying di era digital. Penelitian ini bertujuan untuk mengembangkan sistem pemeringkatan judul berita berdasarkan kata kunci (query) dengan menggabungkan metode Term Frequency-Inverse Document Frequency (TF-IDF) dan cosine similarity. Data yang digunakan berupa 2.507 judul berita dari empat situs berita terpopuler di Indonesia, yaitu Kompas.com, Detik.com, CNNIndonesia.com, dan Tempo.com dalam rentang waktu satu tahun terakhir. Tahapan yang dilakukan meliputi web scraping, pre-processing (case folding, tokenizing, stopwords removal, dan stemming), pembobotan kata menggunakan TF-IDF, perhitungan kemiripan menggunakan cosine similarity, hingga evaluasi kinerja sistem dengan metrik akurasi, presisi, recall, dan f1-score. Hasil pengujian terhadap tiga query yang berbeda menunjukkan bahwa sistem mampu memberikan hasil yang sangat baik dengan rata-rata akurasi sebesar 99.75%, presisi 96.67%, recall 100%, dan f1score 98.33%. Penelitian ini menunjukkan bahwa kombinasi TF-IDF dan cosine similarity efektif dalam mengoptimalkan pencarian judul berita yang relevan terhadap query yang dimasukkan.

Cite

CITATION STYLE

APA

Saputra, C., Wilcent, W., Irsyad, H., & Rahman, A. (2025). Pemrosesan Query dan Pemeringkatan Judul Berita Terkait Gubernur Jawa Barat Menggunakan TF-IDF dan Cosine Similarity. Applied Information Technology and Computer Science (AICOMS), 4(1), 25–32. https://doi.org/10.58466/aicoms.v4i1.1799

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free