{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Creating Text-Fabric from LowFat XML trees\n", "The source data for the conversion are the LowFat XML trees files representing the macula-greek version of the Nestle 1904 Greek New Testment. The most recent source data can be found on github https://github.com/Clear-Bible/macula-greek/tree/main/Nestle1904/lowfat. Attribution: \"MACULA Greek Linguistic Datasets, available at https://github.com/Clear-Bible/macula-greek/\". \n", "\n", "The production of the Text-Fabric files consist of two steps. First the creation of piclke files (part 1). Secondly the actual Text-Fabric creation process (part 2). Both steps are independent allowing to start from Part 2 by using the pickle files as input. \n", "\n", "Be advised that this Text-Fabric version is a test version (proof of concept) and requires further finetuning, especialy with regards of nomenclature and presentation of (sub)phrases and clauses." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Table of content \n", "* [Part 1: Read LowFat XML data and store in pickle](#first-bullet)\n", "* [part 2: Sort the nodes](#second-bullet)\n", "* [Part 3: Nestle1904 production from pickle input](#third-bullet)\n", "* [Part 4: Testing the created textfabric data](#fourth-bullet)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Part 1: Read LowFat XML data and store in pickle \n", "##### [back to TOC](#TOC)\n", "\n", "This script harvests all information from the LowFat tree data (XML nodes), puts it into a Panda DataFrame and stores the result per book in a pickle file. Note: pickling (in Python) is serialising an object into a disk file (or buffer). \n", "\n", "In the context of this script, 'Leaf' refers to those node containing the Greek word as data, which happen to be the nodes without any child (hence the analogy with the leaves on the tree). These 'leafs' can also be refered to as 'terminal nodes'. Futher, Parent1 is the leaf's parent, Parent2 is Parent1's parent, etc.\n", "\n", "For a full description of the source data see document [MACULA Greek Treebank for the Nestle 1904 Greek New Testament.pdf](https://github.com/Clear-Bible/macula-greek/blob/main/doc/MACULA%20Greek%20Treebank%20for%20the%20Nestle%201904%20Greek%20New%20Testament.pdf)" ] }, { "cell_type": "markdown", "metadata": { "tags": [] }, "source": [ "### Step 1: import various libraries" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "ExecuteTime": { "end_time": "2022-10-28T02:58:14.739227Z", "start_time": "2022-10-28T02:57:38.766097Z" } }, "outputs": [], "source": [ "import pandas as pd\n", "import sys\n", "import os\n", "import time\n", "import pickle\n", "\n", "import re #regular expressions\n", "from os import listdir\n", "from os.path import isfile, join\n", "import xml.etree.ElementTree as ET" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 2: initialize global data\n", "\n", "Change BaseDir, XmlDir and PklDir to match location of the datalocation and the OS used." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "BaseDir = 'C:\\\\Users\\\\tonyj\\\\my_new_Jupyter_folder\\\\Read_from_lowfat\\\\data\\\\'\n", "XmlDir = BaseDir+'xml\\\\'\n", "PklDir = BaseDir+'pkl\\\\'\n", "XlsxDir = BaseDir+'xlsx\\\\'\n", "# note: create output directory prior running this part\n", "\n", "# key: filename, [0]=book_long, [1]=book_num, [3]=book_short\n", "bo2book = {'01-matthew': ['Matthew', '1', 'Matt'],\n", " '02-mark': ['Mark', '2', 'Mark'],\n", " '03-luke': ['Luke', '3', 'Luke'],\n", " '04-john': ['John', '4', 'John'],\n", " '05-acts': ['Acts', '5', 'Acts'],\n", " '06-romans': ['Romans', '6', 'Rom'],\n", " '07-1corinthians': ['I_Corinthians', '7', '1Cor'],\n", " '08-2corinthians': ['II_Corinthians', '8', '2Cor'],\n", " '09-galatians': ['Galatians', '9', 'Gal'],\n", " '10-ephesians': ['Ephesians', '10', 'Eph'],\n", " '11-philippians': ['Philippians', '11', 'Phil'],\n", " '12-colossians': ['Colossians', '12', 'Col'],\n", " '13-1thessalonians':['I_Thessalonians', '13', '1Thess'],\n", " '14-2thessalonians':['II_Thessalonians','14', '2Thess'],\n", " '15-1timothy': ['I_Timothy', '15', '1Tim'],\n", " '16-2timothy': ['II_Timothy', '16', '2Tim'],\n", " '17-titus': ['Titus', '17', 'Titus'],\n", " '18-philemon': ['Philemon', '18', 'Phlm'],\n", " '19-hebrews': ['Hebrews', '19', 'Heb'],\n", " '20-james': ['James', '20', 'Jas'],\n", " '21-1peter': ['I_Peter', '21', '1Pet'],\n", " '22-2peter': ['II_Peter', '22', '2Pet'],\n", " '23-1john': ['I_John', '23', '1John'],\n", " '24-2john': ['II_John', '24', '2John'],\n", " '25-3john': ['III_John', '25', '3John'], \n", " '26-jude': ['Jude', '26', 'Jude'],\n", " '27-revelation': ['Revelation', '27', 'Rev']}\n", "\n", "bo2book_ = {'25-3john': ['III_John', '25', '3John']}" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### step 3: define Function to add parent info to each node of the XML tree\n", "\n", "In order to traverse from the 'leafs' (terminating nodes) upto the root of the tree, it is required to add information to each node pointing to the parent of each node.\n", "\n", "(concept taken from https://stackoverflow.com/questions/2170610/access-elementtree-node-parent-node)" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "def addParentInfo(et):\n", " for child in et:\n", " child.attrib['parent'] = et\n", " addParentInfo(child)\n", "\n", "def getParent(et):\n", " if 'parent' in et.attrib:\n", " return et.attrib['parent']\n", " else:\n", " return None" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 4: read and process the XML data and store panda dataframe in pickle" ] }, { "cell_type": "code", "execution_count": 48, "metadata": { "scrolled": true, "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Processing Matthew at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\01-matthew.xml\n", "......................................................................................................................................................................................\n", "Found 18299 items in 337.3681836128235 seconds\n", "\n", "Processing Mark at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\02-mark.xml\n", "................................................................................................................\n", "Found 11277 items in 144.04719877243042 seconds\n", "\n", "Processing Luke at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\03-luke.xml\n", "..................................................................................................................................................................................................\n", "Found 19456 items in 1501.197922706604 seconds\n", "\n", "Processing John at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\04-john.xml\n", "............................................................................................................................................................\n", "Found 15643 items in 237.1071105003357 seconds\n", "\n", "Processing Acts at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\05-acts.xml\n", ".......................................................................................................................................................................................\n", "Found 18393 items in 384.3644151687622 seconds\n", "\n", "Processing Romans at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\06-romans.xml\n", ".......................................................................\n", "Found 7100 items in 71.03568935394287 seconds\n", "\n", "Processing I_Corinthians at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\07-1corinthians.xml\n", "....................................................................\n", "Found 6820 items in 58.47511959075928 seconds\n", "\n", "Processing II_Corinthians at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\08-2corinthians.xml\n", "............................................\n", "Found 4469 items in 31.848721027374268 seconds\n", "\n", "Processing Galatians at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\09-galatians.xml\n", "......................\n", "Found 2228 items in 13.850211143493652 seconds\n", "\n", "Processing Ephesians at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\10-ephesians.xml\n", "........................\n", "Found 2419 items in 17.529520511627197 seconds\n", "\n", "Processing Philippians at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\11-philippians.xml\n", "................\n", "Found 1630 items in 9.271572589874268 seconds\n", "\n", "Processing Colossians at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\12-colossians.xml\n", "...............\n", "Found 1575 items in 10.389309883117676 seconds\n", "\n", "Processing I_Thessalonians at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\13-1thessalonians.xml\n", "..............\n", "Found 1473 items in 8.413437604904175 seconds\n", "\n", "Processing II_Thessalonians at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\14-2thessalonians.xml\n", "........\n", "Found 822 items in 4.284915447235107 seconds\n", "\n", "Processing I_Timothy at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\15-1timothy.xml\n", "...............\n", "Found 1588 items in 10.419771671295166 seconds\n", "\n", "Processing II_Timothy at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\16-2timothy.xml\n", "............\n", "Found 1237 items in 7.126454591751099 seconds\n", "\n", "Processing Titus at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\17-titus.xml\n", "......\n", "Found 658 items in 3.1472580432891846 seconds\n", "\n", "Processing Philemon at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\18-philemon.xml\n", "...\n", "Found 335 items in 1.3175146579742432 seconds\n", "\n", "Processing Hebrews at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\19-hebrews.xml\n", ".................................................\n", "Found 4955 items in 44.31139326095581 seconds\n", "\n", "Processing James at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\20-james.xml\n", ".................\n", "Found 1739 items in 8.570415496826172 seconds\n", "\n", "Processing I_Peter at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\21-1peter.xml\n", "................\n", "Found 1676 items in 10.489561557769775 seconds\n", "\n", "Processing II_Peter at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\22-2peter.xml\n", "..........\n", "Found 1098 items in 6.005697250366211 seconds\n", "\n", "Processing I_John at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\23-1john.xml\n", ".....................\n", "Found 2136 items in 10.843079566955566 seconds\n", "\n", "Processing II_John at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\24-2john.xml\n", "..\n", "Found 245 items in 0.9535031318664551 seconds\n", "\n", "Processing III_John at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\25-3john.xml\n", "..\n", "Found 219 items in 1.0913233757019043 seconds\n", "\n", "Processing Jude at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\26-jude.xml\n", "....\n", "Found 457 items in 1.8929190635681152 seconds\n", "\n", "Processing Revelation at C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\xml\\27-revelation.xml\n", "..................................................................................................\n", "Found 9832 items in 125.92533278465271 seconds\n", "\n" ] } ], "source": [ "# set some globals\n", "monad=1\n", "CollectedItems= 0\n", "\n", "# process books in order\n", "for bo, bookinfo in bo2book.items():\n", " CollectedItems=0\n", " SentenceNumber=0\n", " WordGroupNumber=0\n", " full_df=pd.DataFrame({})\n", " book_long=bookinfo[0]\n", " booknum=bookinfo[1]\n", " book_short=bookinfo[2]\n", " InputFile = os.path.join(XmlDir, f'{bo}.xml')\n", " OutputFile = os.path.join(PklDir, f'{bo}.pkl')\n", " print(f'Processing {book_long} at {InputFile}')\n", "\n", " # send xml document to parsing process\n", " tree = ET.parse(InputFile)\n", " # Now add all the parent info to the nodes in the xtree [important!]\n", " addParentInfo(tree.getroot())\n", " start_time = time.time()\n", " \n", " # walk over all the XML data\n", " for elem in tree.iter():\n", " if elem.tag == 'sentence':\n", " # add running number to 'sentence' tags\n", " SentenceNumber+=1\n", " elem.set('SN', SentenceNumber)\n", " if elem.tag == 'wg':\n", " # add running number to 'wg' tags\n", " WordGroupNumber+=1\n", " elem.set('WGN', WordGroupNumber)\n", " if elem.tag == 'w':\n", " # all nodes containing words are tagged with 'w'\n", " \n", " # show progress on screen\n", " CollectedItems+=1\n", " if (CollectedItems%100==0): print (\".\",end='')\n", " \n", " #Leafref will contain list with book, chapter verse and wordnumber\n", " Leafref = re.sub(r'[!: ]',\" \", elem.attrib.get('ref')).split()\n", " \n", " #push value for monad to element tree \n", " elem.set('monad', monad)\n", " monad+=1\n", " \n", " # add some important computed data to the leaf\n", " elem.set('LeafName', elem.tag)\n", " elem.set('word', elem.text)\n", " elem.set('book_long', book_long)\n", " elem.set('booknum', int(booknum))\n", " elem.set('book_short', book_short)\n", " elem.set('chapter', int(Leafref[1]))\n", " elem.set('verse', int(Leafref[2]))\n", " \n", " # folling code will trace down parents upto the tree and store found attributes\n", " parentnode=getParent(elem)\n", " index=0\n", " while (parentnode):\n", " index+=1\n", " elem.set('Parent{}Name'.format(index), parentnode.tag)\n", " elem.set('Parent{}Type'.format(index), parentnode.attrib.get('type'))\n", " elem.set('Parent{}Appos'.format(index), parentnode.attrib.get('appositioncontainer'))\n", " elem.set('Parent{}Class'.format(index), parentnode.attrib.get('class'))\n", " elem.set('Parent{}Rule'.format(index), parentnode.attrib.get('rule'))\n", " elem.set('Parent{}Role'.format(index), parentnode.attrib.get('role'))\n", " elem.set('Parent{}Cltype'.format(index), parentnode.attrib.get('cltype'))\n", " elem.set('Parent{}Unit'.format(index), parentnode.attrib.get('unit'))\n", " elem.set('Parent{}Junction'.format(index), parentnode.attrib.get('junction'))\n", " elem.set('Parent{}SN'.format(index), parentnode.attrib.get('SN'))\n", " elem.set('Parent{}WGN'.format(index), parentnode.attrib.get('WGN'))\n", " currentnode=parentnode\n", " parentnode=getParent(currentnode) \n", " elem.set('parents', int(index))\n", " \n", " #this will push all elements found in the tree into a DataFrame\n", " df=pd.DataFrame(elem.attrib, index={monad})\n", " full_df=pd.concat([full_df,df])\n", " \n", " #store the resulting DataFrame per book into a pickle file for further processing\n", " df = df.convert_dtypes(convert_string=True)\n", " \n", " # sort by s=id\n", " sortkey='{http://www.w3.org/XML/1998/namespace}id'\n", " full_df.rename(columns={sortkey: 'id'}, inplace=True)\n", " full_df.sort_values(by=['id'])\n", "\n", " output = open(r\"{}\".format(OutputFile), 'wb')\n", " pickle.dump(full_df, output)\n", " output.close()\n", " print(\"\\nFound \",CollectedItems, \" items in %s seconds\\n\" % (time.time() - start_time)) \n", " " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# just dump some things to test the result\n", "\n", "\n", "for bo in bo2book:\n", " '''\n", " load all data into a dataframe\n", " process books in order (bookinfo is a list!)\n", " ''' \n", " InputFile = os.path.join(PklDir, f'{bo}.pkl')\n", " \n", " print(f'\\tloading {InputFile}...')\n", " pkl_file = open(InputFile, 'rb')\n", " df = pickle.load(pkl_file)\n", " pkl_file.close()\n", " \n", " # not sure if this is needed\n", " # fill dictionary of column names for this book \n", " IndexDict = {} # init an empty dictionary\n", " ItemsInRow=1\n", " for itemname in df.columns.to_list():\n", " IndexDict.update({'i_{}'.format(itemname): ItemsInRow})\n", " print (itemname)\n", " ItemsInRow+=1\n", " " ] }, { "cell_type": "markdown", "metadata": { "toc": true }, "source": [ "## Part 3: Nestle1904 Text-Fabric production from pickle input \n", "##### [back to TOC](#TOC)\n", "\n", "This script creates the Text-Fabric files by recursive calling the TF walker function.\n", "API info: https://annotation.github.io/text-fabric/tf/convert/walker.html\n", "\n", "The pickle files created by step 1 are stored on Github location T.B.D." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 1: Load libraries and initialize some data\n", "\n" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "ExecuteTime": { "end_time": "2022-10-28T03:01:34.810259Z", "start_time": "2022-10-28T03:01:25.745112Z" } }, "outputs": [], "source": [ "import pandas as pd\n", "import os\n", "import re\n", "import gc\n", "from tf.fabric import Fabric\n", "from tf.convert.walker import CV\n", "from tf.parameters import VERSION\n", "from datetime import date\n", "import pickle\n", "\n", "BaseDir = 'C:\\\\Users\\\\tonyj\\\\my_new_Jupyter_folder\\\\Read_from_lowfat\\\\data\\\\'\n", "XmlDir = BaseDir+'xml\\\\'\n", "PklDir = BaseDir+'pkl\\\\'\n", "XlsxDir = BaseDir+'xlsx\\\\'\n", "\n", "# key: filename, [0]=book_long, [1]=book_num, [3]=book_short\n", "bo2book = {'01-matthew': ['Matthew', '1', 'Matt'],\n", " '02-mark': ['Mark', '2', 'Mark'],\n", " '03-luke': ['Luke', '3', 'Luke'],\n", " '04-john': ['John', '4', 'John'],\n", " '05-acts': ['Acts', '5', 'Acts'],\n", " '06-romans': ['Romans', '6', 'Rom'],\n", " '07-1corinthians': ['I_Corinthians', '7', '1Cor'],\n", " '08-2corinthians': ['II_Corinthians', '8', '2Cor'],\n", " '09-galatians': ['Galatians', '9', 'Gal'],\n", " '10-ephesians': ['Ephesians', '10', 'Eph'],\n", " '11-philippians': ['Philippians', '11', 'Phil'],\n", " '12-colossians': ['Colossians', '12', 'Col'],\n", " '13-1thessalonians':['I_Thessalonians', '13', '1Thess'],\n", " '14-2thessalonians':['II_Thessalonians','14', '2Thess'],\n", " '15-1timothy': ['I_Timothy', '15', '1Tim'],\n", " '16-2timothy': ['II_Timothy', '16', '2Tim'],\n", " '17-titus': ['Titus', '17', 'Titus'],\n", " '18-philemon': ['Philemon', '18', 'Phlm'],\n", " '19-hebrews': ['Hebrews', '19', 'Heb'],\n", " '20-james': ['James', '20', 'Jas'],\n", " '21-1peter': ['I_Peter', '21', '1Pet'],\n", " '22-2peter': ['II_Peter', '22', '2Pet'],\n", " '23-1john': ['I_John', '23', '1John'],\n", " '24-2john': ['II_John', '24', '2John'],\n", " '25-3john': ['III_John', '25', '3John'], \n", " '26-jude': ['Jude', '26', 'Jude'],\n", " '27-revelation': ['Revelation', '27', 'Rev']}\n", "\n", "bo2book_ = {'26-jude': ['Jude', '26', 'Jude']}\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Optional: export to Excel for investigation" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\tloading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\26-jude.pkl...\n" ] } ], "source": [ "# test: sorting the data\n", "import openpyxl\n", "import pickle\n", "\n", "#if True:\n", "for bo in bo2book:\n", " '''\n", " load all data into a dataframe\n", " process books in order (bookinfo is a list!)\n", " ''' \n", " InputFile = os.path.join(PklDir, f'{bo}.pkl')\n", " #InputFile = os.path.join(PklDir, '01-matthew.pkl')\n", " \n", " print(f'\\tloading {InputFile}...')\n", " pkl_file = open(InputFile, 'rb')\n", " df = pickle.load(pkl_file)\n", " pkl_file.close()\n", " \n", " # not sure if this is needed\n", " # fill dictionary of column names for this book \n", " IndexDict = {} # init an empty dictionary\n", " ItemsInRow=1\n", " for itemname in df.columns.to_list():\n", " IndexDict.update({'i_{}'.format(itemname): ItemsInRow})\n", " ItemsInRow+=1\n", " #print(itemname)\n", " \n", " # sort by id\n", " #print(df)\n", " df_sorted=df.sort_values(by=['id'])\n", " df_sorted.to_excel(os.path.join(XlsxDir, f'{bo}.xlsx'), index=False)\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 2 Running the TF walker function\n", "\n", "API info: https://annotation.github.io/text-fabric/tf/convert/walker.html\n", "\n", "The logic of interpreting the data is included in the director function." ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "This is Text-Fabric 11.2.3\n", "49 features found and 0 ignored\n", " 0.00s Importing data from walking through the source ...\n", " | 0.00s Preparing metadata... \n", " | SECTION TYPES: book, chapter, verse\n", " | SECTION FEATURES: book, chapter, verse\n", " | STRUCTURE TYPES: book, chapter, verse\n", " | STRUCTURE FEATURES: book, chapter, verse\n", " | TEXT FEATURES:\n", " | | text-orig-full after, word\n", " | 0.00s OK\n", " | 0.00s Following director... \n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\01-matthew.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\02-mark.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\03-luke.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\04-john.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\05-acts.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\06-romans.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\07-1corinthians.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\08-2corinthians.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\09-galatians.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\10-ephesians.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\11-philippians.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\12-colossians.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\13-1thessalonians.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\14-2thessalonians.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\15-1timothy.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\16-2timothy.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\17-titus.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\18-philemon.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\19-hebrews.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\20-james.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\21-1peter.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\22-2peter.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\23-1john.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\24-2john.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\25-3john.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\26-jude.pkl...\n", "\tWe are loading C:\\Users\\tonyj\\my_new_Jupyter_folder\\Read_from_lowfat\\data\\pkl\\27-revelation.pkl...\n", " | 40s \"edge\" actions: 0\n", " | 40s \"feature\" actions: 328053\n", " | 40s \"node\" actions: 180871\n", " | 40s \"resume\" actions: 0\n", " | 40s \"slot\" actions: 137779\n", " | 40s \"terminate\" actions: 328026\n", " | 27 x \"book\" node \n", " | 260 x \"chapter\" node \n", " | 95811 x \"clause\" node \n", " | 71106 x \"phrase\" node \n", " | 5724 x \"sentence\" node \n", " | 7943 x \"verse\" node \n", " | 137779 x \"word\" node = slot type\n", " | 318650 nodes of all types\n", " | 40s OK\n", " | 0.00s checking for nodes and edges ... \n", " | 0.00s OK\n", " | 0.00s checking (section) features ... \n", " | 0.24s OK\n", " | 0.00s reordering nodes ...\n", " | 0.03s Sorting 27 nodes of type \"book\"\n", " | 0.04s Sorting 260 nodes of type \"chapter\"\n", " | 0.05s Sorting 95811 nodes of type \"clause\"\n", " | 0.16s Sorting 71106 nodes of type \"phrase\"\n", " | 0.24s Sorting 5724 nodes of type \"sentence\"\n", " | 0.26s Sorting 7943 nodes of type \"verse\"\n", " | 0.28s Max node = 318650\n", " | 0.28s OK\n", " | 0.00s reassigning feature values ...\n", " | | 0.00s node feature \"after\" with 137779 nodes\n", " | | 0.04s node feature \"book\" with 27 nodes\n", " | | 0.05s node feature \"book_long\" with 137779 nodes\n", " | | 0.09s node feature \"book_short\" with 137779 nodes\n", " | | 0.14s node feature \"booknum\" with 137779 nodes\n", " | | 0.18s node feature \"case\" with 137779 nodes\n", " | | 0.24s node feature \"chapter\" with 138039 nodes\n", " | | 0.29s node feature \"clause\" with 233590 nodes\n", " | | 0.38s node feature \"clauserule\" with 95811 nodes\n", " | | 0.43s node feature \"clausetype\" with 95811 nodes\n", " | | 0.47s node feature \"degree\" with 137779 nodes\n", " | | 0.52s node feature \"gloss\" with 137779 nodes\n", " | | 0.57s node feature \"gn\" with 137779 nodes\n", " | | 0.62s node feature \"id\" with 137779 nodes\n", " | | 0.66s node feature \"junction\" with 95808 nodes\n", " | | 0.69s node feature \"lemma\" with 137779 nodes\n", " | | 0.73s node feature \"lex_dom\" with 137779 nodes\n", " | | 0.78s node feature \"ln\" with 137779 nodes\n", " | | 0.82s node feature \"monad\" with 137779 nodes\n", " | | 0.86s node feature \"mood\" with 137779 nodes\n", " | | 0.89s node feature \"morph\" with 137779 nodes\n", " | | 0.93s node feature \"nodeID\" with 137779 nodes\n", " | | 0.97s node feature \"normalized\" with 137779 nodes\n", " | | 1.01s node feature \"nu\" with 137779 nodes\n", " | | 1.05s node feature \"number\" with 137779 nodes\n", " | | 1.09s node feature \"orig_order\" with 137779 nodes\n", " | | 1.13s node feature \"person\" with 137779 nodes\n", " | | 1.16s node feature \"phrase\" with 208885 nodes\n", " | | 1.22s node feature \"phrasefunction\" with 71106 nodes\n", " | | 1.25s node feature \"phrasefunction_long\" with 71106 nodes\n", " | | 1.27s node feature \"phrasetype\" with 71106 nodes\n", " | | 1.29s node feature \"ref\" with 137779 nodes\n", " | | 1.33s node feature \"reference\" with 137779 nodes\n", " | | 1.37s node feature \"sentence\" with 143503 nodes\n", " | | 1.41s node feature \"sp\" with 137779 nodes\n", " | | 1.45s node feature \"sp_full\" with 137779 nodes\n", " | | 1.49s node feature \"strongs\" with 137779 nodes\n", " | | 1.53s node feature \"subj_ref\" with 137779 nodes\n", " | | 1.56s node feature \"tense\" with 137779 nodes\n", " | | 1.61s node feature \"type\" with 137779 nodes\n", " | | 1.65s node feature \"unicode\" with 137779 nodes\n", " | | 1.69s node feature \"verse\" with 145722 nodes\n", " | | 1.73s node feature \"voice\" with 137779 nodes\n", " | | 1.77s node feature \"wg\" with 166914 nodes\n", " | | 1.81s node feature \"wgclass\" with 95808 nodes\n", " | | 1.85s node feature \"word\" with 137779 nodes\n", " | 1.98s OK\n", " 0.00s Exporting 47 node and 1 edge and 1 config features to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data/:\n", " 0.00s VALIDATING oslots feature\n", " 0.02s VALIDATING oslots feature\n", " 0.02s maxSlot= 137779\n", " 0.02s maxNode= 318650\n", " 0.04s OK: oslots is valid\n", " | 0.13s T after to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.00s T book to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.13s T book_long to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.13s T book_short to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.12s T booknum to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.14s T case to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.12s T chapter to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.21s T clause to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.10s T clauserule to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.09s T clausetype to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.13s T degree to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.14s T gloss to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.13s T gn to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.13s T id to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.09s T junction to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.15s T lemma to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.13s T lex_dom to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.13s T ln to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.13s T monad to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.13s T mood to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.14s T morph to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.14s T nodeID to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.15s T normalized to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.14s T nu to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.14s T number to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.13s T orig_order to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.06s T otype to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.13s T person to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.20s T phrase to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.07s T phrasefunction to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.07s T phrasefunction_long to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.07s T phrasetype to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.14s T ref to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.14s T reference to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.14s T sentence to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.13s T sp to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.13s T sp_full to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.13s T strongs to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.13s T subj_ref to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.13s T tense to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.13s T type to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.16s T unicode to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.13s T verse to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.13s T voice to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.22s T wg to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.09s T wgclass to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.15s T word to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.51s T oslots to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " | 0.00s M otext to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data\n", " 6.57s Exported 47 node features and 1 edge features and 1 config features to C:/Users/tonyj/my_new_Jupyter_folder/Read_from_lowfat/data/\n", "done\n" ] } ], "source": [ "TF = Fabric(locations=BaseDir, silent=False)\n", "cv = CV(TF)\n", "version = \"0.1.4 (visualize all wordgroups - recursive clause generation)\"\n", "\n", "\n", "def sanitize(input):\n", " if isinstance(input, float): return ''\n", " if isinstance(input, type(None)): return ''\n", " else: return (input)\n", " \n", "\n", "\n", "\n", "def director(cv):\n", " \n", " \n", " NoneType = type(None) # needed as tool to validate certain data\n", " prev_book = \"Matthew\" # start at first book\n", " IndexDict = {} # init an empty dictionary\n", " \n", " Arrays2Dump=200\n", " DumpedArrays=0\n", " ClauseDict={} # init a dummy dictionary\n", " PrevClauseSet = []\n", " PrevClauseList = []\n", "\n", " for bo,bookinfo in bo2book.items():\n", " \n", " '''\n", " load all data into a dataframe\n", " process books in order (bookinfo is a list!)\n", " ''' \n", " book=bookinfo[0] \n", " booknum=int(bookinfo[1])\n", " book_short=bookinfo[2]\n", " book_loc = os.path.join(PklDir, f'{bo}.pkl') \n", " \n", " print(f'\\tWe are loading {book_loc}...')\n", " pkl_file = open(book_loc, 'rb')\n", " df_unsorted = pickle.load(pkl_file)\n", " pkl_file.close()\n", " df=df_unsorted.sort_values(by=['id'])\n", " \n", " \n", " FoundWords=0\n", " phrasefunction='TBD'\n", " phrasefunction_long='TBD'\n", " this_clausetype=\"unknown\" #just signal a not found case\n", " this_clauserule=\"unknown\"\n", " this_clauseconst=\"unknown\"\n", " prev_clausetype = \"unknown\"\n", " this_phrasetype=\"unknown\" #just signal a not found case\n", " this_phrasefunction=\"unknown\"\n", " this_phrasefunction_long=\"unknown\"\n", " this_role=\"unknown\"\n", " ClausesSuspended = False\n", " PreSuspendClauseList = {}\n", " phrase_resume = False\n", " ClosedPhrase=''\n", " PhraseToRestoreTo=''\n", " phrase_close=False\n", " \n", " \n", " prev_chapter = int(1) # start at 1\n", " prev_verse = int(1) # start at 1\n", " prev_sentence = int(1) # start at 1\n", " prev_clause = int(1) # start at 1\n", " prev_phrase = int(1) # start at 1\n", " prev_role = int(1) # start at 1\n", " \n", " # ClauseArrayNumbers contains the active clause numbers (wg in the LowFatTree data)\n", " \n", "\n", " \n", " # reset/load the following initial variables (we are at the start of a new book)\n", " sentence_track = clause_track = clauseconst_track = phrase_track = 1\n", " sentence_done = clause_done = clauseconst_done = phrase_done = verse_done = chapter_done = book_done = False\n", " PhraseInterupted = False\n", " wrdnum = 0 # start at 0\n", "\n", " # fill dictionary of column names for this book \n", " ItemsInRow=1\n", " for itemname in df.columns.to_list():\n", " IndexDict.update({'i_{}'.format(itemname): ItemsInRow})\n", " ItemsInRow+=1\n", " \n", " df.sort_values(by=['id'])\n", "\n", " '''\n", " Walks through the texts and triggers\n", " slot and node creation events.\n", " '''\n", " \n", " # iterate through words and construct objects\n", " for row in df.itertuples():\n", " wrdnum += 1\n", " FoundWords +=1\n", " \n", " \n", " '''\n", " First get all the relevant information from the dataframe\n", " ''' \n", " \n", " # get number of parent nodes\n", " parents = row[IndexDict.get(\"i_parents\")]\n", " \n", " \n", " # get chapter and verse from the data\n", " chapter = sanitize(row[IndexDict.get(\"i_chapter\")])\n", " verse = sanitize(row[IndexDict.get(\"i_verse\")])\n", " \n", "\n", " \n", " # experimental (decoding the clause structure)\n", " ClauseList=[] # stores current active clauses (wg numbers)\n", " if True:\n", " for i in range(parents-1,1,-1): # reversed itteration\n", " item = IndexDict.get(\"i_Parent{}Class\".format(i))\n", " #if row[item]==\"cl\":\n", " if True:\n", " WGN=row[IndexDict.get(\"i_Parent{}WGN\".format(i))]\n", " ClauseList.append(WGN)\n", " ClauseDict[(WGN,0)]=WGN\n", " ClauseDict[(WGN,1)]=sanitize(row[IndexDict.get(\"i_Parent{}Rule\".format(i))])\n", " ClauseDict[(WGN,2)]=sanitize(row[IndexDict.get(\"i_Parent{}Cltype\".format(i))])\n", " ClauseDict[(WGN,3)]=sanitize(row[IndexDict.get(\"i_Parent{}Junction\".format(i))])\n", " ClauseDict[(WGN,6)]=sanitize(row[IndexDict.get(\"i_Parent{}Class\".format(i))])\n", " if not PrevClauseList==ClauseList:\n", " #print ('\\nPrevClauseDict ={',end='')\n", " #for item in PrevClauseDict:\n", " # print (' ',item,'=',PrevClauseDict[item],end='')\n", " #print ('}')\n", " #print('\\nClauseList=',ClauseList, 'PrevClauseList=',PrevClauseList, 'ClausesSuspended=',ClausesSuspended,end='')\n", " #print('\\nAction(s) = ',end=' ')\n", " ResumePhrase=False\n", " if ClausesSuspended==True:\n", " for item in ClauseList:\n", " try:\n", " ItemToResume=ClauseDict[(item,4)]\n", " #print (' resume: '+str(item),end=' ')\n", " cv.resume(ClauseDict[(item,4)])\n", " #ResumePhrase=True\n", " PhraseToRestoreTo=prev_phrasefunction\n", " except:\n", " #print(\"This is the odd condition for wg=\",item)\n", " # CREATE CASE\n", " #print ('\\n create: '+str(item),end=' ')\n", " ClauseDict[(item,4)]=cv.node('clause')\n", " ClauseDict[(item,5)]=clause_track\n", " clause_track += 1\n", " #print ('link=',ClauseDict[(item,4)])\n", " \n", " \n", "\n", " if not bool(ClauseList): # this means it is a part outside a clause\n", " for item in PrevClauseList:\n", " # SUSPEND CASE\n", " #print (' suspend: '+str(item),end=' ')\n", " cv.feature(ClauseDict[(item,4)], clause=ClauseDict[(item,5)], wg=ClauseDict[(item,0)], junction=ClauseDict[(item,3)], clausetype=ClauseDict[(item,2)], clauserule=ClauseDict[(item,1)], wgclass=ClauseDict[(item,6)])\n", " cv.terminate(ClauseDict[(item,4)])\n", " ClausesSuspended= True\n", " PreSuspendClauseList = PrevClauseList\n", " else:\n", " for item in PrevClauseList:\n", " if (item not in ClauseList):\n", " # CLOSE CASE\n", " #print ('\\n close: '+str(item),end=' ')\n", " cv.feature(ClauseDict[(item,4)], clause=ClauseDict[(item,5)], wg=ClauseDict[(item,0)], junction=ClauseDict[(item,3)], clausetype=ClauseDict[(item,2)], clauserule=ClauseDict[(item,1)] , wgclass=ClauseDict[(item,6)])\n", " cv.terminate(ClauseDict[item,4])\n", " for k in range(6): del ClauseDict[item,k]\n", " for item in ClauseList:\n", " if (item not in PrevClauseList):\n", " if not ClausesSuspended:\n", " # CREATE CASE\n", " #print ('\\n create: '+str(item),end=' ')\n", " ClauseDict[(item,4)]=cv.node('clause')\n", " ClauseDict[(item,5)]=clause_track\n", " clause_track += 1\n", " #print ('link=',ClauseDict[(item,4)])\n", " ClausesSuspended=False\n", "\n", " PrevClauseList = ClauseList \n", " clause_done=True\n", " #print ('\\nClauseDict=',ClauseDict,end='')\n", " #print ('\\n\\n',book,chapter,\":\",verse,'\\t',row[IndexDict.get(\"i_word\")]+row[IndexDict.get(\"i_after\")],end='')\n", "\n", " #else:\n", " #print (row[IndexDict.get(\"i_word\")]+row[IndexDict.get(\"i_after\")],end='')\n", "\n", "\n", " \n", "\n", " \n", " # determine syntactic categories of clause parts. See also the description in \n", " # \"MACULA Greek Treebank for the Nestle 1904 Greek New Testament.pdf\" page 5&6\n", " # (section 2.4 Syntactic Categories at Clause Level)\n", " prev_phrasefunction=this_phrasefunction\n", " prev_phrasefunction_long=this_phrasefunction_long\n", " role=row[IndexDict.get(\"i_role\")]\n", " ValidRoles=[\"adv\",\"io\",\"o\",\"o2\",\"s\",\"p\",\"v\",\"vc\"]\n", " this_phrasefunction=''\n", " PhraseWGN=''\n", " if isinstance (role,str) and role in ValidRoles: \n", " this_phrasefunction=role\n", " else:\n", " for i in range(1,parents-1):\n", " role = row[IndexDict.get(\"i_Parent{}Role\".format(i))]\n", " if isinstance (role,str) and role in ValidRoles: \n", " this_phrasefunction=role\n", " PhraseWGN=row[IndexDict.get(\"i_Parent{}WGN\".format(i))]\n", " break\n", " if this_phrasefunction!=prev_phrasefunction:\n", " #print ('\\n',chapter,':',verse,' this_phrasefunction=',this_phrasefunction,' prev_phrasefunction=',prev_phrasefunction)\n", " if phrase_close:\n", " cv.resume(ClosedPhrase)\n", " #print ('resume phrase',ClosedPhrase)\n", " if this_phrasefunction!='':\n", " phrase_done = True\n", " else:\n", " phrase_close = True\n", " ClosedPhrase=this_phrase\n", " PhraseToRestoreTo=prev_phrasefunction\n", "\n", "\n", "\n", " if this_phrasefunction==\"adv\": this_phrasefunction_long='Adverbial'\n", " elif this_phrasefunction==\"io\": this_phrasefunction_long='Indirect Object'\n", " elif this_phrasefunction==\"o\": this_phrasefunction_long='Object'\n", " elif this_phrasefunction==\"o2\": this_phrasefunction_long='Second Object'\n", " elif this_phrasefunction==\"s\": this_phrasefunction_long='Subject'\n", " elif this_phrasefunction==\"p\": this_phrasefunction_long='Predicate'\n", " elif this_phrasefunction==\"v\": this_phrasefunction_long='Verbal'\n", " elif this_phrasefunction==\"vc\": this_phrasefunction_long='Verbal Copula'\n", " #print ('this_phrasefunction=',this_phrasefunction, end=\" | \")\n", "\n", " \n", " \n", " '''\n", " determine if conditions are met to trigger some action \n", " action will be executed after next word\n", " ''' \n", " \n", " # detect book boundary\n", " if prev_book != book:\n", " prev_book=book\n", " book_done = True\n", " chapter_done = True\n", " verse_done=True\n", " sentence_done = True\n", " clause_done = True\n", " phrase_done = True\n", "\n", " # detect chapter boundary\n", " if prev_chapter != chapter:\n", " chapter_done = True\n", " verse_done=True\n", " sentence_done = True\n", " clause_done = True\n", " phrase_done = True\n", " \n", " # detect verse boundary\n", " if prev_verse != verse:\n", " verse_done=True\n", " \n", "\n", " # determine syntactic categories at word level. See also the description in \n", " # \"MACULA Greek Treebank for the Nestle 1904 Greek New Testament.pdf\" page 6&7\n", " # (2.2. Syntactic Categories at Word Level: Part of Speech Labels)\n", " sp=sanitize(row[IndexDict.get(\"i_class\")])\n", " if sp=='adj':\n", " sp_full='adjective'\n", " elif sp=='adj':\n", " sp_full='adjective'\n", " elif sp=='conj':\n", " sp_full='conjunction'\n", " elif sp=='det':\n", " sp_full='determiner' \n", " elif sp=='intj':\n", " sp_full='interjection' \n", " elif sp=='noun':\n", " sp_full='noun' \n", " elif sp=='num':\n", " sp_full='numeral' \n", " elif sp=='prep':\n", " sp_full='preposition' \n", " elif sp=='ptcl':\n", " sp_full='particle' \n", " elif sp=='pron':\n", " sp_full='pronoun' \n", " elif sp=='verb':\n", " sp_full='verb' \n", " \n", " \n", " # Manage first word per book\n", " if wrdnum==1: \n", " prev_phrasetype=this_phrasetype\n", " prev_phrasefunction=this_phrasefunction\n", " prev_phrasefunction_long=this_phrasefunction_long\n", " prev_clauserule=this_clauserule\n", " book_done = chapter_done = verse_done = phrase_done = clause_done = sentence_done = False\n", " # create the first set of nodes\n", " this_book = cv.node('book')\n", " cv.feature(this_book, book=prev_book)\n", " this_chapter = cv.node('chapter')\n", " this_verse = cv.node('verse')\n", " this_sentence = cv.node('sentence')\n", " #this_clause = cv.node('clause')\n", " this_phrase = cv.node('phrase')\n", " #print ('new phrase',this_phrase)\n", " sentence_track += 1\n", " #clause_track += 1\n", " phrase_track += 1\n", "\n", " \n", " \n", " '''\n", " -- handle TF events --\n", " Determine what actions need to be done if proper condition is met.\n", " ''' \n", "\n", " # act upon end of phrase (close)\n", " if phrase_done or phrase_close:\n", " cv.feature(this_phrase, phrase=prev_phrase, phrasetype=prev_phrasetype, phrasefunction=prev_phrasefunction, phrasefunction_long=prev_phrasefunction_long,wg=PhraseWGN)\n", " cv.terminate(this_phrase)\n", " #print ('terminate phrase',this_phrase,':',prev_phrasefunction,'\\n')\n", " ClosedPhrase=this_phrase\n", " PhraseToRestoreTo=prev_phrasefunction\n", " phrase_close=False\n", "\n", "\n", " \n", " # cv.feature(this_clause, clause=prev_clause, clausetype=prev_clausetype, clauserule=prev_clauserule)\n", " # cv.terminate(this_clause)\n", " \n", " # act upon end of sentence (close)\n", " if sentence_done:\n", " cv.feature(this_sentence, sentence=prev_sentence)\n", " cv.terminate(this_sentence)\n", " \n", " # act upon end of verse (close)\n", " if verse_done:\n", " cv.feature(this_verse, verse=prev_verse)\n", " cv.terminate(this_verse)\n", " prev_verse = verse \n", "\n", " # act upon end of chapter (close)\n", " if chapter_done:\n", " cv.feature(this_chapter, chapter=prev_chapter)\n", " cv.terminate(this_chapter)\n", " prev_chapter = chapter\n", "\n", " # act upon end of book (close and open new)\n", " if book_done:\n", " cv.terminate(this_book)\n", " this_book = cv.node('book')\n", " cv.feature(this_book, book=book) \n", " prev_book = book\n", " wrdnum = 1\n", " phrase_track = 1\n", " clause_track = 1\n", " sentence_track = 1\n", " book_done = False\n", " \n", " # start of chapter (create new)\n", " if chapter_done:\n", " this_chapter = cv.node('chapter')\n", " chapter_done = False\n", " \n", " # start of verse (create new)\n", " if verse_done:\n", " this_verse = cv.node('verse')\n", " verse_done = False \n", " \n", " # start of sentence (create new)\n", " if sentence_done:\n", " this_sentence= cv.node('sentence')\n", " prev_sentence = sentence_track\n", " sentence_track += 1\n", " sentence_done = False\n", "\n", " \n", " # start of phrase (create new)\n", " if phrase_done and not ResumePhrase:\n", " this_phrase = cv.node('phrase')\n", " #print ('new phrase',this_phrase)\n", " prev_phrase = phrase_track\n", " prev_phrasefunction=this_phrasefunction\n", " prev_phrasefunction_long=this_phrasefunction_long\n", " phrase_track += 1\n", " phrase_done = False\n", " \n", " \n", " # Detect boundaries of sentences\n", " text=sanitize(row[IndexDict.get(\"i_after\")])[-1:]\n", " if text == \".\" : \n", " sentence_done = True\n", " #phrase_done = True\n", " #if text == \";\" or text == \",\":\n", " # phrase_done = True \n", " \n", " \n", " '''\n", " -- create word nodes --\n", " ''' \n", " \n", " # some attributes are not present inside some (small) books. The following is to prevent exceptions.\n", " degree='' \n", " if 'i_degree' in IndexDict: \n", " degree=sanitize(row[IndexDict.get(\"i_degree\")]) \n", " subjref=''\n", " if 'i_subjref' in IndexDict:\n", " subjref=sanitize(row[IndexDict.get(\"i_subjref\")]) \n", " \n", " #print (chapter,':',verse,\" \",row[IndexDict.get(\"i_word\")],' - ',row[IndexDict.get(\"i_gloss\")],' - ', sp,end='\\n')\n", "\n", " # make word object\n", " this_word = cv.slot()\n", " cv.feature(this_word, \n", " after=sanitize(row[IndexDict.get(\"i_after\")]),\n", " id=sanitize(row[IndexDict.get(\"i_id\")]),\n", " unicode=sanitize(row[IndexDict.get(\"i_unicode\")]),\n", " word=sanitize(row[IndexDict.get(\"i_word\")]),\n", " monad=sanitize(row[IndexDict.get(\"i_monad\")]),\n", " orig_order=FoundWords,\n", " book_long=sanitize(row[IndexDict.get(\"i_book_long\")]),\n", " booknum=booknum,\n", " book_short=sanitize(row[IndexDict.get(\"i_book_short\")]),\n", " chapter=chapter,\n", " ref=sanitize(row[IndexDict.get(\"i_ref\")]),\n", " sp=sanitize(sp),\n", " sp_full=sanitize(sp_full),\n", " verse=verse,\n", " sentence=sanitize(prev_sentence),\n", " clause=sanitize(prev_clause),\n", " phrase=sanitize(prev_phrase),\n", " normalized=sanitize(row[IndexDict.get(\"i_normalized\")]),\n", " morph=sanitize(row[IndexDict.get(\"i_morph\")]),\n", " strongs=sanitize(row[IndexDict.get(\"i_strong\")]),\n", " lex_dom=sanitize(row[IndexDict.get(\"i_domain\")]),\n", " ln=sanitize(row[IndexDict.get(\"i_ln\")]),\n", " gloss=sanitize(row[IndexDict.get(\"i_gloss\")]),\n", " gn=sanitize(row[IndexDict.get(\"i_gender\")]),\n", " nu=sanitize(row[IndexDict.get(\"i_number\")]),\n", " case=sanitize(row[IndexDict.get(\"i_case\")]),\n", " lemma=sanitize(row[IndexDict.get(\"i_lemma\")]),\n", " person=sanitize(row[IndexDict.get(\"i_person\")]),\n", " mood=sanitize(row[IndexDict.get(\"i_mood\")]),\n", " tense=sanitize(row[IndexDict.get(\"i_tense\")]),\n", " number=sanitize(row[IndexDict.get(\"i_number\")]),\n", " voice=sanitize(row[IndexDict.get(\"i_voice\")]),\n", " degree=degree,\n", " type=sanitize(row[IndexDict.get(\"i_type\")]),\n", " reference=sanitize(row[IndexDict.get(\"i_ref\")]), \n", " subj_ref=subjref,\n", " nodeID=sanitize(row[1]) #this is a fixed position.\n", " )\n", " cv.terminate(this_word)\n", "\n", " \n", " '''\n", " -- wrap up the book --\n", " ''' \n", " \n", " # close all nodes (phrase, clause, sentence, verse, chapter and book)\n", " cv.feature(this_phrase, phrase=phrase_track, phrasetype=prev_phrasetype,phrasefunction=prev_phrasefunction,phrasefunction_long=prev_phrasefunction_long, wg=PhraseWGN)\n", " cv.terminate(this_phrase)\n", " #print ('terminate phrase',this_phrase,':',prev_phrasetype,'\\n')\n", "\n", " \n", " #print (ClauseDict)\n", " for item in ClauseList:\n", " cv.feature(ClauseDict[(item,4)], clause=ClauseDict[(item,5)], clausetype=prev_clausetype, clauserule=prev_clauserule)\n", " cv.terminate(ClauseDict[item,4])\n", " \n", " \n", " cv.feature(this_sentence, sentence=prev_sentence)\n", " cv.terminate(this_sentence)\n", " cv.feature(this_verse, verse=prev_verse)\n", " cv.terminate(this_verse)\n", " cv.feature(this_chapter, chapter=prev_chapter)\n", " cv.terminate(this_chapter)\n", " cv.feature(this_book, book=prev_book)\n", " cv.terminate(this_book)\n", " \n", " # clear dataframe for this book \n", " del df\n", " # clear the index dictionary\n", " IndexDict.clear()\n", " gc.collect()\n", " \n", " \n", "'''\n", "-- output definitions --\n", "''' \n", " \n", "slotType = 'word' # or whatever you choose\n", "otext = { # dictionary of config data for sections and text formats\n", " 'fmt:text-orig-full':'{word}{after}',\n", " 'sectionTypes':'book,chapter,verse',\n", " 'sectionFeatures':'book,chapter,verse',\n", " 'structureFeatures': 'book,chapter,verse',\n", " 'structureTypes': 'book,chapter,verse',\n", " }\n", "\n", "# configure metadata\n", "generic = { # dictionary of metadata meant for all features\n", " 'Name': 'Greek New Testament (NA1904)',\n", " 'Version': '1904',\n", " 'Editors': 'Nestle',\n", " 'Data source': 'MACULA Greek Linguistic Datasets, available at https://github.com/Clear-Bible/macula-greek/tree/main/Nestle1904/lowfat',\n", " 'Availability': 'Creative Commons Attribution 4.0 International (CC BY 4.0)', \n", " 'Converter_author': 'Tony Jurg, Vrije Universiteit Amsterdam, Netherlands', \n", " 'Converter_execution': 'Tony Jurg, Vrije Universiteit Amsterdam, Netherlands', \n", " 'Convertor_source': 'https://github.com/tonyjurg/n1904_lft',\n", " 'Converter_version': '{}'.format(version),\n", " 'TextFabric version': '{}'.format(VERSION) #imported from tf.parameters\n", " }\n", "\n", "intFeatures = { # set of integer valued feature names\n", " 'booknum',\n", " 'chapter',\n", " 'verse',\n", " 'sentence',\n", " 'clause',\n", " 'phrase',\n", " 'orig_order',\n", " 'monad'\n", " }\n", "\n", "featureMeta = { # per feature dicts with metadata\n", " 'after': {'description': 'Characters (eg. punctuations) following the word'},\n", " 'id': {'description': 'id of the word'},\n", " 'book': {'description': 'Book'},\n", " 'book_long': {'description': 'Book name (fully spelled out)'},\n", " 'booknum': {'description': 'NT book number (Matthew=1, Mark=2, ..., Revelation=27)'},\n", " 'book_short': {'description': 'Book name (abbreviated)'},\n", " 'chapter': {'description': 'Chapter number inside book'},\n", " 'verse': {'description': 'Verse number inside chapter'},\n", " 'sentence': {'description': 'Sentence number (counted per chapter)'},\n", " 'clause': {'description': 'Clause number (counted per chapter)'},\n", " 'clausetype' : {'description': 'Clause type information (verb, verbless, elided, minor, etc.)'},\n", " 'clauserule' : {'description': 'Clause rule information '},\n", " 'phrase' : {'description': 'Phrase number (counted per book)'},\n", " 'phrasetype' : {'description': 'Phrase type information'},\n", " 'phrasefunction' : {'description': 'Phrase function (abbreviated)'},\n", " 'phrasefunction_long' : {'description': 'Phrase function (long description)'},\n", " 'orig_order': {'description': 'Word order within corpus (per book)'},\n", " 'monad':{'description': 'Monad (currently: order of words in XML tree file!)'},\n", " 'word': {'description': 'Word as it appears in the text (excl. punctuations)'},\n", " 'unicode': {'description': 'Word as it arears in the text in Unicode (incl. punctuations)'},\n", " 'ref': {'description': 'ref Id'},\n", " 'sp': {'description': 'Part of Speech (abbreviated)'},\n", " 'sp_full': {'description': 'Part of Speech (long description)'}, \n", " 'normalized': {'description': 'Surface word stripped of punctations'},\n", " 'lemma': {'description': 'Lexeme (lemma)'},\n", " 'morph': {'description': 'Morphological tag (Sandborg-Petersen morphology)'},\n", " # see also discussion on relation between lex_dom and ln @ https://github.com/Clear-Bible/macula-greek/issues/29\n", " 'lex_dom': {'description': 'Lexical domain according to Semantic Dictionary of Biblical Greek, SDBG (not present everywhere?)'},\n", " 'ln': {'description': 'Lauw-Nida lexical classification (not present everywhere?)'},\n", " 'strongs': {'description': 'Strongs number'},\n", " 'gloss': {'description': 'English gloss'},\n", " 'gn': {'description': 'Gramatical gender (Masculine, Feminine, Neuter)'},\n", " 'nu': {'description': 'Gramatical number (Singular, Plural)'},\n", " 'case': {'description': 'Gramatical case (Nominative, Genitive, Dative, Accusative, Vocative)'},\n", " 'person': {'description': 'Gramatical person of the verb (first, second, third)'},\n", " 'mood': {'description': 'Gramatical mood of the verb (passive, etc)'},\n", " 'tense': {'description': 'Gramatical tense of the verb (e.g. Present, Aorist)'},\n", " 'number': {'description': 'Gramatical number of the verb'},\n", " 'voice': {'description': 'Gramatical voice of the verb'},\n", " 'degree': {'description': 'Degree (e.g. Comparitative, Superlative)'},\n", " 'type': {'description': 'Gramatical type of noun or pronoun (e.g. Common, Personal)'},\n", " 'reference': {'description': 'Reference (to nodeID in XML source data, not yet post-processes)'},\n", " 'subj_ref': {'description': 'Subject reference (to nodeID in XML source data, not yet post-processes)'},\n", " 'nodeID': {'description': 'Node ID (as in the XML source data, not yet post-processes)'},\n", " 'junction': {'description': 'Junction data related to a clause'},\n", " 'wg' : {'description': 'wg number in orig xml'},\n", " 'wgclass' : {'description': 'class of the wg'}\n", " }\n", "\n", "'''\n", " -- the main function --\n", "''' \n", "\n", "good = cv.walk(\n", " director,\n", " slotType,\n", " otext=otext,\n", " generic=generic,\n", " intFeatures=intFeatures,\n", " featureMeta=featureMeta,\n", " warn=True,\n", " force=True\n", ")\n", "\n", "if good:\n", " print (\"done\")" ] }, { "cell_type": "raw", "metadata": {}, "source": [] }, { "cell_type": "markdown", "metadata": { "tags": [], "toc": true }, "source": [ "## Part 4: Testing the created textfabric data \n", "##### [back to TOC](#TOC)" ] }, { "cell_type": "markdown", "metadata": { "tags": [] }, "source": [ "### Step 1 load the TF data\n", "\n", "The TF will be loaded from github repository https://github.com/tonyjurg/n1904_lft" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "%load_ext autoreload\n", "%autoreload 2" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "ExecuteTime": { "end_time": "2022-10-21T02:32:54.197994Z", "start_time": "2022-10-21T02:32:53.217806Z" } }, "outputs": [], "source": [ "# First, I have to laod different modules that I use for analyzing the data and for plotting:\n", "import sys, os, collections\n", "import pandas as pd\n", "import numpy as np\n", "import re\n", "\n", "\n", "from tf.fabric import Fabric\n", "from tf.app import use\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The following cell loads the TextFabric files from github repository. " ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2022-10-21T02:32:55.906200Z", "start_time": "2022-10-21T02:32:55.012231Z" } }, "outputs": [ { "data": { "text/markdown": [ "**Locating corpus resources ...**" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "app: ~/text-fabric-data/github/tonyjurg/n1904_lft/app" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "The requested data is not available offline\n", "\tC:/Users/tonyj/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4 not found\n", "rate limit is 5000 requests per hour, with 4998 left for this hour\n", "\tconnecting to online GitHub repo tonyjurg/n1904_lft ... connected\n", "\tcannot find releases\n", "\tcannot find releases\n", "\ttf/0.1.4/after.tf...downloaded\n", "\ttf/0.1.4/book.tf...downloaded\n", "\ttf/0.1.4/book_long.tf...downloaded\n", "\ttf/0.1.4/book_short.tf...downloaded\n", "\ttf/0.1.4/booknum.tf...downloaded\n", "\ttf/0.1.4/case.tf...downloaded\n", "\ttf/0.1.4/chapter.tf...downloaded\n", "\ttf/0.1.4/class.tf...downloaded\n", "\ttf/0.1.4/clause.tf...downloaded\n", "\ttf/0.1.4/clauserule.tf...downloaded\n", "\ttf/0.1.4/clausetype.tf...downloaded\n", "\ttf/0.1.4/degree.tf...downloaded\n", "\ttf/0.1.4/gloss.tf...downloaded\n", "\ttf/0.1.4/gn.tf...downloaded\n", "\ttf/0.1.4/id.tf...downloaded\n", "\ttf/0.1.4/junction.tf...downloaded\n", "\ttf/0.1.4/lemma.tf...downloaded\n", "\ttf/0.1.4/lex_dom.tf...downloaded\n", "\ttf/0.1.4/ln.tf...downloaded\n", "\ttf/0.1.4/monad.tf...downloaded\n", "\ttf/0.1.4/mood.tf...downloaded\n", "\ttf/0.1.4/morph.tf...downloaded\n", "\ttf/0.1.4/nodeID.tf...downloaded\n", "\ttf/0.1.4/normalized.tf...downloaded\n", "\ttf/0.1.4/nu.tf...downloaded\n", "\ttf/0.1.4/number.tf...downloaded\n", "\ttf/0.1.4/orig_order.tf...downloaded\n", "\ttf/0.1.4/oslots.tf...downloaded\n", "\ttf/0.1.4/otext.tf...downloaded\n", "\ttf/0.1.4/otype.tf...downloaded\n", "\ttf/0.1.4/person.tf...downloaded\n", "\ttf/0.1.4/phrase.tf...downloaded\n", "\ttf/0.1.4/phrasefunction.tf...downloaded\n", "\ttf/0.1.4/phrasefunction_long.tf...downloaded\n", "\ttf/0.1.4/phrasetype.tf...downloaded\n", "\ttf/0.1.4/ref.tf...downloaded\n", "\ttf/0.1.4/reference.tf...downloaded\n", "\ttf/0.1.4/sentence.tf...downloaded\n", "\ttf/0.1.4/sp.tf...downloaded\n", "\ttf/0.1.4/sp_full.tf...downloaded\n", "\ttf/0.1.4/strongs.tf...downloaded\n", "\ttf/0.1.4/subj_ref.tf...downloaded\n", "\ttf/0.1.4/tense.tf...downloaded\n", "\ttf/0.1.4/type.tf...downloaded\n", "\ttf/0.1.4/unicode.tf...downloaded\n", "\ttf/0.1.4/verse.tf...downloaded\n", "\ttf/0.1.4/voice.tf...downloaded\n", "\ttf/0.1.4/wg.tf...downloaded\n", "\ttf/0.1.4/wgclass.tf...downloaded\n", "\ttf/0.1.4/word.tf...downloaded\n", "\tOK\n" ] }, { "data": { "text/html": [ "data: ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " | 0.33s T otype from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 3.44s T oslots from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.53s T verse from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.56s T after from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.00s T book from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.68s T word from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.50s T chapter from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | | 0.09s C __levels__ from otype, oslots, otext\n", " | | 1.95s C __order__ from otype, oslots, __levels__\n", " | | 0.09s C __rank__ from otype, __order__\n", " | | 5.51s C __levUp__ from otype, oslots, __rank__\n", " | | 3.12s C __levDown__ from otype, __levUp__, __rank__\n", " | | 0.06s C __characters__ from otext\n", " | | 1.34s C __boundary__ from otype, oslots, __rank__\n", " | | 0.04s C __sections__ from otype, oslots, otext, __levUp__, __levels__, book, chapter, verse\n", " | | 0.26s C __structure__ from otype, oslots, otext, __rank__, __levUp__, book, chapter, verse\n", " | 0.57s T book_long from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.57s T book_short from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.49s T booknum from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.54s T case from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.83s T clause from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.39s T clauserule from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.34s T clausetype from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.48s T degree from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.65s T gloss from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.55s T gn from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.72s T id from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.37s T junction from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.62s T lemma from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.59s T lex_dom from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.60s T ln from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.51s T monad from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.51s T mood from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.58s T morph from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.73s T nodeID from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.65s T normalized from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.55s T nu from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.55s T number from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.54s T orig_order from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.54s T person from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.83s T phrase from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.29s T phrasefunction from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.30s T phrasefunction_long from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.30s T phrasetype from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.75s T ref from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.57s T sentence from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.59s T sp from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.62s T sp_full from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.60s T strongs from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.50s T subj_ref from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.52s T tense from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.52s T type from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.69s T unicode from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.50s T voice from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.74s T wg from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n", " | 0.39s T wgclass from ~/text-fabric-data/github/tonyjurg/n1904_lft/tf/0.1.4\n" ] }, { "data": { "text/html": [ "\n", " Text-Fabric: Text-Fabric API 11.2.3, tonyjurg/n1904_lft/app v3, Search Reference
\n", " Data: tonyjurg - n1904_lft 0.1.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
sentence572424.07100
verse794317.35100
clause958117.73538
phrase711061.8093
word1377791.00100
\n", " Sets: no custom sets
\n", " Features:
\n", "
Nestle 1904\n", "
\n", "\n", "
\n", "
\n", "after\n", "
\n", "
str
\n", "\n", " Characters (eg. punctuations) following the word\n", "\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 information \n", "\n", "
\n", "\n", "
\n", "
\n", "clausetype\n", "
\n", "
str
\n", "\n", " Clause type information (verb, verbless, elided, minor, etc.)\n", "\n", "
\n", "\n", "
\n", "
\n", "degree\n", "
\n", "
str
\n", "\n", " Degree (e.g. Comparitative, Superlative)\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", "id\n", "
\n", "
str
\n", "\n", " id of the word\n", "\n", "
\n", "\n", "
\n", "
\n", "junction\n", "
\n", "
str
\n", "\n", " Junction data related to a clause\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 (currently: order of words in XML tree file!)\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", "morph\n", "
\n", "
str
\n", "\n", " Morphological tag (Sandborg-Petersen morphology)\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 (per book)\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 book)\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", "ref\n", "
\n", "
str
\n", "\n", " ref Id\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", "unicode\n", "
\n", "
str
\n", "\n", " Word as it arears in the text in Unicode (incl. punctuations)\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", "wg\n", "
\n", "
str
\n", "\n", " wg number in orig xml\n", "\n", "
\n", "\n", "
\n", "
\n", "wgclass\n", "
\n", "
str
\n", "\n", " class of the wg\n", "\n", "
\n", "\n", "
\n", "
\n", "word\n", "
\n", "
str
\n", "\n", " Word as it appears in the text (excl. punctuations)\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": [ "# Loading-the-New-Testament-Text-Fabric (add a specific version, eg. 0.1.2)\n", "NA = use (\"tonyjurg/n1904_lft\", version=\"0.1.4\", hoist=globals())" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'word': 0,\n", " 'phrase': 1,\n", " 'clause': 2,\n", " 'verse': 3,\n", " 'sentence': 4,\n", " 'chapter': 5,\n", " 'book': 6}" ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "N.otypeRank" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 2 Perform some basic display \n", "\n", "note: the implementation with regards how phrases need to be displayed (esp. with regards to conjunctions) is still to be done." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " 0.01s 25 results\n" ] }, { "data": { "text/html": [ "

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

