{ "cells": [ { "cell_type": "markdown", "id": "3757852f", "metadata": {}, "source": [ "# Running Text-Fabric (Nestle1904GBI)\n", "\n", "Basic instructions on loading the Text-Fabric and start using it on your system." ] }, { "cell_type": "markdown", "id": "fa7f85d5", "metadata": {}, "source": [ "## Table of content \n", "* [Step 1: Install Text-Fabric (if not yet installed)](#first-bullet)\n", "* [Step 2: Raise rate limit on Github](#second-bullet)\n", "* [Step 3: Load Text-Fabric code](#third-bullet)\n", "* [Step 4: Load app and data](#fourth-bullet)" ] }, { "cell_type": "markdown", "id": "d5a6e05a", "metadata": {}, "source": [ "## Step 1: Install Text-Fabric (if not yet installed) \n", "##### [back to TOC](#TOC)" ] }, { "cell_type": "markdown", "id": "f71d3a83", "metadata": {}, "source": [ "### Python\n", "\n", "You need to have Python on your system. Most systems have it out of the box,\n", "but alas, that is python2 and we need at least python **3.6**.\n", "\n", "Install it from [python.org](https://www.python.org) or from\n", "[Anaconda](https://www.anaconda.com/products/distribution).\n", "\n", "### TF itself\n", "\n", "```\n", "pip3 install text-fabric\n", "```\n", "\n", "### When using Jupyter notebook\n", "\n", "You need [Jupyter](http://jupyter.org) or a platform like [Anaconda](https://www.anaconda.com/products/distribution) which includes Jupyter.\n", "\n", "If it is not already installed:\n", "\n", "```\n", "pip3 install jupyter\n", "```" ] }, { "cell_type": "markdown", "id": "8684bf30", "metadata": {}, "source": [ "## Step 2: Raise rate limit on Github \n", "##### [back to TOC](#TOC)\n", "\n", "It may be required to increase rate limit for GitHub. [See instructions](https://annotation.github.io/text-fabric/tf/advanced/repo.html) on aquiring and setting the GHPERS variable. \n", "See [here](https://www.howtogeek.com/789660/how-to-use-windows-cmd-environment-variables/#autotoc_anchor_2) if you want to set the varibale on windows using the command prompt." ] }, { "cell_type": "markdown", "id": "edadeba4", "metadata": {}, "source": [ "## Step 3: Load Text-Fabric code \n", "##### [back to TOC](#TOC)" ] }, { "cell_type": "code", "execution_count": 1, "id": "a5bc2a5d", "metadata": {}, "outputs": [], "source": [ "%load_ext autoreload\n", "%autoreload 2" ] }, { "cell_type": "code", "execution_count": 32, "id": "31f3bbde", "metadata": {}, "outputs": [], "source": [ "# Loading the New Testament TextFabric code\n", "\n", "from tf.fabric import Fabric\n", "from tf.app import use" ] }, { "cell_type": "markdown", "id": "f8a57edd-2c89-406a-873f-e7f71a5539c3", "metadata": {}, "source": [ "## Step 4: Load app and data \n", "##### [back to TOC](#TOC)" ] }, { "cell_type": "code", "execution_count": 48, "id": "b8574f48", "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/markdown": [ "**Locating corpus resources ...**" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stderr", "output_type": "stream", "text": [ "The requested app is not available offline\n", "\t~/github/tonyjurg/Nestle1904GBI/app not found\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "The requested data is not available offline\n", "\t~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf not found\n" ] }, { "data": { "text/html": [ "Status: latest release online v0.1.1 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" }, { "name": "stderr", "output_type": "stream", "text": [ "File is not a zip file\n", "\tcould not save corpus data to ~/text-fabric-data/github" ] }, { "name": "stdout", "output_type": "stream", "text": [ "rate limit is 5000 requests per hour, with 4995 left for this hour\n", "\tconnecting to online GitHub repo tonyjurg/Nestle1904GBI ... connected\n", "\ttf/book.tf...downloaded\n", "\ttf/book_long.tf...downloaded\n", "\ttf/book_short.tf...downloaded\n", "\ttf/booknum.tf...downloaded\n", "\ttf/case.tf...downloaded\n", "\ttf/chapter.tf...downloaded\n", "\ttf/clause.tf...downloaded\n", "\ttf/clauserule.tf...downloaded\n", "\ttf/clausetype.tf...downloaded\n", "\ttf/degree.tf...downloaded\n", "\ttf/formaltag.tf...downloaded\n", "\ttf/functionaltag.tf...downloaded\n", "\ttf/gloss_EN.tf...downloaded\n", "\ttf/gn.tf...downloaded\n", "\ttf/lemma.tf...downloaded\n", "\ttf/lex_dom.tf...downloaded\n", "\ttf/ln.tf...downloaded\n", "\ttf/monad.tf...downloaded\n", "\ttf/mood.tf...downloaded\n", "\ttf/nodeID.tf...downloaded\n", "\ttf/normalized.tf...downloaded\n", "\ttf/nu.tf...downloaded\n", "\ttf/number.tf...downloaded\n", "\ttf/orig_order.tf...downloaded\n", "\ttf/oslots.tf...downloaded\n", "\ttf/otext.tf...downloaded\n", "\ttf/otype.tf...downloaded\n", "\ttf/person.tf...downloaded\n", "\ttf/phrase.tf...downloaded\n", "\ttf/phrasefunction.tf...downloaded\n", "\ttf/phrasefunction_long.tf...downloaded\n", "\ttf/phrasetype.tf...downloaded\n", "\ttf/reference.tf...downloaded\n", "\ttf/sentence.tf...downloaded\n", "\ttf/sp.tf...downloaded\n", "\ttf/sp_full.tf...downloaded\n", "\ttf/strongs.tf...downloaded\n", "\ttf/subj_ref.tf...downloaded\n", "\ttf/tense.tf...downloaded\n", "\ttf/type.tf...downloaded\n", "\ttf/verse.tf...downloaded\n", "\ttf/voice.tf...downloaded\n", "\ttf/word.tf...downloaded\n", "\tOK\n" ] }, { "data": { "text/html": [ "data: ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " | 0.20s T otype from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 1.99s T oslots from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.69s T word from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.54s T verse from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.50s T chapter from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.00s T book from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | | 0.05s C __levels__ from otype, oslots, otext\n", " | | 1.52s C __order__ from otype, oslots, __levels__\n", " | | 0.07s C __rank__ from otype, __order__\n", " | | 2.47s C __levUp__ from otype, oslots, __rank__\n", " | | 1.55s C __levDown__ from otype, __levUp__, __rank__\n", " | | 0.05s C __characters__ from otext\n", " | | 1.05s C __boundary__ from otype, oslots, __rank__\n", " | | 0.05s 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.60s T book_long from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.59s T book_short from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.50s T booknum from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.56s T case from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.58s T clause from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.07s T clauserule from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.02s T clausetype from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.48s T degree from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.59s T formaltag from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.59s T functionaltag from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.66s T gloss_EN from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.55s T gn from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.63s T lemma from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.59s T lex_dom from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.60s T ln from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.51s T monad from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.51s T mood from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.73s T nodeID from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.67s T normalized from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.55s T nu from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.56s T number from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.52s T orig_order from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.52s T person from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.82s T phrase from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.31s T phrasefunction from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.32s T phrasefunction_long from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.33s T phrasetype from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.54s T reference from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.53s T sentence from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.58s T sp from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.57s T sp_full from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.63s T strongs from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.54s T subj_ref from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.52s T tense from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.54s T type from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n", " | 0.51s T voice from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf\n" ] }, { "data": { "text/html": [ "\n", " Text-Fabric: Text-Fabric API 11.4.10, no app configured
\n", " Data: None/tonyjurg/Nestle1904GBI/
\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", "
github/tonyjurg/Nestle1904GBI/\n", "
\n", "\n", "
\n", "
\n", "book\n", "
\n", "
str
\n", "\n", " Book\n", "\n", "
\n", "\n", "
\n", "
\n", "book_long\n", "
\n", "
str
\n", "\n", " Book name (fully spelled out)\n", "\n", "
\n", "\n", "
\n", "
\n", "book_short\n", "
\n", "
str
\n", "\n", " Book name (abbreviated)\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", "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", " Monad\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, not yet post-processes)\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", "orig_order\n", "
\n", "
int
\n", "\n", " Word order within corpus\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", "
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", "reference\n", "
\n", "
str
\n", "\n", " Reference (to nodeID in XML source data, not yet post-processes)\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", " Part of Speech (abbreviated)\n", "\n", "
\n", "\n", "
\n", "
\n", "sp_full\n", "
\n", "
str
\n", "\n", " Part of Speech (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, not yet post-processes)\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:clone\", hoist=globals())" ] }, { "cell_type": "code", "execution_count": 49, "id": "8f6a6b00-ad00-4b24-ae9c-8ac354d1b9fe", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ " | 0.00s E otext from ~/text-fabric-data/github/tonyjurg/Nestle1904/tf/1904\n", " | 0.00s E reference from ~/text-fabric-data/github/tonyjurg/Nestle1904/tf/1904\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ " 0.12s 28455 results\n" ] }, { "data": { "text/html": [ "

verse 1" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

Matthew 1:1
verse
clause
clauserule=S-V-O
phrase
phrasefunction=S
Βίβλος
case=Nominativeformaltag=N-NSFfunctionaltag=N-NSFln=33.38sp=nountype=Common
γενέσεως
case=Genitiveformaltag=N-GSFfunctionaltag=N-GSFln=10.24 33.19sp=nountype=Common
Ἰησοῦ
case=Genitiveformaltag=N-GSMfunctionaltag=N-GSMln=93.169asp=nountype=Proper
Χριστοῦ
case=Genitiveformaltag=N-GSMfunctionaltag=N-GSMln=93.387sp=nountype=Proper
υἱοῦ
case=Genitiveformaltag=N-GSMfunctionaltag=N-GSMln=10.30sp=nountype=Common
Δαυεὶδ
case=Genitiveformaltag=N-PRIfunctionaltag=N-PRIln=93.91sp=nountype=Proper
υἱοῦ
case=Genitiveformaltag=N-GSMfunctionaltag=N-GSMln=10.30sp=nountype=Common
Ἀβραάμ.
case=Genitiveformaltag=N-PRIfunctionaltag=N-PRIln=93.7sp=nountype=Proper
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

verse 2" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

Matthew 1:2
verse
clause
clauserule=Conj13CL
phrase
phrasefunction=V
Ἀβραὰμ
case=Nominativeformaltag=N-PRIfunctionaltag=N-PRIln=93.7sp=nountype=Proper
phrase
phrasefunction=O
ἐγέννησεν
case=formaltag=V-AAI-3Sfunctionaltag=V-AAI-3Sln=23.58sp=verbtype=
phrase
phrasefunction=O
τὸν
case=Accusativeformaltag=T-ASMfunctionaltag=T-ASMln=92.24sp=dettype=
Ἰσαάκ,
case=Accusativeformaltag=N-PRIfunctionaltag=N-PRIln=93.180sp=nountype=Proper
clause
clauserule=Conj13CL
phrase
phrasefunction=S
δὲ
case=formaltag=CONJfunctionaltag=CONJln=89.87sp=conjtype=
phrase
phrasefunction=V
Ἰσαὰκ
case=Nominativeformaltag=N-PRIfunctionaltag=N-PRIln=93.180sp=nountype=Proper
phrase
phrasefunction=O
ἐγέννησεν
case=formaltag=V-AAI-3Sfunctionaltag=V-AAI-3Sln=23.58sp=verbtype=
phrase
phrasefunction=O
τὸν
case=Accusativeformaltag=T-ASMfunctionaltag=T-ASMln=92.24sp=dettype=
Ἰακώβ,
case=Accusativeformaltag=N-PRIfunctionaltag=N-PRIln=93.157asp=nountype=Proper
clause
clauserule=Conj13CL
phrase
phrasefunction=S
δὲ
case=formaltag=CONJfunctionaltag=CONJln=89.87sp=conjtype=
phrase
phrasefunction=V
Ἰακὼβ
case=Nominativeformaltag=N-PRIfunctionaltag=N-PRIln=93.157asp=nountype=Proper
phrase
phrasefunction=O
ἐγέννησεν
case=formaltag=V-AAI-3Sfunctionaltag=V-AAI-3Sln=23.58sp=verbtype=
phrase
phrasefunction=O
τὸν
case=Accusativeformaltag=T-ASMfunctionaltag=T-ASMln=92.24sp=dettype=
Ἰούδαν
case=Accusativeformaltag=N-ASMfunctionaltag=N-ASMln=93.173hsp=nountype=Proper
καὶ
case=formaltag=CONJfunctionaltag=CONJln=89.92sp=conjtype=
τοὺς
case=Accusativeformaltag=T-APMfunctionaltag=T-APMln=92.24sp=dettype=
ἀδελφοὺς
case=Accusativeformaltag=N-APMfunctionaltag=N-APMln=10.49sp=nountype=Common
αὐτοῦ,
case=Genitiveformaltag=P-GSMfunctionaltag=P-GSMln=92.11sp=prontype=Personal
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

verse 3" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

Matthew 1:3
verse
clause
clauserule=Conj13CL
phrase
phrasefunction=S
δὲ
case=formaltag=CONJfunctionaltag=CONJln=89.87sp=conjtype=
phrase
phrasefunction=V
Ἰούδας
case=Nominativeformaltag=N-NSMfunctionaltag=N-NSMln=93.173hsp=nountype=Proper
phrase
phrasefunction=O
ἐγέννησεν
case=formaltag=V-AAI-3Sfunctionaltag=V-AAI-3Sln=23.58sp=verbtype=
phrase
phrasefunction=ADV
τὸν
case=Accusativeformaltag=T-ASMfunctionaltag=T-ASMln=92.24sp=dettype=
Φαρὲς
case=Accusativeformaltag=N-PRIfunctionaltag=N-PRIln=93.374sp=nountype=Proper
καὶ
case=formaltag=CONJfunctionaltag=CONJln=89.92sp=conjtype=
τὸν
case=Accusativeformaltag=T-ASMfunctionaltag=T-ASMln=92.24sp=dettype=
Ζαρὰ
case=Accusativeformaltag=N-PRIfunctionaltag=N-PRIln=93.135sp=nountype=Proper
phrase
phrasefunction=ADV
ἐκ
case=formaltag=PREPfunctionaltag=PREPln=89.3sp=preptype=
τῆς
case=Genitiveformaltag=T-GSFfunctionaltag=T-GSFln=92.24sp=dettype=
Θάμαρ,
case=Genitiveformaltag=N-PRIfunctionaltag=N-PRIln=93.151sp=nountype=Proper
clause
clauserule=Conj13CL
phrase
phrasefunction=S
δὲ
case=formaltag=CONJfunctionaltag=CONJln=89.87sp=conjtype=
phrase
phrasefunction=V
Φαρὲς
case=Nominativeformaltag=N-PRIfunctionaltag=N-PRIln=93.374sp=nountype=Proper
phrase
phrasefunction=O
ἐγέννησεν
case=formaltag=V-AAI-3Sfunctionaltag=V-AAI-3Sln=23.58sp=verbtype=
phrase
phrasefunction=O
τὸν
case=Accusativeformaltag=T-ASMfunctionaltag=T-ASMln=92.24sp=dettype=
Ἐσρώμ,
case=Accusativeformaltag=N-PRIfunctionaltag=N-PRIln=93.127sp=nountype=Proper
clause
clauserule=Conj13CL
phrase
phrasefunction=S
δὲ
case=formaltag=CONJfunctionaltag=CONJln=89.87sp=conjtype=
phrase
phrasefunction=V
Ἐσρὼμ
case=Nominativeformaltag=N-PRIfunctionaltag=N-PRIln=93.127sp=nountype=Proper
phrase
phrasefunction=O
ἐγέννησεν
case=formaltag=V-AAI-3Sfunctionaltag=V-AAI-3Sln=23.58sp=verbtype=
phrase
phrasefunction=O
τὸν
case=Accusativeformaltag=T-ASMfunctionaltag=T-ASMln=92.24sp=dettype=
Ἀράμ,
case=Accusativeformaltag=N-PRIfunctionaltag=N-PRIln=93.35sp=nountype=Proper
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "Search0 = '''\n", "word sp=noun\n", "'''\n", "Search0 = NA.search(Search0)\n", "N1904.show(Search0, start=1, end=3, condensed=True, extraFeatures={'sp', 'clauserule', 'phrasefunction', 'formaltag', 'functionaltag', 'type', 'case', 'ln'}, withNodes=False)" ] }, { "cell_type": "markdown", "id": "9044ec36-e908-4999-ae8a-2d1e805a2b8e", "metadata": {}, "source": [ "# Dump some data" ] }, { "cell_type": "code", "execution_count": 42, "id": "d9b292c2-26a8-462f-bfec-410992cef095", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Jude 1:1\n", "\t\t ἸούδαςἸησοῦΧριστοῦδοῦλος,δὲἀδελφὸςἸακώβου,τοῖςἐνΘεῷΠατρὶἠγαπημένοιςκαὶἸησοῦΧριστῷτετηρημένοιςκλητοῖς.\n", "Jude 1:2\n", "\t\t ὑμῖνἔλεοςκαὶεἰρήνηκαὶἀγάπηπληθυνθείη.\n", "Jude 1:3\n", "\t\t Ἀγαπητοί,πᾶσανσπουδὴνποιούμενοςγράφεινὑμῖνπερὶτῆςκοινῆςἡμῶνσωτηρίας,ἀνάγκηνἔσχονγράψαιὑμῖνπαρακαλῶνἐπαγωνίζεσθαιτῇἅπαξπαραδοθείσῃτοῖςἁγίοιςπίστει.\n", "Jude 1:4\n", "\t\t γάρπαρεισεδύησαντινεςἄνθρωποι,οἱπάλαιπρογεγραμμένοιεἰςτοῦτοτὸκρίμα,ἀσεβεῖς,τὴντοῦΘεοῦἡμῶνχάριταμετατιθέντεςεἰςἀσέλγειανκαὶτὸνμόνονΔεσπότηνκαὶΚύριονἡμῶνἸησοῦνΧριστὸνἀρνούμενοι.\n", "Jude 1:5\n", "\t\t δὲβούλομαι,εἰδόταςἅπαξπάντα,ὙπομνῆσαιὑμᾶςὅτιΚύριοςλαὸνἐκγῆςΑἰγύπτουσώσαςτὸδεύτεροντοὺςμὴπιστεύσανταςἀπώλεσεν,\n", "Jude 1:6\n", "\t\t τεἀγγέλουςτοὺςμὴτηρήσανταςτὴνἑαυτῶνἀρχὴνἀλλὰἀπολιπόνταςτὸἴδιονοἰκητήριονεἰςκρίσινμεγάληςἡμέραςδεσμοῖςἀϊδίοιςὑπὸζόφοντετήρηκεν·\n", "Jude 1:7\n", "\t\t ὡςΣόδομακαὶΓόμορρακαὶαἱπερὶαὐτὰςπόλεις,τὸνὅμοιοντρόποντούτοιςἐκπορνεύσασαικαὶἀπελθοῦσαιὀπίσωσαρκὸςἑτέρας,πρόκεινταιδεῖγμαπυρὸςαἰωνίουδίκηνὑπέχουσαι.\n", "Jude 1:8\n", "\t\t μέντοιὉμοίωςκαὶοὗτοιἐνυπνιαζόμενοιμὲνσάρκαμιαίνουσιν,δὲκυριότηταἀθετοῦσιν,δὲδόξαςβλασφημοῦσιν.\n", "Jude 1:9\n", "\t\t δὲὅτετῷδιαβόλῳδιακρινόμενοςδιελέγετοπερὶτοῦΜωϋσέωςσώματος,οὐκὁΜιχαὴλὁἀρχάγγελος,ἐτόλμησενκρίσινβλασφημίας,ἐπενεγκεῖνἀλλὰεἶπενἘπιτιμήσαισοιΚύριος.\n", "Jude 1:10\n", "\t\t δὲμὲνοὗτοιὅσαοὐκοἴδασινβλασφημοῦσιν,δὲὅσαφυσικῶςὡςτὰἄλογαζῷαἐπίστανται,ἐντούτοιςφθείρονται.\n", "Jude 1:11\n", "\t\t οὐαὶαὐτοῖς,ὅτιτῇὁδῷτοῦΚάϊνἐπορεύθησαν,καὶτῇπλάνῃτοῦΒαλαὰμμισθοῦἐξεχύθησαν,καὶτῇἀντιλογίᾳτοῦΚόρεἀπώλοντο.\n", "Jude 1:12\n", "\t\t Οὗτοίεἰσινοἱἐνταῖςἀγάπαιςὑμῶνσπιλάδεςσυνευωχούμενοιἀφόβως,ἑαυτοὺςποιμαίνοντες,νεφέλαιἄνυδροιὑπὸἀνέμωνπαραφερόμεναι,δένδραφθινοπωρινὰἄκαρπαδὶςἀποθανόνταἐκριζωθέντα,\n", "Jude 1:13\n", "\t\t κύματαἄγριαθαλάσσηςἐπαφρίζοντατὰςἑαυτῶναἰσχύνας,ἀστέρεςπλανῆται,οἷςὁζόφοςτοῦσκότουςεἰςαἰῶνατετήρηται.\n", "Jude 1:14\n", "\t\t δὲἘπροφήτευσενκαὶτούτοιςἕβδομοςἀπὸἈδὰμἙνὼχλέγωνἸδοὺἦλθενΚύριοςἐνἁγίαιςμυριάσιναὐτοῦ,\n", "Jude 1:15\n", "\t\t ποιῆσαικρίσινκατὰπάντωνκαὶἐλέγξαιπάνταςτοὺςἀσεβεῖςπερὶπάντωντῶνἔργωνἀσεβείαςαὐτῶνὧνἠσέβησανκαὶπερὶπάντωντῶνσκληρῶνὧνἐλάλησανκατ’αὐτοῦἁμαρτωλοὶἀσεβεῖς.\n", "Jude 1:16\n", "\t\t Οὗτοίεἰσινγογγυσταί,μεμψίμοιροι,κατὰτὰςἐπιθυμίαςαὐτῶνπορευόμενοι,καὶτὸστόμααὐτῶνλαλεῖὑπέρογκα,θαυμάζοντεςπρόσωπαὠφελείαςχάριν.\n", "Jude 1:17\n", "\t\t δέ,ἀγαπητοί,ὙμεῖςμνήσθητετῶνῥημάτωντῶνπροειρημένωνὑπὸτῶνἀποστόλωντοῦΚυρίουἡμῶνἸησοῦΧριστοῦ,\n", "Jude 1:18\n", "\t\t ὅτιἔλεγονὑμῖνἘπ’ἐσχάτουτοῦχρόνουἔσονταιἐμπαῖκταιπορευόμενοικατὰτὰςἑαυτῶνἐπιθυμίαςτῶνἀσεβειῶν.\n", "Jude 1:19\n", "\t\t Οὗτοίεἰσινοἱἀποδιορίζοντες,ψυχικοί,Πνεῦμαμὴἔχοντες.\n", "Jude 1:20\n", "\t\t δέ,ἀγαπητοί,ὑμεῖςἐποικοδομοῦντεςἑαυτοὺςτῇἁγιωτάτῃὑμῶνπίστει,ἐνΠνεύματιἉγίῳπροσευχόμενοι,\n", "Jude 1:21\n", "\t\t ἑαυτοὺςἐνἀγάπῃΘεοῦτηρήσατε,προσδεχόμενοιτὸἔλεοςτοῦΚυρίουἡμῶνἸησοῦΧριστοῦεἰςζωὴναἰώνιον.\n", "Jude 1:22\n", "\t\t καὶμὲνοὓςδιακρινομένουςἐλεᾶτε\n", "Jude 1:23\n", "\t\t σῴζετεἐκπυρὸςἁρπάζοντες,δὲοὓςἐλεᾶτεἐνφόβῳ,μισοῦντεςκαὶτὸνἀπὸτῆςσαρκὸςἐσπιλωμένονχιτῶνα.\n", "Jude 1:24\n", "\t\t δὲΤῷδυναμένῳφυλάξαιὑμᾶςἀπταίστουςκαὶστῆσαικατενώπιοντῆςδόξηςαὐτοῦἀμώμουςἐνἀγαλλιάσει,\n", "Jude 1:25\n", "\t\t μόνῳΘεῷΣωτῆριἡμῶνδιὰἸησοῦΧριστοῦτοῦΚυρίουἡμῶνδόξαμεγαλωσύνηκράτοςκαὶἐξουσίαπρὸπαντὸςτοῦαἰῶνοςκαὶνῦνκαὶεἰςπάνταςτοὺςαἰῶνας·ἀμήν.\n" ] } ], "source": [ "show_book = T.nodeFromSection(('Jude',))\n", "\n", "for verse in L.d(show_book, 'verse'):\n", " \n", " print('{} {}:{}'.format(*T.sectionFromNode(verse)))\n", " print('\\t\\t', T.text(verse))\n", " " ] }, { "cell_type": "code", "execution_count": 18, "id": "065df218-82e5-44f1-8ac7-2ddf36a6fac1", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "{'oslots': }\n" ] } ], "source": [ "print(E.__dict__)\n" ] }, { "cell_type": "code", "execution_count": 20, "id": "be3d3752-27e8-49d5-9c98-8c1e8cbf027e", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "{'api': , 'otypeRank': {'word': 0, 'phrase': 1, 'clause': 2, 'verse': 3, 'sentence': 4, 'chapter': 5, 'book': 6}, 'sortKey': . at 0x000001F273835310>, 'sortKeyTuple': . at 0x000001F273835940>, 'sortKeyChunk': , 'sortKeyChunkLength': }\n" ] } ], "source": [ "print(N.__dict__)" ] }, { "cell_type": "code", "execution_count": 13, "id": "4ddd3b78-bc8f-4de4-9e70-6a66ac0244f1", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "{'otype': , 'book': , 'chapter': , 'verse': , 'word': , 'book_code': , 'book_long': , 'book_short': , 'booknum': , 'case': , 'clause': , 'clauserule': , 'clausetype': , 'degree': , 'formaltag': , 'functionaltag': , 'gloss_EN': , 'gn': , 'lemma': , 'lex_dom': , 'ln': , 'monad': , 'mood': , 'nodeID': , 'normalized': , 'nu': , 'number': , 'orig_order': , 'person': , 'phrase': , 'phrasefunction': , 'phrasefunction_long': , 'phrasetype': , 'sentence': , 'sentencetype': , 'sp': , 'sp_full': , 'strongs': , 'subj_ref': , 'tense': , 'type': , 'voice': }\n" ] } ], "source": [ "print(F.__dict__)" ] }, { "cell_type": "code", "execution_count": 15, "id": "168bf20d-52fd-4862-8d7f-74b3a0c20a8f", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "{'api': }\n" ] } ], "source": [ "print(L.__dict__)" ] }, { "cell_type": "code", "execution_count": 105, "id": "49079bc7-a9d1-41b0-9efd-2dd5985af2f9", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Jude § 1\n", "(1:1) ἸούδαςἸησοῦΧριστοῦδοῦλος,δὲἀδελφὸςἸακώβου,τοῖςἐνΘεῷΠατρὶἠγαπημένοιςκαὶἸησοῦΧριστῷτετηρημένοιςκλητοῖς.\n", "(1:2) ὑμῖνἔλεοςκαὶεἰρήνηκαὶἀγάπηπληθυνθείη.\n", "(1:3) Ἀγαπητοί,πᾶσανσπουδὴνποιούμενοςγράφεινὑμῖνπερὶτῆςκοινῆςἡμῶνσωτηρίας,ἀνάγκηνἔσχονγράψαιὑμῖνπαρακαλῶνἐπαγωνίζεσθαιτῇἅπαξπαραδοθείσῃτοῖςἁγίοιςπίστει.\n", "(1:4) γάρπαρεισεδύησαντινεςἄνθρωποι,οἱπάλαιπρογεγραμμένοιεἰςτοῦτοτὸκρίμα,ἀσεβεῖς,τὴντοῦΘεοῦἡμῶνχάριταμετατιθέντεςεἰςἀσέλγειανκαὶτὸνμόνονΔεσπότηνκαὶΚύριονἡμῶνἸησοῦνΧριστὸνἀρνούμενοι.\n", "(1:5) δὲβούλομαι,εἰδόταςἅπαξπάντα,ὙπομνῆσαιὑμᾶςὅτιΚύριοςλαὸνἐκγῆςΑἰγύπτουσώσαςτὸδεύτεροντοὺςμὴπιστεύσανταςἀπώλεσεν,\n", "(1:6) τεἀγγέλουςτοὺςμὴτηρήσανταςτὴνἑαυτῶνἀρχὴνἀλλὰἀπολιπόνταςτὸἴδιονοἰκητήριονεἰςκρίσινμεγάληςἡμέραςδεσμοῖςἀϊδίοιςὑπὸζόφοντετήρηκεν·\n", "(1:7) ὡςΣόδομακαὶΓόμορρακαὶαἱπερὶαὐτὰςπόλεις,τὸνὅμοιοντρόποντούτοιςἐκπορνεύσασαικαὶἀπελθοῦσαιὀπίσωσαρκὸςἑτέρας,πρόκεινταιδεῖγμαπυρὸςαἰωνίουδίκηνὑπέχουσαι.\n", "(1:8) μέντοιὉμοίωςκαὶοὗτοιἐνυπνιαζόμενοιμὲνσάρκαμιαίνουσιν,δὲκυριότηταἀθετοῦσιν,δὲδόξαςβλασφημοῦσιν.\n", "(1:9) δὲὅτετῷδιαβόλῳδιακρινόμενοςδιελέγετοπερὶτοῦΜωϋσέωςσώματος,οὐκὁΜιχαὴλὁἀρχάγγελος,ἐτόλμησενκρίσινβλασφημίας,ἐπενεγκεῖνἀλλὰεἶπενἘπιτιμήσαισοιΚύριος.\n", "(1:10) δὲμὲνοὗτοιὅσαοὐκοἴδασινβλασφημοῦσιν,δὲὅσαφυσικῶςὡςτὰἄλογαζῷαἐπίστανται,ἐντούτοιςφθείρονται.\n", "(1:11) οὐαὶαὐτοῖς,ὅτιτῇὁδῷτοῦΚάϊνἐπορεύθησαν,καὶτῇπλάνῃτοῦΒαλαὰμμισθοῦἐξεχύθησαν,καὶτῇἀντιλογίᾳτοῦΚόρεἀπώλοντο.\n", "(1:12) Οὗτοίεἰσινοἱἐνταῖςἀγάπαιςὑμῶνσπιλάδεςσυνευωχούμενοιἀφόβως,ἑαυτοὺςποιμαίνοντες,νεφέλαιἄνυδροιὑπὸἀνέμωνπαραφερόμεναι,δένδραφθινοπωρινὰἄκαρπαδὶςἀποθανόνταἐκριζωθέντα,\n", "(1:13) κύματαἄγριαθαλάσσηςἐπαφρίζοντατὰςἑαυτῶναἰσχύνας,ἀστέρεςπλανῆται,οἷςὁζόφοςτοῦσκότουςεἰςαἰῶνατετήρηται.\n", "(1:14) δὲἘπροφήτευσενκαὶτούτοιςἕβδομοςἀπὸἈδὰμἙνὼχλέγωνἸδοὺἦλθενΚύριοςἐνἁγίαιςμυριάσιναὐτοῦ,\n", "(1:15) ποιῆσαικρίσινκατὰπάντωνκαὶἐλέγξαιπάνταςτοὺςἀσεβεῖςπερὶπάντωντῶνἔργωνἀσεβείαςαὐτῶνὧνἠσέβησανκαὶπερὶπάντωντῶνσκληρῶνὧνἐλάλησανκατ’αὐτοῦἁμαρτωλοὶἀσεβεῖς.\n", "(1:16) Οὗτοίεἰσινγογγυσταί,μεμψίμοιροι,κατὰτὰςἐπιθυμίαςαὐτῶνπορευόμενοι,καὶτὸστόμααὐτῶνλαλεῖὑπέρογκα,θαυμάζοντεςπρόσωπαὠφελείαςχάριν.\n", "(1:17) δέ,ἀγαπητοί,ὙμεῖςμνήσθητετῶνῥημάτωντῶνπροειρημένωνὑπὸτῶνἀποστόλωντοῦΚυρίουἡμῶνἸησοῦΧριστοῦ,\n", "(1:18) ὅτιἔλεγονὑμῖνἘπ’ἐσχάτουτοῦχρόνουἔσονταιἐμπαῖκταιπορευόμενοικατὰτὰςἑαυτῶνἐπιθυμίαςτῶνἀσεβειῶν.\n", "(1:19) Οὗτοίεἰσινοἱἀποδιορίζοντες,ψυχικοί,Πνεῦμαμὴἔχοντες.\n", "(1:20) δέ,ἀγαπητοί,ὑμεῖςἐποικοδομοῦντεςἑαυτοὺςτῇἁγιωτάτῃὑμῶνπίστει,ἐνΠνεύματιἉγίῳπροσευχόμενοι,\n", "(1:21) ἑαυτοὺςἐνἀγάπῃΘεοῦτηρήσατε,προσδεχόμενοιτὸἔλεοςτοῦΚυρίουἡμῶνἸησοῦΧριστοῦεἰςζωὴναἰώνιον.\n", "(1:22) καὶμὲνοὓςδιακρινομένουςἐλεᾶτε\n", "(1:23) σῴζετεἐκπυρὸςἁρπάζοντες,δὲοὓςἐλεᾶτεἐνφόβῳ,μισοῦντεςκαὶτὸνἀπὸτῆςσαρκὸςἐσπιλωμένονχιτῶνα.\n", "(1:24) δὲΤῷδυναμένῳφυλάξαιὑμᾶςἀπταίστουςκαὶστῆσαικατενώπιοντῆςδόξηςαὐτοῦἀμώμουςἐνἀγαλλιάσει,\n", "(1:25) μόνῳΘεῷΣωτῆριἡμῶνδιὰἸησοῦΧριστοῦτοῦΚυρίουἡμῶνδόξαμεγαλωσύνηκράτοςκαὶἐξουσίαπρὸπαντὸςτοῦαἰῶνοςκαὶνῦνκαὶεἰςπάνταςτοὺςαἰῶνας·ἀμήν.\n", "\n", "\n" ] } ], "source": [ "for chapter in L.d(show_book, 'chapter'):\n", " print(F.book.v(show_book), '§', F.chapter.v(chapter))\n", " \n", " for verse in L.d(chapter, 'verse'):\n", " book,chapter,vrs = T.sectionFromNode(verse)\n", " print(f'({chapter}:{vrs}) {T.text(verse)}', end='\\n')\n", " print('\\n')" ] }, { "cell_type": "code", "execution_count": null, "id": "16ab91cb-a143-45e8-bd49-2b3924d74a2a", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 19, "id": "27f0ccb3-a395-494b-b233-3472bdff579e", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "1 - Matthew 1 : 16 =\t λεγόμενος \tformaltag: V-PEP-NSM \tfunctionaltag: V-PPP-NSM\n", "2 - Matthew 1 : 22 =\t ῥηθὲν \tformaltag: V-AEP-NSN \tfunctionaltag: V-APP-NSN\n", "3 - Matthew 1 : 23 =\t μεθερμηνευόμενον \tformaltag: V-PEP-NSN \tfunctionaltag: V-PPP-NSN\n", "4 - Matthew 2 : 4 =\t γεννᾶται. \tformaltag: V-PES-3S \tfunctionaltag: V-PPS-3S\n", "5 - Matthew 2 : 5 =\t γέγραπται \tformaltag: V-REI-3S \tfunctionaltag: V-RPI-3S\n", "6 - Matthew 2 : 15 =\t ῥηθὲν \tformaltag: V-AEP-NSN \tfunctionaltag: V-APP-NSN\n", "7 - Matthew 2 : 17 =\t ῥηθὲν \tformaltag: V-AEP-NSN \tfunctionaltag: V-APP-NSN\n", "8 - Matthew 2 : 20 =\t τεθνήκασιν \tformaltag: V-REI-3P \tfunctionaltag: V-RAI-3P\n", "9 - Matthew 2 : 23 =\t λεγομένην \tformaltag: V-PEP-ASF \tfunctionaltag: V-PPP-ASF\n", "10 - Matthew 2 : 23 =\t ῥηθὲν \tformaltag: V-AEP-NSN \tfunctionaltag: V-APP-NSN\n" ] } ], "source": [ "max=10\n", "count=0\n", "for node in F.otype.s('word'):\n", " functionaltag=F.functionaltag.v(node)\n", " formaltag=F.formaltag.v(node)\n", " if formaltag != functionaltag:\n", " count+=1\n", " book=F.book_long.v(node)\n", " chapter=F.chapter.v(node)\n", " verse=F.verse.v(node)\n", " word=F.word.v(node)\n", " print (count,' - ',book,chapter,':',verse,'=\\t',word,'\\tformaltag:',formaltag,'\\tfunctionaltag:',functionaltag)\n", " if count==max: break\n", " " ] }, { "cell_type": "code", "execution_count": 20, "id": "052fb1b6-19f4-421a-9391-821323f268da", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "{'Feminine': 18736, 'Masculine': 41486, '': 63804, 'Neuter': 13753}\n" ] } ], "source": [ "# print value frequency for feature gn\n", "ValueFreq = {}\n", "\n", "for node in F.otype.s('word'):\n", " gn=F.gn.v(node)\n", " ValueFreq[gn] = ValueFreq.setdefault(gn, 0) + 1\n", "\n", "print (ValueFreq)\n" ] }, { "cell_type": "code", "execution_count": 21, "id": "fe44085f-feb8-460c-aa72-71f000afb6d4", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "{'yes': 126756, 'no': 11023}\n" ] } ], "source": [ "# print frequency for feature ln,lex_dom being populated\n", "ValueFreq = {}\n", "\n", "for node in F.otype.s('word'):\n", " LnPresent='no'\n", " if F.ln.v(node)!='': LnPresent='yes'\n", " ValueFreq[LnPresent] = ValueFreq.setdefault(LnPresent, 0) + 1\n", "\n", "print (ValueFreq)\n" ] }, { "cell_type": "code", "execution_count": 22, "id": "3231c929-b603-4234-9d0a-a18d8f0d4b9a", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Feature: sp Frequency: {'noun': 28455, 'verb': 28357, 'det': 19786, 'conj': 18227, 'pron': 16177, 'prep': 10914, 'adj': 8452, 'adv': 6147, 'ptcl': 773, 'num': 476, 'intj': 15}\n", "Feature: number Frequency: {'Singular': 69846, '': 38842, 'Plural': 29091}\n", "Feature: phrasetype Frequency: {None: 137779}\n", "Feature: person Frequency: {'': 118360, 'Third': 12747, 'Second': 3729, 'First': 2943}\n", "Feature: nu Frequency: {'Singular': 69846, '': 38842, 'Plural': 29091}\n", "Feature: degree Frequency: {'': 137266, 'Superlative': 200, 'Comparative': 313}\n", "Feature: tense Frequency: {'': 109422, 'Aorist': 11803, 'Present': 11579, 'Imperfect': 1689, 'Future': 1626, 'Perfect': 1572, 'Pluperfect': 88}\n", "Feature: case Frequency: {'Nominative': 24197, 'Genitive': 19515, '': 58261, 'Accusative': 23031, 'Dative': 12126, 'Vocative': 649}\n", "Feature: mood Frequency: {'': 109422, 'Indicative': 15617, 'Participle': 6653, 'Infinitive': 2285, 'Imperative': 1877, 'Subjunctive': 1856, 'Optative': 69}\n", "Feature: type Frequency: {'Common': 23644, 'Proper': 4639, '': 93321, 'Personal': 11521, 'Relative': 1674, 'Demonstrative': 1722, 'Interrogative': 633, 'Indefinite': 552, 'Possessive': 70, 'Adverbial': 3}\n", "Feature: voice Frequency: {'': 109422, 'Active': 20742, 'Passive': 3493, 'Middle': 2408, 'MiddlePassive': 1714}\n", "Feature: gn Frequency: {'Feminine': 18736, 'Masculine': 41486, '': 63804, 'Neuter': 13753}\n" ] } ], "source": [ "FeatureList = {'case', 'type', 'phrasetype', 'degree', 'mood', 'nu', 'number', 'person', 'sp', 'tense', 'voice', 'gn' }\n", "for Feature in FeatureList:\n", " ValueFreq = {}\n", " for node in F.otype.s('word'):\n", " # implementation of pseudo: gn=F.{Feature}.v(node)\n", " Value= getattr(F, Feature).v(node)\n", " ValueFreq[Value] = ValueFreq.setdefault(Value, 0) + 1\n", " print ('Feature:',Feature,' Frequency:',ValueFreq)\n", " " ] }, { "cell_type": "markdown", "id": "4463ab23", "metadata": {}, "source": [ "# Zip up the final product" ] }, { "cell_type": "code", "execution_count": 27, "id": "f407069e", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Data to be zipped:\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "'git' is not recognized as an internal or external command,\r\n", "operable program or batch file.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\tOK app (v?? ??) : ~/github/tonyjurg/Nestle1904/app\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "'git' is not recognized as an internal or external command,\r\n", "operable program or batch file.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\tOK main data (v?? ??) : ~/github/tonyjurg/Nestle1904/tf/1904\n", "Writing zip file ...\n", "Result: ~/Downloads/github/tonyjurg/Nestle1904/complete.zip\n" ] } ], "source": [ "N1904.zipAll()" ] }, { "cell_type": "code", "execution_count": null, "id": "7088affb", "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 }