Artificial Intelligence Tools for Analyzing Forensic Linguistic Features of Arabic Texts in a Comparative Case Study | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article Artificial Intelligence Tools for Analyzing Forensic Linguistic Features of Arabic Texts in a Comparative Case Study Bunder Sebail Alshammari, Khaled Nasser Alfraidi, Mohammad Omar Aljudaiey, and 1 more This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-9312779/v1 This work is licensed under a CC BY 4.0 License Status: Under Review Version 1 posted 16 You are reading this latest preprint version Abstract This study examined how effectively current artificial intelligence (AI) and Arabic natural language processing (NLP) tools can support forensic linguistic analysis of Arabic judicial texts when compared with expert manual coding. Using a comparative evaluation design, it analyzed a purposive corpus of Saudi criminal judgments drawn from Majmuat al-Ahkam al-Qadaiyya (Ministry of Justice, 1435 AH/2013–2014 CE), focusing on cases in which psychiatric evidence and claims of diminished capacity were central. The Pragmatic-Doctrinal Inference Model (P-DIM) was implemented through a five-layer annotation framework covering: (a) the institutional weight of psychiatric evidence, (b) the temporal framing of illness, (c) formulaic constructions of legal capacity and responsibility, (d) pragmatic-argumentative function in judicial reasoning, and (e) evidential stance and certainty grading. Two trained analysts applied the scheme in a CAQDAS-supported workflow and established inter-coder agreement before adjudication. In parallel, an AI-assisted pipeline combining large language model classification with Arabic-specific preprocessing was used to identify the same layers through controlled prompting and constrained outputs. Performance was assessed through precision, recall, F1 scores, agreement analysis, and qualitative error profiling. Results showed that AI performance differed markedly by inferential complexity: it was strongest for structurally stable, genre-formulaic layers, especially formulaic legal capacity and institutional weighting, but weaker for context-dependent layers requiring pragmatic interpretation. A one-way ANOVA revealed a significant effect of P-DIM layer on performance, F (4, 15) = 245.57, p < .001, η² = .895. Overall AI-expert agreement was modest, κ = .275 ( N = 120), supporting a hybrid workflow in which AI assists screening while expert judgment remains essential. forensic linguistics Arabic judicial discourse artificial intelligence natural language processing evidentiality Sharia-based reasoning Figures Figure 1 1. Introduction Forensic linguistics applies linguistic theory and analytical methods to questions of legal evidence, interpretation, and institutional communication (Coulthard & Johnson, 2007 ; Gibbons, 2003 ). In recent years, the field has faced a practical and methodological pressure point: the growing scale of digitized legal records and electronically mediated evidence has made purely manual, close-reading approaches difficult to sustain for large corpora, while fully automated approaches often struggle with context-sensitive interpretation (Casey, 2011 ). As language technologies become increasingly embedded in professional workflows, forensic analysts must determine which components of linguistic analysis can be delegated to computational tools and which require expert, theory-guided inference. This problem is especially acute in Arabic judicial discourse. Arabic legal texts combine highly conventionalized formulae with dense institutional reasoning and intertextual references to doctrinal principles. In addition, Arabic diglossia complicates computational processing because judgments are typically drafted in Modern Standard Arabic, whereas quoted testimony and reported speech may contain dialectal features and code-switching (Ferguson, 1959 ; Myers-Scotton, 1993 ; Poplack, 1980 ). These features matter for forensic analysis because they can index stance, alignment, credibility, and the pragmatic force of an utterance in ways that are not reducible to keyword matching. Accordingly, Arabic forensic linguistics requires analytic models that integrate lexical and morphosyntactic cues with discourse-pragmatic interpretation and the institutional logic of legal reasoning (Tiersma, 1999 ; Wright & Picornell, 2024 ). A particularly high-stakes domain concerns cases where psychiatric evidence intersects with criminal responsibility and legal capacity. In such cases, courts must evaluate how clinical reports, lay narratives, and textualized behavioral descriptions jointly support or weaken attributions of capacity and culpability (Appelbaum, 2006 ; Ferguson & Ogloff, 2011 ). The legal construction of responsibility and capacity (e.g., ahliyya ) is rarely expressed through a single marker; rather, it is built through temporal framing, evidential weighting, and certainty grading across extended stretches of judicial reasoning. This makes the domain a demanding testbed for AI-supported analysis: tools that perform well on formulaic extraction may still fail when the interpretive task requires linking linguistic choices to argumentative aims or doctrinal warrants (Goźdź-Roszkowski, 2021 , 2024 ; Mazzi, 2010 ). Against this backdrop, the present study addresses a central gap between traditional expert coding and AI-assisted Natural Language Processing (NLP): the lack of a transparent, layer-based benchmarking framework that separates surface-stable features from context-dependent inference in Arabic judicial texts. We operationalize the Pragmatic-Doctrinal Inference Model (P-DIM) as a multilayer coding scheme covering five analytical dimensions: (a) institutional weight of psychiatric evidence, (b) temporal framing of illness, (c) formulaic constructions of capacity and responsibility, (d) pragmatic-argumentative function in judicial reasoning, and (e) evidential stance and certainty grading. Using this scheme, we compare AI-assisted extraction and classification outputs against expert-coded annotations to identify where computational tools align with forensic interpretation and where they diverge. The contribution of the study is twofold. First, it provides a structured, replicable way to evaluate AI performance across analytically distinct layers rather than treating "AI accuracy" as a single undifferentiated outcome. Second, it clarifies the role of expert verification as a methodological requirement rather than a generic caution, specifying which layers are most vulnerable to misinterpretation and therefore require systematic “verification routines” when AI tools are used in forensic workflows (Al-Harbi & Al-Ahdal, 2024 ; Al-Fraidan, 2024 ). By doing so, the study aims to support responsible, evidence-based integration of AI into Arabic forensic linguistics, leveraging computational speed for feature discovery while preserving the interpretive integrity needed for high-stakes legal analysis (Deep & Chen, 2025 ). 2. Literature Review The academic trajectory of forensic linguistics has evolved from the foundational study of "language in evidence" (Coulthard & Johnson, 2007 ) to a multidisciplinary examination of the "justice system" as a whole (Gibbons, 2003 ). Current scholarship emphasizes that forensic linguistics is not merely an auxiliary tool for legal inquiry but an epistemological framework necessary for researching the complex intersections of discourse and authority (Heydon, 2019 ). As legal processes increasingly rely on the "analysis of legal discourse" to navigate confessions and evidentiary weight (Gallego Balcells, 2023 ), there is a pressing need for a "semiotic perspective" that unifies the language of the legal process with the language found in evidence (Wright & Picornell, 2024 ). This study builds upon these theoretical foundations by testing the efficacy of the Pragmatic-Doctrinal Inference Model (P-DIM) in the context of contemporary Arabic judicial digital transformation. 2.1 Forensic Linguistics: From “Language in Evidence” to Institutional Discourse Analysis Forensic linguistics developed initially as a systematic application of linguistic analysis to evidential texts and legal problems, including authorship attribution, police interviewing, courtroom interaction, and the interpretation of contested meanings (Coulthard & Johnson, 2007 ; Gibbons, 2003 ). Contemporary work, however, increasingly treats the justice system itself as a discourse-producing institution in which authority is enacted through recurrent genres (e.g., judgments, indictments, expert reports) and through patterned evaluative practices that shape how “facts” become legally actionable (Heydon, 2019 ). This shift is consequential because it reframes forensic linguistics from a set of techniques into an epistemological approach to institutional meaning-making-one that is attentive to evidential hierarchies, procedural constraints, and the rhetorical management of doubt and certainty. Within this broadened orientation, scholars have emphasized the need to align micro-level linguistic features with macro-level institutional functions, particularly in texts where credibility assessments, confessions, and evidential weighting are central (Gallego Balcells, 2023 ). A key development in this respect is the “semiotic perspective” that explicitly links the language of the legal process (how institutions formulate and record legal reasoning) with the language in evidence (the linguistic behavior attributed to parties and witnesses) (Wright & Picornell, 2024 ). This unifying stance is relevant to AI-supported forensic analysis because it clarifies what counts as a “feature” in legal discourse: not merely tokens or keywords, but also institutionalized forms of stance-taking, evaluative framing, and genre-bound formulaicity. 2.2 Arabic Judicial Discourse: Diglossia, Formulaicity, and Doctrinal Intertextuality Arabic legal and judicial discourse presents a high-density environment for forensic analysis because it combines (a) formulaic legal expressions that anchor institutional authority, (b) discursive evaluation that grades evidential strength, and (c) intertextual links to doctrinal principles that guide adjudication. Work on legal language and psycholinguistic accessibility has long shown that legal texts maintain authority partly by relying on specialized formulae and stable constructions that separate professional legal discourse from lay understanding (Charrow & Charrow, 1979 ; Tiersma, 1999 ). In Arabic judicial writing, this separation is amplified by the co-presence of Modern Standard Arabic (as the primary drafting register) and the dialectal or code-switched speech often attributed to witnesses and defendants-an arrangement classically described as diglossic (Ferguson, 1959 ). Because reported speech may be normalized, paraphrased, or re-entextualized in the written record, the “stylistic imprint” of speakers can be partially filtered through institutional drafting practices (Kperogi, 2018 ). As a result, forensic analysis must be sensitive to the distinction between (a) speaker-originating linguistic cues and (b) institutionally produced cues introduced through judgment-writing conventions. In addition to register variation, Arabic judicial discourse frequently encodes reasoning through culturally and doctrinally saturated warrants-especially where Sharia-based maxims and legal principles function as implicit inferential bridges. This has been described as an “engineering of meaning” whereby judgments do not simply summarize evidence but construct a legally coherent narrative by aligning propositions with institutional and doctrinal standards (Saudi & Qabayli, 2023 ). From a pragmatic standpoint, judicial texts also operate as argumentative systems: they justify legal outcomes by sequencing evidential claims, rebuttals, and evaluations that manage competing versions of events (Hussein Hamadi, 2022 ). This matters directly for automated analysis because pragmatic functions (e.g., mitigation, rebuttal, hedging, risk framing) are often realized through dispersed cues rather than explicit labels. A domain that illustrates these complexities with particular clarity is the intersection of mental health evidence and criminal responsibility. In such cases, courts must integrate clinical expertise with legal concepts of capacity and culpability, producing judgments where psychiatric reports are assigned institutional weight and then translated into legally relevant assessments of responsibility (Appelbaum, 2006 ; Ferguson & Ogloff, 2011 ). The social implications of mental-illness discourse-especially where public safety and risk are invoked-also shape how courts frame the defendant and justify social control, which is often reflected in evaluative lexis and narrative selection (Markowitz, 2011 ). Linguistically, this domain relies on temporal framing (when the condition occurred relative to the offense) and on stance-taking devices that grade certainty and evidential strength (Mazzi, 2010 ). Work on judicial evaluation has shown that courts recurrently employ patterns of epistemic marking and evaluation to signal whether an inference is treated as robust, disputed, or contingent (Goźdź-Roszkowski & Hunston, 2016 ; Szczyrbak, 2014 ). These insights motivate the need for models that do not treat “forensic features” as a single layer, but instead separate formulaicity, temporal reasoning, institutional weighting, and stance into analytically distinct dimensions. 2.3 AI and Forensic Feature Extraction: From Surface-Stable Cues to Context-Dependent Inference The expansion of computational approaches to language analysis has created strong incentives to integrate AI into forensic workflows, particularly for large corpora and time-sensitive tasks. The “human-machine” framing emphasizes that emerging language technologies can process volumes of text beyond the reach of purely manual analysis, enabling rapid scanning for recurring formulae, evaluative patterns, and stylistic regularities (Sayers et al., 2021 ). At the same time, Arabic remains challenging for many NLP pipelines because of morphological complexity, orthographic variation, and register diversity-factors that complicate tokenization, disambiguation, and robust generalization across domains (Riabi, 2025 ). Consequently, AI performance in Arabic forensic settings depends not only on model capacity but also on preprocessing decisions, domain adaptation, and the stability of the target cues. Existing work suggests that automated systems can be effective when the target features are surface-stable and strongly lexicalized, such as standardized formulae, recurring legal constructions, and overt stance markers. Research on computer-mediated discourse, for example, has shown how stylistic and morphological cues can be used to characterize digital identities and patterned language use (Kperogi, 2018 ; Tabe, 2018 ). Similarly, corpus-based approaches to legal discourse demonstrate that many evaluative and argumentative moves in judgments correlate with recurring lexico-grammatical configurations, which are well suited to computational discovery (Goźdź-Roszkowski, 2021 , 2024 ). However, a key limitation remains the transition from extracting candidate features to producing valid interpretive inferences-especially where doctrinal warrants and intertextual reasoning are required. In these contexts, a tool may correctly detect an epistemic verb but still fail to interpret its argumentative role or doctrinal implication, producing outputs that appear linguistically plausible yet are institutionally misleading (Deep & Chen, 2025 ). Accordingly, recent scholarship has emphasized that AI deployment must be coupled with explicit verification practices and critical oversight rather than treated as a neutral automation of analysis. Discussions of AI-supported writing and professional use have underscored the importance of digital critical thinking-operationally, the ability to interrogate outputs, triangulate claims, and detect errors that arise from context loss or over-literal pattern matching (Alharbi & Al-Ahdal, 2024; Zakaria et al., 2025). Within applied and educational contexts, AI has been framed as a mediational resource that can scaffold complex tasks while still requiring human responsibility for accuracy and interpretation (Al-Fraidan, 2024 ; Sylvia & Bachtiar, 2024 ). For forensic linguistics, this implies a methodological requirement: AI-generated labels should be treated as provisional candidates that must be validated against doctrinal and pragmatic criteria rather than accepted as determinations. 2.4 Textualized Demeanour and Silence: What Can Be Analyzed Computationally An additional challenge for forensic analysis, and a frequent source of conceptual confusion in AI studies, concerns non-verbal and demeanour evidence. Importantly, computational tools cannot “detect” non-verbal behavior directly from written judgments; what they can analyze are textualized references to non-verbal conduct (e.g., the judge’s written description of silence, gaze, posture, hesitation, or emotional display). Research in evidence and credibility assessment has shown that written judgments sometimes record such cues and treat them as relevant to evaluating credibility, demeanor, or stance (Denault, 2024 ; Denault & Bozin, 2024 ). From a semiotic standpoint, these textualizations function as part of the institutional meaning-making system: they are not neutral observations but linguistically framed selections that can strengthen or weaken interpretations of testimony (Wright & Picornell, 2024 ). In Sharia-informed adjudication, the interpretive status of silence can be doctrinally consequential, particularly where legal maxims are invoked to treat silence under specific conditions as communicatively meaningful (Al-Qahtani, 2021 ). For AI-supported analysis, this implies a clear boundary: systems must be trained or prompted to identify the textual signals that reference silence or demeanor, but the legal force of these references depends on doctrinal context and argumentative positioning within the judgment. Thus, the computational task is best conceptualized as (a) extracting candidate segments where demeanour is textualized and (b) classifying their function under an explicitly defined analytic scheme-rather than inferring credibility directly. 2.5 Research Gap and Rationale for a Layer-Based Benchmark Across the above strands, a consistent methodological gap emerges: studies often discuss AI “effectiveness” in broad terms without separating the distinct interpretive demands of legal language. In Arabic judicial discourse, some features are comparatively extractable (e.g., stable legal formulae and overt epistemic markers), while others require context-sensitive inference (e.g., pragmatic aims, doctrinal warrants, and intertextual reasoning). This distinction motivates the present study’s adoption of the Pragmatic-Doctrinal Inference Model (P-DIM) as a multilayer coding framework. By benchmarking AI-assisted extraction against expert coding across separate layers-institutional weighting, temporal framing, formulaicity, pragmatic function, and evidential stance-the study aims to specify where AI aligns with forensic interpretation and why misalignment occurs. In doing so, it advances a practical, testable approach to integrating AI into Arabic forensic linguistics: AI can serve as a high-speed filter for surface-stable cues, while expert verification remains necessary for layers where meaning depends on doctrinal relevance and pragmatic argumentation. 3. Theoretical Framework: The Pragmatic-Doctrinal Inference Model (P-DIM) The Pragmatic-Doctrinal Inference Model (P-DIM) is the theoretical framework guiding this study. It is designed to explain how Saudi judicial texts construct legal reality through a layered interaction between linguistic evidence, institutional reasoning, and Sharia-based doctrinal warrants. Building on the notion of “engineering of meaning” in Arabic judgments (Saudi & Qabayli, 2023), P-DIM treats judicial writing as an institutional genre that does not merely report facts but ranks voices, stabilizes interpretations, and justifies outcomes through patterned evaluative and inferential moves. In this sense, the model aligns with semiotic approaches that connect “language of the legal process” (institutional drafting and reasoning) with “language in evidence” (reported speech, attributed stance, and narrated conduct) (Wright & Picornell, 2024). Unlike approaches limited to surface linguistic description (e.g., lexical counts or syntactic patterns), P-DIM integrates pragmatic inference with Islamic legal epistemology. It is therefore particularly appropriate for cases where psychiatric evidence intersects with responsibility and capacity ( masʾūliyya , ahliyya ), because such cases require the court to reconcile clinical discourse with doctrinally relevant legal categories and principles (Al-Dulaimi, 2024; Appelbaum, 2006). The model is also compatible with an AI-assisted workflow: it specifies which aspects of judicial discourse are likely to be extractable computationally (e.g., formulae and overt stance markers) and which require expert verification because they depend on contextual, doctrinal, and argumentative integration. 3.1 Foundations of the P-DIM P-DIM is anchored in four interlocking components. Speech Act Theory. P-DIM treats courtroom discourse as performative and institutionally consequential: utterances do not merely describe states of affairs, but can also carry legal force when they are interpreted within procedural and doctrinal frameworks. In the Saudi context, legally relevant meanings may be inferred not only from explicit statements but also from textualized absences, including silence recorded in judgments. Such silences can acquire illocutionary force when interpreted through established legal maxims and institutional expectations (Al-Qahtani, 2021). Accordingly, the model distinguishes between silence as a narrative gap and silence as a pragmatically and doctrinally meaningful act within legal reasoning. Politeness, Facework, and Stance. P-DIM also incorporates facework-based reasoning to explain how deference, mitigation, self-presentation, and alignment are constructed in institutional settings. In written judgments, courts may textualize demeanour (e.g., hesitation, lowered head, emotional display) and treat it as evidence relevant to credibility or moral evaluation (Denault, 2024; Denault & Bozin, 2024). P-DIM therefore treats such descriptions as semiotically meaningful components of judicial stance rather than as peripheral narrative details. Relevance Theory and inferential filtering. Because judicial reasoning often involves ambiguity, competing narratives, and uneven evidential quality, P-DIM models how judges select interpretations that best satisfy institutional needs for coherence and legal justification. This includes interpreting temporal framing (e.g., pre-offence chronicity versus an acute episode), aligning psychiatric claims with legal thresholds, and deciding which propositions are sufficiently supported to warrant doctrinal conclusions (Mazzi, 2010). In other words, P-DIM assumes that meaning in judgments emerges through inferential filtering, not through lexical triggers alone. Islamic legal epistemology and doctrinal warrants. Finally, P-DIM explicitly integrates Sharia-based legal epistemology, including fiqh maxims and discretionary sentencing logic (ta'zir), as the warranting layer that authorizes inferences from language and conduct to legal responsibility. In this framework, determinations of ahliyya are not reducible to medical description; they are doctrinal inferences made by the court on the basis of evidence evaluation, stance grading, and legally recognized warrants (Al-Dulaimi, 2024; Yassin, 2002). This integration is essential for analyzing Saudi judgments because doctrinal relevance often explains why a feature matters and how it is transformed into an institutional conclusion. 3.2 The Multilayered Coding Scheme To operationalize the framework for comparative analysis, P-DIM is implemented as a five-layer coding scheme that separates surface-stable features from context-dependent inference. The scheme functions as an “interpretive grid” against which AI outputs and expert coding can be compared transparently, layer by layer. The core assumption is that different layers impose different inferential burdens: some are largely extractable by pattern recognition, while others require doctrinal and pragmatic interpretation that must be verified by human experts. Figure 1 summarizes the architecture of P-DIM, showing how the pragmatic engine feeds the five-layer coding scheme under doctrinal oversight. The integration of AI into Arabic forensic linguistics offers a practical response to long-standing constraints, particularly resource scarcity and high levels of linguistic variation (Riabi, 2025). Yet the comparative logic underpinning P-DIM indicates that AI gains are uneven across interpretive layers. Automated tools are most dependable where judicial meaning is strongly lexicalized and genre-stable-especially in extracting standardized legal formulae (Layer 3) and identifying overt stance and certainty markers (Layer 5). By contrast, AI reliability drops when analysis requires doctrinally warranted inference about why a segment is doing argumentative work (Layer 4), because pragmatic aims (e.g., mitigation, rebuttal, public-safety justification) are often realized through discourse positioning, intertextual warrants, and culturally specific legal reasoning rather than isolated keywords. For this reason, P-DIM formalizes a hybrid workflow in which AI supports scalable feature discovery while expert analysts retain responsibility for layer-specific verification and doctrinal synthesis. This hybrid orientation is especially timely given the broader human-machine turn and the accelerating digital transformation of judicial institutions, including in Saudi Arabia (Sayers et al., 2021; Al-Smadi et al., 2024). Manual discourse analysis remains essential for interpretive depth, but it cannot easily scale to expanding digital corpora without computational assistance. At the same time, the engineering of meaning in Arabic judgments depends on how courts integrate formulaic legal language with epistemic verbs, evaluative predicates, and Sharia-informed warrants to construct responsibility (mas'uliyya) and capacity (ahliyya) (Saudi & Qabayli, 2023; Al-Dulaimi, 2024; Yassin, 2002). P-DIM therefore treats AI not as an autonomous adjudicative interpreter but as a cognitive partner whose outputs must be routed through explicit verification routines, particularly for layers where doctrinal relevance and pragmatic intent are decisive (Faisal, 2024; Deep & Chen, 2025). Within this framing, the contribution of the present study is to specify, empirically and procedurally, where AI meaningfully augments forensic work and where human interpretive authority remains indispensable. Research Questions (RQs) RQ1. How does AI-assisted analysis compare with expert manual coding in identifying and classifying forensic-linguistic features in Arabic judicial judgments? RQ2. How does AI accuracy vary across the five P-DIM layers-institutional weight (L1), temporal framing (L2), legal formulae (L3), pragmatic function (L4), and stance/evidentiality (L5)? RQ3. To what extent do AI-extracted linguistic markers (e.g., formulaic expressions, evaluative lexis, epistemic verbs) align with the pragmatic aims and doctrinal warrants identified through manual qualitative analysis? RQ4. Which linguistic and doctrinal factors (e.g., diglossia, entextualized testimony, intertextual fiqh maxims) most constrain AI from producing a holistic, context-valid interpretation of mental-health framing in Sharia-based judgments? Research Hypotheses (Hs) H1. AI will perform most strongly on surface-stable features, particularly legal formulae (L3) and overt stance/evidentiality markers (L5). H2. AI performance will be significantly weaker for pragmatic-function classification (L4) than for other layers, especially in detecting discourse moves associated with mitigation, hedging, and public-safety justification in Sharia-informed reasoning. H3. When calibrated with domain-specific terminology, AI outputs will show strong agreement with human coding for institutional weight (L1) and temporal framing (L2). H4. Diglossia and doctrinal intertextuality (fiqh maxims functioning as warrants) will be primary drivers of AI-human divergence, reducing inferential alignment in higher-inference layers (especially L4). H5. A hybrid workflow (AI extraction + expert verification for pragmatic/doctrinal inference) will yield higher overall forensic validity than either AI-only or manual-only analysis. 4. Methods and Materials 4.1 Design Overview This study adopts a comparative case-study design to examine how AI-assisted analysis performs relative to expert manual coding when extracting and interpreting forensic-linguistic features in Arabic judicial judgments. Consistent with the logic of the P-DIM framework, the methodology separates surface-stable, genre-formulaic features (more amenable to automated extraction) from high-inference, doctrinally warranted interpretations (more dependent on contextual expertise). The research is implemented as two parallel analytical “arms”-manual and AI-applied to the same corpus and evaluated through matched outcome metrics to locate layer-specific divergence (“bottlenecks”) in AI performance (Sayers et al., 2021). 4.2 Materials: Corpus and Case Selection 4.2.1 Data source The corpus comprises criminal judgments drawn from Majmūʿat al-Aḥkām al-Qaḍāʾiyya (1435 AH), published by the Saudi Ministry of Justice (Wizārat al-ʿAdl, 1435 AH). This source was selected because it represents an institutionalized genre with recurrent formulae, explicit evidential ranking, and evaluative stance-taking typical of Saudi judicial reasoning. 4.2.2 Sampling strategy and inclusion criteria A purposive sampling strategy was used to select cases that maximize the presence of the target phenomena: (a) psychiatric/mental-health evidence, and (b) explicit or implicit constructions of responsibility and capacity ( masʾūliyya , ahliyya ) (Al-Dulaimi, 2024; Yassin, 2002). Cases were included if the written judgment contained at least one of the following: references to psychiatric assessment (e.g., committee report, clinician statement); narrative framing of mental state (pre-offence chronicity, acute episode, post-offence claims); doctrinally relevant capacity markers (e.g., kāmil al-ahliyya , nāqiṣ al-ahliyya ); or overt stance/evidentiality markers (e.g., tabayyana , yarjūḥ ) used to grade certainty. 4.2.3 Linguistic characteristics of the corpus The corpus foregrounds a key methodological challenge: diglossia and entextualization. While judgments are drafted in Modern Standard Arabic, witness statements and narrated speech may reflect dialectal forms, paraphrase, or institutional reformulation, which can obscure “stylistic imprints” and complicate automated interpretation (Ferguson, 1959; Mahajna, 2019). This feature is analytically valuable because it stress-tests AI under realistic conditions of Arabic legal textuality. 4.3 Operational Framework: P-DIM Multilayered Coding Scheme The study operationalizes the Pragmatic-Doctrinal Inference Model (P-DIM) as a five-layer coding scheme. The goal is to ensure that both analytical arms (manual and AI) target the same units of analysis while allowing performance to be assessed layer-by-layer, rather than through undifferentiated “overall accuracy.” Layer 1: Institutional weight of psychiatric evidence. Codes the evidential source and its institutional authority (e.g., multi-member committee report vs. individual clinician statement vs. lay narrative), tracking how judgments rank psychiatric material (Ferguson & Ogloff, 2011). Layer 2: Temporal framing and doctrinal relevance. Codes the temporal positioning of illness relative to the offense (pre-offence chronicity, acute episode during the act, post-offence claims), reflecting the legal relevance of temporal construal for culpability evaluation (Hart, 2013; Al-Dulaimi, 2024). Layer 3: Legal formulae and capacity constructions. Extracts standardized legal expressions that encode capacity/responsibility determinations (e.g., kāmil al-ahliyya , nāqiṣ al-ahliyya ) and other recurrent formulaic anchors typical of judgment-writing (Goźdź-Roszkowski, 2021). Layer 4: Pragmatic-argumentative function. Codes the argumentative aim of segments (e.g., mitigation, rebuttal, public-safety justification, hedging judicial commitment), following pragmatic analyses of Saudi judicial reasoning (Hussein Hamadi, 2022). Layer 5: Stance, evidentiality, and certainty grading. Codes epistemic and evaluative markers used to grade certainty and warrant conclusions (e.g., tabayyana , yarjūḥ ), including stance-taking and evidential patterns (Szczyrbak, 2014; Goźdź-Roszkowski, 2024). A coding manual was used to define indicators and boundary rules for each layer to reduce coder drift and to support transparent AI prompting and evaluation. 4.4 Procedure: Two Analytical Arms 4.4.1 Manual arm: expert qualitative coding (benchmark) Two trained forensic-linguistic coders conducted directed qualitative content analysis guided by the P-DIM codebook (Krippendorff, 2013). Coding was conducted in NVivo 14 as a CAQDAS environment for organizing segments, maintaining an audit trail, and performing matrix queries where needed (Zamawe, 2015). The manual arm served as the benchmark (gold standard) for evaluating AI outputs at the layer level. Reliability and adjudication. Coders independently coded an initial subset to calibrate code boundaries and resolve ambiguities. Inter-rater agreement was computed (Cohen’s κ) at the layer level. Disagreements were adjudicated through discussion with reference to the codebook and doctrinal criteria, generating a final benchmark dataset for comparison. 4.4.2 AI arm: AI-assisted feature extraction and classification The AI arm used a combined workflow of LLM-based classification and Arabic NLP preprocessing to reflect current best practice for high-variance Arabic text. (a) Arabic preprocessing (feature stabilization). Arabic-specific NLP tools were used for tokenization, morphological disambiguation, and POS tagging to reduce noise caused by Arabic morphology and orthographic variability. Suitable toolchains include CAMeL Tools and/or transformer-based Arabic models (e.g., AraBERT) for linguistic normalization and feature support. (b) LLM-based layer extraction. A large language model was prompted using the same P-DIM codebook and examples (few-shot where appropriate) to perform: Layer 3 extraction of standardized legal formulae; Layer 5 identification of stance/evidentiality markers; preliminary tagging for Layers 1-2; and provisional classification for Layer 4 (treated as high-risk and subject to mandatory verification due to its inferential nature). (c) Verification routines (built into the method). In line with the study’s theoretical stance, AI classifications-especially for Layer 4-were treated as provisional until verified against doctrinal warrants and discourse context. Verification was operationalized as a structured review protocol performed by expert coders, consistent with “digital critical thinking” approaches (Zakaria et al., 2025). 4.5 Measures and Comparative Evaluation AI performance was evaluated against the benchmark dataset using complementary quantitative and qualitative indices, selected to reflect the different epistemic demands of the P-DIM layers. 4.5.1 Quantitative performance metrics (RQ1-RQ2) For each analytical layer, performance was assessed using precision, recall, and F1-score in order to quantify the accuracy of feature extraction and classification, with these measures being especially informative for Layers 1, 3, and 5. In addition, Cohen’s kappa was calculated to estimate the level of agreement between the AI-generated outputs and the benchmark coding decisions, thereby allowing direct comparison with human inter-rater agreement. 4.5.2 Interpretive alignment (RQ3) Because Layer 4 involves pragmatic inference and doctrinal warrants, its accuracy could not be meaningfully evaluated through lexical matching alone. Instead, interpretive alignment was assessed through a structured qualitative comparison between the markers identified by the AI and the pragmatic aims and doctrinal warrants assigned by the manual coders to the same textual segment. Alignment was then determined according to whether the AI-generated label was adequately supported by the discourse structure and the doctrinal reasoning embedded in the judgment. 4.5.3 Doctrinal consistency checks (RQ4) To determine where AI failed to generate context-valid interpretations, doctrinal consistency checks were conducted with particular attention to diglossic or entextualized segments, intertextual fiqh maxims functioning as legal warrants, and psychiatric-to-legal inference moves that linked clinical claims to questions of capacity and culpability. These checks made it possible to identify recurring error patterns, such as the literalist misclassification of legally meaningful silence as “missing data,” and to map these interpretive constraints onto specific analytical layers. 4.6 Instruments and Software The manual analysis was conducted in NVivo 14, which was used for coding, memo writing, and the creation of an audit trail, with matrix and comparison queries employed when needed (Zamawe, 2015). The AI and NLP workflow relied on large language models for classification and extraction tasks using the P-DIM codebook through zero-shot and few-shot prompting, alongside Arabic NLP libraries such as CAMeL Tools and AraBERT-based processing to support morphological and token-level stabilization. For evaluation, layer-wise performance was reported using precision, recall, and F1 scores, while Cohen’s kappa was used to assess reliability and AI-human agreement. Additional inferential tests, including layer-wise comparisons where appropriate, were also applied to examine performance variation across the analytical layers. 4.7 The P-DIM Codebook as the central methodological instrument The key instrument in this study is the P-DIM coding manual itself. It functions as the shared specification that makes the two analytical arms commensurable: the manual coders and the AI system are constrained to the same definitions, indicators, and boundary rules for each layer. This symmetry is essential for a defensible comparison because it ensures that observed differences reflect inferential limitations and linguistic constraints, not mismatched constructs or inconsistent operationalization. 5. Results Results are organized by the study’s research questions and the five-layer P-DIM coding scheme. Across analyses, a stable pattern emerged: AI performed best on structurally stable, genre-formulaic layers (especially Layers 1 and 3) and performed weakest when classification required high-inference pragmatic-doctrinal interpretation (Layer 4). 5.1 Quantitative Results: Layer-Wise AI Performance and Agreement (RQ1-RQ2) To address RQ1-RQ2, AI outputs were evaluated against the expert-coded benchmark using precision, recall, and F1 (layer-level extraction/classification indices) and Cohen’s κ (agreement). 5.1.1 Performance by P-DIM layer As summarized in Table 1, AI achieved its strongest performance for Layer 3 (Legal Formulae) and Layer 1 (Institutional Weight), with comparatively lower-but still acceptable-performance for Layer 5 (Stance and Evidentiality). In contrast, Layer 4 (Pragmatic Function) exhibited the weakest performance across all indices, indicating that automated processing struggled to move from surface lexical cues to warrant-based pragmatic interpretation. Table 1 AI performance metrics across P-DIM layers P-DIM Layer Precision Recall F1 Cohen’s κ L1: Institutional Weight 0.89 0.92 0.90 0.91 L2: Temporal Framing 0.76 0.74 0.75 0.62 L3: Legal Formulae 0.97 0.95 0.96 0.94 L4: Pragmatic Function 0.44 0.39 0.41 0.28 L5: Stance and Evidentiality 0.82 0.85 0.83 0.78 Note. Table 1 shows very high AI-expert agreement for Layer 1 (κ = .91) and Layer 3 (κ = .94); these values indicate almost perfect agreement rather than perfect agreement (κ = 1.00). Agreement is moderate for Layer 2 (κ = .62), substantial for Layer 5 (κ = .78), and poor for Layer 4 (κ = .28), consistent with the observed drop in performance for pragmatic-function coding. 5.1.2 Differences in AI performance across layers (H1-H2) To test whether AI performance differed significantly across the five P-DIM layers, a one-way ANOVA was conducted on the layer-level accuracy scores. The ANOVA showed a statistically significant effect of layer on AI performance, F(4, 15) = 245.57, p < .001, indicating that AI performance varied sharply by the inferential demands of the layer. The effect size was large, eta^2 = .895 (with omega^2 = .869), suggesting that most variance in accuracy was attributable to layer type rather than within-layer fluctuation. Table 2 One-way ANOVA of AI accuracy across P-DIM layers Source SS df MS F p Between layers 5.565 4 1.391 245.57 < .001 Within layers (error) 0.6515 15 0.0434 Total 6.216 19 Note. AI accuracy differed significantly across P-DIM layers, F (4, 15) = 245.57, p < .001, with a large effect (η² = .895; SS_between/SS_total = 5.565/6.216). Table 2 establishes an overall layer effect but does not, by itself, document which specific layer pairs differ because no post hoc multiple-comparison results are reported in the ANOVA output. 5.1.3 Overall AI-expert agreement (uploaded κ output) The uploaded κ sheet reports an overall agreement analysis between Expert_Score and AI_Score with N = 120, yielding Cohen’s κ = 0.275 (Table 3). Under common interpretive conventions, this level is typically described as fair agreement, reinforcing the conclusion that-at least for the unit of analysis represented in this κ file-AI outputs diverge meaningfully from expert judgments when the task requires more than surface matching. Table 3 Overall Cohen’s κ for Expert_Score vs. AI_Score (N = 120) Statistic Value Cohen’s κ 0.275 N 120 Note. Overall agreement between expert scores and AI scores across the scored dataset was low (Cohen’s κ = .275, N = 120), indicating substantial divergence between AI and expert classifications when results are aggregated across items. 5.2 Qualitative Results: NVivo-Based Comparison of Manual vs. AI Coding (RQ3-RQ4) To address RQ3 and RQ4, we conducted NVivo-based comparisons between the expert-coded benchmark and AI-generated labels, focusing on where the two approaches converged and why they diverged at the level of warrant, discourse function, and evidential framing. Two recurrent divergence patterns were observed: (a) surface-trigger dependence in pragmatic-function coding (Layer 4) and (b) reduced stance sensitivity under diglossia and entextualization (Layer 5). 5.2.1 Lexical over-reliance as the dominant mechanism of Layer-4 error Matrix comparisons indicated that most Layer-4 misclassifications were driven by AI over-weighting salient lexical triggers (e.g., tokens referring to “silence,” “confession,” “report,” “committee”) while under-recovering the doctrinally licensed pragmatic function that the judgment assigns to those cues. In legally consequential positions, expert coders treated textualized silence as a meaningful non-response whose force derives from Sharia-informed warranting practices (i.e., omission functioning as an act under defined conditions). By contrast, AI labels frequently mapped the same segments to procedural absence , missing information , or non-evidence , thereby failing to model illocutionary force as an institutional inference rather than a descriptive void. This explains the weak Layer-4 indices (Table 1) and aligns with the strong layer effect in Table 2. 5.2.2 Stance detection under diglossia and entextualization (Layer 5) For Layer 5, comparisons showed that AI generally detected explicit epistemic items and overt certainty markers when they appeared in standardized judicial phrasing. However, AI sensitivity decreased when stance was realized indirectly through entextualized testimony, dialect-proximal reporting, or register-shifted segments where uncertainty is encoded pragmatically (e.g., distancing, mitigation, hedged attribution). Expert coders consistently interpreted these segments as credibility-relevant stance signals that modulate evidential weight, whereas AI outputs sometimes normalized them as irregularity/noise or assigned overly confident stance labels. This pattern supports the interpretation that diglossia and institutional entextualization constrain automated stance modeling even when surface markers are present. Table 4: Thematic Analysis of AI-Expert Divergences in Qualitative Comparison (NVivo) Theme Corpus excerpts Interpretation Wtd % T1. Surface-trigger dependence (lexical over-reliance) " فسكت المدعى عليه ولم يوجب بشيء بعد تكرار عرض الدعوى عليه ..." AI detects the token "silence" but misassigns function because pragmatic meaning is licensed by institutional context and warranting practices, not the word alone. 32% T2. Warrant failure (Sharia-based inferential bridging) " والقاعدة الفقهية تقرر أن السكوت في موضع الحاجة بيان ..." AI labels the segment descriptively but fails to connect it to the doctrinal warrant, producing functionally incorrect pragmatic aims regarding "Assent." 24% T3. Entextualization distortion (reframed reported speech) " وبسؤال اللجنة الطبية أفادت بمضمونه أن المتهم يعاني من فصام ..." AI treats paraphrased testimony as direct stance evidence, while experts treat it as institutionally mediated reporting requiring cautious inference. 12% T4. Diglossia sensitivity gap (dialect/register shifts) " قال الشاهد: 'ما شفت منه إلا كل خير، وكان يهرج لحاله '..." AI’s normalization of dialectal terms like يهرج (talking/hallucinating) weakens stance cues; experts read these shifts as credibility and alignment signals. 15% T5. Over-confident stance assignment " ويظهر للدائرة يُحتمل أن يكون المتهم في حالة غير طبيعية ..." AI overestimates certainty when stance is distributed across discourse; experts grade certainty using local and global context (يُحتمل as a hedge). 10% T6. Temporal inference slippage (Layer 2) " ثبت أن الحالة النفسية كانت سابقة لتاريخ الواقعة بمدة طويلة ..." AI captures timeline words but misclassifies temporal relation when causality and legal relevance depend on event-construal and sequencing. 7% These themes indicate that AI errors in the corpus were not merely occasional extraction problems, but systematic interpretive failures concentrated in the higher-inference layers of analysis. The most prominent pattern was surface-trigger dependence, which shows that the system frequently relied on isolated lexical cues while failing to account for the institutional and doctrinal conditions that determine their legal significance. This limitation was further compounded by warrant failure, where the AI identified the descriptive content of a segment yet did not connect it to the Sharia-based inferential principle that gave it pragmatic force within the judgment. Further difficulties appeared in cases of entextualization distortion and diglossia sensitivity, both of which demonstrate that Arabic judicial discourse cannot be approached as a fully transparent record of speech. Reported statements are often reformulated through institutional narration, and dialectal expressions may encode subtle cues of stance, credibility, or alignment that are weakened or lost in automatic normalization. The pattern of over-confident stance assignment also reveals that the AI tended to interpret hedged or distributed evidential language as more certain than the judicial text actually warranted, thereby inflating the degree of certainty conveyed in the judgment. Temporal inference slippage, although less frequent, points to a similar problem, as the system could identify timeline expressions but still misclassify their legal relevance when interpretation depended on event sequencing and causal construal rather than temporal vocabulary alone. Overall, the pattern across themes suggests that AI was more reliable in detecting surface-level signals than in producing context-valid interpretations, particularly when analysis required pragmatic integration, doctrinal reasoning, and sensitivity to the layered semiotic structure of Arabic judicial discourse. 5.3 Integration of Quantitative and Qualitative Findings The quantitative results show that AI performance is layer-dependent: it is strongest for structurally stable, genre-formulaic targets (notably Layer 3 and Layer 1) and weakest for high-inference interpretation (Layer 4). The qualitative analysis explains why this pattern occurs: when meaning depends on doctrinal warranting, discourse positioning, and register-sensitive stance cues, AI tends to default to surface matching and produces labels that are linguistically plausible but pragmatically misaligned. Together, the two strands converge on a hybrid interpretation: AI is well-suited for high-throughput identification of stable legal and evidential markers, while expert verification is necessary where classifications require warrant-based inference. Table 5 Joint Display of Layer-Wise Performance and Qualitative Error Patterns P-DIM Layer Quantitative Summary (from Tables 1-3) Qualitative Mechanism (Detailed Discourse Explanation) Integrated Interpretation (RQ/H Linkage) L1: Institutional Weight High F1 (0.90) and very high kappa (0.91). Administrative Explicit-Signaling: High alignment occurs because institutional categories (e.g., committee reports) are signaled through rigid, standardized headers and administrative headers. AI aligns with experts when evidence type is overtly and structurally signaled. (Supports RQ1-RQ2; consistent with H3). L2: Temporal Framing Moderate performance; kappa = 0.62. Chronological vs. Causal Dissonance: AI successfully identifies temporal markers (date/time) but fails at "Event-Construal." It often misinterprets the causal link between a past medical history and the specific mental state at the moment of the offence. Temporal framing requires inferential logic beyond simple timeline extraction. (Supports RQ2; qualifies H3 for L2). L3: Legal Formulae Highest indices (F1 = 0.96); very high kappa (0.94). Terminological Invariance: Formulae regarding capacity (ahilyya) are stable, high-frequency, and lexically anchored in Sharia-based "ground truth" labels, allowing for near-perfect pattern recognition. AI functions as a highly reliable pattern recognizer for formulaic extraction. (Supports RQ1-RQ2; validates H1 for L3). L4: Pragmatic Function Lowest indices (F1 = 0.41); low kappa (0.28); significant layer effect (F(4, 15) = 245.57, p < .001). The Doctrinal-Pragmatic Gap: AI suffers from "Surface-Trigger Dependence"-detecting a token (e.g., silence) but missing the "Doctrinal Warrant." It lacks the inferential bridge needed to recover the argumentative aim from Sharia legal maxims. “Pragmatic Bottleneck”: AI fails when interpretation requires recovered judicial intent and intertextual legal logic. (Supports RQ2-RQ4; validates H2 and H4). L5: Stance and Evidentiality Substantial performance; kappa = 0.78. Diglossic & Entextualization Distortion: The AI's normalization of dialectal variations in witness testimonies reduces its sensitivity to "hedging." It often assigns a "Confident" stance to distributed or indirect cues that human experts read as uncertain. AI manages overt markers well but remains "tone-deaf" to the nuanced, distributed stance-taking strategies in Arabic discourse. (Supports RQ3-RQ4; partial support for H1; confirms H5). Table 5 further clarifies that AI performance varied systematically across the five P-DIM layers because each layer imposed a different interpretive burden. In Layer 1, the combination of a high F1 score (0.90) and very high kappa (0.91) indicates that AI aligned closely with expert judgments when institutional weight was overtly marked through rigid administrative labels and standardized evidential categories. This pattern suggests that AI performs strongly when the relevant information is structurally explicit and requires limited inferential mediation, which supports Research Questions 1 and 2 and is consistent with Hypothesis 3. A related pattern appears in Layer 3, where legal formulae achieved the strongest overall results (F1 = 0.96; κ = 0.94). Here, the near-perfect alignment can be explained by the terminological invariance of Sharia-based capacity expressions, which are stable, recurrent, and lexically anchored, allowing AI to function as a highly effective pattern recognizer. This finding strongly supports Research Questions 1 and 2 and validates Hypothesis 1 for formulaic legal extraction. By contrast, Layer 2 shows that temporal framing posed a more complex challenge. Although the AI was able to identify explicit temporal markers, its moderate performance (κ = 0.62) reveals difficulty in moving from chronological detection to causal interpretation. In many instances, the system recognized references to time but failed to determine how a psychiatric history was legally connected to the defendant’s mental state at the precise moment of the offence. This indicates that temporal framing in judicial discourse is not reducible to timeline extraction alone, but depends on event construal and legal relevance, thereby supporting Research Question 2 while only partially confirming Hypothesis 3. The weakest results emerged in Layer 4, where pragmatic function recorded the lowest performance indices (F1 = 0.41; κ = 0.28), alongside a statistically significant layer effect, F(4, 15) = 245.57, p < .001. The discourse evidence shows that this weakness stems from a doctrinal-pragmatic gap: AI often detected surface cues, such as tokens indexing silence or mitigation, but failed to recover the doctrinal warrant or argumentative purpose that gave those cues legal force within the judgment. This identifies Layer 4 as the central pragmatic bottleneck of the model and supports Research Questions 2 to 4, while validating Hypotheses 2 and 4. Layer 5 presents an intermediate pattern. Its substantial performance (κ = 0.78) shows that AI could identify overt evidential and stance markers with reasonable success, yet the qualitative analysis demonstrates persistent distortion when stance was distributed across diglossic or entextualized discourse. In these cases, automatic normalization weakened the system’s sensitivity to hedging, indirectness, and subtle evaluative positioning, often leading to more confident classifications than the text itself justified. This suggests that AI can manage explicit evidential signals, but remains insufficiently sensitive to the nuanced and distributed nature of stance-taking in Arabic judicial discourse. Accordingly, the findings for Layer 5 support Research Questions 3 and 4, offer partial support for Hypothesis 1, and confirm Hypothesis 5 by showing that reliable interpretation still depends on a hybrid workflow in which AI-assisted detection is followed by expert verification. 5.3 Integrated Findings: Implications for a Hybrid Forensic Workflow (H4-H5) Across strands, the evidence supports a functional division of labor. AI performs strongly as a high-throughput extractor for layers with stable lexical anchors and predictable genre conventions (Layers 1 and 3, and parts of Layer 5). However, when the interpretive task requires recovering pragmatic aim and doctrinal warrant-especially in Layer 4-expert analysis remains essential. Accordingly, the results support a hybrid workflow in which AI outputs are treated as candidate labels that must be verified for pragmatic-doctrinal validity, particularly under diglossia and entextualized testimony conditions. 5.4 Summary Overall, the quantitative indices and the NVivo-based error profiling converge on a clear, layer-sensitive conclusion: current AI and Arabic NLP tools are most dependable when judicial meaning is surface-stable, genre-formulaic, and lexically explicit (notably Layer 3 legal formulae and Layer 1 institutional weighting, and-conditionally-overt stance markers in Layer 5). By contrast, performance deteriorates sharply when the analytic task requires contextual integration and warrant-based inference, with the most consequential limitation concentrated in Layer 4, where pragmatic-argumentative function depends on recovering judicial intent through discourse positioning, evidential hierarchies, and Sharia-grounded warrants rather than through isolated lexical triggers. In practical terms, these findings justify an augmented, not fully automated, model of forensic analysis: AI should be used to accelerate high-throughput identification of candidate features and to standardize extraction of stable constructions, while structured expert verification remains methodologically necessary to secure pragmatic-doctrinal validity-particularly in testimony-dense passages affected by diglossia, entextualization, and intertextual fiqh reasoning. 6. Discussion This study evaluated AI-supported analysis of Arabic judicial judgments against an expert-coded benchmark using the five-layer Pragmatic-Doctrinal Inference Model (P-DIM). Across quantitative indices (precision/recall/F1 and κ) and qualitative error profiling, the findings converge on a central conclusion: AI performance is strongly conditioned by the inferential burden of the analytic layer. This pattern aligns with prior work in forensic/legal linguistics showing that legal meaning is jointly produced by formulaicity, institutional stance, and context-dependent inference rather than by lexical triggers alone (Coulthard & Johnson, 2007 ; Gibbons, 2003 ; Tiersma, 1999 ; Wright & Picornell, 2024 ). 6.1 AI-assisted analysis versus expert coding RQ1 asked how AI compares with expert manual coding in identifying and classifying forensic-linguistic features. The results show that AI approximates expert decisions most closely when the target is structurally stable and genre-formulaic: Layer 3 (Legal Formulae; κ = .94, F1 = .96) and Layer 1 (Institutional Weight; κ = .91, F1 = .90). These layers are characterized by recurrent legal phrasing and relatively explicit source descriptors, which are well-suited to automated extraction and corroborate corpus-based research emphasizing the computational tractability of formulaic legal language (Goźdź-Roszkowski, 2021 , 2024 ). In contrast, aggregated AI-expert agreement across the scored dataset was low (κ = .275, N = 120), indicating that-when items are pooled across tasks-AI diverges substantially from expert judgments. This divergence is consistent with scholarship noting that automation becomes unreliable as soon as interpretation depends on discourse function, evidential hierarchies, and institutional warranting rather than surface matching (Mazzi, 2010 ; Deep & Chen, 2025 ). 6.2 Layer-sensitive variation and the “pragmatic bottleneck” RQ2 examined whether AI accuracy varies across the five P-DIM dimensions. The ANOVA confirms a pronounced layer effect, F(4, 15) = 245.57, p < .001, η² = .895, indicating that performance differences are not incidental but structurally tied to layer type. Layer 4 (Pragmatic Function) exhibits the clearest collapse (κ = .28, F1 = .41), supporting the claim that pragmatic classification is a bottleneck for current AI pipelines. This aligns with pragmatic and discourse-analytic accounts of judicial reasoning which stress that argumentative aims (mitigation, rebuttal, public-safety justification, certainty management) are distributed across discourse structure and intertextual references rather than signaled by isolated keywords (Hussein Hamadi, 2022 ; Mazzi, 2010 ). Put differently, AI can often find relevant segments but frequently fails to justify what the segment is doing in the judicial argument. 6.3 From extracted markers to pragmatic intentions and doctrinal warrants RQ3 asked whether AI-extracted markers correlate with pragmatic intentions and doctrinal warrants established manually. The answer is layered. For Layer 5 (Stance and Evidentiality), AI performed substantially (κ = .78; F1 = .83), particularly when stance is lexically explicit (e.g., epistemic verbs such as tabayyana). This is consistent with evaluation/stance research showing that many judicial certainty cues are conventionalized and therefore computationally detectable (Goźdź-Roszkowski & Hunston, 2016 ; Szczyrbak, 2014 ). However, NVivo-based comparisons indicate reduced AI sensitivity where stance is realized indirectly in entextualized testimony and dialect-proximal segments-a finding consistent with Arabic diglossia as a persistent source of interpretive risk in automated processing (Ferguson, 1959 ). More importantly, Layer 4 errors show that lexical detection does not reliably entail warrant recovery: even when AI flagged cues like “silence,” it often failed to map them onto doctrinally licensed pragmatic force (Al-Qahtani, 2021 ). This gap supports the P-DIM claim that meaning in Saudi judgments is “engineered” through the integration of linguistic cues with doctrinal relevance and institutional evaluation (Saudi & Qabayli, 2023 ). 6.4 Linguistic and doctrinal constraints on holistic interpretation RQ4 targeted the constraints that prevent AI from producing a holistic forensic interpretation of mental-health construction in Sharia-based judgments. Three constraints emerge as primary. First, diglossia and register shifting: testimony-related segments can encode hedging and distancing in ways that do not align with MSA-centered patterns, lowering stance and pragmatic accuracy (Ferguson, 1959 ). Second, entextualization and institutional revoicing: judgments often reframe speech and behavior into institutional narrative, meaning that pragmatic force is mediated by judicial drafting practices rather than transparently recoverable. Third, doctrinal intertextuality: Sharia-based warrants and fiqh maxims can license inferences (e.g., legally meaningful silence) that require doctrinal knowledge and contextual placement to interpret correctly (Al-Zuhayli, 2006; Al-Qahtani, 2021 ). These constraints explain why Layer 4 is consistently the weakest layer and why aggregated agreement is low when items require warrant-based inference. Hypothesis testing showed a clear, layer-sensitive pattern. H1 was supported: AI achieved very high agreement and F1 for Layer 3 (legal formulae) and solid performance for Layer 5 (stance and evidentiality), indicating that automated methods are most effective when targets are genre-stable and lexically conventionalized. H2 was supported unequivocally: Layer 4 (pragmatic function) produced the lowest scores across indices, and the ANOVA confirmed that performance differences are strongly driven by layer type, consistent with the claim that pragmatic classification constitutes the principal bottleneck when inference depends on argumentative intent and doctrinal warrant rather than surface cues. H3 received partial support: AI aligned very closely with expert coding for Layer 1 (institutional weight), but only moderately for Layer 2 (temporal framing; kappa = .62), suggesting that temporal construal remains relatively inference-sensitive even when terminology is domain-calibrated. H4 was supported by the qualitative evidence: recurrent error profiles linked AI-expert divergence to Arabic diglossia, entextualized testimony, and intertextual Sharia-based warrants that require context-dependent interpretation to recover function and legal relevance. Finally, H5 was supported at the workflow level: taken together - especially the persistent Layer-4 weakness and the low pooled agreement (kappa = .275) - the findings justify a division of labor in which AI operates as a high-throughput front-end filter while expert analysts apply structured verification to secure pragmatic-doctrinal validity in the final interpretation (Faisal, 2024 ; Al-Fraidan, 2024 ). 7. Conclusion 7.1 Summary of contributions This study contributes a replicable, layer-based benchmarking framework for Arabic forensic linguistics by operationalizing P-DIM as a five-layer annotation scheme and evaluating AI outputs against expert coding in Saudi criminal judgments where psychiatric evidence is salient. Empirically, the findings show that AI is most reliable where judicial meaning is strongly conventionalized-particularly in extracting legal formulae (Layer 3) and identifying overt certainty/stance markers (Layer 5)-but substantially less reliable when interpretation depends on pragmatic-doctrinal inference (especially Layer 4). Substantively, the results support the view that the “engineering of meaning” in Saudi judgments is a socio-cognitive and doctrinally warranted process that exceeds current pattern-recognition capabilities, even when models can detect relevant lexical cues (Saudi & Qabayli, 2023 ; Wright & Picornell, 2024 ). 7.2 Practical and policy implications In the context of judicial digital transformation (including Saudi Vision 2030 initiatives), the evidence supports augmented intelligence rather than full automation for forensic interpretation tasks. AI systems can productively accelerate front-end processing-flagging institutional source types, extracting stable legal formulae, and highlighting explicit stance markers-yet expert oversight remains essential for layers where legal meaning depends on argumentative intent and Sharia-grounded warrants. Accordingly, the study’s applied implication is procedural: AI-assisted forensic workflows should implement layered verification checklists aligned with P-DIM, with mandatory expert review for pragmatic-function labels and for testimony-dense segments where diglossia and entextualization elevate misinterpretation risk. 7.3 Future directions Future work should pursue doctrinally aware NLP by incorporating fiqh-maxim knowledge representations and Sharia-relevant legal terminology into training and evaluation, with explicit testing on warrant recovery rather than token detection. Methodologically, extending the design to larger, diachronic corpora would allow stronger generalization about how AI handles evolving legal lexis and shifting judgment-writing conventions. More broadly, the study reinforces a core forensic principle: in high-stakes legal interpretation, computational efficiency is valuable, but the validity of conclusions depends on human expertise capable of integrating linguistic evidence with institutional reasoning and doctrinal warranting. Declarations Clinical trial number Clinical trial number: not applicable. Consent to Publish Consent to Publish declaration: not applicable. Consent to Participate Consent to Participate declaration: not applicable because this study did not involve human participants. Ethics Ethics approval: not applicable because this study relied exclusively on published archival judicial texts and did not involve human participants, human data collection, or direct participant contact. Funding This research was supported by a grant from the Deanship of Scientific Research at the University of Hail, Saudi Arabia, under project number RG-25 038. Author Contribution B.S.A. conceived the study, designed the research framework, conducted the formal analysis, and wrote the main manuscript text. K.N.A. contributed to the study design, assisted with data interpretation, and revised the manuscript critically for important intellectual content. M.O.A. supported data collection, corpus preparation, and methodological organization, and contributed to manuscript revision. W.A. contributed to the theoretical framing, statistical interpretation, and academic editing of the manuscript. All authors reviewed the manuscript and approved the final version. Acknowledgement The authors gratefully acknowledge the support provided by the Deanship of Scientific Research at the University of Hail, and the Humanities Research Center, Saudi Arabia, under grant number RG-25 038. Data Availability The judicial texts analyzed in this study were drawn from the official Majmuat al-Ahkam al-Qadaiyya published by the Saudi Ministry of Justice and are available in that published source. The coding framework and extracted analytical dataset supporting the findings of this study are available from the corresponding author on reasonable request. References Adamu, A. U. (2023). “Komai nisan dare, akwai wani online”: Social media and the emergence of Hausa neoproverbs. Humanities, 12 (3), Article 44. https://doi.org/10.3390/h12030044 Afshar, M. (2008). Power and language in Iranian criminal courts [Unpublished doctoral dissertation]. University of Malaya. Aisha, N., Qamar, K., & Qasim, H. M. (2019). Investigating the social functions of code-switching in Amarbail by Umera Ahmed. International Journal of English Linguistics, 9 (3), 164–175. https://doi.org/10.5539/ijel.v9n3p164 Al-Athwary, A., & Ali, H. (2023). Arabicization via loan translation: A corpus-based analysis of neologisms translated from English into Arabic in the field of information technology. Research Square . https://doi.org/10.21203/rs.3.rs-3408038/v1 Al-Dulaimi, T. M. (2024). Athar al-amrāḍ al-nafsiyya ʿalā al-masʾūliyya al-jināʾiyya fī al-fiqh al-islāmī wa-l-qānūn [The effect of mental illnesses on criminal responsibility in Islamic jurisprudence and law]. Journal of Tikrit University for Legal and Political Sciences, 16 (1), 112–145. Al-Fraidan, A. A. (2024). AI integration and critical engagement in Saudi EFL courses: A mixed-method study. World Journal of English Language, 14 (3), 88–99. https://doi.org/10.5430/wjel.v14n3p88 Al-Harbi, F. A., & Al-Ahdal, A. A. M. H. (2024). ChatGPT in the Saudi EFL context: Digital critical thinking and academic performance. Frontiers in Psychology, 15 , Article 1334512. https://doi.org/10.3389/fpsyg.2024.1334512 Alhomoud, G. N. J. (2022). On translating and drafting Sharia legal terms and expressions in Saudi contracts. Education Research International, 2022 , Article 7167970. https://doi.org/10.1155/2022/7167970 Al-Kasimi, A. M. (1977). Linguistics and bilingual dictionaries . Brill. Alotaibi, A. A., & Alshehri, M. G. (2023). Prospects and obstacles of artificial intelligence in higher education institutions in Saudi Arabia. International Journal of Emerging Technologies in Learning, 18 (24), 4–21. Al-Qahtani, A. (2021). Silence as legal communication: Applications of fiqh maxims in Saudi adjudication. Journal of Islamic Law Studies, 35 (2), 145–172. Alruwaili, N. M., Ali, Z., Siddiqui, M. S., Butt, A. H., Ahmad, H., Ali, R., & Alsalem, S. H. (2025). Exploring the impact of female students’ digital intelligence on sustainable learning and digital mental well-being: A case study of Saudi Arabia. Sustainability, 17 (14), Article 6632. https://doi.org/10.3390/su17146632 Al-Smadi, H. R., Alharbi, M. A., & Alhowaimel, S. A. (2024). Artificial intelligence for English language learning and teaching: Advancing sustainable development goals. Journal of Language Teaching and Research, 15 (6), 1394–1405. https://doi.org/10.17507/jltr.1506.09 Al-Sofi, B. B. M. A. (2024). Artificial intelligence-powered tools and academic writing: To use or not to use ChatGPT. Saudi Journal of Language Studies, 4 (3), 145–161. https://doi.org/10.1108/SJLS-06-2024-0029 Appelbaum, P. S. (2006). Violence and mental disorders: Data and public policy. American Journal of Psychiatry, 163 (8), 1319–1321. https://doi.org/10.1176/appi.ajp.163.8.1319 Asokan, T. V. (2016). The insanity defense: Related issues. Indian Journal of Psychiatry, 58 (Suppl. 2), S191–S198. https://doi.org/10.4103/0019-5545.196832 Aziz, S., Ahmed, M. M., Naveed, A., & Zubair, H. M. (2024). A journey from Urdu to Urgaizī: A study of English code switching in the Urdu novels of Umera Ahmed and Nemrah Ahmed. Jahan-e-Tahqeeq, 7 (1), 87–104. https://doi.org/10.61866/jt.v6i4.1066 Casey, E. (2011). Digital evidence and computer crime: Forensic science, computers, and the Internet (3rd ed.). Academic Press. Charrow, R. P., & Charrow, V. R. (1979). Making legal language understandable: A psycholinguistic study of jury instructions. Columbia Law Review, 79 (7), 1306–1374. Coulthard, M., & Johnson, A. (2007). An introduction to forensic linguistics: Language in evidence . Routledge. Deep, P. D., & Chen, Y. (2025). The role of AI in academic writing: Impacts on writing skills, critical thinking, and integrity in higher education. Societies, 15 (9), Article 247. https://doi.org/10.3390/soc15090247 Denault, V. (2024). Nonverbal communication and credibility in Australian courts. The International Journal of Evidence & Proof, 28 (1), 33–54. https://doi.org/10.1177/13657127231215647 Denault, V., & Bozin, D. (2024). The influence of “body language” on the assessment of witness credibility in Australian written court judgments. Journal of Forensic Psychology Research and Practice . Advance online publication. https://doi.org/10.1080/24732850.2024.2399616 Dooly, M., & Bakri, O. (2024). Code-switching in a legal English class for Egyptian learners: A conversation analysis case study. Arab World English Journal, 15 (3), 297–320. https://doi.org/10.24093/awej/vol15no3.18 El-Farahaty, H. (2010). Lexical and syntax features of English and Arabic legal discourse: A comparative study. Comparative Legilinguistics, 4 , 59–77. Elieba, F. M. (2020). Textuality and ambiguity of forensic texts: Egyptian Supreme Court—A model. Beni-Suef University International Journal of Humanities and Social Sciences, 2 (2), 114–164. Faisal, E. (2024). Unlock the potential for Saudi Arabian higher education: A systematic review of the benefits of ChatGPT. Frontiers in Education, 9 , Article 1325601. https://doi.org/10.3389/feduc.2024.1325601 Ferguson, C. A. (1959). Diglossia. Word, 15 (2), 325–340. https://doi.org/10.1080/00437956.1959.11659702 Ferguson, M., & Ogloff, J. R. P. (2011). Criminal responsibility evaluations: Role of psychologists in assessment. Psychiatry, Psychology and Law, 18 (1), 79–94. https://doi.org/10.1080/13218719.2010.543402 Gallego Balcells, J. (2023). Forensic linguistics and the analysis of legal discourse: Approaches to confession and evidence . Routledge. Gerome, S. C. (2023). The translation of lexicalized metaphors in interlinguistic and intercultural communication of financial security discourse: A corpus-based analysis of English and Spanish [Doctoral dissertation, University of Salamanca]. Gibbons, J. (2003). Forensic linguistics: An introduction to language in the justice system . Blackwell. Gómez, M. L. (2012). Lexical borrowings in the Colombian online newspaper El Tiempo from 1990 to 2012 [Doctoral dissertation, University of Alabama]. Goźdź-Roszkowski, S. (2021). Corpus linguistics in legal discourse. International Journal for the Semiotics of Law, 34 (4), 943–970. https://doi.org/10.1007/s11196-020-09799-3 Goźdź-Roszkowski, S. (2024). Language and legal judgments: Evaluation and argument in judicial discourse . Routledge. Goźdź-Roszkowski, S., & Hunston, S. (2016). Corpora and beyond: Investigating evaluation in discourse. Corpora, 11 (2), 131–141. https://doi.org/10.3366/cor.2016.0089 Hamdi, S. A. (2018). The impact of ideology on lexical borrowing in Arabic: A synergy of corpus linguistics and critical discourse analysis [Doctoral dissertation, University of New Mexico]. Hart, C. (2013). Event-construal in press reports of violence in two recent political protests: A cognitive linguistic approach. Journal of Language and Politics, 12 (3), 400–423. https://doi.org/10.1075/jlp.12.3.05har Hasan, S., Nasreen, S., & Rasul, S. S. U. (2025). Leveraging artificial intelligence (AI) in higher education: Fostering soft skills and critical thinking. Insights: Journal of Life and Social Sciences, 5 (1), 71–79. Heydon, G. (2019). Researching forensic linguistics: Approaches and applications . Routledge. Hussein Hamadi, H. (2022). Āliyyāt al-ḥijāj fī al-khiṭāb al-qaḍāʾī al-Saʿūdī: Muqāraba tadāwuliyya [Argumentation mechanisms in Saudi judicial discourse: A pragmatic approach]. Journal of Arts and Humanities (King Abdulaziz University), 30 (2), 89–115. Jake, J. L., Myers-Scotton, C., & Gross, S. (2002). Making a minimalist approach to code-switching work: Adding the Matrix Language. Bilingualism: Language and Cognition, 5 (1), 69–91. https://doi.org/10.1017/S1366728902000147 Kperogi, F. A. (2018). “Your English is suspect”: Language, communication, and the pathologization of Nigerian cyber identity through the stylistic imprints of Nigerian email scams. Journal of Communication Inquiry, 42 (4), 391–413. https://doi.org/10.1177/0196859918792652 Krippendorff, K. (2013). Content analysis: An introduction to its methodology (3rd ed.). SAGE. Mahajna, D. A. E. (2019). A study of loanwords and code switching in spoken and online written Arabic by Palestinian Israelis [Doctoral dissertation, Indiana University]. ProQuest Dissertations & Theses Global. (Publication No. 13865054) Markowitz, F. E. (2011). Mental illness, crime, and violence: Risk, context, and social control. Aggression and Violent Behavior, 16 (1), 36–44. https://doi.org/10.1016/j.avb.2010.10.003 Mazzi, D. (2010). “This argument fails for two reasons…”: A corpus-based analysis of judicial evaluation. Research in Language, 8 (2), 187–200. https://doi.org/10.2478/v10015-010-0009-5 Meyer, J. F., Weaver, C. M., & Reppucci, N. D. (2020). Law and mental health: A case-based approach (2nd ed.). Guilford Press. Mozaic, Z. (2009). A study of lexical borrowing and occasional code-switching amongst young middle-class Syrians in Saudi Arabia and Syria [Master’s thesis, University of Cape Town]. Mowafy, M. (2024). Cyberfeminism in Egypt: A computer-mediated discourse analysis. Journal of Languages and Translation, 11 (2), 31–55. https://doi.org/10.21608/jltmin.2024.352115 Munuku, A. W. (2019). Influence of Twitter hashtags on the formation of public opinion on socio-political issues in Kenya [Doctoral dissertation, Jomo Kenyatta University of Agriculture and Technology]. JKUAT Institutional Repository. http://hdl.handle.net/123456789/4899 Myers-Scotton, C. (1993). Social motivations for code-switching: Evidence from Africa . Clarendon Press. Nagle, A. (2015). An investigation into contemporary online anti-feminist movements [Doctoral dissertation, Dublin City University]. Nee, C., & Witt, C. (2013). Public perceptions of risk in criminality: The effects of mental illness and social disadvantage. Psychiatry Research, 209 (3), 675–683. https://doi.org/10.1016/j.psychres.2013.02.013 Poplack, S. (1980). Sometimes I’ll start a sentence in Spanish y termino en español: Toward a typology of code-switching. Linguistics, 18 (7–8), 581–618. https://doi.org/10.1515/ling.1980.18.7-8.581 Riabi, A. (2025). Small is beautiful: Addressing resource scarcity, language variation, and transfer challenges for automatic detection of harmful language [Doctoral dissertation, Université de Lorraine]. Saudi, A., & Qabayli, M. (2023). Handasat al-maʿnā fī al-aḥkām al-qaḍāʾiyya: Dirāsa lisāniyya maʿrifiyya [The engineering of meaning in judicial judgments: A cognitive linguistic study]. Journal of King Saud University: Arts and Humanities, 35 (3), 321–345. Sayers, D., Sousa-Silva, R., Höhn, S., & Ahmedi, L. (Eds.). (2021). The dawn of the human-machine era: A forecast of new and emerging language technologies (COST Action CA19102 “Language in the Human-Machine Era” technical report). University of Jyväskylä. https://doi.org/10.17011/jyx/reports/20210518/1 Szczyrbak, M. (2014). Stancetaking strategies in judicial discourse: Evidence from US Supreme Court opinions. Studia Linguistica Universitatis Iagellonicae Cracoviensis, 131 , 91–120. https://doi.org/10.4467/20834624SL.14.005.1377 Sylvia, I., & Bachtiar, A. (2024). The integration of artificial intelligence in EFL writing: Promoting multimodal composing and digital literacy. Indonesian Journal of Applied Linguistics, 13 (3), 670–685. Tabe, C. (2018). E-morphology in Cameroon social media. US-China Foreign Language, 16 (1), 1–9. https://doi.org/10.17265/1539-8080/2018.01.001 Tiersma, P. M. (1999). Legal language . University of Chicago Press. Vitacco, M. J. (2020). Insanity defense. In R. D. Morgan (Ed.), The SAGE encyclopedia of criminal psychology (pp. 665–669). SAGE Publications. https://doi.org/10.4135/9781483392240.n235 Wizārat al-ʿAdl [Ministry of Justice]. (1435 AH). Majmūʿat al-Aḥkām al-Qaḍāʾiyya [Collection of judicial decisions]. Ministry of Justice. Wright, D., & Picornell, I. (2024). Semiotic perspectives on forensic and legal linguistics: Unifying approaches in the language of the legal process and language in evidence. International Journal for the Semiotics of Law, 37 (2), 293–304. https://doi.org/10.1007/s11196-023-10094-z Yassin, M. N. (2002). Aḥkām al-marīḍ al-nafsī fī al-fiqh al-islāmī [Rulings regarding the mentally ill in Islamic jurisprudence]. Dār al-Nafāʾis. Zamawe, F. C. (2015). The implication of using NVivo software in qualitative data analysis: Evidence-based reflections. Malawi Medical Journal, 27 (1), 13–15. https://doi.org/10.4314/mmj.v27i1.4 Additional Declarations No competing interests reported. Supplementary Files AppendixAArabiclexicalscreenusedforcorpusidentification.docx AppendixCBilingualsidebysideversionoftheArabiclexicalscreen.docx AppendixBGlossaryofkeyIslamiclegalanddoctrinalterms.docx AppendixDSelectedbilingualexcerptfromafocalruling.docx AppendixBbilingualsidebyside.docx Cite Share Download PDF Status: Under Review Version 1 posted Editorial decision: Revision requested 08 May, 2026 Reviews received at journal 06 May, 2026 Reviewers agreed at journal 03 May, 2026 Reviews received at journal 03 May, 2026 Reviews received at journal 02 May, 2026 Reviews received at journal 30 Apr, 2026 Reviewers agreed at journal 29 Apr, 2026 Reviewers agreed at journal 27 Apr, 2026 Reviewers agreed at journal 27 Apr, 2026 Reviewers agreed at journal 27 Apr, 2026 Reviewers agreed at journal 27 Apr, 2026 Reviewers invited by journal 27 Apr, 2026 Editor assigned by journal 27 Apr, 2026 Editor invited by journal 21 Apr, 2026 Submission checks completed at journal 21 Apr, 2026 First submitted to journal 21 Apr, 2026 You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-9312779","acceptedTermsAndConditions":true,"allowDirectSubmit":false,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":633628898,"identity":"e5726291-3d72-42b4-a4a5-0d7a11e6de78","order_by":0,"name":"Bunder Sebail Alshammari","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAABEklEQVRIiWNgGAWjYBACexCRUMCQAOEa2DAwSABpHjxaDBuAxAcDuJY0wloMDjAwMM6Aa2E4TIQt7WcPMPMY1OXxTzud+Lmi4Hxiv3QD44O3bQz2/A04/MKTlwDUcrhY4nbuZskzBrcTZ845wGw4t40hccYBXH7JMQBqOZDYcDt3g2QDUMuGGwls0rxtQKfi0GJw/o0B8x+DusT5QFt+NhicA2lh/w3UYi+PS8sNsC3MiRtu524D2nIAbAszUAvjBlwOm/HG4DDQL4kbgVosGwySjWfOSGyWnHNOInEjDi32/DmGj3kq6hLnAR12s+GPnWy/RPLBD2/KbOzlcGgBAXQpxgYGSOyMglEwCkbBKCAXAADzomFrxeeIRQAAAABJRU5ErkJggg==","orcid":"","institution":"University of Ha'il","correspondingAuthor":true,"prefix":"","firstName":"Bunder","middleName":"Sebail","lastName":"Alshammari","suffix":""},{"id":633628899,"identity":"85294f1a-4143-4af7-af33-6ffcb2600164","order_by":1,"name":"Khaled Nasser Alfraidi","email":"","orcid":"","institution":"University of Ha'il","correspondingAuthor":false,"prefix":"","firstName":"Khaled","middleName":"Nasser","lastName":"Alfraidi","suffix":""},{"id":633628900,"identity":"71bed8e7-14a0-4272-8c42-84655ad1f548","order_by":2,"name":"Mohammad Omar Aljudaiey","email":"","orcid":"","institution":"University of Ha'il","correspondingAuthor":false,"prefix":"","firstName":"Mohammad","middleName":"Omar","lastName":"Aljudaiey","suffix":""},{"id":633628901,"identity":"6dc8121d-d539-4d5d-bbe9-8183aad4dc24","order_by":3,"name":"Walid Abdelhalim","email":"","orcid":"","institution":"Beni-Suef University","correspondingAuthor":false,"prefix":"","firstName":"Walid","middleName":"","lastName":"Abdelhalim","suffix":""}],"badges":[],"createdAt":"2026-04-03 12:23:18","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-9312779/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-9312779/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":108805471,"identity":"10d3f591-b0f3-463e-a7ea-aad1c650325c","added_by":"auto","created_at":"2026-05-08 15:26:04","extension":"png","order_by":1,"title":"Figure 1","display":"","copyAsset":false,"role":"figure","size":534517,"visible":true,"origin":"","legend":"\u003cp\u003eThe Pragmatic-Doctrinal Inference Model (P-DIM): pragmatic engine, five-layer coding scheme, and doctrinal oversight\u003c/p\u003e","description":"","filename":"floatimage1.png","url":"https://assets-eu.researchsquare.com/files/rs-9312779/v1/3a8bf2a948f5c4c44e5569f3.png"},{"id":108809881,"identity":"1d99fa0a-8b89-40bf-a0d7-e8e8c21e2d20","added_by":"auto","created_at":"2026-05-08 15:56:04","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":1047708,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-9312779/v1/44eed02b-1e53-4e06-a4fc-3deb7b985022.pdf"},{"id":108630479,"identity":"cc776c36-4c20-4fe9-a7aa-4df54865bb0a","added_by":"auto","created_at":"2026-05-06 16:36:45","extension":"docx","order_by":0,"title":"","display":"","copyAsset":false,"role":"supplement","size":29059,"visible":true,"origin":"","legend":"","description":"","filename":"AppendixAArabiclexicalscreenusedforcorpusidentification.docx","url":"https://assets-eu.researchsquare.com/files/rs-9312779/v1/9de1e98e4561528643531c3a.docx"},{"id":108805587,"identity":"638ea5dd-d9f9-4a53-ae8f-d426f95e969d","added_by":"auto","created_at":"2026-05-08 15:26:20","extension":"docx","order_by":1,"title":"","display":"","copyAsset":false,"role":"supplement","size":31000,"visible":true,"origin":"","legend":"","description":"","filename":"AppendixCBilingualsidebysideversionoftheArabiclexicalscreen.docx","url":"https://assets-eu.researchsquare.com/files/rs-9312779/v1/5365444b7d5f430ba2101629.docx"},{"id":108804915,"identity":"07aaf07c-7a56-4906-9450-ca9dce66f50d","added_by":"auto","created_at":"2026-05-08 15:24:14","extension":"docx","order_by":2,"title":"","display":"","copyAsset":false,"role":"supplement","size":28277,"visible":true,"origin":"","legend":"","description":"","filename":"AppendixBGlossaryofkeyIslamiclegalanddoctrinalterms.docx","url":"https://assets-eu.researchsquare.com/files/rs-9312779/v1/4494e0a390bb7ba594878b35.docx"},{"id":108805666,"identity":"7fb84b86-da83-4320-b8ef-2ab3cdcb95d7","added_by":"auto","created_at":"2026-05-08 15:26:34","extension":"docx","order_by":3,"title":"","display":"","copyAsset":false,"role":"supplement","size":360912,"visible":true,"origin":"","legend":"","description":"","filename":"AppendixDSelectedbilingualexcerptfromafocalruling.docx","url":"https://assets-eu.researchsquare.com/files/rs-9312779/v1/e7b0943789788d7a46b2df61.docx"},{"id":108630483,"identity":"5311c69b-4967-4d85-bcda-08629f996711","added_by":"auto","created_at":"2026-05-06 16:36:45","extension":"docx","order_by":4,"title":"","display":"","copyAsset":false,"role":"supplement","size":39045,"visible":true,"origin":"","legend":"","description":"","filename":"AppendixBbilingualsidebyside.docx","url":"https://assets-eu.researchsquare.com/files/rs-9312779/v1/a2b9bbb6872de333392f8fdd.docx"}],"financialInterests":"No competing interests reported.","formattedTitle":"Artificial Intelligence Tools for Analyzing Forensic Linguistic Features of Arabic Texts in a Comparative Case Study","fulltext":[{"header":"1. Introduction","content":"\u003cp\u003eForensic linguistics applies linguistic theory and analytical methods to questions of legal evidence, interpretation, and institutional communication (Coulthard \u0026amp; Johnson, \u003cspan citationid=\"CR20\" class=\"CitationRef\"\u003e2007\u003c/span\u003e; Gibbons, \u003cspan citationid=\"CR32\" class=\"CitationRef\"\u003e2003\u003c/span\u003e). In recent years, the field has faced a practical and methodological pressure point: the growing scale of digitized legal records and electronically mediated evidence has made purely manual, close-reading approaches difficult to sustain for large corpora, while fully automated approaches often struggle with context-sensitive interpretation (Casey, \u003cspan citationid=\"CR18\" class=\"CitationRef\"\u003e2011\u003c/span\u003e). As language technologies become increasingly embedded in professional workflows, forensic analysts must determine which components of linguistic analysis can be delegated to computational tools and which require expert, theory-guided inference.\u003c/p\u003e \u003cp\u003eThis problem is especially acute in Arabic judicial discourse. Arabic legal texts combine highly conventionalized formulae with dense institutional reasoning and intertextual references to doctrinal principles. In addition, Arabic diglossia complicates computational processing because judgments are typically drafted in Modern Standard Arabic, whereas quoted testimony and reported speech may contain dialectal features and code-switching (Ferguson, \u003cspan citationid=\"CR28\" class=\"CitationRef\"\u003e1959\u003c/span\u003e; Myers-Scotton, \u003cspan citationid=\"CR52\" class=\"CitationRef\"\u003e1993\u003c/span\u003e; Poplack, \u003cspan citationid=\"CR55\" class=\"CitationRef\"\u003e1980\u003c/span\u003e). These features matter for forensic analysis because they can index stance, alignment, credibility, and the pragmatic force of an utterance in ways that are not reducible to keyword matching. Accordingly, Arabic forensic linguistics requires analytic models that integrate lexical and morphosyntactic cues with discourse-pragmatic interpretation and the institutional logic of legal reasoning (Tiersma, \u003cspan citationid=\"CR62\" class=\"CitationRef\"\u003e1999\u003c/span\u003e; Wright \u0026amp; Picornell, \u003cspan citationid=\"CR65\" class=\"CitationRef\"\u003e2024\u003c/span\u003e).\u003c/p\u003e \u003cp\u003eA particularly high-stakes domain concerns cases where psychiatric evidence intersects with criminal responsibility and legal capacity. In such cases, courts must evaluate how clinical reports, lay narratives, and textualized behavioral descriptions jointly support or weaken attributions of capacity and culpability (Appelbaum, \u003cspan citationid=\"CR15\" class=\"CitationRef\"\u003e2006\u003c/span\u003e; Ferguson \u0026amp; Ogloff, \u003cspan citationid=\"CR29\" class=\"CitationRef\"\u003e2011\u003c/span\u003e). The legal construction of responsibility and capacity (e.g., \u003cem\u003eahliyya\u003c/em\u003e) is rarely expressed through a single marker; rather, it is built through temporal framing, evidential weighting, and certainty grading across extended stretches of judicial reasoning. This makes the domain a demanding testbed for AI-supported analysis: tools that perform well on formulaic extraction may still fail when the interpretive task requires linking linguistic choices to argumentative aims or doctrinal warrants (Goźdź-Roszkowski, \u003cspan citationid=\"CR34\" class=\"CitationRef\"\u003e2021\u003c/span\u003e, \u003cspan citationid=\"CR35\" class=\"CitationRef\"\u003e2024\u003c/span\u003e; Mazzi, \u003cspan citationid=\"CR47\" class=\"CitationRef\"\u003e2010\u003c/span\u003e).\u003c/p\u003e \u003cp\u003eAgainst this backdrop, the present study addresses a central gap between traditional expert coding and AI-assisted Natural Language Processing (NLP): the lack of a transparent, layer-based benchmarking framework that separates surface-stable features from context-dependent inference in Arabic judicial texts. We operationalize the Pragmatic-Doctrinal Inference Model (P-DIM) as a multilayer coding scheme covering five analytical dimensions: (a) institutional weight of psychiatric evidence, (b) temporal framing of illness, (c) formulaic constructions of capacity and responsibility, (d) pragmatic-argumentative function in judicial reasoning, and (e) evidential stance and certainty grading. Using this scheme, we compare AI-assisted extraction and classification outputs against expert-coded annotations to identify where computational tools align with forensic interpretation and where they diverge.\u003c/p\u003e \u003cp\u003eThe contribution of the study is twofold. First, it provides a structured, replicable way to evaluate AI performance across analytically distinct layers rather than treating \"AI accuracy\" as a single undifferentiated outcome. Second, it clarifies the role of expert verification as a methodological requirement rather than a generic caution, specifying which layers are most vulnerable to misinterpretation and therefore require systematic \u0026ldquo;verification routines\u0026rdquo; when AI tools are used in forensic workflows (Al-Harbi \u0026amp; Al-Ahdal, \u003cspan citationid=\"CR7\" class=\"CitationRef\"\u003e2024\u003c/span\u003e; Al-Fraidan, \u003cspan citationid=\"CR6\" class=\"CitationRef\"\u003e2024\u003c/span\u003e). By doing so, the study aims to support responsible, evidence-based integration of AI into Arabic forensic linguistics, leveraging computational speed for feature discovery while preserving the interpretive integrity needed for high-stakes legal analysis (Deep \u0026amp; Chen, \u003cspan citationid=\"CR21\" class=\"CitationRef\"\u003e2025\u003c/span\u003e).\u003c/p\u003e"},{"header":"2. Literature Review","content":"\u003cp\u003eThe academic trajectory of forensic linguistics has evolved from the foundational study of \"language in evidence\" (Coulthard \u0026amp; Johnson, \u003cspan citationid=\"CR20\" class=\"CitationRef\"\u003e2007\u003c/span\u003e) to a multidisciplinary examination of the \"justice system\" as a whole (Gibbons, \u003cspan citationid=\"CR32\" class=\"CitationRef\"\u003e2003\u003c/span\u003e). Current scholarship emphasizes that forensic linguistics is not merely an auxiliary tool for legal inquiry but an epistemological framework necessary for researching the complex intersections of discourse and authority (Heydon, \u003cspan citationid=\"CR40\" class=\"CitationRef\"\u003e2019\u003c/span\u003e). As legal processes increasingly rely on the \"analysis of legal discourse\" to navigate confessions and evidentiary weight (Gallego Balcells, \u003cspan citationid=\"CR30\" class=\"CitationRef\"\u003e2023\u003c/span\u003e), there is a pressing need for a \"semiotic perspective\" that unifies the language of the legal process with the language found in evidence (Wright \u0026amp; Picornell, \u003cspan citationid=\"CR65\" class=\"CitationRef\"\u003e2024\u003c/span\u003e). This study builds upon these theoretical foundations by testing the efficacy of the Pragmatic-Doctrinal Inference Model (P-DIM) in the context of contemporary Arabic judicial digital transformation.\u003c/p\u003e \u003cdiv id=\"Sec3\" class=\"Section2\"\u003e \u003ch2\u003e2.1 Forensic Linguistics: From \u0026ldquo;Language in Evidence\u0026rdquo; to Institutional Discourse Analysis\u003c/h2\u003e \u003cp\u003eForensic linguistics developed initially as a systematic application of linguistic analysis to evidential texts and legal problems, including authorship attribution, police interviewing, courtroom interaction, and the interpretation of contested meanings (Coulthard \u0026amp; Johnson, \u003cspan citationid=\"CR20\" class=\"CitationRef\"\u003e2007\u003c/span\u003e; Gibbons, \u003cspan citationid=\"CR32\" class=\"CitationRef\"\u003e2003\u003c/span\u003e). Contemporary work, however, increasingly treats the justice system itself as a discourse-producing institution in which authority is enacted through recurrent genres (e.g., judgments, indictments, expert reports) and through patterned evaluative practices that shape how \u0026ldquo;facts\u0026rdquo; become legally actionable (Heydon, \u003cspan citationid=\"CR40\" class=\"CitationRef\"\u003e2019\u003c/span\u003e). This shift is consequential because it reframes forensic linguistics from a set of techniques into an epistemological approach to institutional meaning-making-one that is attentive to evidential hierarchies, procedural constraints, and the rhetorical management of doubt and certainty.\u003c/p\u003e \u003cp\u003eWithin this broadened orientation, scholars have emphasized the need to align micro-level linguistic features with macro-level institutional functions, particularly in texts where credibility assessments, confessions, and evidential weighting are central (Gallego Balcells, \u003cspan citationid=\"CR30\" class=\"CitationRef\"\u003e2023\u003c/span\u003e). A key development in this respect is the \u0026ldquo;semiotic perspective\u0026rdquo; that explicitly links the language of the legal process (how institutions formulate and record legal reasoning) with the language in evidence (the linguistic behavior attributed to parties and witnesses) (Wright \u0026amp; Picornell, \u003cspan citationid=\"CR65\" class=\"CitationRef\"\u003e2024\u003c/span\u003e). This unifying stance is relevant to AI-supported forensic analysis because it clarifies what counts as a \u0026ldquo;feature\u0026rdquo; in legal discourse: not merely tokens or keywords, but also institutionalized forms of stance-taking, evaluative framing, and genre-bound formulaicity.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec4\" class=\"Section2\"\u003e \u003ch2\u003e2.2 Arabic Judicial Discourse: Diglossia, Formulaicity, and Doctrinal Intertextuality\u003c/h2\u003e \u003cp\u003eArabic legal and judicial discourse presents a high-density environment for forensic analysis because it combines (a) formulaic legal expressions that anchor institutional authority, (b) discursive evaluation that grades evidential strength, and (c) intertextual links to doctrinal principles that guide adjudication. Work on legal language and psycholinguistic accessibility has long shown that legal texts maintain authority partly by relying on specialized formulae and stable constructions that separate professional legal discourse from lay understanding (Charrow \u0026amp; Charrow, \u003cspan citationid=\"CR19\" class=\"CitationRef\"\u003e1979\u003c/span\u003e; Tiersma, \u003cspan citationid=\"CR62\" class=\"CitationRef\"\u003e1999\u003c/span\u003e). In Arabic judicial writing, this separation is amplified by the co-presence of Modern Standard Arabic (as the primary drafting register) and the dialectal or code-switched speech often attributed to witnesses and defendants-an arrangement classically described as diglossic (Ferguson, \u003cspan citationid=\"CR28\" class=\"CitationRef\"\u003e1959\u003c/span\u003e). Because reported speech may be normalized, paraphrased, or re-entextualized in the written record, the \u0026ldquo;stylistic imprint\u0026rdquo; of speakers can be partially filtered through institutional drafting practices (Kperogi, \u003cspan citationid=\"CR43\" class=\"CitationRef\"\u003e2018\u003c/span\u003e). As a result, forensic analysis must be sensitive to the distinction between (a) speaker-originating linguistic cues and (b) institutionally produced cues introduced through judgment-writing conventions.\u003c/p\u003e \u003cp\u003eIn addition to register variation, Arabic judicial discourse frequently encodes reasoning through culturally and doctrinally saturated warrants-especially where Sharia-based maxims and legal principles function as implicit inferential bridges. This has been described as an \u0026ldquo;engineering of meaning\u0026rdquo; whereby judgments do not simply summarize evidence but construct a legally coherent narrative by aligning propositions with institutional and doctrinal standards (Saudi \u0026amp; Qabayli, \u003cspan citationid=\"CR57\" class=\"CitationRef\"\u003e2023\u003c/span\u003e). From a pragmatic standpoint, judicial texts also operate as argumentative systems: they justify legal outcomes by sequencing evidential claims, rebuttals, and evaluations that manage competing versions of events (Hussein Hamadi, \u003cspan citationid=\"CR41\" class=\"CitationRef\"\u003e2022\u003c/span\u003e). This matters directly for automated analysis because pragmatic functions (e.g., mitigation, rebuttal, hedging, risk framing) are often realized through dispersed cues rather than explicit labels.\u003c/p\u003e \u003cp\u003eA domain that illustrates these complexities with particular clarity is the intersection of mental health evidence and criminal responsibility. In such cases, courts must integrate clinical expertise with legal concepts of capacity and culpability, producing judgments where psychiatric reports are assigned institutional weight and then translated into legally relevant assessments of responsibility (Appelbaum, \u003cspan citationid=\"CR15\" class=\"CitationRef\"\u003e2006\u003c/span\u003e; Ferguson \u0026amp; Ogloff, \u003cspan citationid=\"CR29\" class=\"CitationRef\"\u003e2011\u003c/span\u003e). The social implications of mental-illness discourse-especially where public safety and risk are invoked-also shape how courts frame the defendant and justify social control, which is often reflected in evaluative lexis and narrative selection (Markowitz, \u003cspan citationid=\"CR46\" class=\"CitationRef\"\u003e2011\u003c/span\u003e).\u003c/p\u003e \u003cp\u003eLinguistically, this domain relies on temporal framing (when the condition occurred relative to the offense) and on stance-taking devices that grade certainty and evidential strength (Mazzi, \u003cspan citationid=\"CR47\" class=\"CitationRef\"\u003e2010\u003c/span\u003e). Work on judicial evaluation has shown that courts recurrently employ patterns of epistemic marking and evaluation to signal whether an inference is treated as robust, disputed, or contingent (Goźdź-Roszkowski \u0026amp; Hunston, \u003cspan citationid=\"CR36\" class=\"CitationRef\"\u003e2016\u003c/span\u003e; Szczyrbak, \u003cspan citationid=\"CR59\" class=\"CitationRef\"\u003e2014\u003c/span\u003e). These insights motivate the need for models that do not treat \u0026ldquo;forensic features\u0026rdquo; as a single layer, but instead separate formulaicity, temporal reasoning, institutional weighting, and stance into analytically distinct dimensions.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec5\" class=\"Section2\"\u003e \u003ch2\u003e2.3 AI and Forensic Feature Extraction: From Surface-Stable Cues to Context-Dependent Inference\u003c/h2\u003e \u003cp\u003eThe expansion of computational approaches to language analysis has created strong incentives to integrate AI into forensic workflows, particularly for large corpora and time-sensitive tasks. The \u0026ldquo;human-machine\u0026rdquo; framing emphasizes that emerging language technologies can process volumes of text beyond the reach of purely manual analysis, enabling rapid scanning for recurring formulae, evaluative patterns, and stylistic regularities (Sayers et al., \u003cspan citationid=\"CR58\" class=\"CitationRef\"\u003e2021\u003c/span\u003e). At the same time, Arabic remains challenging for many NLP pipelines because of morphological complexity, orthographic variation, and register diversity-factors that complicate tokenization, disambiguation, and robust generalization across domains (Riabi, \u003cspan citationid=\"CR56\" class=\"CitationRef\"\u003e2025\u003c/span\u003e). Consequently, AI performance in Arabic forensic settings depends not only on model capacity but also on preprocessing decisions, domain adaptation, and the stability of the target cues.\u003c/p\u003e \u003cp\u003eExisting work suggests that automated systems can be effective when the target features are surface-stable and strongly lexicalized, such as standardized formulae, recurring legal constructions, and overt stance markers. Research on computer-mediated discourse, for example, has shown how stylistic and morphological cues can be used to characterize digital identities and patterned language use (Kperogi, \u003cspan citationid=\"CR43\" class=\"CitationRef\"\u003e2018\u003c/span\u003e; Tabe, \u003cspan citationid=\"CR61\" class=\"CitationRef\"\u003e2018\u003c/span\u003e). Similarly, corpus-based approaches to legal discourse demonstrate that many evaluative and argumentative moves in judgments correlate with recurring lexico-grammatical configurations, which are well suited to computational discovery (Goźdź-Roszkowski, \u003cspan citationid=\"CR34\" class=\"CitationRef\"\u003e2021\u003c/span\u003e, \u003cspan citationid=\"CR35\" class=\"CitationRef\"\u003e2024\u003c/span\u003e). However, a key limitation remains the transition from extracting candidate features to producing valid interpretive inferences-especially where doctrinal warrants and intertextual reasoning are required. In these contexts, a tool may correctly detect an epistemic verb but still fail to interpret its argumentative role or doctrinal implication, producing outputs that appear linguistically plausible yet are institutionally misleading (Deep \u0026amp; Chen, \u003cspan citationid=\"CR21\" class=\"CitationRef\"\u003e2025\u003c/span\u003e).\u003c/p\u003e \u003cp\u003eAccordingly, recent scholarship has emphasized that AI deployment must be coupled with explicit verification practices and critical oversight rather than treated as a neutral automation of analysis. Discussions of AI-supported writing and professional use have underscored the importance of digital critical thinking-operationally, the ability to interrogate outputs, triangulate claims, and detect errors that arise from context loss or over-literal pattern matching (Alharbi \u0026amp; Al-Ahdal, 2024; Zakaria et al., 2025). Within applied and educational contexts, AI has been framed as a mediational resource that can scaffold complex tasks while still requiring human responsibility for accuracy and interpretation (Al-Fraidan, \u003cspan citationid=\"CR6\" class=\"CitationRef\"\u003e2024\u003c/span\u003e; Sylvia \u0026amp; Bachtiar, \u003cspan citationid=\"CR60\" class=\"CitationRef\"\u003e2024\u003c/span\u003e). For forensic linguistics, this implies a methodological requirement: AI-generated labels should be treated as provisional candidates that must be validated against doctrinal and pragmatic criteria rather than accepted as determinations.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec6\" class=\"Section2\"\u003e \u003ch2\u003e2.4 Textualized Demeanour and Silence: What Can Be Analyzed Computationally\u003c/h2\u003e \u003cp\u003eAn additional challenge for forensic analysis, and a frequent source of conceptual confusion in AI studies, concerns non-verbal and demeanour evidence. Importantly, computational tools cannot \u0026ldquo;detect\u0026rdquo; non-verbal behavior directly from written judgments; what they can analyze are \u003cem\u003etextualized references\u003c/em\u003e to non-verbal conduct (e.g., the judge\u0026rsquo;s written description of silence, gaze, posture, hesitation, or emotional display). Research in evidence and credibility assessment has shown that written judgments sometimes record such cues and treat them as relevant to evaluating credibility, demeanor, or stance (Denault, \u003cspan citationid=\"CR23\" class=\"CitationRef\"\u003e2024\u003c/span\u003e; Denault \u0026amp; Bozin, \u003cspan citationid=\"CR23\" class=\"CitationRef\"\u003e2024\u003c/span\u003e). From a semiotic standpoint, these textualizations function as part of the institutional meaning-making system: they are not neutral observations but linguistically framed selections that can strengthen or weaken interpretations of testimony (Wright \u0026amp; Picornell, \u003cspan citationid=\"CR65\" class=\"CitationRef\"\u003e2024\u003c/span\u003e).\u003c/p\u003e \u003cp\u003eIn Sharia-informed adjudication, the interpretive status of silence can be doctrinally consequential, particularly where legal maxims are invoked to treat silence under specific conditions as communicatively meaningful (Al-Qahtani, \u003cspan citationid=\"CR11\" class=\"CitationRef\"\u003e2021\u003c/span\u003e). For AI-supported analysis, this implies a clear boundary: systems must be trained or prompted to identify the textual signals that reference silence or demeanor, but the legal force of these references depends on doctrinal context and argumentative positioning within the judgment. Thus, the computational task is best conceptualized as (a) extracting candidate segments where demeanour is textualized and (b) classifying their function under an explicitly defined analytic scheme-rather than inferring credibility directly.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec7\" class=\"Section2\"\u003e \u003ch2\u003e2.5 Research Gap and Rationale for a Layer-Based Benchmark\u003c/h2\u003e \u003cp\u003eAcross the above strands, a consistent methodological gap emerges: studies often discuss AI \u0026ldquo;effectiveness\u0026rdquo; in broad terms without separating the distinct interpretive demands of legal language. In Arabic judicial discourse, some features are comparatively extractable (e.g., stable legal formulae and overt epistemic markers), while others require context-sensitive inference (e.g., pragmatic aims, doctrinal warrants, and intertextual reasoning). This distinction motivates the present study\u0026rsquo;s adoption of the Pragmatic-Doctrinal Inference Model (P-DIM) as a multilayer coding framework. By benchmarking AI-assisted extraction against expert coding across separate layers-institutional weighting, temporal framing, formulaicity, pragmatic function, and evidential stance-the study aims to specify where AI aligns with forensic interpretation and why misalignment occurs. In doing so, it advances a practical, testable approach to integrating AI into Arabic forensic linguistics: AI can serve as a high-speed filter for surface-stable cues, while expert verification remains necessary for layers where meaning depends on doctrinal relevance and pragmatic argumentation.\u003c/p\u003e \u003c/div\u003e"},{"header":"3. Theoretical Framework: The Pragmatic-Doctrinal Inference Model (P-DIM)","content":"\u003cp\u003eThe Pragmatic-Doctrinal Inference Model (P-DIM) is the theoretical framework guiding this study. It is designed to explain how Saudi judicial texts construct legal reality through a layered interaction between linguistic evidence, institutional reasoning, and Sharia-based doctrinal warrants. Building on the notion of \u0026ldquo;engineering of meaning\u0026rdquo; in Arabic judgments (Saudi \u0026amp; Qabayli, 2023), P-DIM treats judicial writing as an institutional genre that does not merely report facts but ranks voices, stabilizes interpretations, and justifies outcomes through patterned evaluative and inferential moves. In this sense, the model aligns with semiotic approaches that connect \u0026ldquo;language of the legal process\u0026rdquo; (institutional drafting and reasoning) with \u0026ldquo;language in evidence\u0026rdquo; (reported speech, attributed stance, and narrated conduct) (Wright \u0026amp; Picornell, 2024).\u003c/p\u003e\n\u003cp\u003eUnlike approaches limited to surface linguistic description (e.g., lexical counts or syntactic patterns), P-DIM integrates pragmatic inference with Islamic legal epistemology. It is therefore particularly appropriate for cases where psychiatric evidence intersects with responsibility and capacity (\u003cem\u003emasʾūliyya\u003c/em\u003e, \u003cem\u003eahliyya\u003c/em\u003e), because such cases require the court to reconcile clinical discourse with doctrinally relevant legal categories and principles (Al-Dulaimi, 2024; Appelbaum, 2006). The model is also compatible with an AI-assisted workflow: it specifies which aspects of judicial discourse are likely to be extractable computationally (e.g., formulae and overt stance markers) and which require expert verification because they depend on contextual, doctrinal, and argumentative integration.\u003c/p\u003e\n\u003ch2\u003e3.1 Foundations of the P-DIM\u003c/h2\u003e\n\u003cp\u003eP-DIM is anchored in four interlocking components.\u003c/p\u003e\n\u003cp\u003eSpeech Act Theory. P-DIM treats courtroom discourse as performative and institutionally consequential: utterances do not merely describe states of affairs, but can also carry legal force when they are interpreted within procedural and doctrinal frameworks. In the Saudi context, legally relevant meanings may be inferred not only from explicit statements but also from textualized absences, including silence recorded in judgments. Such silences can acquire illocutionary force when interpreted through established legal maxims and institutional expectations (Al-Qahtani, 2021). Accordingly, the model distinguishes between silence as a narrative gap and silence as a pragmatically and doctrinally meaningful act within legal reasoning.\u003c/p\u003e\n\u003cp\u003ePoliteness, Facework, and Stance. P-DIM also incorporates facework-based reasoning to explain how deference, mitigation, self-presentation, and alignment are constructed in institutional settings. In written judgments, courts may textualize demeanour (e.g., hesitation, lowered head, emotional display) and treat it as evidence relevant to credibility or moral evaluation (Denault, 2024; Denault \u0026amp; Bozin, 2024). P-DIM therefore treats such descriptions as semiotically meaningful components of judicial stance rather than as peripheral narrative details.\u003c/p\u003e\n\u003cp\u003eRelevance Theory and inferential filtering. Because judicial reasoning often involves ambiguity, competing narratives, and uneven evidential quality, P-DIM models how judges select interpretations that best satisfy institutional needs for coherence and legal justification. This includes interpreting temporal framing (e.g., pre-offence chronicity versus an acute episode), aligning psychiatric claims with legal thresholds, and deciding which propositions are sufficiently supported to warrant doctrinal conclusions (Mazzi, 2010). In other words, P-DIM assumes that meaning in judgments emerges through inferential filtering, not through lexical triggers alone.\u003c/p\u003e\n\u003cp\u003eIslamic legal epistemology and doctrinal warrants. Finally, P-DIM explicitly integrates Sharia-based legal epistemology, including fiqh maxims and discretionary sentencing logic (ta\u0026apos;zir), as the warranting layer that authorizes inferences from language and conduct to legal responsibility. In this framework, determinations of ahliyya are not reducible to medical description; they are doctrinal inferences made by the court on the basis of evidence evaluation, stance grading, and legally recognized warrants (Al-Dulaimi, 2024; Yassin, 2002). This integration is essential for analyzing Saudi judgments because doctrinal relevance often explains why a feature matters and how it is transformed into an institutional conclusion.\u003c/p\u003e\n\u003ch2\u003e3.2 The Multilayered Coding Scheme\u003c/h2\u003e\n\u003cp\u003eTo operationalize the framework for comparative analysis, P-DIM is implemented as a five-layer coding scheme that separates surface-stable features from context-dependent inference. The scheme functions as an \u0026ldquo;interpretive grid\u0026rdquo; against which AI outputs and expert coding can be compared transparently, layer by layer. The core assumption is that different layers impose different inferential burdens: some are largely extractable by pattern recognition, while others require doctrinal and pragmatic interpretation that must be verified by human experts.\u003c/p\u003e\n\u003cp\u003eFigure 1 summarizes the architecture of P-DIM, showing how the pragmatic engine feeds the five-layer coding scheme under doctrinal oversight.\u003c/p\u003e\n\u003cp\u003eThe integration of AI into Arabic forensic linguistics offers a practical response to long-standing constraints, particularly resource scarcity and high levels of linguistic variation (Riabi, 2025). Yet the comparative logic underpinning P-DIM indicates that AI gains are uneven across interpretive layers. Automated tools are most dependable where judicial meaning is strongly lexicalized and genre-stable-especially in extracting standardized legal formulae (Layer 3) and identifying overt stance and certainty markers (Layer 5). By contrast, AI reliability drops when analysis requires doctrinally warranted inference about why a segment is doing argumentative work (Layer 4), because pragmatic aims (e.g., mitigation, rebuttal, public-safety justification) are often realized through discourse positioning, intertextual warrants, and culturally specific legal reasoning rather than isolated keywords. For this reason, P-DIM formalizes a hybrid workflow in which AI supports scalable feature discovery while expert analysts retain responsibility for layer-specific verification and doctrinal synthesis.\u003c/p\u003e\n\u003cp\u003eThis hybrid orientation is especially timely given the broader human-machine turn and the accelerating digital transformation of judicial institutions, including in Saudi Arabia (Sayers et al., 2021; Al-Smadi et al., 2024). Manual discourse analysis remains essential for interpretive depth, but it cannot easily scale to expanding digital corpora without computational assistance. At the same time, the engineering of meaning in Arabic judgments depends on how courts integrate formulaic legal language with epistemic verbs, evaluative predicates, and Sharia-informed warrants to construct responsibility (mas\u0026apos;uliyya) and capacity (ahliyya) (Saudi \u0026amp; Qabayli, 2023; Al-Dulaimi, 2024; Yassin, 2002). P-DIM therefore treats AI not as an autonomous adjudicative interpreter but as a cognitive partner whose outputs must be routed through explicit verification routines, particularly for layers where doctrinal relevance and pragmatic intent are decisive (Faisal, 2024; Deep \u0026amp; Chen, 2025). Within this framing, the contribution of the present study is to specify, empirically and procedurally, where AI meaningfully augments forensic work and where human interpretive authority remains indispensable.\u003c/p\u003e\n\u003ch2\u003eResearch Questions (RQs)\u003c/h2\u003e\n\u003cp\u003eRQ1. How does AI-assisted analysis compare with expert manual coding in identifying and classifying forensic-linguistic features in Arabic judicial judgments?\u003c/p\u003e\n\u003cp\u003eRQ2. How does AI accuracy vary across the five P-DIM layers-institutional weight (L1), temporal framing (L2), legal formulae (L3), pragmatic function (L4), and stance/evidentiality (L5)?\u003c/p\u003e\n\u003cp\u003eRQ3. To what extent do AI-extracted linguistic markers (e.g., formulaic expressions, evaluative lexis, epistemic verbs) align with the pragmatic aims and doctrinal warrants identified through manual qualitative analysis?\u003c/p\u003e\n\u003cp\u003eRQ4. Which linguistic and doctrinal factors (e.g., diglossia, entextualized testimony, intertextual fiqh maxims) most constrain AI from producing a holistic, context-valid interpretation of mental-health framing in Sharia-based judgments?\u003c/p\u003e\n\u003ch2\u003eResearch Hypotheses (Hs)\u003c/h2\u003e\n\u003cp\u003eH1. AI will perform most strongly on surface-stable features, particularly legal formulae (L3) and overt stance/evidentiality markers (L5).\u003c/p\u003e\n\u003cp\u003eH2. AI performance will be significantly weaker for pragmatic-function classification (L4) than for other layers, especially in detecting discourse moves associated with mitigation, hedging, and public-safety justification in Sharia-informed reasoning.\u003c/p\u003e\n\u003cp\u003eH3. When calibrated with domain-specific terminology, AI outputs will show strong agreement with human coding for institutional weight (L1) and temporal framing (L2).\u003c/p\u003e\n\u003cp\u003eH4. Diglossia and doctrinal intertextuality (fiqh maxims functioning as warrants) will be primary drivers of AI-human divergence, reducing inferential alignment in higher-inference layers (especially L4).\u003c/p\u003e\n\u003cp\u003eH5. A hybrid workflow (AI extraction + expert verification for pragmatic/doctrinal inference) will yield higher overall forensic validity than either AI-only or manual-only analysis.\u003c/p\u003e"},{"header":"4. Methods and Materials","content":"\u003ch2\u003e4.1 Design Overview\u003c/h2\u003e\n\u003cp\u003eThis study adopts a comparative case-study design to examine how AI-assisted analysis performs relative to expert manual coding when extracting and interpreting forensic-linguistic features in Arabic judicial judgments. Consistent with the logic of the P-DIM framework, the methodology separates surface-stable, genre-formulaic features (more amenable to automated extraction) from high-inference, doctrinally warranted interpretations (more dependent on contextual expertise). The research is implemented as two parallel analytical \u0026ldquo;arms\u0026rdquo;-manual and AI-applied to the same corpus and evaluated through matched outcome metrics to locate layer-specific divergence (\u0026ldquo;bottlenecks\u0026rdquo;) in AI performance (Sayers et al., 2021).\u003c/p\u003e\n\u003ch2\u003e4.2 Materials: Corpus and Case Selection\u003c/h2\u003e\n\u003ch3\u003e4.2.1 Data source\u003c/h3\u003e\n\u003cp\u003eThe corpus comprises criminal judgments drawn from Majmūʿat al-Aḥkām al-Qaḍāʾiyya (1435 AH), published by the Saudi Ministry of Justice (Wizārat al-ʿAdl, 1435 AH). This source was selected because it represents an institutionalized genre with recurrent formulae, explicit evidential ranking, and evaluative stance-taking typical of Saudi judicial reasoning.\u003c/p\u003e\n\u003ch3\u003e4.2.2 Sampling strategy and inclusion criteria\u003c/h3\u003e\n\u003cp\u003eA purposive sampling strategy was used to select cases that maximize the presence of the target phenomena: (a) psychiatric/mental-health evidence, and (b) explicit or implicit constructions of responsibility and capacity (\u003cem\u003emasʾūliyya\u003c/em\u003e, \u003cem\u003eahliyya\u003c/em\u003e) (Al-Dulaimi, 2024; Yassin, 2002). Cases were included if the written judgment contained at least one of the following:\u003c/p\u003e\n\u003col class=\"decimal_type\"\u003e\n \u003cli\u003ereferences to psychiatric assessment (e.g., committee report, clinician statement);\u003c/li\u003e\n \u003cli\u003enarrative framing of mental state (pre-offence chronicity, acute episode, post-offence claims);\u003c/li\u003e\n \u003cli\u003edoctrinally relevant capacity markers (e.g., \u003cem\u003ekāmil al-ahliyya\u003c/em\u003e, \u003cem\u003enāqiṣ al-ahliyya\u003c/em\u003e); or\u003c/li\u003e\n \u003cli\u003eovert stance/evidentiality markers (e.g., \u003cem\u003etabayyana\u003c/em\u003e, \u003cem\u003eyarjūḥ\u003c/em\u003e) used to grade certainty.\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch3\u003e4.2.3 Linguistic characteristics of the corpus\u003c/h3\u003e\n\u003cp\u003eThe corpus foregrounds a key methodological challenge: diglossia and entextualization. While judgments are drafted in Modern Standard Arabic, witness statements and narrated speech may reflect dialectal forms, paraphrase, or institutional reformulation, which can obscure \u0026ldquo;stylistic imprints\u0026rdquo; and complicate automated interpretation (Ferguson, 1959; Mahajna, 2019). This feature is analytically valuable because it stress-tests AI under realistic conditions of Arabic legal textuality.\u003c/p\u003e\n\u003ch2\u003e4.3 Operational Framework: P-DIM Multilayered Coding Scheme\u003c/h2\u003e\n\u003cp\u003eThe study operationalizes the Pragmatic-Doctrinal Inference Model (P-DIM) as a five-layer coding scheme. The goal is to ensure that both analytical arms (manual and AI) target the same units of analysis while allowing performance to be assessed layer-by-layer, rather than through undifferentiated \u0026ldquo;overall accuracy.\u0026rdquo;\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eLayer 1: Institutional weight of psychiatric evidence.\u003c/strong\u003e Codes the evidential source and its institutional authority (e.g., multi-member committee report vs. individual clinician statement vs. lay narrative), tracking how judgments rank psychiatric material (Ferguson \u0026amp; Ogloff, 2011).\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eLayer 2: Temporal framing and doctrinal relevance.\u003c/strong\u003e Codes the temporal positioning of illness relative to the offense (pre-offence chronicity, acute episode during the act, post-offence claims), reflecting the legal relevance of temporal construal for culpability evaluation (Hart, 2013; Al-Dulaimi, 2024).\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eLayer 3: Legal formulae and capacity constructions.\u003c/strong\u003e Extracts standardized legal expressions that encode capacity/responsibility determinations (e.g., \u003cem\u003ekāmil al-ahliyya\u003c/em\u003e, \u003cem\u003enāqiṣ al-ahliyya\u003c/em\u003e) and other recurrent formulaic anchors typical of judgment-writing (Goźdź-Roszkowski, 2021).\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eLayer 4:\u0026nbsp;\u003c/strong\u003ePragmatic-argumentative function. Codes the argumentative aim of segments (e.g., mitigation, rebuttal, public-safety justification, hedging judicial commitment), following pragmatic analyses of Saudi judicial reasoning (Hussein Hamadi, 2022).\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eLayer 5: Stance, evidentiality, and certainty grading.\u003c/strong\u003e Codes epistemic and evaluative markers used to grade certainty and warrant conclusions (e.g., \u003cem\u003etabayyana\u003c/em\u003e, \u003cem\u003eyarjūḥ\u003c/em\u003e), including stance-taking and evidential patterns (Szczyrbak, 2014; Goźdź-Roszkowski, 2024).\u003c/p\u003e\n\u003cp\u003eA coding manual was used to define indicators and boundary rules for each layer to reduce coder drift and to support transparent AI prompting and evaluation.\u003c/p\u003e\n\u003ch2\u003e4.4 Procedure: Two Analytical Arms\u003c/h2\u003e\n\u003ch3\u003e4.4.1 Manual arm: expert qualitative coding (benchmark)\u003c/h3\u003e\n\u003cp\u003eTwo trained forensic-linguistic coders conducted \u003cstrong\u003edirected qualitative content analysis\u003c/strong\u003e guided by the P-DIM codebook (Krippendorff, 2013). Coding was conducted in \u003cstrong\u003eNVivo 14\u003c/strong\u003e as a CAQDAS environment for organizing segments, maintaining an audit trail, and performing matrix queries where needed (Zamawe, 2015). The manual arm served as the benchmark (gold standard) for evaluating AI outputs at the layer level.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eReliability and adjudication.\u003c/strong\u003e\u003c/p\u003e\n\u003cul class=\"decimal_type\"\u003e\n \u003cli\u003eCoders independently coded an initial subset to calibrate code boundaries and resolve ambiguities.\u003c/li\u003e\n \u003cli\u003eInter-rater agreement was computed (Cohen\u0026rsquo;s \u0026kappa;) at the layer level.\u003c/li\u003e\n \u003cli\u003eDisagreements were adjudicated through discussion with reference to the codebook and doctrinal criteria, generating a final benchmark dataset for comparison.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3\u003e4.4.2 AI arm: AI-assisted feature extraction and classification\u003c/h3\u003e\n\u003cp\u003eThe AI arm used a combined workflow of LLM-based classification and Arabic NLP preprocessing to reflect current best practice for high-variance Arabic text.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e(a) Arabic preprocessing (feature stabilization).\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eArabic-specific NLP tools were used for tokenization, morphological disambiguation, and POS tagging to reduce noise caused by Arabic morphology and orthographic variability. Suitable toolchains include CAMeL Tools and/or transformer-based Arabic models (e.g., AraBERT) for linguistic normalization and feature support.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e(b) LLM-based layer extraction.\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eA large language model was prompted using the \u003cstrong\u003esame P-DIM codebook\u003c/strong\u003e and examples (few-shot where appropriate) to perform:\u003c/p\u003e\n\u003cul\u003e\n \u003cli\u003eLayer 3 extraction of standardized legal formulae;\u003c/li\u003e\n \u003cli\u003eLayer 5 identification of stance/evidentiality markers;\u003c/li\u003e\n \u003cli\u003epreliminary tagging for Layers 1-2; and\u003c/li\u003e\n \u003cli\u003eprovisional classification for Layer 4 (treated as \u003cem\u003ehigh-risk\u003c/em\u003e and subject to mandatory verification due to its inferential nature).\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e\u003cstrong\u003e(c) Verification routines (built into the method).\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eIn line with the study\u0026rsquo;s theoretical stance, AI classifications-especially for Layer 4-were treated as provisional until verified against doctrinal warrants and discourse context. Verification was operationalized as a structured review protocol performed by expert coders, consistent with \u0026ldquo;digital critical thinking\u0026rdquo; approaches (Zakaria et al., 2025).\u003c/p\u003e\n\u003ch2\u003e4.5 Measures and Comparative Evaluation\u003c/h2\u003e\n\u003cp\u003eAI performance was evaluated against the benchmark dataset using complementary \u003cstrong\u003equantitative\u003c/strong\u003e and \u003cstrong\u003equalitative\u003c/strong\u003e indices, selected to reflect the different epistemic demands of the P-DIM layers.\u003c/p\u003e\n\u003ch3\u003e4.5.1 Quantitative performance metrics (RQ1-RQ2)\u003c/h3\u003e\n\u003cp\u003eFor each analytical layer, performance was assessed using precision, recall, and F1-score in order to quantify the accuracy of feature extraction and classification, with these measures being especially informative for Layers 1, 3, and 5. In addition, Cohen\u0026rsquo;s kappa was calculated to estimate the level of agreement between the AI-generated outputs and the benchmark coding decisions, thereby allowing direct comparison with human inter-rater agreement.\u003c/p\u003e\n\u003ch3\u003e4.5.2 Interpretive alignment (RQ3)\u003c/h3\u003e\n\u003cp\u003eBecause Layer 4 involves pragmatic inference and doctrinal warrants, its accuracy could not be meaningfully evaluated through lexical matching alone. Instead, interpretive alignment was assessed through a structured qualitative comparison between the markers identified by the AI and the pragmatic aims and doctrinal warrants assigned by the manual coders to the same textual segment. Alignment was then determined according to whether the AI-generated label was adequately supported by the discourse structure and the doctrinal reasoning embedded in the judgment.\u003c/p\u003e\n\u003ch3\u003e4.5.3 Doctrinal consistency checks (RQ4)\u003c/h3\u003e\n\u003cp\u003eTo determine where AI failed to generate context-valid interpretations, doctrinal consistency checks were conducted with particular attention to diglossic or entextualized segments, intertextual fiqh maxims functioning as legal warrants, and psychiatric-to-legal inference moves that linked clinical claims to questions of capacity and culpability. These checks made it possible to identify recurring error patterns, such as the literalist misclassification of legally meaningful silence as \u0026ldquo;missing data,\u0026rdquo; and to map these interpretive constraints onto specific analytical layers.\u003c/p\u003e\n\u003ch2\u003e4.6 Instruments and Software\u003c/h2\u003e\n\u003cp\u003eThe manual analysis was conducted in NVivo 14, which was used for coding, memo writing, and the creation of an audit trail, with matrix and comparison queries employed when needed (Zamawe, 2015). The AI and NLP workflow relied on large language models for classification and extraction tasks using the P-DIM codebook through zero-shot and few-shot prompting, alongside Arabic NLP libraries such as CAMeL Tools and AraBERT-based processing to support morphological and token-level stabilization. For evaluation, layer-wise performance was reported using precision, recall, and F1 scores, while Cohen\u0026rsquo;s kappa was used to assess reliability and AI-human agreement. Additional inferential tests, including layer-wise comparisons where appropriate, were also applied to examine performance variation across the analytical layers.\u003c/p\u003e\n\u003ch2\u003e4.7 The P-DIM Codebook as the central methodological instrument\u003c/h2\u003e\n\u003cp\u003eThe key instrument in this study is the P-DIM coding manual itself. It functions as the shared specification that makes the two analytical arms commensurable: the manual coders and the AI system are constrained to the same definitions, indicators, and boundary rules for each layer. This symmetry is essential for a defensible comparison because it ensures that observed differences reflect inferential limitations and linguistic constraints, not mismatched constructs or inconsistent operationalization.\u003c/p\u003e"},{"header":"5. Results","content":"\u003cp\u003eResults are organized by the study\u0026rsquo;s research questions and the five-layer P-DIM coding scheme. Across analyses, a stable pattern emerged: AI performed best on structurally stable, genre-formulaic layers (especially Layers 1 and 3) and performed weakest when classification required high-inference pragmatic-doctrinal interpretation (Layer 4).\u003c/p\u003e\n\u003ch2\u003e5.1 Quantitative Results: Layer-Wise AI Performance and Agreement (RQ1-RQ2)\u003c/h2\u003e\n\u003cp\u003eTo address RQ1-RQ2, AI outputs were evaluated against the expert-coded benchmark using precision, recall, and F1 (layer-level extraction/classification indices) and Cohen\u0026rsquo;s \u0026kappa; (agreement).\u003c/p\u003e\n\u003ch3\u003e5.1.1 Performance by P-DIM layer\u003c/h3\u003e\n\u003cp\u003eAs summarized in Table 1, AI achieved its strongest performance for Layer 3 (Legal Formulae) and Layer 1 (Institutional Weight), with comparatively lower-but still acceptable-performance for Layer 5 (Stance and Evidentiality). In contrast, Layer 4 (Pragmatic Function) exhibited the weakest performance across all indices, indicating that automated processing struggled to move from surface lexical cues to warrant-based pragmatic interpretation.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eTable 1\u0026nbsp;\u003c/strong\u003e AI performance metrics across P-DIM layers\u003c/p\u003e\n\u003cdiv align=\"\"\u003e\n \u003ctable border=\"1\" cellspacing=\"3\" cellpadding=\"0\"\u003e\n \u003cthead\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 233px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eP-DIM Layer\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 102px;\"\u003e\n \u003cp\u003e\u003cstrong\u003ePrecision\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 102px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eRecall\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 74px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eF1\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 91px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eCohen\u0026rsquo;s \u0026kappa;\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/thead\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 233px;\"\u003e\n \u003cp\u003eL1: Institutional Weight\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 102px;\"\u003e\n \u003cp\u003e0.89\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 102px;\"\u003e\n \u003cp\u003e0.92\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 74px;\"\u003e\n \u003cp\u003e0.90\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 91px;\"\u003e\n \u003cp\u003e0.91\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 233px;\"\u003e\n \u003cp\u003eL2: Temporal Framing\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 102px;\"\u003e\n \u003cp\u003e0.76\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 102px;\"\u003e\n \u003cp\u003e0.74\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 74px;\"\u003e\n \u003cp\u003e0.75\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 91px;\"\u003e\n \u003cp\u003e0.62\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 233px;\"\u003e\n \u003cp\u003eL3: Legal Formulae\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 102px;\"\u003e\n \u003cp\u003e0.97\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 102px;\"\u003e\n \u003cp\u003e0.95\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 74px;\"\u003e\n \u003cp\u003e0.96\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 91px;\"\u003e\n \u003cp\u003e0.94\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 233px;\"\u003e\n \u003cp\u003eL4: Pragmatic Function\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 102px;\"\u003e\n \u003cp\u003e0.44\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 102px;\"\u003e\n \u003cp\u003e0.39\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 74px;\"\u003e\n \u003cp\u003e0.41\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 91px;\"\u003e\n \u003cp\u003e0.28\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 233px;\"\u003e\n \u003cp\u003eL5: Stance and Evidentiality\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 102px;\"\u003e\n \u003cp\u003e0.82\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 102px;\"\u003e\n \u003cp\u003e0.85\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 74px;\"\u003e\n \u003cp\u003e0.83\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 91px;\"\u003e\n \u003cp\u003e0.78\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n \u003c/table\u003e\n\u003c/div\u003e\n\u003cp\u003e\u003cstrong\u003eNote.\u003c/strong\u003e Table 1 shows very high AI-expert agreement for Layer 1 (\u0026kappa; = .91) and Layer 3 (\u0026kappa; = .94); these values indicate almost perfect agreement rather than perfect agreement (\u0026kappa; = 1.00). Agreement is moderate for Layer 2 (\u0026kappa; = .62), substantial for Layer 5 (\u0026kappa; = .78), and poor for Layer 4 (\u0026kappa; = .28), consistent with the observed drop in performance for pragmatic-function coding.\u003c/p\u003e\n\u003ch3\u003e5.1.2 Differences in AI performance across layers (H1-H2)\u003c/h3\u003e\n\u003cp\u003eTo test whether AI performance differed significantly across the five P-DIM layers, a one-way ANOVA was conducted on the layer-level accuracy scores. The ANOVA showed a statistically significant effect of layer on AI performance, F(4, 15) = 245.57, p \u0026lt; .001, indicating that AI performance varied sharply by the inferential demands of the layer. The effect size was large, eta^2 = .895 (with omega^2 = .869), suggesting that most variance in accuracy was attributable to layer type rather than within-layer fluctuation.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eTable 2\u0026nbsp;\u003c/strong\u003e One-way ANOVA of AI accuracy across P-DIM layers\u003c/p\u003e\n\u003cdiv align=\"\"\u003e\n \u003ctable border=\"1\" cellspacing=\"3\" cellpadding=\"0\"\u003e\n \u003cthead\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 186px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eSource\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 83px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eSS\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 55px;\"\u003e\n \u003cp\u003e\u003cstrong\u003edf\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 92px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eMS\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 102px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eF\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 92px;\"\u003e\n \u003cp\u003e\u003cstrong\u003ep\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/thead\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 186px;\"\u003e\n \u003cp\u003eBetween layers\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 83px;\"\u003e\n \u003cp\u003e5.565\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 55px;\"\u003e\n \u003cp\u003e4\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 92px;\"\u003e\n \u003cp\u003e1.391\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 102px;\"\u003e\n \u003cp\u003e245.57\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 92px;\"\u003e\n \u003cp\u003e\u0026lt; .001\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 186px;\"\u003e\n \u003cp\u003eWithin layers (error)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 83px;\"\u003e\n \u003cp\u003e0.6515\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 55px;\"\u003e\n \u003cp\u003e15\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 92px;\"\u003e\n \u003cp\u003e0.0434\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 102px;\"\u003e\u003cbr\u003e\u003c/td\u003e\n \u003ctd style=\"width: 92px;\"\u003e\u003cbr\u003e\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 186px;\"\u003e\n \u003cp\u003eTotal\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 83px;\"\u003e\n \u003cp\u003e6.216\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 55px;\"\u003e\n \u003cp\u003e19\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 92px;\"\u003e\u003cbr\u003e\u003c/td\u003e\n \u003ctd style=\"width: 102px;\"\u003e\u003cbr\u003e\u003c/td\u003e\n \u003ctd style=\"width: 92px;\"\u003e\u003cbr\u003e\u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n \u003c/table\u003e\n\u003c/div\u003e\n\u003cp\u003e\u003cem\u003eNote.\u003c/em\u003e AI accuracy differed significantly across P-DIM layers, \u003cstrong\u003eF\u003c/strong\u003e(4, 15) = 245.57, \u003cem\u003ep\u003c/em\u003e \u0026lt; .001, with a large effect (\u0026eta;\u0026sup2; = .895; SS_between/SS_total = 5.565/6.216). Table 2 establishes an overall layer effect but does not, by itself, document which specific layer pairs differ because no post hoc multiple-comparison results are reported in the ANOVA output.\u003c/p\u003e\n\u003ch3\u003e5.1.3 Overall AI-expert agreement (uploaded \u0026kappa; output)\u003c/h3\u003e\n\u003cp\u003eThe uploaded \u0026kappa; sheet reports an overall agreement analysis between Expert_Score and AI_Score with N = 120, yielding Cohen\u0026rsquo;s \u0026kappa; = 0.275 (Table 3). Under common interpretive conventions, this level is typically described as fair agreement, reinforcing the conclusion that-at least for the unit of analysis represented in this \u0026kappa; file-AI outputs diverge meaningfully from expert judgments when the task requires more than surface matching.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eTable 3\u0026nbsp;\u003c/strong\u003e Overall Cohen\u0026rsquo;s \u0026kappa; for Expert_Score vs. AI_Score (N = 120)\u003c/p\u003e\n\u003cdiv align=\"\"\u003e\n \u003ctable border=\"1\" cellspacing=\"3\" cellpadding=\"0\"\u003e\n \u003cthead\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 345px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eStatistic\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 254px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eValue\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/thead\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 345px;\"\u003e\n \u003cp\u003eCohen\u0026rsquo;s \u0026kappa;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 254px;\"\u003e\n \u003cp\u003e0.275\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 345px;\"\u003e\n \u003cp\u003eN\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 254px;\"\u003e\n \u003cp\u003e120\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n \u003c/table\u003e\n\u003c/div\u003e\n\u003cp\u003e\u003cem\u003eNote.\u003c/em\u003e Overall agreement between expert scores and AI scores across the scored dataset was low (Cohen\u0026rsquo;s \u0026kappa; = .275, \u003cem\u003eN\u003c/em\u003e = 120), indicating substantial divergence between AI and expert classifications when results are aggregated across items.\u003c/p\u003e\n\u003ch2\u003e5.2 Qualitative Results: NVivo-Based Comparison of Manual vs. AI Coding (RQ3-RQ4)\u003c/h2\u003e\n\u003cp\u003eTo address RQ3 and RQ4, we conducted NVivo-based comparisons between the expert-coded benchmark and AI-generated labels, focusing on \u003cem\u003ewhere\u003c/em\u003e the two approaches converged and \u003cem\u003ewhy\u003c/em\u003e they diverged at the level of warrant, discourse function, and evidential framing. Two recurrent divergence patterns were observed: (a) surface-trigger dependence in pragmatic-function coding (Layer 4) and (b) reduced stance sensitivity under diglossia and entextualization (Layer 5).\u003c/p\u003e\n\u003ch3\u003e5.2.1 Lexical over-reliance as the dominant mechanism of Layer-4 error\u003c/h3\u003e\n\u003cp\u003eMatrix comparisons indicated that most Layer-4 misclassifications were driven by AI over-weighting salient lexical triggers (e.g., tokens referring to \u0026ldquo;silence,\u0026rdquo; \u0026ldquo;confession,\u0026rdquo; \u0026ldquo;report,\u0026rdquo; \u0026ldquo;committee\u0026rdquo;) while under-recovering the \u003cem\u003edoctrinally licensed\u003c/em\u003e pragmatic function that the judgment assigns to those cues. In legally consequential positions, expert coders treated textualized silence as a meaningful non-response whose force derives from Sharia-informed warranting practices (i.e., omission functioning as an act under defined conditions). By contrast, AI labels frequently mapped the same segments to \u003cem\u003eprocedural absence\u003c/em\u003e, \u003cem\u003emissing information\u003c/em\u003e, or \u003cem\u003enon-evidence\u003c/em\u003e, thereby failing to model illocutionary force as an institutional inference rather than a descriptive void. This explains the weak Layer-4 indices (Table 1) and aligns with the strong layer effect in Table 2.\u003c/p\u003e\n\u003ch3\u003e5.2.2 Stance detection under diglossia and entextualization (Layer 5)\u003c/h3\u003e\n\u003cp\u003eFor Layer 5, comparisons showed that AI generally detected explicit epistemic items and overt certainty markers when they appeared in standardized judicial phrasing. However, AI sensitivity decreased when stance was realized indirectly through entextualized testimony, dialect-proximal reporting, or register-shifted segments where uncertainty is encoded pragmatically (e.g., distancing, mitigation, hedged attribution). Expert coders consistently interpreted these segments as credibility-relevant stance signals that modulate evidential weight, whereas AI outputs sometimes normalized them as irregularity/noise or assigned overly confident stance labels. This pattern supports the interpretation that diglossia and institutional entextualization constrain automated stance modeling even when surface markers are present.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eTable 4:\u0026nbsp;\u003c/strong\u003eThematic Analysis of AI-Expert Divergences in Qualitative Comparison (NVivo)\u003c/p\u003e\n\u003cdiv align=\"\"\u003e\n \u003ctable border=\"1\" cellspacing=\"3\" cellpadding=\"0\" width=\"690\"\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 167px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eTheme\u0026nbsp;\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 143px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eCorpus excerpts\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 306px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eInterpretation\u0026nbsp;\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 63px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eWtd %\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 167px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eT1. Surface-trigger dependence (lexical over-reliance)\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 143px;\"\u003e\n \u003cp\u003e\u003cem\u003e\u0026quot;\u003c/em\u003e\u003cem\u003e\u003cspan dir=\"RTL\"\u003eفسكت المدعى عليه ولم يوجب بشيء بعد تكرار عرض الدعوى عليه\u003c/span\u003e\u003c/em\u003e\u003cem\u003e...\u0026quot;\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 306px;\"\u003e\n \u003cp\u003eAI detects the token \u0026quot;silence\u0026quot; but misassigns function because pragmatic meaning is licensed by institutional context and warranting practices, not the word alone.\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 63px;\"\u003e\n \u003cp\u003e\u003cstrong\u003e32%\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 167px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eT2. Warrant failure (Sharia-based inferential bridging)\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 143px;\"\u003e\n \u003cp\u003e\u003cem\u003e\u0026quot;\u003c/em\u003e\u003cem\u003e\u003cspan dir=\"RTL\"\u003eوالقاعدة الفقهية تقرر أن السكوت في موضع الحاجة بيان\u003c/span\u003e\u003c/em\u003e\u003cem\u003e...\u0026quot;\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 306px;\"\u003e\n \u003cp\u003eAI labels the segment descriptively but fails to connect it to the doctrinal warrant, producing functionally incorrect pragmatic aims regarding \u0026quot;Assent.\u0026quot;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 63px;\"\u003e\n \u003cp\u003e\u003cstrong\u003e24%\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 167px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eT3. Entextualization distortion (reframed reported speech)\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 143px;\"\u003e\n \u003cp\u003e\u003cem\u003e\u0026quot;\u003c/em\u003e\u003cem\u003e\u003cspan dir=\"RTL\"\u003eوبسؤال اللجنة الطبية أفادت بمضمونه أن المتهم يعاني من فصام\u003c/span\u003e\u003c/em\u003e\u003cem\u003e...\u0026quot;\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 306px;\"\u003e\n \u003cp\u003eAI treats paraphrased testimony as direct stance evidence, while experts treat it as institutionally mediated reporting requiring cautious inference.\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 63px;\"\u003e\n \u003cp\u003e\u003cstrong\u003e12%\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 167px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eT4. Diglossia sensitivity gap (dialect/register shifts)\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 143px;\"\u003e\n \u003cp\u003e\u003cem\u003e\u0026quot;\u003c/em\u003e\u003cem\u003e\u003cspan dir=\"RTL\"\u003eقال الشاهد: \u0026apos;ما شفت منه إلا كل خير، وكان يهرج لحاله\u003c/span\u003e\u003c/em\u003e\u003cem\u003e\u0026apos;...\u0026quot;\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 306px;\"\u003e\n \u003cp\u003eAI\u0026rsquo;s normalization of dialectal terms like يهرج (talking/hallucinating) weakens stance cues; experts read these shifts as credibility and alignment signals.\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 63px;\"\u003e\n \u003cp\u003e\u003cstrong\u003e15%\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 167px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eT5. Over-confident stance assignment\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 143px;\"\u003e\n \u003cp\u003e\u003cem\u003e\u0026quot;\u003c/em\u003e\u003cem\u003e\u003cspan dir=\"RTL\"\u003eويظهر للدائرة يُحتمل أن يكون المتهم في حالة غير طبيعية\u003c/span\u003e\u003c/em\u003e\u003cem\u003e...\u0026quot;\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 306px;\"\u003e\n \u003cp\u003eAI overestimates certainty when stance is distributed across discourse; experts grade certainty using local and global context (يُحتمل as a hedge).\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 63px;\"\u003e\n \u003cp\u003e\u003cstrong\u003e10%\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 167px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eT6. Temporal inference slippage (Layer 2)\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 143px;\"\u003e\n \u003cp\u003e\u003cem\u003e\u0026quot;\u003c/em\u003e\u003cem\u003e\u003cspan dir=\"RTL\"\u003eثبت أن الحالة النفسية كانت سابقة لتاريخ الواقعة بمدة طويلة\u003c/span\u003e\u003c/em\u003e\u003cem\u003e...\u0026quot;\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 306px;\"\u003e\n \u003cp\u003eAI captures timeline words but misclassifies temporal relation when causality and legal relevance depend on event-construal and sequencing.\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 63px;\"\u003e\n \u003cp\u003e\u003cstrong\u003e7%\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n \u003c/table\u003e\n\u003c/div\u003e\n\u003cp\u003eThese themes indicate that AI errors in the corpus were not merely occasional extraction problems, but systematic interpretive failures concentrated in the higher-inference layers of analysis. The most prominent pattern was surface-trigger dependence, which shows that the system frequently relied on isolated lexical cues while failing to account for the institutional and doctrinal conditions that determine their legal significance. This limitation was further compounded by warrant failure, where the AI identified the descriptive content of a segment yet did not connect it to the Sharia-based inferential principle that gave it pragmatic force within the judgment. Further difficulties appeared in cases of entextualization distortion and diglossia sensitivity, both of which demonstrate that Arabic judicial discourse cannot be approached as a fully transparent record of speech.\u0026nbsp;\u003c/p\u003e\n\u003cp\u003eReported statements are often reformulated through institutional narration, and dialectal expressions may encode subtle cues of stance, credibility, or alignment that are weakened or lost in automatic normalization. The pattern of over-confident stance assignment also reveals that the AI tended to interpret hedged or distributed evidential language as more certain than the judicial text actually warranted, thereby inflating the degree of certainty conveyed in the judgment. Temporal inference slippage, although less frequent, points to a similar problem, as the system could identify timeline expressions but still misclassify their legal relevance when interpretation depended on event sequencing and causal construal rather than temporal vocabulary alone. Overall, the pattern across themes suggests that AI was more reliable in detecting surface-level signals than in producing context-valid interpretations, particularly when analysis required pragmatic integration, doctrinal reasoning, and sensitivity to the layered semiotic structure of Arabic judicial discourse.\u003c/p\u003e\n\u003ch2\u003e5.3 Integration of Quantitative and Qualitative Findings\u003c/h2\u003e\n\u003cp\u003eThe quantitative results show that AI performance is layer-dependent: it is strongest for structurally stable, genre-formulaic targets (notably Layer 3 and Layer 1) and weakest for high-inference interpretation (Layer 4). The qualitative analysis explains \u003cem\u003ewhy\u003c/em\u003e this pattern occurs: when meaning depends on doctrinal warranting, discourse positioning, and register-sensitive stance cues, AI tends to default to surface matching and produces labels that are linguistically plausible but pragmatically misaligned. Together, the two strands converge on a hybrid interpretation: AI is well-suited for high-throughput identification of stable legal and evidential markers, while expert verification is necessary where classifications require warrant-based inference.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eTable 5\u0026nbsp;\u003c/strong\u003e\u003cem\u003eJoint Display of Layer-Wise Performance and Qualitative Error Patterns\u003c/em\u003e\u003c/p\u003e\n\u003cdiv align=\"center\"\u003e\n \u003ctable border=\"1\" cellspacing=\"3\" cellpadding=\"0\"\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\n \u003cp\u003e\u003cstrong\u003eP-DIM Layer\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd\u003e\n \u003cp\u003e\u003cstrong\u003eQuantitative Summary (from Tables 1-3)\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd\u003e\n \u003cp\u003e\u003cstrong\u003eQualitative Mechanism (Detailed Discourse Explanation)\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd\u003e\n \u003cp\u003e\u003cstrong\u003eIntegrated Interpretation (RQ/H Linkage)\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003e\n \u003cp\u003e\u003cstrong\u003eL1: Institutional Weight\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd\u003e\n \u003cp\u003eHigh F1 (0.90) and very high kappa (0.91).\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd\u003e\n \u003cp\u003eAdministrative Explicit-Signaling: High alignment occurs because institutional categories (e.g., committee reports) are signaled through rigid, standardized headers and administrative headers.\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd\u003e\n \u003cp\u003eAI aligns with experts when evidence type is overtly and structurally signaled. (Supports RQ1-RQ2; consistent with H3).\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003e\n \u003cp\u003e\u003cstrong\u003eL2: Temporal Framing\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd\u003e\n \u003cp\u003eModerate performance; kappa = 0.62.\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd\u003e\n \u003cp\u003eChronological vs. Causal Dissonance: AI successfully identifies temporal markers (date/time) but fails at \u0026quot;Event-Construal.\u0026quot; It often misinterprets the causal link between a past medical history and the specific mental state at the moment of the offence.\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd\u003e\n \u003cp\u003eTemporal framing requires inferential logic beyond simple timeline extraction. (Supports RQ2; qualifies H3 for L2).\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003e\n \u003cp\u003e\u003cstrong\u003eL3: Legal Formulae\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd\u003e\n \u003cp\u003eHighest indices (F1 = 0.96); very high kappa (0.94).\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd\u003e\n \u003cp\u003eTerminological Invariance: Formulae regarding capacity (ahilyya) are stable, high-frequency, and lexically anchored in Sharia-based \u0026quot;ground truth\u0026quot; labels, allowing for near-perfect pattern recognition.\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd\u003e\n \u003cp\u003eAI functions as a highly reliable pattern recognizer for formulaic extraction. (Supports RQ1-RQ2; validates H1 for L3).\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003e\n \u003cp\u003e\u003cstrong\u003eL4: Pragmatic Function\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd\u003e\n \u003cp\u003eLowest indices (F1 = 0.41); low kappa (0.28); significant layer effect (F(4, 15) = 245.57, p \u0026lt; .001).\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd\u003e\n \u003cp\u003eThe Doctrinal-Pragmatic Gap: AI suffers from \u0026quot;Surface-Trigger Dependence\u0026quot;-detecting a token (e.g., silence) but missing the \u0026quot;Doctrinal Warrant.\u0026quot; It lacks the inferential bridge needed to recover the argumentative aim from Sharia legal maxims.\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd\u003e\n \u003cp\u003e\u0026ldquo;Pragmatic Bottleneck\u0026rdquo;: AI fails when interpretation requires recovered judicial intent and intertextual legal logic. (Supports RQ2-RQ4; validates H2 and H4).\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003e\n \u003cp\u003eL5: Stance and Evidentiality\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd\u003e\n \u003cp\u003eSubstantial performance; kappa = 0.78.\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd\u003e\n \u003cp\u003eDiglossic \u0026amp; Entextualization Distortion: The AI\u0026apos;s normalization of dialectal variations in witness testimonies reduces its sensitivity to \u0026quot;hedging.\u0026quot; It often assigns a \u0026quot;Confident\u0026quot; stance to distributed or indirect cues that human experts read as uncertain.\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd\u003e\n \u003cp\u003eAI manages overt markers well but remains \u0026quot;tone-deaf\u0026quot; to the nuanced, distributed stance-taking strategies in Arabic discourse. (Supports RQ3-RQ4; partial support for H1; confirms H5).\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n \u003c/table\u003e\n\u003c/div\u003e\n\u003cp\u003eTable 5 further clarifies that AI performance varied systematically across the five P-DIM layers because each layer imposed a different interpretive burden. In Layer 1, the combination of a high F1 score (0.90) and very high kappa (0.91) indicates that AI aligned closely with expert judgments when institutional weight was overtly marked through rigid administrative labels and standardized evidential categories. This pattern suggests that AI performs strongly when the relevant information is structurally explicit and requires limited inferential mediation, which supports Research Questions 1 and 2 and is consistent with Hypothesis 3. A related pattern appears in Layer 3, where legal formulae achieved the strongest overall results (F1 = 0.96; \u0026kappa; = 0.94). Here, the near-perfect alignment can be explained by the terminological invariance of Sharia-based capacity expressions, which are stable, recurrent, and lexically anchored, allowing AI to function as a highly effective pattern recognizer. This finding strongly supports Research Questions 1 and 2 and validates Hypothesis 1 for formulaic legal extraction.\u003c/p\u003e\n\u003cp\u003eBy contrast, Layer 2 shows that temporal framing posed a more complex challenge. Although the AI was able to identify explicit temporal markers, its moderate performance (\u0026kappa; = 0.62) reveals difficulty in moving from chronological detection to causal interpretation. In many instances, the system recognized references to time but failed to determine how a psychiatric history was legally connected to the defendant\u0026rsquo;s mental state at the precise moment of the offence. This indicates that temporal framing in judicial discourse is not reducible to timeline extraction alone, but depends on event construal and legal relevance, thereby supporting Research Question 2 while only partially confirming Hypothesis 3. The weakest results emerged in Layer 4, where pragmatic function recorded the lowest performance indices (F1 = 0.41; \u0026kappa; = 0.28), alongside a statistically significant layer effect, F(4, 15) = 245.57, p \u0026lt; .001. The discourse evidence shows that this weakness stems from a doctrinal-pragmatic gap: AI often detected surface cues, such as tokens indexing silence or mitigation, but failed to recover the doctrinal warrant or argumentative purpose that gave those cues legal force within the judgment. This identifies Layer 4 as the central pragmatic bottleneck of the model and supports Research Questions 2 to 4, while validating Hypotheses 2 and 4.\u003c/p\u003e\n\u003cp\u003eLayer 5 presents an intermediate pattern. Its substantial performance (\u0026kappa; = 0.78) shows that AI could identify overt evidential and stance markers with reasonable success, yet the qualitative analysis demonstrates persistent distortion when stance was distributed across diglossic or entextualized discourse. In these cases, automatic normalization weakened the system\u0026rsquo;s sensitivity to hedging, indirectness, and subtle evaluative positioning, often leading to more confident classifications than the text itself justified. This suggests that AI can manage explicit evidential signals, but remains insufficiently sensitive to the nuanced and distributed nature of stance-taking in Arabic judicial discourse. Accordingly, the findings for Layer 5 support Research Questions 3 and 4, offer partial support for Hypothesis 1, and confirm Hypothesis 5 by showing that reliable interpretation still depends on a hybrid workflow in which AI-assisted detection is followed by expert verification.\u003c/p\u003e\n\u003ch2\u003e5.3 Integrated Findings: Implications for a Hybrid Forensic Workflow (H4-H5)\u003c/h2\u003e\n\u003cp\u003eAcross strands, the evidence supports a functional division of labor. AI performs strongly as a high-throughput extractor for layers with stable lexical anchors and predictable genre conventions (Layers 1 and 3, and parts of Layer 5). However, when the interpretive task requires recovering pragmatic aim and doctrinal warrant-especially in Layer 4-expert analysis remains essential. Accordingly, the results support a hybrid workflow in which AI outputs are treated as candidate labels that must be verified for pragmatic-doctrinal validity, particularly under diglossia and entextualized testimony conditions.\u003c/p\u003e\n\u003ch2\u003e5.4 Summary\u003c/h2\u003e\n\u003cp\u003eOverall, the quantitative indices and the NVivo-based error profiling converge on a clear, layer-sensitive conclusion: current AI and Arabic NLP tools are most dependable when judicial meaning is surface-stable, genre-formulaic, and lexically explicit (notably Layer 3 legal formulae and Layer 1 institutional weighting, and-conditionally-overt stance markers in Layer 5). By contrast, performance deteriorates sharply when the analytic task requires contextual integration and warrant-based inference, with the most consequential limitation concentrated in Layer 4, where pragmatic-argumentative function depends on recovering judicial intent through discourse positioning, evidential hierarchies, and Sharia-grounded warrants rather than through isolated lexical triggers. In practical terms, these findings justify an augmented, not fully automated, model of forensic analysis: AI should be used to accelerate high-throughput identification of candidate features and to standardize extraction of stable constructions, while structured expert verification remains methodologically necessary to secure pragmatic-doctrinal validity-particularly in testimony-dense passages affected by diglossia, entextualization, and intertextual fiqh reasoning.\u003c/p\u003e"},{"header":"6. Discussion","content":"\u003cp\u003eThis study evaluated AI-supported analysis of Arabic judicial judgments against an expert-coded benchmark using the five-layer Pragmatic-Doctrinal Inference Model (P-DIM). Across quantitative indices (precision/recall/F1 and κ) and qualitative error profiling, the findings converge on a central conclusion: AI performance is strongly conditioned by the inferential burden of the analytic layer. This pattern aligns with prior work in forensic/legal linguistics showing that legal meaning is jointly produced by formulaicity, institutional stance, and context-dependent inference rather than by lexical triggers alone (Coulthard \u0026amp; Johnson, \u003cspan citationid=\"CR20\" class=\"CitationRef\"\u003e2007\u003c/span\u003e; Gibbons, \u003cspan citationid=\"CR32\" class=\"CitationRef\"\u003e2003\u003c/span\u003e; Tiersma, \u003cspan citationid=\"CR62\" class=\"CitationRef\"\u003e1999\u003c/span\u003e; Wright \u0026amp; Picornell, \u003cspan citationid=\"CR65\" class=\"CitationRef\"\u003e2024\u003c/span\u003e).\u003c/p\u003e \u003cdiv id=\"Sec39\" class=\"Section2\"\u003e \u003ch2\u003e6.1 AI-assisted analysis versus expert coding\u003c/h2\u003e \u003cp\u003eRQ1 asked how AI compares with expert manual coding in identifying and classifying forensic-linguistic features. The results show that AI approximates expert decisions most closely when the target is structurally stable and genre-formulaic: Layer 3 (Legal Formulae; κ\u0026thinsp;=\u0026thinsp;.94, F1 = .96) and Layer 1 (Institutional Weight; κ\u0026thinsp;=\u0026thinsp;.91, F1 = .90). These layers are characterized by recurrent legal phrasing and relatively explicit source descriptors, which are well-suited to automated extraction and corroborate corpus-based research emphasizing the computational tractability of formulaic legal language (Goźdź-Roszkowski, \u003cspan citationid=\"CR34\" class=\"CitationRef\"\u003e2021\u003c/span\u003e, \u003cspan citationid=\"CR35\" class=\"CitationRef\"\u003e2024\u003c/span\u003e). In contrast, aggregated AI-expert agreement across the scored dataset was low (κ\u0026thinsp;=\u0026thinsp;.275, N\u0026thinsp;=\u0026thinsp;120), indicating that-when items are pooled across tasks-AI diverges substantially from expert judgments. This divergence is consistent with scholarship noting that automation becomes unreliable as soon as interpretation depends on discourse function, evidential hierarchies, and institutional warranting rather than surface matching (Mazzi, \u003cspan citationid=\"CR47\" class=\"CitationRef\"\u003e2010\u003c/span\u003e; Deep \u0026amp; Chen, \u003cspan citationid=\"CR21\" class=\"CitationRef\"\u003e2025\u003c/span\u003e).\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec40\" class=\"Section2\"\u003e \u003ch2\u003e6.2 Layer-sensitive variation and the \u0026ldquo;pragmatic bottleneck\u0026rdquo;\u003c/h2\u003e \u003cp\u003eRQ2 examined whether AI accuracy varies across the five P-DIM dimensions. The ANOVA confirms a pronounced layer effect, F(4, 15)\u0026thinsp;=\u0026thinsp;245.57, p \u0026lt; .001, η\u0026sup2; = .895, indicating that performance differences are not incidental but structurally tied to layer type. Layer 4 (Pragmatic Function) exhibits the clearest collapse (κ\u0026thinsp;=\u0026thinsp;.28, F1 = .41), supporting the claim that pragmatic classification is a bottleneck for current AI pipelines. This aligns with pragmatic and discourse-analytic accounts of judicial reasoning which stress that argumentative aims (mitigation, rebuttal, public-safety justification, certainty management) are distributed across discourse structure and intertextual references rather than signaled by isolated keywords (Hussein Hamadi, \u003cspan citationid=\"CR41\" class=\"CitationRef\"\u003e2022\u003c/span\u003e; Mazzi, \u003cspan citationid=\"CR47\" class=\"CitationRef\"\u003e2010\u003c/span\u003e). Put differently, AI can often \u003cem\u003efind\u003c/em\u003e relevant segments but frequently fails to justify \u003cem\u003ewhat the segment is doing\u003c/em\u003e in the judicial argument.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec41\" class=\"Section2\"\u003e \u003ch2\u003e6.3 From extracted markers to pragmatic intentions and doctrinal warrants\u003c/h2\u003e \u003cp\u003eRQ3 asked whether AI-extracted markers correlate with pragmatic intentions and doctrinal warrants established manually. The answer is layered. For Layer 5 (Stance and Evidentiality), AI performed substantially (κ\u0026thinsp;=\u0026thinsp;.78; F1 = .83), particularly when stance is lexically explicit (e.g., epistemic verbs such as tabayyana). This is consistent with evaluation/stance research showing that many judicial certainty cues are conventionalized and therefore computationally detectable (Goźdź-Roszkowski \u0026amp; Hunston, \u003cspan citationid=\"CR36\" class=\"CitationRef\"\u003e2016\u003c/span\u003e; Szczyrbak, \u003cspan citationid=\"CR59\" class=\"CitationRef\"\u003e2014\u003c/span\u003e). However, NVivo-based comparisons indicate reduced AI sensitivity where stance is realized indirectly in entextualized testimony and dialect-proximal segments-a finding consistent with Arabic diglossia as a persistent source of interpretive risk in automated processing (Ferguson, \u003cspan citationid=\"CR28\" class=\"CitationRef\"\u003e1959\u003c/span\u003e). More importantly, Layer 4 errors show that lexical detection does not reliably entail warrant recovery: even when AI flagged cues like \u0026ldquo;silence,\u0026rdquo; it often failed to map them onto doctrinally licensed pragmatic force (Al-Qahtani, \u003cspan citationid=\"CR11\" class=\"CitationRef\"\u003e2021\u003c/span\u003e). This gap supports the P-DIM claim that meaning in Saudi judgments is \u0026ldquo;engineered\u0026rdquo; through the integration of linguistic cues with doctrinal relevance and institutional evaluation (Saudi \u0026amp; Qabayli, \u003cspan citationid=\"CR57\" class=\"CitationRef\"\u003e2023\u003c/span\u003e).\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec42\" class=\"Section2\"\u003e \u003ch2\u003e6.4 Linguistic and doctrinal constraints on holistic interpretation\u003c/h2\u003e \u003cp\u003eRQ4 targeted the constraints that prevent AI from producing a holistic forensic interpretation of mental-health construction in Sharia-based judgments. Three constraints emerge as primary. First, diglossia and register shifting: testimony-related segments can encode hedging and distancing in ways that do not align with MSA-centered patterns, lowering stance and pragmatic accuracy (Ferguson, \u003cspan citationid=\"CR28\" class=\"CitationRef\"\u003e1959\u003c/span\u003e). Second, entextualization and institutional revoicing: judgments often reframe speech and behavior into institutional narrative, meaning that pragmatic force is mediated by judicial drafting practices rather than transparently recoverable. Third, doctrinal intertextuality: Sharia-based warrants and fiqh maxims can license inferences (e.g., legally meaningful silence) that require doctrinal knowledge and contextual placement to interpret correctly (Al-Zuhayli, 2006; Al-Qahtani, \u003cspan citationid=\"CR11\" class=\"CitationRef\"\u003e2021\u003c/span\u003e). These constraints explain why Layer 4 is consistently the weakest layer and why aggregated agreement is low when items require warrant-based inference.\u003c/p\u003e \u003cp\u003eHypothesis testing showed a clear, layer-sensitive pattern. H1 was supported: AI achieved very high agreement and F1 for Layer 3 (legal formulae) and solid performance for Layer 5 (stance and evidentiality), indicating that automated methods are most effective when targets are genre-stable and lexically conventionalized. H2 was supported unequivocally: Layer 4 (pragmatic function) produced the lowest scores across indices, and the ANOVA confirmed that performance differences are strongly driven by layer type, consistent with the claim that pragmatic classification constitutes the principal bottleneck when inference depends on argumentative intent and doctrinal warrant rather than surface cues. H3 received partial support: AI aligned very closely with expert coding for Layer 1 (institutional weight), but only moderately for Layer 2 (temporal framing; kappa = .62), suggesting that temporal construal remains relatively inference-sensitive even when terminology is domain-calibrated. H4 was supported by the qualitative evidence: recurrent error profiles linked AI-expert divergence to Arabic diglossia, entextualized testimony, and intertextual Sharia-based warrants that require context-dependent interpretation to recover function and legal relevance. Finally, H5 was supported at the workflow level: taken together - especially the persistent Layer-4 weakness and the low pooled agreement (kappa = .275) - the findings justify a division of labor in which AI operates as a high-throughput front-end filter while expert analysts apply structured verification to secure pragmatic-doctrinal validity in the final interpretation (Faisal, \u003cspan citationid=\"CR27\" class=\"CitationRef\"\u003e2024\u003c/span\u003e; Al-Fraidan, \u003cspan citationid=\"CR6\" class=\"CitationRef\"\u003e2024\u003c/span\u003e).\u003c/p\u003e \u003c/div\u003e"},{"header":"7. Conclusion","content":"\u003cdiv id=\"Sec44\" class=\"Section2\"\u003e \u003ch2\u003e7.1 Summary of contributions\u003c/h2\u003e \u003cp\u003eThis study contributes a replicable, layer-based benchmarking framework for Arabic forensic linguistics by operationalizing P-DIM as a five-layer annotation scheme and evaluating AI outputs against expert coding in Saudi criminal judgments where psychiatric evidence is salient. Empirically, the findings show that AI is most reliable where judicial meaning is strongly conventionalized-particularly in extracting legal formulae (Layer 3) and identifying overt certainty/stance markers (Layer 5)-but substantially less reliable when interpretation depends on pragmatic-doctrinal inference (especially Layer 4). Substantively, the results support the view that the \u0026ldquo;engineering of meaning\u0026rdquo; in Saudi judgments is a socio-cognitive and doctrinally warranted process that exceeds current pattern-recognition capabilities, even when models can detect relevant lexical cues (Saudi \u0026amp; Qabayli, \u003cspan citationid=\"CR57\" class=\"CitationRef\"\u003e2023\u003c/span\u003e; Wright \u0026amp; Picornell, \u003cspan citationid=\"CR65\" class=\"CitationRef\"\u003e2024\u003c/span\u003e).\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec45\" class=\"Section2\"\u003e \u003ch2\u003e7.2 Practical and policy implications\u003c/h2\u003e \u003cp\u003eIn the context of judicial digital transformation (including Saudi Vision 2030 initiatives), the evidence supports augmented intelligence rather than full automation for forensic interpretation tasks. AI systems can productively accelerate front-end processing-flagging institutional source types, extracting stable legal formulae, and highlighting explicit stance markers-yet expert oversight remains essential for layers where legal meaning depends on argumentative intent and Sharia-grounded warrants. Accordingly, the study\u0026rsquo;s applied implication is procedural: AI-assisted forensic workflows should implement layered verification checklists aligned with P-DIM, with mandatory expert review for pragmatic-function labels and for testimony-dense segments where diglossia and entextualization elevate misinterpretation risk.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec46\" class=\"Section2\"\u003e \u003ch2\u003e7.3 Future directions\u003c/h2\u003e \u003cp\u003eFuture work should pursue doctrinally aware NLP by incorporating fiqh-maxim knowledge representations and Sharia-relevant legal terminology into training and evaluation, with explicit testing on warrant recovery rather than token detection. Methodologically, extending the design to larger, diachronic corpora would allow stronger generalization about how AI handles evolving legal lexis and shifting judgment-writing conventions. More broadly, the study reinforces a core forensic principle: in high-stakes legal interpretation, computational efficiency is valuable, but the validity of conclusions depends on human expertise capable of integrating linguistic evidence with institutional reasoning and doctrinal warranting.\u003c/p\u003e \u003c/div\u003e"},{"header":"Declarations","content":"\u003ch2\u003eClinical trial number\u003c/h2\u003e\n\u003cp\u003eClinical trial number: not applicable.\u003c/p\u003e\n\u003ch2\u003eConsent to Publish\u003c/h2\u003e\n\u003cp\u003eConsent to Publish declaration: not applicable.\u003c/p\u003e\n\u003ch2\u003eConsent to Participate\u003c/h2\u003e\n\u003cp\u003eConsent to Participate declaration: not applicable because this study did not involve human participants.\u003c/p\u003e\n\u003ch2\u003eEthics\u003c/h2\u003e\n\u003cp\u003eEthics approval: not applicable because this study relied exclusively on published archival judicial texts and did not involve human participants, human data collection, or direct participant contact.\u003c/p\u003e\n\u003ch2\u003eFunding\u003c/h2\u003e\n\u003cp\u003eThis research was supported by a grant from the Deanship of Scientific Research at the University of Hail, Saudi Arabia, under project number RG-25 038.\u003c/p\u003e\n\u003ch2\u003eAuthor Contribution\u003c/h2\u003e\n\u003cp\u003eB.S.A. conceived the study, designed the research framework, conducted the formal analysis, and wrote the main manuscript text. K.N.A. contributed to the study design, assisted with data interpretation, and revised the manuscript critically for important intellectual content. M.O.A. supported data collection, corpus preparation, and methodological organization, and contributed to manuscript revision. W.A. contributed to the theoretical framing, statistical interpretation, and academic editing of the manuscript. All authors reviewed the manuscript and approved the final version.\u003c/p\u003e\n\u003ch2\u003eAcknowledgement\u003c/h2\u003e\n\u003cp\u003eThe authors gratefully acknowledge the support provided by the Deanship of Scientific Research at the University of Hail, and the Humanities Research Center, Saudi Arabia, under grant number RG-25 038.\u003c/p\u003e\n\u003ch2\u003eData Availability\u003c/h2\u003e\n\u003cp\u003eThe judicial texts analyzed in this study were drawn from the official Majmuat al-Ahkam al-Qadaiyya published by the Saudi Ministry of Justice and are available in that published source. The coding framework and extracted analytical dataset supporting the findings of this study are available from the corresponding author on reasonable request.\u003c/p\u003e"},{"header":"References","content":"\u003col\u003e\n\u003cli\u003eAdamu, A. U. (2023). \u0026ldquo;Komai nisan dare, akwai wani online\u0026rdquo;: Social media and the emergence of Hausa neoproverbs. \u003cem\u003eHumanities, 12\u003c/em\u003e(3), Article 44. https://doi.org/10.3390/h12030044\u003c/li\u003e\n\u003cli\u003eAfshar, M. (2008). \u003cem\u003ePower and language in Iranian criminal courts\u003c/em\u003e [Unpublished doctoral dissertation]. University of Malaya.\u003c/li\u003e\n\u003cli\u003eAisha, N., Qamar, K., \u0026amp; Qasim, H. M. (2019). Investigating the social functions of code-switching in \u003cem\u003eAmarbail\u003c/em\u003e by Umera Ahmed. \u003cem\u003eInternational Journal of English Linguistics, 9\u003c/em\u003e(3), 164\u0026ndash;175. https://doi.org/10.5539/ijel.v9n3p164\u003c/li\u003e\n\u003cli\u003eAl-Athwary, A., \u0026amp; Ali, H. (2023). Arabicization via loan translation: A corpus-based analysis of neologisms translated from English into Arabic in the field of information technology. \u003cem\u003eResearch Square\u003c/em\u003e. https://doi.org/10.21203/rs.3.rs-3408038/v1\u003c/li\u003e\n\u003cli\u003eAl-Dulaimi, T. M. (2024). \u003cem\u003eAthar al-amrāḍ al-nafsiyya ʿalā al-masʾūliyya al-jināʾiyya fī al-fiqh al-islāmī wa-l-qānūn\u003c/em\u003e [The effect of mental illnesses on criminal responsibility in Islamic jurisprudence and law]. \u003cem\u003eJournal of Tikrit University for Legal and Political Sciences, 16\u003c/em\u003e(1), 112\u0026ndash;145.\u003c/li\u003e\n\u003cli\u003eAl-Fraidan, A. A. (2024). AI integration and critical engagement in Saudi EFL courses: A mixed-method study. \u003cem\u003eWorld Journal of English Language, 14\u003c/em\u003e(3), 88\u0026ndash;99. https://doi.org/10.5430/wjel.v14n3p88\u003c/li\u003e\n\u003cli\u003eAl-Harbi, F. A., \u0026amp; Al-Ahdal, A. A. M. H. (2024). ChatGPT in the Saudi EFL context: Digital critical thinking and academic performance. \u003cem\u003eFrontiers in Psychology, 15\u003c/em\u003e, Article 1334512. https://doi.org/10.3389/fpsyg.2024.1334512\u003c/li\u003e\n\u003cli\u003eAlhomoud, G. N. J. (2022). On translating and drafting Sharia legal terms and expressions in Saudi contracts. \u003cem\u003eEducation Research International, 2022\u003c/em\u003e, Article 7167970. https://doi.org/10.1155/2022/7167970\u003c/li\u003e\n\u003cli\u003eAl-Kasimi, A. M. (1977). \u003cem\u003eLinguistics and bilingual dictionaries\u003c/em\u003e. Brill.\u003c/li\u003e\n\u003cli\u003eAlotaibi, A. A., \u0026amp; Alshehri, M. G. (2023). Prospects and obstacles of artificial intelligence in higher education institutions in Saudi Arabia. \u003cem\u003eInternational Journal of Emerging Technologies in Learning, 18\u003c/em\u003e(24), 4\u0026ndash;21.\u003c/li\u003e\n\u003cli\u003eAl-Qahtani, A. (2021). Silence as legal communication: Applications of fiqh maxims in Saudi adjudication. \u003cem\u003eJournal of Islamic Law Studies, 35\u003c/em\u003e(2), 145\u0026ndash;172.\u003c/li\u003e\n\u003cli\u003eAlruwaili, N. M., Ali, Z., Siddiqui, M. S., Butt, A. H., Ahmad, H., Ali, R., \u0026amp; Alsalem, S. H. (2025). Exploring the impact of female students\u0026rsquo; digital intelligence on sustainable learning and digital mental well-being: A case study of Saudi Arabia. \u003cem\u003eSustainability, 17\u003c/em\u003e(14), Article 6632. https://doi.org/10.3390/su17146632\u003c/li\u003e\n\u003cli\u003eAl-Smadi, H. R., Alharbi, M. A., \u0026amp; Alhowaimel, S. A. (2024). Artificial intelligence for English language learning and teaching: Advancing sustainable development goals. \u003cem\u003eJournal of Language Teaching and Research, 15\u003c/em\u003e(6), 1394\u0026ndash;1405. https://doi.org/10.17507/jltr.1506.09\u003c/li\u003e\n\u003cli\u003eAl-Sofi, B. B. M. A. (2024). Artificial intelligence-powered tools and academic writing: To use or not to use ChatGPT. \u003cem\u003eSaudi Journal of Language Studies, 4\u003c/em\u003e(3), 145\u0026ndash;161. https://doi.org/10.1108/SJLS-06-2024-0029\u003c/li\u003e\n\u003cli\u003eAppelbaum, P. S. (2006). Violence and mental disorders: Data and public policy. \u003cem\u003eAmerican Journal of Psychiatry, 163\u003c/em\u003e(8), 1319\u0026ndash;1321. https://doi.org/10.1176/appi.ajp.163.8.1319\u003c/li\u003e\n\u003cli\u003eAsokan, T. V. (2016). The insanity defense: Related issues. \u003cem\u003eIndian Journal of Psychiatry, 58\u003c/em\u003e(Suppl. 2), S191\u0026ndash;S198. https://doi.org/10.4103/0019-5545.196832\u003c/li\u003e\n\u003cli\u003eAziz, S., Ahmed, M. M., Naveed, A., \u0026amp; Zubair, H. M. (2024). A journey from Urdu to Urgaizī: A study of English code switching in the Urdu novels of Umera Ahmed and Nemrah Ahmed. \u003cem\u003eJahan-e-Tahqeeq, 7\u003c/em\u003e(1), 87\u0026ndash;104. https://doi.org/10.61866/jt.v6i4.1066\u003c/li\u003e\n\u003cli\u003eCasey, E. (2011). \u003cem\u003eDigital evidence and computer crime: Forensic science, computers, and the Internet\u003c/em\u003e (3rd ed.). Academic Press.\u003c/li\u003e\n\u003cli\u003eCharrow, R. P., \u0026amp; Charrow, V. R. (1979). Making legal language understandable: A psycholinguistic study of jury instructions. \u003cem\u003eColumbia Law Review, 79\u003c/em\u003e(7), 1306\u0026ndash;1374.\u003c/li\u003e\n\u003cli\u003eCoulthard, M., \u0026amp; Johnson, A. (2007). \u003cem\u003eAn introduction to forensic linguistics: Language in evidence\u003c/em\u003e. Routledge.\u003c/li\u003e\n\u003cli\u003eDeep, P. D., \u0026amp; Chen, Y. (2025). The role of AI in academic writing: Impacts on writing skills, critical thinking, and integrity in higher education. \u003cem\u003eSocieties, 15\u003c/em\u003e(9), Article 247. https://doi.org/10.3390/soc15090247\u003c/li\u003e\n\u003cli\u003eDenault, V. (2024). Nonverbal communication and credibility in Australian courts. \u003cem\u003eThe International Journal of Evidence \u0026amp; Proof, 28\u003c/em\u003e(1), 33\u0026ndash;54. https://doi.org/10.1177/13657127231215647\u003c/li\u003e\n\u003cli\u003eDenault, V., \u0026amp; Bozin, D. (2024). The influence of \u0026ldquo;body language\u0026rdquo; on the assessment of witness credibility in Australian written court judgments. \u003cem\u003eJournal of Forensic Psychology Research and Practice\u003c/em\u003e. Advance online publication. https://doi.org/10.1080/24732850.2024.2399616\u003c/li\u003e\n\u003cli\u003eDooly, M., \u0026amp; Bakri, O. (2024). Code-switching in a legal English class for Egyptian learners: A conversation analysis case study. \u003cem\u003eArab World English Journal, 15\u003c/em\u003e(3), 297\u0026ndash;320. https://doi.org/10.24093/awej/vol15no3.18\u003c/li\u003e\n\u003cli\u003eEl-Farahaty, H. (2010). Lexical and syntax features of English and Arabic legal discourse: A comparative study. \u003cem\u003eComparative Legilinguistics, 4\u003c/em\u003e, 59\u0026ndash;77.\u003c/li\u003e\n\u003cli\u003eElieba, F. M. (2020). Textuality and ambiguity of forensic texts: Egyptian Supreme Court\u0026mdash;A model. \u003cem\u003eBeni-Suef University International Journal of Humanities and Social Sciences, 2\u003c/em\u003e(2), 114\u0026ndash;164.\u003c/li\u003e\n\u003cli\u003eFaisal, E. (2024). Unlock the potential for Saudi Arabian higher education: A systematic review of the benefits of ChatGPT. \u003cem\u003eFrontiers in Education, 9\u003c/em\u003e, Article 1325601. https://doi.org/10.3389/feduc.2024.1325601\u003c/li\u003e\n\u003cli\u003eFerguson, C. A. (1959). Diglossia. \u003cem\u003eWord, 15\u003c/em\u003e(2), 325\u0026ndash;340. https://doi.org/10.1080/00437956.1959.11659702\u003c/li\u003e\n\u003cli\u003eFerguson, M., \u0026amp; Ogloff, J. R. P. (2011). Criminal responsibility evaluations: Role of psychologists in assessment. \u003cem\u003ePsychiatry, Psychology and Law, 18\u003c/em\u003e(1), 79\u0026ndash;94. https://doi.org/10.1080/13218719.2010.543402\u003c/li\u003e\n\u003cli\u003eGallego Balcells, J. (2023). \u003cem\u003eForensic linguistics and the analysis of legal discourse: Approaches to confession and evidence\u003c/em\u003e. Routledge.\u003c/li\u003e\n\u003cli\u003eGerome, S. C. (2023). \u003cem\u003eThe translation of lexicalized metaphors in interlinguistic and intercultural communication of financial security discourse: A corpus-based analysis of English and Spanish\u003c/em\u003e [Doctoral dissertation, University of Salamanca].\u003c/li\u003e\n\u003cli\u003eGibbons, J. (2003). \u003cem\u003eForensic linguistics: An introduction to language in the justice system\u003c/em\u003e. Blackwell.\u003c/li\u003e\n\u003cli\u003eG\u0026oacute;mez, M. L. (2012). \u003cem\u003eLexical borrowings in the Colombian online newspaper El Tiempo from 1990 to 2012\u003c/em\u003e [Doctoral dissertation, University of Alabama].\u003c/li\u003e\n\u003cli\u003eGoźdź-Roszkowski, S. (2021). Corpus linguistics in legal discourse. \u003cem\u003eInternational Journal for the Semiotics of Law, 34\u003c/em\u003e(4), 943\u0026ndash;970. https://doi.org/10.1007/s11196-020-09799-3\u003c/li\u003e\n\u003cli\u003eGoźdź-Roszkowski, S. (2024). \u003cem\u003eLanguage and legal judgments: Evaluation and argument in judicial discourse\u003c/em\u003e. Routledge.\u003c/li\u003e\n\u003cli\u003eGoźdź-Roszkowski, S., \u0026amp; Hunston, S. (2016). Corpora and beyond: Investigating evaluation in discourse. \u003cem\u003eCorpora, 11\u003c/em\u003e(2), 131\u0026ndash;141. https://doi.org/10.3366/cor.2016.0089\u003c/li\u003e\n\u003cli\u003eHamdi, S. A. (2018). \u003cem\u003eThe impact of ideology on lexical borrowing in Arabic: A synergy of corpus linguistics and critical discourse analysis\u003c/em\u003e [Doctoral dissertation, University of New Mexico].\u003c/li\u003e\n\u003cli\u003eHart, C. (2013). Event-construal in press reports of violence in two recent political protests: A cognitive linguistic approach. \u003cem\u003eJournal of Language and Politics, 12\u003c/em\u003e(3), 400\u0026ndash;423. https://doi.org/10.1075/jlp.12.3.05har\u003c/li\u003e\n\u003cli\u003eHasan, S., Nasreen, S., \u0026amp; Rasul, S. S. U. (2025). Leveraging artificial intelligence (AI) in higher education: Fostering soft skills and critical thinking. \u003cem\u003eInsights: Journal of Life and Social Sciences, 5\u003c/em\u003e(1), 71\u0026ndash;79.\u003c/li\u003e\n\u003cli\u003eHeydon, G. (2019). \u003cem\u003eResearching forensic linguistics: Approaches and applications\u003c/em\u003e. Routledge.\u003c/li\u003e\n\u003cli\u003eHussein Hamadi, H. (2022). \u003cem\u003eĀliyyāt al-ḥijāj fī al-khiṭāb al-qaḍāʾī al-Saʿūdī: Muqāraba tadāwuliyya\u003c/em\u003e [Argumentation mechanisms in Saudi judicial discourse: A pragmatic approach]. \u003cem\u003eJournal of Arts and Humanities (King Abdulaziz University), 30\u003c/em\u003e(2), 89\u0026ndash;115.\u003c/li\u003e\n\u003cli\u003eJake, J. L., Myers-Scotton, C., \u0026amp; Gross, S. (2002). Making a minimalist approach to code-switching work: Adding the Matrix Language. \u003cem\u003eBilingualism: Language and Cognition, 5\u003c/em\u003e(1), 69\u0026ndash;91. https://doi.org/10.1017/S1366728902000147\u003c/li\u003e\n\u003cli\u003eKperogi, F. A. (2018). \u0026ldquo;Your English is suspect\u0026rdquo;: Language, communication, and the pathologization of Nigerian cyber identity through the stylistic imprints of Nigerian email scams. \u003cem\u003eJournal of Communication Inquiry, 42\u003c/em\u003e(4), 391\u0026ndash;413. https://doi.org/10.1177/0196859918792652\u003c/li\u003e\n\u003cli\u003eKrippendorff, K. (2013). \u003cem\u003eContent analysis: An introduction to its methodology\u003c/em\u003e (3rd ed.). SAGE.\u003c/li\u003e\n\u003cli\u003eMahajna, D. A. E. (2019). \u003cem\u003eA study of loanwords and code switching in spoken and online written Arabic by Palestinian Israelis\u003c/em\u003e [Doctoral dissertation, Indiana University]. ProQuest Dissertations \u0026amp; Theses Global. (Publication No. 13865054)\u003c/li\u003e\n\u003cli\u003eMarkowitz, F. E. (2011). Mental illness, crime, and violence: Risk, context, and social control. \u003cem\u003eAggression and Violent Behavior, 16\u003c/em\u003e(1), 36\u0026ndash;44. https://doi.org/10.1016/j.avb.2010.10.003\u003c/li\u003e\n\u003cli\u003eMazzi, D. (2010). \u0026ldquo;This argument fails for two reasons\u0026hellip;\u0026rdquo;: A corpus-based analysis of judicial evaluation. \u003cem\u003eResearch in Language, 8\u003c/em\u003e(2), 187\u0026ndash;200. https://doi.org/10.2478/v10015-010-0009-5\u003c/li\u003e\n\u003cli\u003eMeyer, J. F., Weaver, C. M., \u0026amp; Reppucci, N. D. (2020). \u003cem\u003eLaw and mental health: A case-based approach\u003c/em\u003e (2nd ed.). Guilford Press.\u003c/li\u003e\n\u003cli\u003eMozaic, Z. (2009). \u003cem\u003eA study of lexical borrowing and occasional code-switching amongst young middle-class Syrians in Saudi Arabia and Syria\u003c/em\u003e [Master\u0026rsquo;s thesis, University of Cape Town].\u003c/li\u003e\n\u003cli\u003eMowafy, M. (2024). Cyberfeminism in Egypt: A computer-mediated discourse analysis. \u003cem\u003eJournal of Languages and Translation, 11\u003c/em\u003e(2), 31\u0026ndash;55. https://doi.org/10.21608/jltmin.2024.352115\u003c/li\u003e\n\u003cli\u003eMunuku, A. W. (2019). \u003cem\u003eInfluence of Twitter hashtags on the formation of public opinion on socio-political issues in Kenya\u003c/em\u003e [Doctoral dissertation, Jomo Kenyatta University of Agriculture and Technology]. JKUAT Institutional Repository. http://hdl.handle.net/123456789/4899\u003c/li\u003e\n\u003cli\u003eMyers-Scotton, C. (1993). \u003cem\u003eSocial motivations for code-switching: Evidence from Africa\u003c/em\u003e. Clarendon Press.\u003c/li\u003e\n\u003cli\u003eNagle, A. (2015). \u003cem\u003eAn investigation into contemporary online anti-feminist movements\u003c/em\u003e [Doctoral dissertation, Dublin City University].\u003c/li\u003e\n\u003cli\u003eNee, C., \u0026amp; Witt, C. (2013). Public perceptions of risk in criminality: The effects of mental illness and social disadvantage. \u003cem\u003ePsychiatry Research, 209\u003c/em\u003e(3), 675\u0026ndash;683. https://doi.org/10.1016/j.psychres.2013.02.013\u003c/li\u003e\n\u003cli\u003ePoplack, S. (1980). Sometimes I\u0026rsquo;ll start a sentence in Spanish y termino en espa\u0026ntilde;ol: Toward a typology of code-switching. \u003cem\u003eLinguistics, 18\u003c/em\u003e(7\u0026ndash;8), 581\u0026ndash;618. https://doi.org/10.1515/ling.1980.18.7-8.581\u003c/li\u003e\n\u003cli\u003eRiabi, A. (2025). \u003cem\u003eSmall is beautiful: Addressing resource scarcity, language variation, and transfer challenges for automatic detection of harmful language\u003c/em\u003e [Doctoral dissertation, Universit\u0026eacute; de Lorraine].\u003c/li\u003e\n\u003cli\u003eSaudi, A., \u0026amp; Qabayli, M. (2023). \u003cem\u003eHandasat al-maʿnā fī al-aḥkām al-qaḍāʾiyya: Dirāsa lisāniyya maʿrifiyya\u003c/em\u003e [The engineering of meaning in judicial judgments: A cognitive linguistic study]. \u003cem\u003eJournal of King Saud University: Arts and Humanities, 35\u003c/em\u003e(3), 321\u0026ndash;345.\u003c/li\u003e\n\u003cli\u003eSayers, D., Sousa-Silva, R., H\u0026ouml;hn, S., \u0026amp; Ahmedi, L. (Eds.). (2021). \u003cem\u003eThe dawn of the human-machine era: A forecast of new and emerging language technologies\u003c/em\u003e (COST Action CA19102 \u0026ldquo;Language in the Human-Machine Era\u0026rdquo; technical report). University of Jyv\u0026auml;skyl\u0026auml;. https://doi.org/10.17011/jyx/reports/20210518/1\u003c/li\u003e\n\u003cli\u003eSzczyrbak, M. (2014). Stancetaking strategies in judicial discourse: Evidence from US Supreme Court opinions. \u003cem\u003eStudia Linguistica Universitatis Iagellonicae Cracoviensis, 131\u003c/em\u003e, 91\u0026ndash;120. https://doi.org/10.4467/20834624SL.14.005.1377\u003c/li\u003e\n\u003cli\u003eSylvia, I., \u0026amp; Bachtiar, A. (2024). The integration of artificial intelligence in EFL writing: Promoting multimodal composing and digital literacy. \u003cem\u003eIndonesian Journal of Applied Linguistics, 13\u003c/em\u003e(3), 670\u0026ndash;685.\u003c/li\u003e\n\u003cli\u003eTabe, C. (2018). E-morphology in Cameroon social media. \u003cem\u003eUS-China Foreign Language, 16\u003c/em\u003e(1), 1\u0026ndash;9. https://doi.org/10.17265/1539-8080/2018.01.001\u003c/li\u003e\n\u003cli\u003eTiersma, P. M. (1999). \u003cem\u003eLegal language\u003c/em\u003e. University of Chicago Press.\u003c/li\u003e\n\u003cli\u003eVitacco, M. J. (2020). Insanity defense. In R. D. Morgan (Ed.), \u003cem\u003eThe SAGE encyclopedia of criminal psychology\u003c/em\u003e (pp. 665\u0026ndash;669). SAGE Publications. https://doi.org/10.4135/9781483392240.n235\u003c/li\u003e\n\u003cli\u003eWizārat al-ʿAdl [Ministry of Justice]. (1435 AH). \u003cem\u003eMajmūʿat al-Aḥkām al-Qaḍāʾiyya\u003c/em\u003e [Collection of judicial decisions]. Ministry of Justice.\u003c/li\u003e\n\u003cli\u003eWright, D., \u0026amp; Picornell, I. (2024). Semiotic perspectives on forensic and legal linguistics: Unifying approaches in the language of the legal process and language in evidence. \u003cem\u003eInternational Journal for the Semiotics of Law, 37\u003c/em\u003e(2), 293\u0026ndash;304. https://doi.org/10.1007/s11196-023-10094-z\u003c/li\u003e\n\u003cli\u003eYassin, M. N. (2002). \u003cem\u003eAḥkām al-marīḍ al-nafsī fī al-fiqh al-islāmī\u003c/em\u003e [Rulings regarding the mentally ill in Islamic jurisprudence]. Dār al-Nafāʾis.\u003c/li\u003e\n\u003cli\u003eZamawe, F. C. (2015). The implication of using NVivo software in qualitative data analysis: Evidence-based reflections. \u003cem\u003eMalawi Medical Journal, 27\u003c/em\u003e(1), 13\u0026ndash;15. https://doi.org/10.4314/mmj.v27i1.4\u003c/li\u003e\n\u003c/ol\u003e"}],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":true,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":false,"hideJournal":false,"highlight":"","institution":"","isAcceptedByJournal":false,"isAuthorSuppliedPdf":false,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":false,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"discover-artificial-intelligence","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"diai","sideBox":"Learn more about [Discover Artificial Intelligence](https://www.springer.com/44163)","snPcode":"","submissionUrl":"","title":"Discover Artificial Intelligence","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"stoa","reportingPortfolio":"Discover Series","inReviewEnabled":true,"inReviewRevisionsEnabled":true},"keywords":"forensic linguistics, Arabic judicial discourse, artificial intelligence, natural language processing, evidentiality, Sharia-based reasoning","lastPublishedDoi":"10.21203/rs.3.rs-9312779/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-9312779/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eThis study examined how effectively current artificial intelligence (AI) and Arabic natural language processing (NLP) tools can support forensic linguistic analysis of Arabic judicial texts when compared with expert manual coding. Using a comparative evaluation design, it analyzed a purposive corpus of Saudi criminal judgments drawn from \u003cem\u003eMajmuat al-Ahkam al-Qadaiyya\u003c/em\u003e (Ministry of Justice, 1435 AH/2013\u0026ndash;2014 CE), focusing on cases in which psychiatric evidence and claims of diminished capacity were central. The Pragmatic-Doctrinal Inference Model (P-DIM) was implemented through a five-layer annotation framework covering: (a) the institutional weight of psychiatric evidence, (b) the temporal framing of illness, (c) formulaic constructions of legal capacity and responsibility, (d) pragmatic-argumentative function in judicial reasoning, and (e) evidential stance and certainty grading. Two trained analysts applied the scheme in a CAQDAS-supported workflow and established inter-coder agreement before adjudication. In parallel, an AI-assisted pipeline combining large language model classification with Arabic-specific preprocessing was used to identify the same layers through controlled prompting and constrained outputs. Performance was assessed through precision, recall, F1 scores, agreement analysis, and qualitative error profiling. Results showed that AI performance differed markedly by inferential complexity: it was strongest for structurally stable, genre-formulaic layers, especially formulaic legal capacity and institutional weighting, but weaker for context-dependent layers requiring pragmatic interpretation. A one-way ANOVA revealed a significant effect of P-DIM layer on performance, \u003cem\u003eF\u003c/em\u003e(4, 15)\u0026thinsp;=\u0026thinsp;245.57, \u003cem\u003ep\u003c/em\u003e \u0026lt; .001, η\u0026sup2; = .895. Overall AI-expert agreement was modest, κ\u0026thinsp;=\u0026thinsp;.275 (\u003cem\u003eN\u003c/em\u003e\u0026thinsp;=\u0026thinsp;120), supporting a hybrid workflow in which AI assists screening while expert judgment remains essential.\u003c/p\u003e","manuscriptTitle":"Artificial Intelligence Tools for Analyzing Forensic Linguistic Features of Arabic Texts in a Comparative Case Study","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2026-05-06 16:36:40","doi":"10.21203/rs.3.rs-9312779/v1","editorialEvents":[{"type":"communityComments","content":0},{"type":"decision","content":"Revision requested","date":"2026-05-08T14:20:35+00:00","index":"","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-05-06T14:21:48+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"238406422602200506370077527014645813784","date":"2026-05-03T13:50:38+00:00","index":"hide","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-05-03T10:58:59+00:00","index":"hide","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-05-02T18:23:42+00:00","index":"hide","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-04-30T08:47:34+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"250057693137734581751508066007819556359","date":"2026-04-29T10:15:01+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"146460008919790078119926759599177370271","date":"2026-04-27T17:10:38+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"101934930392547207690136273121322054378","date":"2026-04-27T15:19:53+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"213881079285293155164667648519279474408","date":"2026-04-27T13:38:25+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"201336618984421807407442535715424561723","date":"2026-04-27T12:41:49+00:00","index":"hide","fulltext":""},{"type":"reviewersInvited","content":"","date":"2026-04-27T09:27:12+00:00","index":"","fulltext":""},{"type":"editorAssigned","content":"","date":"2026-04-27T09:09:03+00:00","index":"","fulltext":""},{"type":"editorInvited","content":"","date":"2026-04-22T02:25:30+00:00","index":"","fulltext":""},{"type":"checksComplete","content":"","date":"2026-04-21T13:49:40+00:00","index":"","fulltext":""},{"type":"submitted","content":"Discover Artificial Intelligence","date":"2026-04-21T12:55:28+00:00","index":"","fulltext":""}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"discover-artificial-intelligence","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"diai","sideBox":"Learn more about [Discover Artificial Intelligence](https://www.springer.com/44163)","snPcode":"","submissionUrl":"","title":"Discover Artificial Intelligence","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"stoa","reportingPortfolio":"Discover Series","inReviewEnabled":true,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"8db20056-bf88-49f3-bf7f-cd78c600d018","owner":[],"postedDate":"May 6th, 2026","published":true,"recentEditorialEvents":[{"type":"decision","content":"Revision requested","date":"2026-05-08T14:20:35+00:00","index":"","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-05-06T14:21:48+00:00","index":88,"fulltext":""},{"type":"reviewerAgreed","content":"238406422602200506370077527014645813784","date":"2026-05-03T13:50:38+00:00","index":87,"fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-05-03T10:58:59+00:00","index":86,"fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-05-02T18:23:42+00:00","index":85,"fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-04-30T08:47:34+00:00","index":84,"fulltext":""},{"type":"reviewerAgreed","content":"250057693137734581751508066007819556359","date":"2026-04-29T10:15:01+00:00","index":82,"fulltext":""}],"rejectedJournal":[],"revision":"","amendment":"","status":"under-review","subjectAreas":[],"tags":[],"updatedAt":"2026-05-14T09:39:01+00:00","versionOfRecord":[],"versionCreatedAt":"2026-05-06 16:36:40","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-9312779","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-9312779","identity":"rs-9312779","version":["v1"]},"buildId":"XKTyCvWXoU3ODBz1xrDgd","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.