verse:310708 1
clause:138067 1
clause:138068 2
wg=1
clause:138069 3
clauserule=P2CLclausetype=Verblesswg=2
phrase:233878 1
phrasefunction_long=Predicate
1 Βίβλος
chapter=1gloss=[The] booksp=noun
clause:138070 4
clauserule=NPofNPwg=3
phrase:233878 1
phrasefunction_long=Predicate
2 γενέσεως
chapter=1gloss=of [the] genealogysp=noun
clause:138071 5
clauserule=NPofNPwg=4
clause:138072 6
clauserule=Np-Apposwg=5
clause:138073 7
clauserule=Np-Apposwg=6
phrase:233878 1
phrasefunction_long=Predicate
3 Ἰησοῦ
chapter=1gloss=of Jesussp=noun
4 Χριστοῦ
chapter=1gloss=Christsp=noun
5 υἱοῦ
chapter=1gloss=sonsp=noun
6 Δαυεὶδ
chapter=1gloss=of Davidsp=noun
phrase:233878 1
phrasefunction_long=Predicate
7 υἱοῦ
chapter=1gloss=sonsp=noun
8 Ἀβραάμ.
chapter=1gloss=of Abrahamsp=noun
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

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

verse:310709 2
clause:138067 1
clause:138074 8
wg=10
clause:138075 9
clauserule=Conj13CLwg=11
phrase:233879 2
phrasefunction_long=Subject
9 Ἀβραὰμ
chapter=1gloss=Abrahamsp=noun
phrase:233880 3
phrasefunction_long=Verbalwg=13
10 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138076 10
clauserule=S-V-Ojunction=coordinatewg=12
phrase:233881 4
phrasefunction_long=Object
11 τὸν
chapter=1gloss=-sp=det
12 Ἰσαάκ,
chapter=1gloss=Isaacsp=noun
clause:138077 11
wg=14
phrase:233882 5
phrasefunction_long=Subject
13 Ἰσαὰκ
chapter=1gloss=Isaacsp=noun
14 δὲ
chapter=1gloss=thensp=conj
clause:138078 12
wg=14
phrase:233883 6
phrasefunction_long=Verbalwg=16
15 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138079 13
clauserule=S-V-Ojunction=coordinatewg=15
phrase:233884 7
phrasefunction_long=Object
16 τὸν
chapter=1gloss=-sp=det
17 Ἰακώβ,
chapter=1gloss=Jacobsp=noun
clause:138080 14
wg=17
phrase:233885 8
phrasefunction_long=Subject
18 Ἰακὼβ
chapter=1gloss=Jacobsp=noun
19 δὲ
chapter=1gloss=thensp=conj
clause:138081 15
wg=17
phrase:233886 9
phrasefunction_long=Verbalwg=19
20 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138082 16
clauserule=S-V-Ojunction=coordinatewg=18
clause:138083 17
clauserule=NpaNpwg=19
phrase:233887 10
phrasefunction_long=Object
21 τὸν
chapter=1gloss=-sp=det
22 Ἰούδαν
chapter=1gloss=Judahsp=noun
23 καὶ
chapter=1gloss=andsp=conj
clause:138084 18
wg=21
phrase:233887 10
phrasefunction_long=Object
24 τοὺς
chapter=1gloss=thesp=det
clause:138085 19
clauserule=DetNPwg=22
phrase:233887 10
phrasefunction_long=Object
25 ἀδελφοὺς
chapter=1gloss=brotherssp=noun
26 αὐτοῦ,
chapter=1gloss=of himsp=pron
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

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

