Semantic Similarity Analysis of Hadith Matn in Indonesian Ṣaḥīḥ al-Bukhārī Corpus Using IndoBERT and Cosine Similarity - Muhammad Didik Rohmad Wahyudi; Hasan, Noorhaidi; Fatwanto, Agung (International Journal of Informatics and Computation, 2026)
Digital hadith corpora create opportunities for computational analysis of semantic relationships among hadith texts that convey similar meanings through different wording. However, lexical-based similarity methods often fail to identify semantic proximity when hadith matn contain paraphrases, structural variations, or thematic similarities with limited word overlap. This study analyzes semantic similarity in the Indonesian-translated Ṣaḥīḥ al-Bukhārī corpus using IndoBERT and cosine similarity. We apply a quantitative text mining approach that includes data preprocessing, sanad–matn separation, narrator-based subcorpus construction, contextual embedding generation with IndoBERT, pairwise cosine similarity calculation, and similarity score categorization. The analysis focuses on two narrator-based subcorpora: Abu Hurairah (936 matn) and Anas bin Malik (744 matn), resulting in 696,384 comparison pairs. The results show that 68.06% of Abu Hurairah’s matn and 80.65% of Anas bin Malik’s matn belong to the high-similarity category, indicating substantial thematic overlap between the two subcorpora. In contrast, low-similarity matn reveal more distinctive thematic characteristics. These findings demonstrate that IndoBERT effectively captures semantic relationships beyond literal word matching and can support exploratory analysis, thematic mapping, and meaning-based hadith retrieval in digital hadith corpora.