This study analyzes the effectiveness of the cosine similarity and Boyer-Moore algorithms in digital document retrieval within the SIPANDOK system developed for the Bengkalis Regency Health Office. Cosine similarity measures semantic document relevance via TF-IDF vector weighting, while Boyer-Moore performs direct pattern matching through string heuristics. The system was built using the Rapid Application Development (RAD) methodology and evaluated against 56 documents and 55 test queries using precision, recall, F1-score, accuracy, and execution time metrics. Results indicate that Boyer-Moore achieves higher average recall (66.7%) and F1-score (33.3%), demonstrating superiority in retrieving relevant documents, whereas cosine similarity offers faster execution time (average 0.31 seconds) compared to Boyer-Moore (0.91 seconds). Each algorithm presents distinct advantages depending on whether precision-orientation or recall-orientation is prioritized in document retrieval scenarios.
Copyrights © 2026