verse:310710 3
clause:138067 1
clause:138074 8
wg=10
clause:138075 9
clauserule=Conj13CLwg=11
clause:138086 20
wg=24
phrase:233888 11
phrasefunction_long=Subject
27 Ἰούδας
chapter=1gloss=Judahsp=noun
28 δὲ
chapter=1gloss=thensp=conj
clause:138087 21
wg=24
phrase:233889 12
phrasefunction_long=Verbalwg=26
29 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138088 22
clauserule=S-V-O-ADVjunction=coordinatewg=25
clause:138089 23
clauserule=NpaNpwg=26
phrase:233890 13
phrasefunction_long=Objectwg=30
30 τὸν
chapter=1gloss=-sp=det
31 Φαρὲς
chapter=1gloss=Perezsp=noun
32 καὶ
chapter=1gloss=andsp=conj
clause:138090 24
wg=28
phrase:233890 13
phrasefunction_long=Objectwg=30
33 τὸν
chapter=1gloss=-sp=det
34 Ζαρὰ
chapter=1gloss=Zerahsp=noun
phrase:233891 14
phrasefunction_long=Adverbial
35 ἐκ
chapter=1gloss=out ofsp=prep
clause:138091 25
clauserule=PrepNpwg=30
phrase:233891 14
phrasefunction_long=Adverbial
36 τῆς
chapter=1gloss=-sp=det
37 Θάμαρ,
chapter=1gloss=Tamarsp=noun
clause:138092 26
wg=32
phrase:233892 15
phrasefunction_long=Subject
38 Φαρὲς
chapter=1gloss=Perezsp=noun
39 δὲ
chapter=1gloss=thensp=conj
clause:138093 27
wg=32
phrase:233893 16
phrasefunction_long=Verbalwg=34
40 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138094 28
clauserule=S-V-Ojunction=coordinatewg=33
phrase:233894 17
phrasefunction_long=Object
41 τὸν
chapter=1gloss=-sp=det
42 Ἐσρώμ,
chapter=1gloss=Hezronsp=noun
clause:138095 29
wg=35
phrase:233895 18
phrasefunction_long=Subject
43 Ἐσρὼμ
chapter=1gloss=Hezronsp=noun
44 δὲ
chapter=1gloss=thensp=conj
clause:138096 30
wg=35
phrase:233896 19
phrasefunction_long=Verbalwg=37
45 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138097 31
clauserule=S-V-Ojunction=coordinatewg=36
phrase:233897 20
phrasefunction_long=Object
46 τὸν
chapter=1gloss=-sp=det
47 Ἀράμ,
chapter=1gloss=Ramsp=noun
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

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

