{ "cells": [ { "cell_type": "markdown", "id": "cb10925c-cccb-420e-be3b-b5ca49ad5cf5", "metadata": { "tags": [] }, "source": [ "# Identifying use of critical signs in the text (N1904GBI)" ] }, { "cell_type": "markdown", "id": "b9e178c9-7abb-46cf-b4d4-8d38a5985bf2", "metadata": { "tags": [] }, "source": [ "## Table of content \n", "* 1 - Introduction]\n", "* 2 - Load Text-Fabric app and data\n", "* 3 - Performing the queries\n", " * 3.1 - Getting an overview of leading critical signs\n", " * 3.2 - Query for all words that contain some critical marks" ] }, { "cell_type": "markdown", "id": "549033e8-b844-4504-8017-bd4a389e1164", "metadata": {}, "source": [ "# 1 - Introduction \n", "##### [Back to TOC](#TOC)\n", "\n", "This Jupyter Notebook investigates the pressense of 'odd' values for feature 'after'. " ] }, { "cell_type": "markdown", "id": "01f65e07-00ae-4099-892e-6dcfeecd6663", "metadata": {}, "source": [ "# 2 - Load Text-Fabric app and data \n", "##### [Back to TOC](#TOC)" ] }, { "cell_type": "code", "execution_count": 1, "id": "51782023-07ce-4923-b46a-3ed0fd2b8a12", "metadata": { "tags": [] }, "outputs": [], "source": [ "%load_ext autoreload\n", "%autoreload 2" ] }, { "cell_type": "code", "execution_count": 1, "id": "a1afe711-fc3a-49c7-a3a8-6d889c0adc0e", "metadata": {}, "outputs": [], "source": [ "# Loading the New Testament TextFabric code\n", "# Note: it is assumed Text-Fabric is installed in your environment.\n", "\n", "from tf.fabric import Fabric\n", "from tf.app import use" ] }, { "cell_type": "code", "execution_count": 2, "id": "29ff4a94-c84d-4011-9dd8-4acfd3f4a845", "metadata": { "scrolled": true, "tags": [] }, "outputs": [ { "data": { "text/markdown": [ "**Locating corpus resources ...**" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "The requested app is not available offline\n", "\t~/text-fabric-data/github/tonyjurg/Nestle1904GBI/app not found\n" ] }, { "data": { "text/html": [ "Status: latest release online 0.4 versus None locally" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "downloading app, main data and requested additions ..." ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "app: ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/app" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "The requested data is not available offline\n", "\t~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 not found\n" ] }, { "data": { "text/html": [ "Status: latest release online 0.4 versus None locally" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "downloading app, main data and requested additions ..." ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "data: ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " | 0.22s T otype from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 1.91s T oslots from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.56s T after from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.57s T chapter from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.67s T book from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.66s T word from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.58s T verse from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | | 0.05s C __levels__ from otype, oslots, otext\n", " | | 1.53s C __order__ from otype, oslots, __levels__\n", " | | 0.07s C __rank__ from otype, __order__\n", " | | 2.45s C __levUp__ from otype, oslots, __rank__\n", " | | 1.50s C __levDown__ from otype, __levUp__, __rank__\n", " | | 0.06s C __characters__ from otext\n", " | | 0.99s C __boundary__ from otype, oslots, __rank__\n", " | | 0.04s C __sections__ from otype, oslots, otext, __levUp__, __levels__, book, chapter, verse\n", " | | 0.24s C __structure__ from otype, oslots, otext, __rank__, __levUp__, book, chapter, verse\n", " | 0.56s T booknum from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.65s T bookshort from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.53s T case from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.54s T clause from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.07s T clauserule from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.02s T clausetype from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.47s T degree from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.57s T formaltag from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.58s T functionaltag from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.63s T gloss from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.53s T gn from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.63s T lemma from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.58s T lex_dom from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.60s T ln from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.50s T monad from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.51s T mood from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.71s T nodeID from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.66s T normalized from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.56s T nu from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.55s T number from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.50s T person from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.79s T phrase from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.30s T phrasefunction from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.31s T phrasefunctionlong from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.30s T phrasetype from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.51s T sentence from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.57s T sp from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.57s T splong from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.59s T strongs from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.50s T subj_ref from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.50s T tense from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.51s T type from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.50s T voice from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n" ] }, { "data": { "text/html": [ "\n", " Text-Fabric: Text-Fabric API 11.4.10, tonyjurg/Nestle1904GBI/app v3, Search Reference
\n", " Data: tonyjurg - Nestle1904GBI 0.4, Character table, Feature docs
\n", "
Node types\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", "\n", " \n", " \n", " \n", " \n", "\n", "\n", "\n", " \n", " \n", " \n", " \n", "\n", "\n", "\n", " \n", " \n", " \n", " \n", "\n", "\n", "\n", " \n", " \n", " \n", " \n", "\n", "\n", "\n", " \n", " \n", " \n", " \n", "\n", "\n", "\n", " \n", " \n", " \n", " \n", "\n", "\n", "\n", " \n", " \n", " \n", " \n", "\n", "
Name# of nodes# slots/node% coverage
book275102.93100
chapter260529.92100
sentence572024.09100
verse794317.35100
clause161248.54100
phrase726741.90100
word1377791.00100
\n", " Sets: no custom sets
\n", " Features:
\n", "
Nestle 1904 (GBI nodes)\n", "
\n", "\n", "
\n", "
\n", "after\n", "
\n", "
str
\n", "\n", " Character after the word (space or punctuation)\n", "\n", "
\n", "\n", "
\n", "
\n", "book\n", "
\n", "
str
\n", "\n", " Book name (fully spelled out)\n", "\n", "
\n", "\n", "
\n", "
\n", "booknum\n", "
\n", "
int
\n", "\n", " NT book number (Matthew=1, Mark=2, ..., Revelation=27)\n", "\n", "
\n", "\n", "
\n", "
\n", "bookshort\n", "
\n", "
str
\n", "\n", " Book name (abbreviated)\n", "\n", "
\n", "\n", "
\n", "
\n", "case\n", "
\n", "
str
\n", "\n", " Gramatical case (Nominative, Genitive, Dative, Accusative, Vocative)\n", "\n", "
\n", "\n", "
\n", "
\n", "chapter\n", "
\n", "
int
\n", "\n", " Chapter number inside book\n", "\n", "
\n", "\n", "
\n", "
\n", "clause\n", "
\n", "
int
\n", "\n", " Clause number (counted per chapter)\n", "\n", "
\n", "\n", "
\n", "
\n", "clauserule\n", "
\n", "
str
\n", "\n", " Clause rule\n", "\n", "
\n", "\n", "
\n", "
\n", "clausetype\n", "
\n", "
str
\n", "\n", " Clause type\n", "\n", "
\n", "\n", "
\n", "
\n", "degree\n", "
\n", "
str
\n", "\n", " Degree (e.g. Comparitative, Superlative)\n", "\n", "
\n", "\n", "
\n", "
\n", "formaltag\n", "
\n", "
str
\n", "\n", " Formal tag (Sandborg-Petersen morphology)\n", "\n", "
\n", "\n", "
\n", "
\n", "functionaltag\n", "
\n", "
str
\n", "\n", " \n", "\n", "
\n", "\n", "
\n", "
\n", "gloss\n", "
\n", "
str
\n", "\n", " English gloss\n", "\n", "
\n", "\n", "
\n", "
\n", "gn\n", "
\n", "
str
\n", "\n", " Gramatical gender (Masculine, Feminine, Neuter)\n", "\n", "
\n", "\n", "
\n", "
\n", "lemma\n", "
\n", "
str
\n", "\n", " Lexeme (lemma)\n", "\n", "
\n", "\n", "
\n", "
\n", "lex_dom\n", "
\n", "
str
\n", "\n", " Lexical domain according to Semantic Dictionary of Biblical Greek, SDBG\n", "\n", "
\n", "\n", "
\n", "
\n", "ln\n", "
\n", "
str
\n", "\n", " Lauw-Nida lexical classification\n", "\n", "
\n", "\n", "
\n", "
\n", "monad\n", "
\n", "
int
\n", "\n", " Sequence number of the smallest meaningful unit of text (single word)\n", "\n", "
\n", "\n", "
\n", "
\n", "mood\n", "
\n", "
str
\n", "\n", " Gramatical mood of the verb (passive, etc)\n", "\n", "
\n", "\n", "
\n", "
\n", "nodeID\n", "
\n", "
str
\n", "\n", " Node ID (as in the XML source data)\n", "\n", "
\n", "\n", "
\n", "
\n", "normalized\n", "
\n", "
str
\n", "\n", " Surface word stripped of punctations\n", "\n", "
\n", "\n", "
\n", "
\n", "nu\n", "
\n", "
str
\n", "\n", " Gramatical number (Singular, Plural)\n", "\n", "
\n", "\n", "
\n", "
\n", "number\n", "
\n", "
str
\n", "\n", " Gramatical number of the verb\n", "\n", "
\n", "\n", "
\n", "
\n", "otype\n", "
\n", "
str
\n", "\n", " \n", "\n", "
\n", "\n", "
\n", "
\n", "person\n", "
\n", "
str
\n", "\n", " Gramatical person of the verb (first, second, third)\n", "\n", "
\n", "\n", "
\n", "
\n", "phrase\n", "
\n", "
int
\n", "\n", " Phrase number (counted per chapter)\n", "\n", "
\n", "\n", "
\n", "
\n", "phrasefunction\n", "
\n", "
str
\n", "\n", " Phrase function (abbreviated)\n", "\n", "
\n", "\n", "
\n", "
\n", "phrasefunctionlong\n", "
\n", "
str
\n", "\n", " Phrase function (long description)\n", "\n", "
\n", "\n", "
\n", "
\n", "phrasetype\n", "
\n", "
str
\n", "\n", " Phrase type information\n", "\n", "
\n", "\n", "
\n", "
\n", "sentence\n", "
\n", "
int
\n", "\n", " Sentence number (counted per chapter)\n", "\n", "
\n", "\n", "
\n", "
\n", "sp\n", "
\n", "
str
\n", "\n", " Speech Part (abbreviated)\n", "\n", "
\n", "\n", "
\n", "
\n", "splong\n", "
\n", "
str
\n", "\n", " Speech Part (long description)\n", "\n", "
\n", "\n", "
\n", "
\n", "strongs\n", "
\n", "
str
\n", "\n", " Strongs number\n", "\n", "
\n", "\n", "
\n", "
\n", "subj_ref\n", "
\n", "
str
\n", "\n", " Subject reference (to nodeID in XML source data)\n", "\n", "
\n", "\n", "
\n", "
\n", "tense\n", "
\n", "
str
\n", "\n", " Gramatical tense of the verb (e.g. Present, Aorist)\n", "\n", "
\n", "\n", "
\n", "
\n", "type\n", "
\n", "
str
\n", "\n", " Gramatical type of noun or pronoun (e.g. Common, Personal)\n", "\n", "
\n", "\n", "
\n", "
\n", "verse\n", "
\n", "
int
\n", "\n", " Verse number inside chapter\n", "\n", "
\n", "\n", "
\n", "
\n", "voice\n", "
\n", "
str
\n", "\n", " Gramatical voice of the verb\n", "\n", "
\n", "\n", "
\n", "
\n", "word\n", "
\n", "
str
\n", "\n", " Word as it appears in the text\n", "\n", "
\n", "\n", "
\n", "
\n", "oslots\n", "
\n", "
none
\n", "\n", " \n", "\n", "
\n", "\n", "
\n", "
\n", "\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Text-Fabric API: names N F E L T S C TF directly usable

" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# load the app and data\n", "N1904 = use (\"tonyjurg/Nestle1904GBI\", version=\"0.4\", hoist=globals())" ] }, { "cell_type": "markdown", "id": "4b1bf471-6511-4fd9-8bb8-116379da307f", "metadata": { "tags": [] }, "source": [ "# 3 - Performing the queries \n", "##### [Back to TOC](#TOC)" ] }, { "cell_type": "markdown", "id": "62bc2c34-bb57-46bf-96f3-3ff6f43c9eee", "metadata": {}, "source": [ "## 3.1 - Getting an overview of leading critical signs\n", "##### [Back to TOC](#TOC)" ] }, { "cell_type": "markdown", "id": "754e51a0-0f07-4262-ac18-e96f81160d48", "metadata": {}, "source": [ "First get a list of all unique words in unicode (including punctuations, critical signs and trailing spaces):" ] }, { "cell_type": "code", "execution_count": 4, "id": "748067ec-15ac-4080-9fbc-65c97b8cce2b", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Number of results: 19506\n" ] } ], "source": [ "unicodeList = F.word.freqList()\n", "print ('Number of results:',len(unicodeList))" ] }, { "cell_type": "markdown", "id": "7e64a00c-38af-48ad-8abb-73e54aad3c45", "metadata": {}, "source": [ "Now just look at the first character:" ] }, { "cell_type": "code", "execution_count": 8, "id": "cce44c18-ee64-462f-bc1c-212c4a5f7f9e", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Frequency list of all first character:\n", "{'κ': 1477, 'ὁ': 100, 'ἐ': 2305, 'δ': 1009, 'τ': 533, 'ε': 485, 'α': 197, 'ὅ': 47, 'ο': 187, 'ἡ': 96, 'γ': 389, 'μ': 707, 'Θ': 47, 'π': 2261, 'ἵ': 7, 'ὑ': 323, 'ὡ': 16, 'ἀ': 2000, 'Ἰ': 114, 'σ': 1113, 'Κ': 134, 'λ': 409, 'ἢ': 1, 'ἦ': 16, 'Χ': 34, 'ὃ': 3, 'ἂ': 1, 'ἕ': 39, 'ἔ': 358, 'ν': 208, 'ἰ': 88, 'Ὁ': 7, 'ᾧ': 1, 'ἄ': 211, 'Τ': 99, 'ἃ': 2, 'Π': 193, 'ἣ': 2, 'Υ': 9, 'ὄ': 61, 'ὧ': 3, 'ὥ': 12, 'Μ': 115, 'ὀ': 181, 'ἑ': 146, 'β': 362, 'Ο': 38, 'ἤ': 66, 'χ': 277, 'ἁ': 124, 'Ε': 57, 'ζ': 131, 'θ': 317, 'Ἐ': 149, 'Φ': 55, 'ἧ': 2, 'φ': 398, 'ἓ': 2, 'Σ': 158, 'Ἀ': 216, 'ᾖ': 2, 'Ἁ': 7, 'ἥ': 23, 'ὢ': 1, 'ᾗ': 1, 'Ἱ': 14, 'Γ': 62, 'υ': 16, 'Δ': 90, 'ψ': 78, 'Ἅ': 11, 'Ἠ': 32, 'ἱ': 71, 'Ὡ': 8, 'ὕ': 25, 'ῥ': 76, 'Ἄ': 41, 'ἠ': 157, 'ἴ': 32, 'Β': 81, 'Ν': 50, 'Ὑ': 16, 'ὤ': 11, 'Ὅ': 14, 'ὦ': 5, 'Ἴ': 3, 'Ῥ': 34, 'ἅ': 44, 'ᾔ': 6, 'Ἦ': 6, 'Α': 26, 'Ἔ': 44, 'Ὦ': 1, 'Ζ': 24, 'Λ': 56, 'Ὃ': 3, 'Ὕ': 3, 'ξ': 30, 'Ὥ': 2, 'η': 13, 'ἆ': 5, 'Ἕ': 13, 'Ἢ': 2, 'ᾐ': 7, 'Ι': 2, 'Ὀ': 15, 'ὠ': 38, 'ᾠ': 6, '(': 7, 'Ἑ': 33, 'Ὧ': 2, '[': 6, 'Ἃ': 1, 'Ἆ': 3, 'Ἵ': 2, 'ᾄ': 2, 'Η': 2, 'Ἓ': 2, 'Ἤ': 9, 'Ἥ': 4, 'ἶ': 1, 'Ὄ': 5, '—': 15, 'Ξ': 1, 'Ψ': 2, 'ὂ': 1, 'Ὗ': 1, 'Ὤ': 1, 'ᾑ': 1}\n", "\n", "Frequency list of critical character:\n", "{'(': 7, '[': 6, '—': 15}\n" ] } ], "source": [ "# Initialize an empty dictionary to store the frequencies\n", "frequencyList = {}\n", "criticalSignsList ={}\n", "criticalSigns={\"—\",\"[\",\"(\"}\n", " \n", "# Iterate through the list (which is a list of ordered tuples)\n", "for item in unicodeList:\n", " # Get the first character of the item\n", " firstChar = item[0][0]\n", "\n", " # Update the frequency in the dictionary for the full list\n", " frequencyList[firstChar] = frequencyList.get(firstChar, 0) + 1\n", " # add to other list if critical sign\n", " if firstChar in criticalSigns:\n", " criticalSignsList[firstChar]=criticalSignsList.get(firstChar, 0) + 1\n", " \n", "\n", "print(\"Frequency list of all first character:\")\n", "print(frequencyList)\n", "print(\"\\nFrequency list of critical character:\")\n", "print(criticalSignsList)" ] }, { "cell_type": "markdown", "id": "86138709-f6c0-433a-aaab-db6aa079e33a", "metadata": {}, "source": [ "## 3.2 - Query for all words that contain some critical marks\n", "##### [Back to TOC](#TOC)" ] }, { "cell_type": "code", "execution_count": 10, "id": "15d731b8-ac0e-4427-a998-29a2997d72b6", "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " 0.11s 55 results\n", "╒═════════════════════╤══════════════════╤════════╕\n", "│ location │ unicode │ word │\n", "╞═════════════════════╪══════════════════╪════════╡\n", "│ Mark 1:1 │ (Υἱοῦ │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Mark 1:1 │ Θεοῦ) │ . │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Mark 16:9 │ [[Ἀναστὰς │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Mark 16:20 │ σημείων.]] │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Mark 16:99 │ [[Πάντα │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Mark 16:99 │ σωτηρίας.]] │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Luke 2:35 │ —καὶ │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Luke 2:35 │ ῥομφαία— │ , │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Luke 23:51 │ —οὗτος │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Luke 24:12 │ [[Ὁ │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Luke 24:12 │ γεγονός.]] │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Luke 24:36 │ [[καὶ │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Luke 24:36 │ ὑμῖν]] │ . │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Luke 24:40 │ [[καὶ │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Luke 24:40 │ πόδας.]] │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Luke 24:51 │ [[καὶ │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Luke 24:51 │ οὐρανόν]] │ . │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Luke 24:52 │ [[προσκυνήσαντες │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Luke 24:52 │ αὐτὸν]] │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ John 1:38 │ (ὃ │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ John 1:38 │ Διδάσκαλε,) │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ John 1:41 │ (ὅ │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ John 1:41 │ Χριστός) │ . │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ John 1:42 │ (ὃ │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ John 1:42 │ Πέτρος) │ . │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ John 4:2 │ —καίτοιγε │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ John 5:3 │ ξηρῶν( │ , │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ John 5:4 │ νοσήματι) │ . │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ John 7:22 │ —οὐχ │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ John 7:53 │ (Καὶ │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ John 8:11 │ ἁμάρτανε.) │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ John 9:7 │ (ὃ │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ John 9:7 │ Ἀπεσταλμένος) │ . │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ John 20:16 │ (ὃ │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ John 20:16 │ Διδάσκαλε) │ . │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Acts 22:2 │ —ἀκούσαντες │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Romans 4:16 │ (ὅς │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Romans 4:17 │ σε,) │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Romans 15:25 │ —νυνὶ │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ I_Corinthians 9:15 │ —τὸ │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ II_Corinthians 6:2 │ —λέγει │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ II_Corinthians 12:2 │ —εἴτε │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ II_Corinthians 12:2 │ —ἁρπαγέντα │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ II_Corinthians 12:3 │ —εἴτε │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Galatians 2:6 │ —ὁποῖοί │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Ephesians 1:1 │ [ἐν │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Ephesians 1:1 │ Ἐφέσῳ] │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Ephesians 5:9 │ —ὁ │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Ephesians 5:10 │ —δοκιμάζοντες │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Colossians 4:10 │ (περὶ │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Colossians 4:10 │ αὐτόν,) │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ I_Timothy 3:5 │ (εἰ │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ I_Timothy 3:5 │ ἐπιμελήσεται;) │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Hebrews 7:20 │ —οἱ │ │\n", "├─────────────────────┼──────────────────┼────────┤\n", "│ Hebrews 7:22 │ —κατὰ │ │\n", "╘═════════════════════╧══════════════════╧════════╛\n" ] } ], "source": [ "# Library to format table\n", "from tabulate import tabulate\n", "\n", "# The actual query\n", "SearchLeadingCriticalMarks = '''\n", "word word~[(\\(\\[—\\)\\])]\n", " '''\n", "MarksList = N1904.search(SearchLeadingCriticalMarks)\n", "\n", "# Postprocess the query results\n", "Results=[]\n", "for tuple in MarksList:\n", " node=tuple[0]\n", " location=\"{} {}:{}\".format(F.book.v(node),F.chapter.v(node),F.verse.v(node))\n", " result=(location,F.word.v(node),F.after.v(node))\n", " Results.append(result)\n", " \n", "# Produce the table\n", "headers = [\"location\",\"unicode\",\"word\",\"after\"]\n", "print(tabulate(Results, headers=headers, tablefmt='fancy_grid'))" ] }, { "cell_type": "markdown", "id": "a5e4bdf3-b108-4c6a-b99b-a4bf4723afee", "metadata": {}, "source": [ "Note: The following site can be used to build and verify a regular expression: [regex101.com](https://regex101.com/) (choose the 'Pyton flavor') " ] }, { "cell_type": "code", "execution_count": null, "id": "118862e2", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.12" } }, "nbformat": 4, "nbformat_minor": 5 }