{ "cells": [ { "cell_type": "markdown", "id": "d0cb504a", "metadata": {}, "source": [ "# Duplicate structure headings (N1904GBI)" ] }, { "cell_type": "code", "execution_count": 1, "id": "3c445176", "metadata": { "tags": [] }, "outputs": [], "source": [ "%load_ext autoreload\n", "%autoreload 2" ] }, { "cell_type": "code", "execution_count": 2, "id": "48b874c4", "metadata": { "tags": [] }, "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": 76, "id": "3a9021a7", "metadata": {}, "outputs": [ { "data": { "text/markdown": [ "**Locating corpus resources ...**" ], "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.3 not found\n" ] }, { "data": { "text/html": [ "Status: latest release online 0.2 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.3" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " | 0.19s T otype from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 2.11s T oslots from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.66s T after from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.79s T verse from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.69s T word from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.67s T book from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.80s T chapter from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | | 0.07s C __levels__ from otype, oslots, otext\n", " | | 1.84s 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.51s C __levDown__ from otype, __levUp__, __rank__\n", " | | 0.06s C __characters__ from otext\n", " | | 1.00s C __boundary__ from otype, oslots, __rank__\n", " | | 0.04s C __sections__ from otype, oslots, otext, __levUp__, __levels__, book, chapter, verse\n", " | | 0.25s C __structure__ from otype, oslots, otext, __rank__, __levUp__, book, chapter, verse\n", " | 0.57s T booknum from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.66s T bookshort from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.53s T case from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.56s T clause from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.07s T clauserule from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.02s T clausetype from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.47s T degree from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.58s T formaltag from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.58s T functionaltag from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.63s T gloss_EN from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.53s T gn from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.62s T lemma from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.57s T lex_dom from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.59s T ln from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.49s T monad from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.50s T mood from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.73s T nodeID from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.69s T normalized from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.56s T nu from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.55s T number from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.50s T person from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.78s T phrase from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.30s T phrasefunction from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.31s T phrasefunctionlong from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.30s T phrasetype from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.52s T sentence from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.57s T sp from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.57s T splong from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.59s T strongs from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.50s T subj_ref from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.50s T tense from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.52s T type from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n", " | 0.50s T voice from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.3\n" ] }, { "data": { "text/html": [ "\n", " Text-Fabric: Text-Fabric API 11.4.10, tonyjurg/Nestle1904GBI/app v3, Search Reference
\n", " Data: tonyjurg - Nestle1904GBI 0.3, 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
verse794417.34100
clause161248.54100
phrase735471.87100
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", " Chararcter 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", " Functional tag (Sandborg-Petersen morphology)\n", "\n", "
\n", "\n", "
\n", "
\n", "gloss_EN\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 (not present everywhere?)\n", "\n", "
\n", "\n", "
\n", "
\n", "ln\n", "
\n", "
str
\n", "\n", " Lauw-Nida lexical classification (not present everywhere)\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.3\", hoist=globals())" ] }, { "cell_type": "code", "execution_count": 52, "id": "df9aa628", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "A heading is a tuple of pairs (node type, feature value)\n", "\tof node types and features that have been configured as structural elements\n", "These 3 structural elements have been configured\n", "\tnode type book with heading feature book\n", "\tnode type chapter with heading feature chapter\n", "\tnode type verse with heading feature verse\n", "You can get them as a tuple with T.headings.\n", "\n", "Structure API:\n", "\tT.structure(node=None) gives the structure below node, or everything if node is None\n", "\tT.structurePretty(node=None) prints the structure below node, or everything if node is None\n", "\tT.top() gives all top-level nodes\n", "\tT.up(node) gives the (immediate) parent node\n", "\tT.down(node) gives the (immediate) children nodes\n", "\tT.headingFromNode(node) gives the heading of a node\n", "\tT.nodeFromHeading(heading) gives the node of a heading\n", "\tT.ndFromHd complete mapping from headings to nodes\n", "\tT.hdFromNd complete mapping from nodes to headings\n", "\tT.hdMult are all headings with their nodes that occur multiple times\n", "\n", "There are 8231 structural elements in the dataset.\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING: 1 structure headings with hdMult occurrences (total 2)\n", "\tbook:I_Peter-chapter:4-verse:1 has 2 occurrences\n", "\t\t240744, 240746\n" ] } ], "source": [ "T.structureInfo()" ] }, { "cell_type": "code", "execution_count": 53, "id": "8f8c5676", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{(('book', 'I_Peter'), ('chapter', 4), ('verse', 1)): (240744, 240746)}" ] }, "execution_count": 53, "metadata": {}, "output_type": "execute_result" } ], "source": [ "T.hdMult" ] }, { "cell_type": "code", "execution_count": 54, "id": "d993486e", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'οὖν Χριστοῦ παθόντος σαρκὶ καὶ ὑμεῖς τὴν αὐτὴν ἔννοιαν ὁπλίσασθε, '" ] }, "execution_count": 54, "metadata": {}, "output_type": "execute_result" } ], "source": [ "T.text(240744)" ] }, { "cell_type": "code", "execution_count": 55, "id": "7a772b38", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'ὅτι ὁ παθὼν σαρκὶ πέπαυται ἁμαρτίας, '" ] }, "execution_count": 55, "metadata": {}, "output_type": "execute_result" } ], "source": [ "T.text(240746)" ] }, { "cell_type": "code", "execution_count": 68, "id": "4edd7e7c", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
I_Peter 4:1  οὖν Χριστοῦ παθόντος σαρκὶ καὶ ὑμεῖς τὴν αὐτὴν ἔννοιαν ὁπλίσασθε,
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "'verse'" ] }, "execution_count": 68, "metadata": {}, "output_type": "execute_result" } ], "source": [ "N1904.plain(240744)\n", "F.otype.v(240744)" ] }, { "cell_type": "code", "execution_count": 67, "id": "da97ebee", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
I_Peter 4:1  ὅτι παθὼν σαρκὶ πέπαυται ἁμαρτίας,
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "'verse'" ] }, "execution_count": 67, "metadata": {}, "output_type": "execute_result" } ], "source": [ "N1904.plain(240746)\n", "F.otype.v(240746)" ] }, { "cell_type": "markdown", "id": "f26f262f", "metadata": {}, "source": [ "Possibly related to?:\n", "\n", "```\n", "0.03s Removing unlinked nodes ... \n", " | | 0.00s 25 unlinked \"phrase\" nodes: [1, 10018, 27166, 46044, 49656] ...\n", " | | 0.00s 25 unlinked nodes\n", "```" ] }, { "cell_type": "code", "execution_count": 81, "id": "8bc442fc", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
Matthew 1:1  Βίβλος
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "word\n" ] }, { "data": { "text/html": [ "
Matthew 17:15  ὕδωρ.
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "word\n" ] }, { "data": { "text/html": [ "
Mark 13:24  ἥλιος
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "word\n" ] }, { "data": { "text/html": [ "
Luke 21:24  καὶ
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "word\n" ] }, { "data": { "text/html": [ "
John 1:41  τὸν
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "word\n" ] } ], "source": [ "for i in (1, 10018, 27166, 46044, 49656): \n", " N1904.plain(i)\n", " print(F.otype.v(1))" ] }, { "cell_type": "code", "execution_count": 49, "id": "b6ba1e86", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "book (137780, 137806)\n", "chapter (137807, 138066)\n", "sentence (227738, 233457)\n", "verse (233458, 241401)\n", "clause (138067, 154190)\n", "phrase (154191, 227737)\n", "word (1, 137779)\n" ] } ], "source": [ "for NodeType in F.otype.all:\n", " print (NodeType, F.otype.sInterval(NodeType))" ] }, { "cell_type": "markdown", "id": "90cf97ff", "metadata": {}, "source": [ "The nodes are not sorted: " ] }, { "cell_type": "code", "execution_count": 80, "id": "7e1123a9", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
I_Peter 4:1  οὖν Χριστοῦ παθόντος σαρκὶ καὶ ὑμεῖς τὴν αὐτὴν ἔννοιαν ὁπλίσασθε,
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "123281 n60004001002 34\n", "123282 n60004001001 34\n", "123283 n60004001003 34\n", "123284 n60004001004 34\n", "123285 n60004001005 34\n", "123286 n60004001006 34\n", "123287 n60004001007 34\n", "123288 n60004001008 34\n", "123289 n60004001009 34\n", "123290 n60004001010 34\n" ] } ], "source": [ "N1904.plain(240744)\n", "\n", "WordNodeList=L.d(240744,otype='word')\n", "for node in WordNodeList:\n", " print (node,F.nodeID.v(node),F.sentence.v(node))" ] }, { "cell_type": "code", "execution_count": 79, "id": "57a50f43", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
I_Peter 4:1  ὅτι παθὼν σαρκὶ πέπαυται ἁμαρτίας,
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "123305 n60004001011 35\n", "123306 n60004001012 35\n", "123307 n60004001013 35\n", "123308 n60004001014 35\n", "123309 n60004001015 35\n", "123310 n60004001016 35\n" ] } ], "source": [ "N1904.plain(240746)\n", "\n", "WordNodeList=L.d(240746,otype='word')\n", "for node in WordNodeList:\n", " print (node,F.nodeID.v(node),F.sentence.v(node))" ] }, { "cell_type": "code", "execution_count": 84, "id": "ac2940ca", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Node=123290\n", "after , \n", "book I_Peter\n", "booknum 21\n", "bookshort 1Pet\n", "case \n", "chapter 4\n", "clause 153\n", "clauserule None\n", "clausetype None\n", "degree \n", "formaltag V-AMM-2P\n", "functionaltag V-AMM-2P\n", "gloss_EN arm yourselves with\n", "gn \n", "lemma ὁπλίζω\n", "lex_dom 077\n", "ln 77.10\n", "monad 123290\n", "mood Imperative\n", "nodeID n60004001010\n", "normalized ὁπλίσασθε\n", "nu Plural\n", "number Plural\n", "otype word\n", "person Second\n", "phrase 567\n", "phrasefunction None\n", "phrasefunctionlong None\n", "phrasetype None\n", "sentence 34\n", "sp verb\n", "splong verb\n", "strongs 3695\n", "subj_ref \n", "tense Aorist\n", "type \n", "verse 1\n", "voice Middle\n", "word ὁπλίσασθε\n", "\n", "Node=123291\n", "after \n", "book I_Peter\n", "booknum 21\n", "bookshort 1Pet\n", "case \n", "chapter 4\n", "clause 154\n", "clauserule None\n", "clausetype None\n", "degree \n", "formaltag PREP\n", "functionaltag PREP\n", "gloss_EN so as\n", "gn \n", "lemma εἰς\n", "lex_dom 089008\n", "ln 89.48\n", "monad 123291\n", "mood \n", "nodeID n60004002001\n", "normalized εἰς\n", "nu \n", "number \n", "otype word\n", "person \n", "phrase 568\n", "phrasefunction None\n", "phrasefunctionlong None\n", "phrasetype None\n", "sentence 34\n", "sp prep\n", "splong preposition\n", "strongs 1519\n", "subj_ref \n", "tense \n", "type \n", "verse 2\n", "voice \n", "word εἰς\n" ] } ], "source": [ "FeatureList=Fall()\n", "print ('Node=123290')\n", "for Feature in FeatureList:\n", " print (Feature,Fs(Feature).v(123290))\n", "print ('\\nNode=123291')\n", "for Feature in FeatureList:\n", " print (Feature,Fs(Feature).v(123291))" ] }, { "cell_type": "markdown", "id": "859e67d9-8bff-4e33-9df6-966c73a1d0ff", "metadata": {}, "source": [ "# Check release '0.4'" ] }, { "cell_type": "code", "execution_count": 3, "id": "7e9a4794", "metadata": { "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.18s T otype from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 1.85s T oslots from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.56s T chapter from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.62s T word from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.50s T after from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.51s T verse from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.59s T book from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | | 0.05s C __levels__ from otype, oslots, otext\n", " | | 1.59s C __order__ from otype, oslots, __levels__\n", " | | 0.07s C __rank__ from otype, __order__\n", " | | 2.16s C __levUp__ from otype, oslots, __rank__\n", " | | 1.40s C __levDown__ from otype, __levUp__, __rank__\n", " | | 0.06s C __characters__ from otext\n", " | | 0.87s C __boundary__ from otype, oslots, __rank__\n", " | | 0.04s C __sections__ from otype, oslots, otext, __levUp__, __levels__, book, chapter, verse\n", " | | 0.21s C __structure__ from otype, oslots, otext, __rank__, __levUp__, book, chapter, verse\n", " | 0.50s T booknum from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.61s T bookshort from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.46s T case from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.49s 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.41s T degree from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.50s T formaltag from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.51s T functionaltag from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.58s 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.55s T lemma from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.54s T lex_dom from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.55s T ln from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.47s T monad from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.44s T mood from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.65s T nodeID from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.59s T normalized from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.48s T nu from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.48s T number from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.43s T person from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.70s T phrase from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.26s T phrasefunction from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.27s T phrasefunctionlong from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.27s T phrasetype from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.47s T sentence from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.50s T sp from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.52s T splong from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.57s T strongs from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.44s T subj_ref from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.46s T tense from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.45s T type from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n", " | 0.44s T voice from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4\n" ] }, { "data": { "text/html": [ "\n", " TF: TF API 12.1.5, 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", " Settings:
specified
  1. apiVersion: 3
  2. appName: tonyjurg/Nestle1904GBI
  3. appPath:C:/Users/tonyj/text-fabric-data/github/tonyjurg/Nestle1904GBI/app
  4. commit: no value
  5. css:
  6. dataDisplay:
    • excludedFeatures: [reference]
    • noneValues:
      • none
      • unknown
      • no value
      • NA
      • ''
    • textFormat: text-orig-full
  7. interfaceDefaults: {fmt: layout-orig-full}
  8. isCompatible: True
  9. local: no value
  10. localDir:C:/Users/tonyj/text-fabric-data/github/tonyjurg/Nestle1904GBI/_temp
  11. provenanceSpec:
    • corpus: Nestle 1904 (GBI nodes)
    • org: tonyjurg
    • relative: /tf
    • repo: Nestle1904GBI
    • repro: Nestle1904GBI
    • version: 0.4
    • webUrl:https://bibleol.3bmoodle.dk/text/show_text/nestle1904/<1>/<2>/<3>
  12. release: no value
  13. typeDisplay:
    • book:
      • label: {book}
      • style: ''
    • clause:
      • label: #{clause}
      • style: ''
    • phrase:
      • label: #{phrase}
      • style: ''
    • word:
      • features:
        • lemma
        • strongs
      • featuresBare: [gloss]
  14. writing: grc
\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": [ "
TF API: names N F E L T S C TF Fs Fall Es Eall Cs Call directly usable

" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# load the app and data\n", "N1904_4 = use (\"tonyjurg/Nestle1904GBI\", version=\"0.4\", hoist=globals())" ] }, { "cell_type": "code", "execution_count": 4, "id": "2393ef13-19ed-493e-8af8-3df6b6fa6760", "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "A heading is a tuple of pairs (node type, feature value)\n", "\tof node types and features that have been configured as structural elements\n", "These 3 structural elements have been configured\n", "\tnode type book with heading feature book\n", "\tnode type chapter with heading feature chapter\n", "\tnode type verse with heading feature verse\n", "You can get them as a tuple with T.headings.\n", "\n", "Structure API:\n", "\tT.structure(node=None) gives the structure below node, or everything if node is None\n", "\tT.structurePretty(node=None) prints the structure below node, or everything if node is None\n", "\tT.top() gives all top-level nodes\n", "\tT.up(node) gives the (immediate) parent node\n", "\tT.down(node) gives the (immediate) children nodes\n", "\tT.headingFromNode(node) gives the heading of a node\n", "\tT.nodeFromHeading(heading) gives the node of a heading\n", "\tT.ndFromHd complete mapping from headings to nodes\n", "\tT.hdFromNd complete mapping from nodes to headings\n", "\tT.hdMult are all headings with their nodes that occur multiple times\n", "\n", "There are 8230 structural elements in the dataset.\n", "\n" ] } ], "source": [ "T.structureInfo()" ] }, { "cell_type": "markdown", "id": "def88df9-094c-40c2-b5a2-4491ab3563c7", "metadata": {}, "source": [ "Conclusion: duplicate structure problem resolved with new release." ] }, { "cell_type": "code", "execution_count": null, "id": "e64c2c9b-cfeb-4834-a116-2e7f94680f30", "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.11.5" } }, "nbformat": 4, "nbformat_minor": 5 }