verse:310711 4
clause:138067 1
clause:138074 8
wg=10
clause:138075 9
clauserule=Conj13CLwg=11
clause:138098 32
wg=38
phrase:233898 21
phrasefunction_long=Subject
48 Ἀρὰμ
chapter=1gloss=Ramsp=noun
49 δὲ
chapter=1gloss=thensp=conj
clause:138099 33
wg=38
phrase:233899 22
phrasefunction_long=Verbalwg=40
50 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138100 34
clauserule=S-V-Ojunction=coordinatewg=39
phrase:233900 23
phrasefunction_long=Object
51 τὸν
chapter=1gloss=-sp=det
52 Ἀμιναδάβ,
chapter=1gloss=Amminadabsp=noun
clause:138101 35
wg=41
phrase:233901 24
phrasefunction_long=Subject
53 Ἀμιναδὰβ
chapter=1gloss=Amminadabsp=noun
54 δὲ
chapter=1gloss=thensp=conj
clause:138102 36
wg=41
phrase:233902 25
phrasefunction_long=Verbalwg=43
55 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138103 37
clauserule=S-V-Ojunction=coordinatewg=42
phrase:233903 26
phrasefunction_long=Object
56 τὸν
chapter=1gloss=-sp=det
57 Ναασσών,
chapter=1gloss=Nahshonsp=noun
clause:138104 38
wg=44
phrase:233904 27
phrasefunction_long=Subject
58 Ναασσὼν
chapter=1gloss=Nahshonsp=noun
59 δὲ
chapter=1gloss=thensp=conj
clause:138105 39
wg=44
phrase:233905 28
phrasefunction_long=Verbalwg=46
60 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138106 40
clauserule=S-V-Ojunction=coordinatewg=45
phrase:233906 29
phrasefunction_long=Object
61 τὸν
chapter=1gloss=-sp=det
62 Σαλμών,
chapter=1gloss=Salmonsp=noun
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

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

