Scripture Detector
About

Scripture Detector

An AI-powered tool for detecting, classifying, and analyzing biblical quotations, paraphrases, and allusions in historical texts โ€” powered by Google Gemini.

Powered by Google Gemini Yale University Open Source
๐Ÿ‘ค

Dr. William J.B. Mattingly

Cultural Heritage Data Scientist ยท Yale University

Scripture Detector was developed by Dr. William J.B. Mattingly, Cultural Heritage Data Scientist at Yale University. The application was built for the international workshop Ruse of Reuse: Detecting Text-similarity with AI in Historical Sources (March 5โ€“6, 2026), hosted by the Austrian Academy of Sciences in Vienna.

Ruse of Reuse Workshop ยท March 5โ€“6, 2026

Austrian Academy of Sciences ยท PSK, Georg-Coch-Platz 2, 1010 Vienna
Organised by the Digital Lab, Institute for Medieval Research, Austrian Academy of Sciences & SOLEMNE, Radboud University

What is Scripture Detector?

Scripture Detector is an AI-powered web application that analyzes historical and literary texts to find and classify all the ways biblical scripture appears within them. Given any piece of text, the application uses large language models to locate exact quotations, partial quotations, paraphrases, and allusions to specific Bible verses.

Each detected passage is linked to the exact verse(s) it references, displayed in context within the original document, and explored through interactive visualizations. The application is designed for scholars, students, and researchers working with texts that draw on the biblical tradition.

How It Works

1

Add a Source Text

Paste any text you want to analyze โ€” a sermon, a letter, a medieval chronicle, a theological treatise โ€” into the Sources page. The text is stored locally in a SQLite database.

2

AI Detection via Google Gemini

Click "Process with AI" to send the text to Google Gemini with a carefully engineered prompt. The model returns a structured JSON list of all detected scriptural passages, their verse references, and classification types. Only a free Gemini API key is required.

3

Span Location & Annotation

The app finds the exact character span of each detected quote within the original text, then stores annotations linking text spans to specific Bible verses using a full verse database.

4

Interactive Exploration

View color-coded highlights directly in the text, click any passage to see the verse references and original Bible text side-by-side, edit or add annotations manually, and explore distribution charts by Bible book, testament, and quote type.

Quote Classification Types

The AI classifies each detected passage into one of four categories:

Full

A complete or near-complete verse quoted verbatim from the Bible.

Partial

A recognizable portion of a verse, quoted with minor variation or truncation.

Paraphrase

Biblical content clearly restated in different words while preserving the meaning.

Allusion

A brief phrase, thematic echo, or indirect reference to a specific verse.

Technical Requirements

  • Python 3.10+ with Flask โ€” the entire backend runs as a lightweight local web application.
  • SQLite โ€” all sources, annotations, and settings are stored in a local database with no external server required.
  • A full Bible verse database (35,000+ verses) is included and used for verse lookup and reference validation.
  • Google Vertex AI or a Gemini API key from Google AI Studio โ€” this is the only external dependency and is free to obtain.
๐Ÿ”‘

Only a free Gemini API key is required. Get yours at aistudio.google.com/apikey and enter it in the Settings page to start using the app immediately. No cloud account, credit card, or additional setup is needed.

Advanced Search

The Sources page includes a powerful multi-layered search system that lets you find sources by their text content, the Bible books they reference, specific chapters, or individual verses โ€” all updating in real time as you type.

Text Content

Full-text search across all source documents. Matching passages are highlighted in context with the search term shown inline.

Bible Book

Find all sources that contain any reference to a chosen Bible book, using a searchable dropdown of all 73 books.

Chapter

Narrow results to sources referencing a specific chapter (e.g. Psalms 23) using cascading book โ†’ chapter selectors.

Verse

Pinpoint sources that reference a specific verse (e.g. John 3:16) using book โ†’ chapter โ†’ verse number selectors.

Stacked filters with AND / OR logic โ€” click Advanced to open the filter builder and stack any number of filters. Toggle between AND (source must match all filters) and OR (source must match any filter). Active filters are summarized as removable chips below the search bar. Match evidence appears directly on each source card, showing the exact text snippet or the matched verse and quote.

Key Features

  • Full-text AI analysis using Google Gemini with structured JSON output.
  • Color-coded in-text annotations with click-to-explore interactivity.
  • Selection-based re-analysis: highlight any passage and re-run AI detection on just that section.
  • Manual annotation editor with a Bible verse picker (book โ†’ chapter โ†’ verse).
  • Advanced search with real-time filtering by text content, Bible book, chapter, or verse โ€” stackable filters with AND / OR logic and inline match evidence.
  • Distribution charts showing which Bible books and testaments are most referenced.
  • Global analytics dashboard across all sources.
  • Support for both Gemini API (free tier) and Google Vertex AI.
  • Model switching โ€” choose between available Gemini model versions.
  • Runs entirely locally โ€” your texts never leave your machine except for the AI API call.

Screenshots

Sources page
Sources page โ€” manage your text sources and see detection statistics at a glance
Text viewer
Text viewer โ€” color-coded annotations with side-by-side verse references
Analytics dashboard
Analytics dashboard โ€” explore scripture distribution across all sources
Settings page
Settings โ€” configure your Gemini API key and model selection
Developed by Dr. William J.B. Mattingly ยท Yale University ยท 2026
Built for the Ruse of Reuse workshop, Austrian Academy of Sciences, Vienna ยท March 5โ€“6, 2026