verse:310712 5
clause:138067 1
clause:138074 8
wg=10
clause:138075 9
clauserule=Conj13CLwg=11
clause:138107 41
wg=47
phrase:233907 30
phrasefunction_long=Subject
63 Σαλμὼν
chapter=1gloss=Salmonsp=noun
64 δὲ
chapter=1gloss=thensp=conj
clause:138108 42
wg=47
phrase:233908 31
phrasefunction_long=Verbalwg=49
65 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138109 43
clauserule=S-V-O-ADVjunction=coordinatewg=48
phrase:233909 32
phrasefunction_long=Objectwg=50
66 τὸν
chapter=1gloss=-sp=det
67 Βόες
chapter=1gloss=Boazsp=noun
phrase:233910 33
phrasefunction_long=Adverbial
68 ἐκ
chapter=1gloss=out ofsp=prep
clause:138110 44
clauserule=PrepNpwg=50
phrase:233910 33
phrasefunction_long=Adverbial
69 τῆς
chapter=1gloss=-sp=det
70 Ῥαχάβ,
chapter=1gloss=Rahabsp=noun
clause:138111 45
wg=52
phrase:233911 34
phrasefunction_long=Subject
71 Βόες
chapter=1gloss=Boazsp=noun
72 δὲ
chapter=1gloss=thensp=conj
clause:138112 46
wg=52
phrase:233912 35
phrasefunction_long=Verbalwg=54
73 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138113 47
clauserule=S-V-O-ADVjunction=coordinatewg=53
phrase:233913 36
phrasefunction_long=Objectwg=55
74 τὸν
chapter=1gloss=-sp=det
75 Ἰωβὴδ
chapter=1gloss=Obedsp=noun
phrase:233914 37
phrasefunction_long=Adverbial
76 ἐκ
chapter=1gloss=out ofsp=prep
clause:138114 48
clauserule=PrepNpwg=55
phrase:233914 37
phrasefunction_long=Adverbial
77 τῆς
chapter=1gloss=-sp=det
78 Ῥούθ,
chapter=1gloss=Ruthsp=noun
clause:138115 49
wg=57
phrase:233915 38
phrasefunction_long=Subject
79 Ἰωβὴδ
chapter=1gloss=Obedsp=noun
80 δὲ
chapter=1gloss=thensp=conj
clause:138116 50
wg=57
phrase:233916 39
phrasefunction_long=Verbalwg=59
81 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138117 51
clauserule=S-V-Ojunction=coordinatewg=58
phrase:233917 40
phrasefunction_long=Object
82 τὸν
chapter=1gloss=-sp=det
83 Ἰεσσαί,
chapter=1gloss=Jessesp=noun
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

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

verse:310713 6
clause:138067 1
clause:138074 8
wg=10
clause:138075 9
clauserule=Conj13CLwg=11
clause:138118 52
wg=60
phrase:233918 41
phrasefunction_long=Subject
84 Ἰεσσαὶ
chapter=1gloss=Jessesp=noun
85 δὲ
chapter=1gloss=thensp=conj
clause:138119 53
wg=60
phrase:233919 42
phrasefunction_long=Verbalwg=62
86 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138120 54
clauserule=S-V-Ojunction=coordinatewg=61
clause:138121 55
clauserule=Np-Apposwg=62
phrase:233920 43
phrasefunction_long=Object
87 τὸν
chapter=1gloss=-sp=det
88 Δαυεὶδ
chapter=1gloss=Davidsp=noun
89 τὸν
chapter=1gloss=thesp=det
90 βασιλέα.
chapter=1gloss=kingsp=noun
clause:138122 56
wg=65
clause:138123 57
clauserule=Conj-CLwg=66
clause:138124 58
clauserule=Conj14CLwg=67
phrase:233921 44
phrasefunction_long=Subject
91 Δαυεὶδ
chapter=1gloss=Davidsp=noun
92 δὲ
chapter=1gloss=thensp=conj
clause:138125 59
clauserule=Conj-CLwg=66
clause:138126 60
clauserule=Conj14CLwg=67
phrase:233922 45
phrasefunction_long=Verbalwg=69
93 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138127 61
clauserule=S-V-O-ADVjunction=coordinatewg=68
phrase:233923 46
phrasefunction_long=Objectwg=70
94 τὸν
chapter=1gloss=-sp=det
95 Σολομῶνα
chapter=1gloss=Solomonsp=noun
phrase:233924 47
phrasefunction_long=Adverbial
96 ἐκ
chapter=1gloss=out ofsp=prep
clause:138128 62
clauserule=PrepNpwg=70
phrase:233924 47
phrasefunction_long=Adverbial
97 τῆς
chapter=1gloss=the [wife]sp=det
clause:138129 63
clauserule=NPofNPwg=71
phrase:233924 47
phrasefunction_long=Adverbial
98 τοῦ
chapter=1gloss=-sp=det
99 Οὐρίου,
chapter=1gloss=of Uriahsp=noun
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

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

verse:310714 7
clause:138067 1
clause:138122 56
wg=65
clause:138125 59
clauserule=Conj-CLwg=66
clause:138126 60
clauserule=Conj14CLwg=67
clause:138130 64
wg=73
phrase:233925 48
phrasefunction_long=Subject
100 Σολομὼν
chapter=1gloss=Solomonsp=noun
101 δὲ
chapter=1gloss=thensp=conj
clause:138131 65
wg=73
phrase:233926 49
phrasefunction_long=Verbalwg=75
102 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138132 66
clauserule=S-V-Ojunction=coordinatewg=74
phrase:233927 50
phrasefunction_long=Object
103 τὸν
chapter=1gloss=-sp=det
104 Ῥοβοάμ,
chapter=1gloss=Rehoboamsp=noun
clause:138133 67
wg=76
phrase:233928 51
phrasefunction_long=Subject
105 Ῥοβοὰμ
chapter=1gloss=Rehoboamsp=noun
106 δὲ
chapter=1gloss=thensp=conj
clause:138134 68
wg=76
phrase:233929 52
phrasefunction_long=Verbalwg=78
107 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138135 69
clauserule=S-V-Ojunction=coordinatewg=77
phrase:233930 53
phrasefunction_long=Object
108 τὸν
chapter=1gloss=-sp=det
109 Ἀβιά,
chapter=1gloss=Abijahsp=noun
clause:138136 70
wg=79
phrase:233931 54
phrasefunction_long=Subject
110 Ἀβιὰ
chapter=1gloss=Abijahsp=noun
111 δὲ
chapter=1gloss=thensp=conj
clause:138137 71
wg=79
phrase:233932 55
phrasefunction_long=Verbalwg=81
112 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138138 72
clauserule=S-V-Ojunction=coordinatewg=80
phrase:233933 56
phrasefunction_long=Object
113 τὸν
chapter=1gloss=-sp=det
114 Ἀσάφ,
chapter=1gloss=Asasp=noun
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

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

verse:310715 8
clause:138067 1
clause:138122 56
wg=65
clause:138125 59
clauserule=Conj-CLwg=66
clause:138126 60
clauserule=Conj14CLwg=67
clause:138139 73
wg=82
phrase:233934 57
phrasefunction_long=Subject
115 Ἀσὰφ
chapter=1gloss=Asasp=noun
116 δὲ
chapter=1gloss=thensp=conj
clause:138140 74
wg=82
phrase:233935 58
phrasefunction_long=Verbalwg=84
117 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138141 75
clauserule=S-V-Ojunction=coordinatewg=83
phrase:233936 59
phrasefunction_long=Object
118 τὸν
chapter=1gloss=-sp=det
119 Ἰωσαφάτ,
chapter=1gloss=Jehoshaphatsp=noun
clause:138142 76
wg=85
phrase:233937 60
phrasefunction_long=Subject
120 Ἰωσαφὰτ
chapter=1gloss=Jehoshaphatsp=noun
121 δὲ
chapter=1gloss=thensp=conj
clause:138143 77
wg=85
phrase:233938 61
phrasefunction_long=Verbalwg=87
122 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138144 78
clauserule=S-V-Ojunction=coordinatewg=86
phrase:233939 62
phrasefunction_long=Object
123 τὸν
chapter=1gloss=-sp=det
124 Ἰωράμ,
chapter=1gloss=Joramsp=noun
clause:138145 79
wg=88
phrase:233940 63
phrasefunction_long=Subject
125 Ἰωρὰμ
chapter=1gloss=Joramsp=noun
126 δὲ
chapter=1gloss=thensp=conj
clause:138146 80
wg=88
phrase:233941 64
phrasefunction_long=Verbalwg=90
127 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138147 81
clauserule=S-V-Ojunction=coordinatewg=89
phrase:233942 65
phrasefunction_long=Object
128 τὸν
chapter=1gloss=-sp=det
129 Ὀζείαν,
chapter=1gloss=Uzziahsp=noun
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

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

verse:310716 9
clause:138067 1
clause:138122 56
wg=65
clause:138125 59
clauserule=Conj-CLwg=66
clause:138126 60
clauserule=Conj14CLwg=67
clause:138148 82
wg=91
phrase:233943 66
phrasefunction_long=Subject
130 Ὀζείας
chapter=1gloss=Uzziahsp=noun
131 δὲ
chapter=1gloss=thensp=conj
clause:138149 83
wg=91
phrase:233944 67
phrasefunction_long=Verbalwg=93
132 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138150 84
clauserule=S-V-Ojunction=coordinatewg=92
phrase:233945 68
phrasefunction_long=Object
133 τὸν
chapter=1gloss=-sp=det
134 Ἰωαθάμ,
chapter=1gloss=Jothamsp=noun
clause:138151 85
wg=94
phrase:233946 69
phrasefunction_long=Subject
135 Ἰωαθὰμ
chapter=1gloss=Jothamsp=noun
136 δὲ
chapter=1gloss=thensp=conj
clause:138152 86
wg=94
phrase:233947 70
phrasefunction_long=Verbalwg=96
137 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138153 87
clauserule=S-V-Ojunction=coordinatewg=95
phrase:233948 71
phrasefunction_long=Object
138 τὸν
chapter=1gloss=-sp=det
139 Ἄχαζ,
chapter=1gloss=Ahazsp=noun
clause:138154 88
wg=97
phrase:233949 72
phrasefunction_long=Subject
140 Ἄχαζ
chapter=1gloss=Ahazsp=noun
141 δὲ
chapter=1gloss=thensp=conj
clause:138155 89
wg=97
phrase:233950 73
phrasefunction_long=Verbalwg=99
142 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138156 90
clauserule=S-V-Ojunction=coordinatewg=98
phrase:233951 74
phrasefunction_long=Object
143 τὸν
chapter=1gloss=-sp=det
144 Ἐζεκίαν,
chapter=1gloss=Hezekiahsp=noun
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

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

verse:310717 10
clause:138067 1
clause:138122 56
wg=65
clause:138125 59
clauserule=Conj-CLwg=66
clause:138126 60
clauserule=Conj14CLwg=67
clause:138157 91
wg=100
phrase:233952 75
phrasefunction_long=Subject
145 Ἐζεκίας
chapter=1gloss=Hezekiahsp=noun
146 δὲ
chapter=1gloss=thensp=conj
clause:138158 92
wg=100
phrase:233953 76
phrasefunction_long=Verbalwg=102
147 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138159 93
clauserule=S-V-Ojunction=coordinatewg=101
phrase:233954 77
phrasefunction_long=Object
148 τὸν
chapter=1gloss=-sp=det
149 Μανασσῆ,
chapter=1gloss=Manassehsp=noun
clause:138160 94
wg=103
phrase:233955 78
phrasefunction_long=Subject
150 Μανασσῆς
chapter=1gloss=Manassehsp=noun
151 δὲ
chapter=1gloss=thensp=conj
clause:138161 95
wg=103
phrase:233956 79
phrasefunction_long=Verbalwg=105
152 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138162 96
clauserule=S-V-Ojunction=coordinatewg=104
phrase:233957 80
phrasefunction_long=Object
153 τὸν
chapter=1gloss=-sp=det
154 Ἀμώς,
chapter=1gloss=Amossp=noun
clause:138163 97
wg=106
phrase:233958 81
phrasefunction_long=Subject
155 Ἀμὼς
chapter=1gloss=Amossp=noun
156 δὲ
chapter=1gloss=thensp=conj
clause:138164 98
wg=106
phrase:233959 82
phrasefunction_long=Verbalwg=108
157 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138165 99
clauserule=S-V-Ojunction=coordinatewg=107
phrase:233960 83
phrasefunction_long=Object
158 τὸν
chapter=1gloss=-sp=det
159 Ἰωσείαν,
chapter=1gloss=Josiahsp=noun
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

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

verse:310718 11
clause:138067 1
clause:138122 56
wg=65
clause:138125 59
clauserule=Conj-CLwg=66
clause:138126 60
clauserule=Conj14CLwg=67
clause:138166 100
wg=109
phrase:233961 84
phrasefunction_long=Subject
160 Ἰωσείας
chapter=1gloss=Josiahsp=noun
161 δὲ
chapter=1gloss=thensp=conj
clause:138167 101
wg=109
phrase:233962 85
phrasefunction_long=Verbalwg=111
162 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138168 102
clauserule=S-V-O-ADVjunction=coordinatewg=110
clause:138169 103
clauserule=NpaNpwg=111
phrase:233963 86
phrasefunction_long=Objectwg=116
163 τὸν
chapter=1gloss=-sp=det
164 Ἰεχονίαν
chapter=1gloss=Jechoniahsp=noun
165 καὶ
chapter=1gloss=andsp=conj
clause:138170 104
wg=113
phrase:233963 86
phrasefunction_long=Objectwg=116
166 τοὺς
chapter=1gloss=thesp=det
clause:138171 105
clauserule=DetNPwg=114
phrase:233963 86
phrasefunction_long=Objectwg=116
167 ἀδελφοὺς
chapter=1gloss=brotherssp=noun
168 αὐτοῦ
chapter=1gloss=of himsp=pron
phrase:233964 87
phrasefunction_long=Adverbialwg=123
169 ἐπὶ
chapter=1gloss=at [the time]sp=prep
clause:138172 106
clauserule=PrepNpwg=116
phrase:233964 87
phrasefunction_long=Adverbialwg=123
170 τῆς
chapter=1gloss=of thesp=det
clause:138173 107
clauserule=DetNPwg=117
phrase:233964 87
phrasefunction_long=Adverbialwg=123
171 μετοικεσίας
chapter=1gloss=carrying awaysp=noun
172 Βαβυλῶνος.
chapter=1gloss=to Babylonsp=noun
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

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

verse:310719 12
clause:138067 1
clause:138174 108
wg=119
clause:138175 109
clauserule=Conj-CLwg=120
clause:138176 110
clauserule=Conj12CLwg=121
clause:138177 111
clauserule=ADV-S-V-Ojunction=coordinatewg=122
phrase:233964 87
phrasefunction_long=Adverbialwg=123
173 Μετὰ
chapter=1gloss=Aftersp=prep
174 δὲ
chapter=1gloss=thensp=conj
clause:138178 112
clauserule=Conj-CLwg=120
clause:138179 113
clauserule=Conj12CLwg=121
clause:138180 114
clauserule=ADV-S-V-Ojunction=coordinatewg=122
clause:138181 115
clauserule=PrepNpwg=123
phrase:233965 88
phrasefunction_long=Adverbial
175 τὴν
chapter=1gloss=thesp=det
clause:138182 116
clauserule=DetNPwg=124
phrase:233965 88
phrasefunction_long=Adverbial
176 μετοικεσίαν
chapter=1gloss=carrying awaysp=noun
177 Βαβυλῶνος
chapter=1gloss=to Babylonsp=noun
phrase:233966 89
phrasefunction_long=Subject
178 Ἰεχονίας
chapter=1gloss=Jechoniahsp=noun
phrase:233967 90
phrasefunction_long=Verbalwg=126
179 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138183 117
clauserule=ADV-S-V-Ojunction=coordinatewg=122
phrase:233968 91
phrasefunction_long=Object
180 τὸν
chapter=1gloss=-sp=det
181 Σαλαθιήλ,
chapter=1gloss=Shealtielsp=noun
clause:138184 118
wg=127
phrase:233969 92
phrasefunction_long=Subject
182 Σαλαθιὴλ
chapter=1gloss=Shealtielsp=noun
183 δὲ
chapter=1gloss=thensp=conj
clause:138185 119
wg=127
phrase:233970 93
phrasefunction_long=Verbalwg=129
184 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138186 120
clauserule=S-V-Ojunction=coordinatewg=128
phrase:233971 94
phrasefunction_long=Object
185 τὸν
chapter=1gloss=-sp=det
186 Ζοροβαβέλ,
chapter=1gloss=Zerubbabelsp=noun
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

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

verse:310720 13
clause:138067 1
clause:138174 108
wg=119
clause:138178 112
clauserule=Conj-CLwg=120
clause:138179 113
clauserule=Conj12CLwg=121
clause:138187 121
wg=130
phrase:233972 95
phrasefunction_long=Subject
187 Ζοροβαβὲλ
chapter=1gloss=Zerubbabelsp=noun
188 δὲ
chapter=1gloss=thensp=conj
clause:138188 122
wg=130
phrase:233973 96
phrasefunction_long=Verbalwg=132
189 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138189 123
clauserule=S-V-Ojunction=coordinatewg=131
phrase:233974 97
phrasefunction_long=Object
190 τὸν
chapter=1gloss=-sp=det
191 Ἀβιούδ,
chapter=1gloss=Abiudsp=noun
clause:138190 124
wg=133
phrase:233975 98
phrasefunction_long=Subject
192 Ἀβιοὺδ
chapter=1gloss=Abiudsp=noun
193 δὲ
chapter=1gloss=thensp=conj
clause:138191 125
wg=133
phrase:233976 99
phrasefunction_long=Verbalwg=135
194 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138192 126
clauserule=S-V-Ojunction=coordinatewg=134
phrase:233977 100
phrasefunction_long=Object
195 τὸν
chapter=1gloss=-sp=det
196 Ἐλιακείμ,
chapter=1gloss=Eliakimsp=noun
clause:138193 127
wg=136
phrase:233978 101
phrasefunction_long=Subject
197 Ἐλιακεὶμ
chapter=1gloss=Eliakimsp=noun
198 δὲ
chapter=1gloss=thensp=conj
clause:138194 128
wg=136
phrase:233979 102
phrasefunction_long=Verbalwg=138
199 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138195 129
clauserule=S-V-Ojunction=coordinatewg=137
phrase:233980 103
phrasefunction_long=Object
200 τὸν
chapter=1gloss=-sp=det
201 Ἀζώρ,
chapter=1gloss=Azorsp=noun
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

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

verse:310721 14
clause:138067 1
clause:138174 108
wg=119
clause:138178 112
clauserule=Conj-CLwg=120
clause:138179 113
clauserule=Conj12CLwg=121
clause:138196 130
wg=139
phrase:233981 104
phrasefunction_long=Subject
202 Ἀζὼρ
chapter=1gloss=Azorsp=noun
203 δὲ
chapter=1gloss=thensp=conj
clause:138197 131
wg=139
phrase:233982 105
phrasefunction_long=Verbalwg=141
204 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138198 132
clauserule=S-V-Ojunction=coordinatewg=140
phrase:233983 106
phrasefunction_long=Object
205 τὸν
chapter=1gloss=-sp=det
206 Σαδώκ,
chapter=1gloss=Zadoksp=noun
clause:138199 133
wg=142
phrase:233984 107
phrasefunction_long=Subject
207 Σαδὼκ
chapter=1gloss=Zadoksp=noun
208 δὲ
chapter=1gloss=thensp=conj
clause:138200 134
wg=142
phrase:233985 108
phrasefunction_long=Verbalwg=144
209 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138201 135
clauserule=S-V-Ojunction=coordinatewg=143
phrase:233986 109
phrasefunction_long=Object
210 τὸν
chapter=1gloss=-sp=det
211 Ἀχείμ,
chapter=1gloss=Achimsp=noun
clause:138202 136
wg=145
phrase:233987 110
phrasefunction_long=Subject
212 Ἀχεὶμ
chapter=1gloss=Achimsp=noun
213 δὲ
chapter=1gloss=thensp=conj
clause:138203 137
wg=145
phrase:233988 111
phrasefunction_long=Verbalwg=147
214 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138204 138
clauserule=S-V-Ojunction=coordinatewg=146
phrase:233989 112
phrasefunction_long=Object
215 τὸν
chapter=1gloss=-sp=det
216 Ἐλιούδ,
chapter=1gloss=Eliudsp=noun
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

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

verse:310722 15
clause:138067 1
clause:138174 108
wg=119
clause:138178 112
clauserule=Conj-CLwg=120
clause:138179 113
clauserule=Conj12CLwg=121
clause:138205 139
wg=148
phrase:233990 113
phrasefunction_long=Subject
217 Ἐλιοὺδ
chapter=1gloss=Eliudsp=noun
218 δὲ
chapter=1gloss=thensp=conj
clause:138206 140
wg=148
phrase:233991 114
phrasefunction_long=Verbalwg=150
219 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138207 141
clauserule=S-V-Ojunction=coordinatewg=149
phrase:233992 115
phrasefunction_long=Object
220 τὸν
chapter=1gloss=-sp=det
221 Ἐλεάζαρ,
chapter=1gloss=Eleazarsp=noun
clause:138208 142
wg=151
phrase:233993 116
phrasefunction_long=Subject
222 Ἐλεάζαρ
chapter=1gloss=Eleazarsp=noun
223 δὲ
chapter=1gloss=thensp=conj
clause:138209 143
wg=151
phrase:233994 117
phrasefunction_long=Verbalwg=153
224 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138210 144
clauserule=S-V-Ojunction=coordinatewg=152
phrase:233995 118
phrasefunction_long=Object
225 τὸν
chapter=1gloss=-sp=det
226 Μαθθάν,
chapter=1gloss=Matthansp=noun
clause:138211 145
wg=154
phrase:233996 119
phrasefunction_long=Subject
227 Μαθθὰν
chapter=1gloss=Matthansp=noun
228 δὲ
chapter=1gloss=thensp=conj
clause:138212 146
wg=154
phrase:233997 120
phrasefunction_long=Verbalwg=156
229 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138213 147
clauserule=S-V-Ojunction=coordinatewg=155
phrase:233998 121
phrasefunction_long=Object
230 τὸν
chapter=1gloss=-sp=det
231 Ἰακώβ,
chapter=1gloss=Jacobsp=noun
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

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

verse:310723 16
clause:138067 1
clause:138174 108
wg=119
clause:138178 112
clauserule=Conj-CLwg=120
clause:138179 113
clauserule=Conj12CLwg=121
clause:138214 148
wg=157
phrase:233999 122
phrasefunction_long=Subject
232 Ἰακὼβ
chapter=1gloss=Jacobsp=noun
233 δὲ
chapter=1gloss=thensp=conj
clause:138215 149
wg=157
phrase:234000 123
phrasefunction_long=Verbalwg=159
234 ἐγέννησεν
chapter=1gloss=begatsp=verb
clause:138216 150
clauserule=S-V-Ojunction=coordinatewg=158
clause:138217 151
clauserule=Np-Apposwg=159
phrase:234001 124
phrasefunction_long=Objectwg=165
235 τὸν
chapter=1gloss=-sp=det
236 Ἰωσὴφ
chapter=1gloss=Josephsp=noun
237 τὸν
chapter=1gloss=thesp=det
clause:138218 152
clauserule=DetNPjunction=appositionwg=161
phrase:234001 124
phrasefunction_long=Objectwg=165
238 ἄνδρα
chapter=1gloss=husbandsp=noun
clause:138219 153
clauserule=NPofNPwg=162
phrase:234001 124
phrasefunction_long=Objectwg=165
239 Μαρίας,
chapter=1gloss=of Marysp=noun
clause:138220 154
clauserule=NP-CLwg=163
clause:138221 155
clauserule=ADV-V-Sjunction=appositionwg=164
phrase:234002 125
phrasefunction_long=Adverbial
240 ἐξ
chapter=1gloss=out ofsp=prep
241 ἧς
chapter=1gloss=whomsp=pron
phrase:234003 126
phrasefunction_long=Verbalwg=166
242 ἐγεννήθη
chapter=1gloss=was bornsp=verb
clause:138222 156
clauserule=ADV-V-Sjunction=appositionwg=164
phrase:234004 127
phrasefunction_long=Subject
243 Ἰησοῦς
chapter=1gloss=Jesussp=noun
clause:138223 157
clauserule=Np-Apposwg=166
phrase:234004 127
phrasefunction_long=Subject
244
chapter=1gloss=the [One]sp=det
clause:138224 158
clauserule=DetCLjunction=appositionwg=167
phrase:234005 128
phrasefunction_long=Verbal Copula
245 λεγόμενος
chapter=1gloss=being calledsp=verb
phrase:234006 129
phrasefunction_long=Predicatewg=173
246 Χριστός.
chapter=1gloss=Christsp=noun
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

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

verse:310724 17
clause:138067 1
clause:138225 159
wg=169
clause:138226 160
clauserule=Conj-CLwg=170
clause:138227 161
clauserule=Conj3CLwg=171
clause:138228 162
clauserule=S-Pclausetype=Verblessjunction=coordinatewg=172
phrase:234007 130
phrasefunction_long=Subjectwg=173
247 Πᾶσαι
chapter=1gloss=Allsp=adj
248 οὖν
chapter=1gloss=thereforesp=conj
clause:138229 163
clauserule=Conj-CLwg=170
clause:138230 164
clauserule=Conj3CLwg=171
clause:138231 165
clauserule=S-Pclausetype=Verblessjunction=coordinatewg=172
clause:138232 166
clauserule=All-NPwg=173
phrase:234008 131
phrasefunction_long=Subjectwg=179
249 αἱ
chapter=1gloss=thesp=det
clause:138233 167
clauserule=DetNPwg=174
phrase:234008 131
phrasefunction_long=Subjectwg=179
250 γενεαὶ
chapter=1gloss=generationssp=noun
clause:138234 168
clauserule=NpPpwg=175
clause:138235 169
clauserule=2Ppwg=176
phrase:234008 131
phrasefunction_long=Subjectwg=179
251 ἀπὸ
chapter=1gloss=fromsp=prep
252 Ἀβραὰμ
chapter=1gloss=Abrahamsp=noun
253 ἕως
chapter=1gloss=tosp=prep
254 Δαυεὶδ
chapter=1gloss=David [were]sp=noun
phrase:234009 132
phrasefunction_long=Predicatewg=182
255 γενεαὶ
chapter=1gloss=generationssp=noun
256 δεκατέσσαρες,
chapter=1gloss=fourteensp=adj
257 καὶ
chapter=1gloss=andsp=conj
clause:138236 170
wg=180
clause:138237 171
clauserule=S-Pclausetype=Verblessjunction=coordinatewg=181
clause:138238 172
clauserule=2Ppwg=182
phrase:234010 133
phrasefunction_long=Subjectwg=187
258 ἀπὸ
chapter=1gloss=fromsp=prep
259 Δαυεὶδ
chapter=1gloss=Davidsp=noun
260 ἕως
chapter=1gloss=untilsp=prep
clause:138239 173
clauserule=PrepNpwg=184
phrase:234010 133
phrasefunction_long=Subjectwg=187
261 τῆς
chapter=1gloss=thesp=det
clause:138240 174
clauserule=DetNPwg=185
phrase:234010 133
phrasefunction_long=Subjectwg=187
262 μετοικεσίας
chapter=1gloss=carrying awaysp=noun
263 Βαβυλῶνος
chapter=1gloss=to Babylonsp=noun
phrase:234011 134
phrasefunction_long=Predicatewg=190
264 γενεαὶ
chapter=1gloss=generationssp=noun
265 δεκατέσσαρες,
chapter=1gloss=fourteensp=adj
266 καὶ
chapter=1gloss=andsp=conj
clause:138241 175
wg=188
clause:138242 176
clauserule=S-Pclausetype=Verblessjunction=coordinatewg=189
clause:138243 177
clauserule=2Ppwg=190
phrase:234012 135
phrasefunction_long=Subjectwg=196
267 ἀπὸ
chapter=1gloss=fromsp=prep
clause:138244 178
clauserule=PrepNpwg=191
phrase:234012 135
phrasefunction_long=Subjectwg=196
268 τῆς
chapter=1gloss=thesp=det
clause:138245 179
clauserule=DetNPwg=192
phrase:234012 135
phrasefunction_long=Subjectwg=196
269 μετοικεσίας
chapter=1gloss=carrying awaysp=noun
270 Βαβυλῶνος
chapter=1gloss=to Babylonsp=noun
phrase:234012 135
phrasefunction_long=Subjectwg=196
271 ἕως
chapter=1gloss=untilsp=prep
clause:138246 180
clauserule=PrepNpwg=194
phrase:234012 135
phrasefunction_long=Subjectwg=196
272 τοῦ
chapter=1gloss=thesp=det
273 Χριστοῦ
chapter=1gloss=Christsp=noun
phrase:234013 136
phrasefunction_long=Predicatewg=200
274 γενεαὶ
chapter=1gloss=generationssp=noun
275 δεκατέσσαρες.
chapter=1gloss=fourteensp=adj
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

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

verse:310725 18
clause:138067 1
clause:138247 181
wg=197
clause:138248 182
clauserule=Conj-CLwg=198
clause:138249 183
clauserule=S-P-VCwg=199
clause:138250 184
clauserule=ofNPNPwg=200
phrase:234014 137
phrasefunction_long=Subjectwg=200
276 Τοῦ
chapter=1gloss=-sp=det
277 δὲ
chapter=1gloss=Nowsp=conj
clause:138251 185
clauserule=Conj-CLwg=198
clause:138252 186
clauserule=S-P-VCwg=199
clause:138253 187
clauserule=ofNPNPwg=200
clause:138254 188
clauserule=DetNPwg=201
phrase:234015 138
phrasefunction_long=Subject
278 Ἰησοῦ
chapter=1gloss=of Jesussp=noun
279 Χριστοῦ
chapter=1gloss=Christsp=noun
phrase:234015 138
phrasefunction_long=Subject
280
chapter=1gloss=thesp=det
281 γένεσις
chapter=1gloss=birthsp=noun
phrase:234016 139
phrasefunction_long=Predicate
282 οὕτως
chapter=1gloss=thussp=adv
phrase:234017 140
phrasefunction_long=Verbal Copula
283 ἦν.
chapter=1gloss=came aboutsp=verb
clause:138255 189
wg=204
clause:138256 190
clauserule=ClCl2wg=205
phrase:234018 141
phrasefunction_long=Verbalwg=207
284 μνηστευθείσης
chapter=1gloss=Having been pledgedsp=verb
clause:138257 191
clauserule=V-S-IOwg=206
clause:138258 192
clauserule=Np-Apposwg=207
phrase:234019 142
phrasefunction_long=Subjectwg=210
285 τῆς
chapter=1gloss=thesp=det
clause:138259 193
clauserule=DetNPwg=208
phrase:234019 142
phrasefunction_long=Subjectwg=210
286 μητρὸς
chapter=1gloss=mothersp=noun
287 αὐτοῦ
chapter=1gloss=of Himsp=pron
phrase:234019 142
phrasefunction_long=Subjectwg=210
288 Μαρίας
chapter=1gloss=Marysp=noun
phrase:234020 143
phrasefunction_long=Indirect Objectwg=212
289 τῷ
chapter=1gloss=-sp=det
290 Ἰωσήφ,
chapter=1gloss=to Josephsp=noun
clause:138260 194
clauserule=ADV-V-Owg=211
phrase:234021 144
phrasefunction_long=Adverbial
291 πρὶν
chapter=1gloss=beforesp=adv
clause:138261 195
clauserule=AdvpCLjunction=subordinatewg=212
phrase:234021 144
phrasefunction_long=Adverbial
292
chapter=1gloss=rathersp=conj
clause:138262 196
clauserule=sub-CLwg=213
phrase:234022 145
phrasefunction_long=Verbal
293 συνελθεῖν
chapter=1gloss=coming togethersp=verb
phrase:234023 146
phrasefunction_long=Subject
294 αὐτοὺς
chapter=1gloss=of themsp=pron
phrase:234024 147
phrasefunction_long=Verbalwg=216
295 εὑρέθη
chapter=1gloss=she was foundsp=verb
clause:138263 197
clauserule=ADV-V-Owg=211
clause:138264 198
clauserule=ADV-V-ADVjunction=subordinatewg=215
phrase:234025 148
phrasefunction_long=Adverbial
296 ἐν
chapter=1gloss=insp=prep
297 γαστρὶ
chapter=1gloss=wombsp=noun
phrase:234026 149
phrasefunction_long=Verbalwg=217
298 ἔχουσα
chapter=1gloss=having [a child]sp=verb
clause:138265 199
clauserule=ADV-V-ADVjunction=subordinatewg=215
phrase:234027 150
phrasefunction_long=Adverbialwg=222
299 ἐκ
chapter=1gloss=out ofsp=prep
clause:138266 200
clauserule=PrepNpwg=217
phrase:234027 150
phrasefunction_long=Adverbialwg=222
300 Πνεύματος
chapter=1gloss=[the] Spiritsp=noun
301 Ἁγίου.
chapter=1gloss=Holysp=adj
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

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

verse:310726 19
clause:138067 1
clause:138267 201
wg=219
clause:138268 202
clauserule=Conj-CLwg=220
clause:138269 203
clauserule=S-ADV-V-Owg=221
phrase:234028 151
phrasefunction_long=Subjectwg=222
302 Ἰωσὴφ
chapter=1gloss=Josephsp=noun
303 δὲ
chapter=1gloss=nowsp=conj
clause:138270 204
clauserule=Conj-CLwg=220
clause:138271 205
clauserule=S-ADV-V-Owg=221
clause:138272 206
clauserule=Np-Apposwg=222
phrase:234029 152
phrasefunction_long=Subject
304
chapter=1gloss=thesp=det
clause:138273 207
clauserule=DetNPjunction=appositionwg=223
phrase:234029 152
phrasefunction_long=Subject
305 ἀνὴρ
chapter=1gloss=husbandsp=noun
306 αὐτῆς,
chapter=1gloss=of hersp=pron
clause:138274 208
clauserule=CLaCLjunction=subordinatewg=225
phrase:234030 153
phrasefunction_long=Predicate
307 δίκαιος
chapter=1gloss=righteoussp=adj
phrase:234031 154
phrasefunction_long=Verbal Copulawg=225
308 ὢν
chapter=1gloss=beingsp=verb
phrase:234032 155
phrasefunction_long=Adverbial
309 καὶ
chapter=1gloss=andsp=conj
clause:138275 209
wg=227
phrase:234032 155
phrasefunction_long=Adverbial
310 μὴ
chapter=1gloss=notsp=adv
phrase:234033 156
phrasefunction_long=Verbal
311 θέλων
chapter=1gloss=willingsp=verb
clause:138276 210
clauserule=ADV-V-Ojunction=coordinatewg=228
phrase:234034 157
phrasefunction_long=Object
312 αὐτὴν
chapter=1gloss=hersp=pron
phrase:234035 158
phrasefunction_long=Verbal
313 δειγματίσαι,
chapter=1gloss=to expose publiclysp=verb
phrase:234035 158
phrasefunction_long=Verbal
314 ἐβουλήθη
chapter=1gloss=purposedsp=verb
clause:138277 211
clauserule=S-ADV-V-Owg=221
phrase:234036 159
phrasefunction_long=Adverbial
315 λάθρᾳ
chapter=1gloss=secretlysp=adv
phrase:234037 160
phrasefunction_long=Verbal
316 ἀπολῦσαι
chapter=1gloss=to send awaysp=verb
phrase:234038 161
phrasefunction_long=Object
317 αὐτήν.
chapter=1gloss=hersp=pron
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

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

verse:310727 20
clause:138067 1
clause:138278 212
wg=231
clause:138279 213
clauserule=Conj-CLwg=232
clause:138280 214
wg=233
phrase:234038 161
phrasefunction_long=Object
318 ταῦτα
chapter=1gloss=These thingssp=pron
319 δὲ
chapter=1gloss=nowsp=conj
clause:138281 215
clauserule=Conj-CLwg=232
clause:138282 216
wg=233
phrase:234039 162
phrasefunction_long=Subject
320 αὐτοῦ
chapter=1gloss=of himsp=pron
phrase:234040 163
phrasefunction_long=Verbalwg=235
321 ἐνθυμηθέντος
chapter=1gloss=having ponderedsp=verb
322 ἰδοὺ
chapter=1gloss=beholdsp=verb
clause:138283 217
wg=233
phrase:234041 164
phrasefunction_long=Subjectwg=236
323 ἄγγελος
chapter=1gloss=an angelsp=noun
324 Κυρίου
chapter=1gloss=of [the] Lordsp=noun
phrase:234042 165
phrasefunction_long=Adverbial
325 κατ’
chapter=1gloss=insp=prep
326 ὄναρ
chapter=1gloss=a dreamsp=noun
phrase:234043 166
phrasefunction_long=Verbal
327 ἐφάνη
chapter=1gloss=appearedsp=verb
phrase:234044 167
phrasefunction_long=Indirect Object
328 αὐτῷ
chapter=1gloss=to himsp=pron
clause:138284 218
wg=233
phrase:234045 168
phrasefunction_long=Verbalwg=238
329 λέγων
chapter=1gloss=sayingsp=verb
clause:138285 219
wg=237
clause:138286 220
clauserule=CLaCLwg=238
clause:138287 221
wg=239
clause:138288 222
clauserule=Np2CLclausetype=Minorwg=240
phrase:234046 169
phrasefunction_long=Object
330 Ἰωσὴφ
chapter=1gloss=Josephsp=noun
clause:138289 223
clauserule=Np-Apposwg=241
phrase:234046 169
phrasefunction_long=Object
331 υἱὸς
chapter=1gloss=sonsp=noun
332 Δαυείδ,
chapter=1gloss=of Davidsp=noun
phrase:234047 170
phrasefunction_long=Adverbial
333 μὴ
chapter=1gloss=notsp=adv
phrase:234048 171
phrasefunction_long=Verbal
334 φοβηθῇς
chapter=1gloss=you should fearsp=verb
clause:138290 224
wg=239
phrase:234048 171
phrasefunction_long=Verbal
335 παραλαβεῖν
chapter=1gloss=to receivesp=verb
phrase:234049 172
phrasefunction_long=Objectwg=244
336 Μαρίαν
chapter=1gloss=Marysp=noun
clause:138291 225
clauserule=V-O-O2junction=subordinatewg=243
phrase:234050 173
phrasefunction_long=Second Objectwg=248
337 τὴν
chapter=1gloss=[as] thesp=det
clause:138292 226
clauserule=DetNPwg=244
phrase:234050 173
phrasefunction_long=Second Objectwg=248
338 γυναῖκά
chapter=1gloss=wifesp=noun
339 σου,
chapter=1gloss=of yousp=pron
clause:138293 227
clauserule=sub-CLwg=246
clause:138294 228
clauserule=S-P-VCjunction=subordinatewg=247
phrase:234051 174
phrasefunction_long=Subjectwg=246
340 τὸ
chapter=1gloss=thatsp=det
phrase:234052 175
phrasefunction_long=Adverbial
341 γὰρ
chapter=1gloss=forsp=conj
clause:138295 229
clauserule=sub-CLwg=246
clause:138296 230
clauserule=S-P-VCjunction=subordinatewg=247
clause:138297 231
clauserule=DetCLwg=248
clause:138298 232
clauserule=ADV-Vwg=249
phrase:234052 175
phrasefunction_long=Adverbial
342 ἐν
chapter=1gloss=insp=prep
343 αὐτῇ
chapter=1gloss=hersp=pron
phrase:234053 176
phrasefunction_long=Verbalwg=251
344 γεννηθὲν
chapter=1gloss=having been conceivedsp=verb
phrase:234054 177
phrasefunction_long=Predicate
345 ἐκ
chapter=1gloss=fromsp=prep
clause:138299 233
clauserule=PrepNpwg=251
phrase:234054 177
phrasefunction_long=Predicate
346 Πνεύματός
chapter=1gloss=[the] Spiritsp=noun
phrase:234055 178
phrasefunction_long=Verbal Copulawg=251
347 ἐστιν
chapter=1gloss=issp=verb
clause:138300 234
clauserule=S-P-VCjunction=subordinatewg=247
clause:138301 235
clauserule=PrepNpwg=251
phrase:234056 179
phrasefunction_long=Predicate
348 Ἁγίου·
chapter=1gloss=Holysp=adj
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "Search0 = '''\n", "book book=Matthew\n", " chapter chapter=1\n", " \n", " verse \n", "'''\n", "Search0 = NA.search(Search0)\n", "NA.show(Search0, start=1, end=20, condensed=True, extraFeatures={'sp','wg','clausetype','gloss','clauserule', 'junction','phrasefunction_long', }, withNodes=True)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 3 dump some structure information" ] }, { "cell_type": "code", "execution_count": 233, "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 1097 structural elements in the dataset.\n", "\n" ] } ], "source": [ "T.structureInfo()" ] }, { "cell_type": "code", "execution_count": 234, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "20619 is an phrase which is not configured as a structure type\n" ] } ], "source": [ "T.structure(20619)" ] }, { "cell_type": "code", "execution_count": 232, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'Availability': 'Creative Commons Attribution 4.0 International (CC BY 4.0)',\n", " 'Converter_author': 'Tony Jurg, Vrije Universiteit Amsterdam, Netherlands',\n", " 'Converter_execution': 'Tony Jurg, Vrije Universiteit Amsterdam, Netherlands',\n", " 'Converter_version': '0.1 (Initial)',\n", " 'Convertor_source': 'https://github.com/tonyjurg/n1904_lft',\n", " 'Data source': 'MACULA Greek Linguistic Datasets, available at https://github.com/Clear-Bible/macula-greek/tree/main/Nestle1904/lowfat',\n", " 'Editors': 'Nestle',\n", " 'Name': 'Greek New Testament (NA1904)',\n", " 'TextFabric version': '11.2.3',\n", " 'Version': '1904',\n", " 'fmt:text-orig-full': '{word}',\n", " 'sectionFeatures': 'book,chapter,verse',\n", " 'sectionTypes': 'book,chapter,verse',\n", " 'structureFeatures': 'book,chapter,verse',\n", " 'structureTypes': 'book,chapter,verse',\n", " 'writtenBy': 'Text-Fabric',\n", " 'dateWritten': '2023-04-06T16:41:52Z'}" ] }, "execution_count": 232, "metadata": {}, "output_type": "execute_result" } ], "source": [ "TF.features['otext'].metaData\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Running text fabric browser \n", "##### [back to TOC](#TOC)" ] }, { "cell_type": "code", "execution_count": 33, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "This is Text-Fabric 11.2.3\n", "Connecting to running kernel via 19685\n", "Connecting to running webserver via 29685\n", "Opening app in browser\n", "Press to stop the TF browser\n" ] } ], "source": [ "!text-fabric app " ] }, { "cell_type": "code", "execution_count": 34, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "This is Text-Fabric 11.2.3\n", "Killing processes:\n", "kernel % 10804: 19685 app: terminated\n", "web % 3564: 29685 app: terminated\n", "text-fabric % 10076 app: terminated\n", "3 processes done.\n" ] } ], "source": [ "!text-fabric app -k" ] }, { "cell_type": "code", "execution_count": 44, "metadata": {}, "outputs": [ { "ename": "NameError", "evalue": "name 'tf' is not defined", "output_type": "error", "traceback": [ "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)", "Input \u001b[1;32mIn [44]\u001b[0m, in \u001b[0;36m\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[43mtf\u001b[49m\u001b[38;5;241m.\u001b[39mcore\u001b[38;5;241m.\u001b[39mnodes\u001b[38;5;241m.\u001b[39mNodes\u001b[38;5;241m.\u001b[39motypeRank\n", "\u001b[1;31mNameError\u001b[0m: name 'tf' is not defined" ] } ], "source": [ "tf.core.nodes.Nodes.otypeRank" ] }, { "cell_type": "code", "execution_count": null, "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" }, "toc": { "base_numbering": 1, "nav_menu": {}, "number_sections": true, "sideBar": true, "skip_h1_title": false, "title_cell": "Table of Contents", "title_sidebar": "Contents", "toc_cell": true, "toc_position": { "height": "calc(100% - 180px)", "left": "10px", "top": "150px", "width": "321.391px" }, "toc_section_display": true, "toc_window_display": true } }, "nbformat": 4, "nbformat_minor": 4 }