#!/usr/bin/env python # coding: utf-8 # # Examine presentation of John 1:1 (GBI versus LFT) # # **Work in progress!** # ## Table of content # # * 1 - Introduction # * 2 - Load Text-Fabric app and data # * 3 - Performing the queries # * 3.1 - The GBI implementation # * 3.1.1 - The input XML (GBI nodes) # * 3.2 - The LFT implementation # * 3.2.1 - The input XML (Low Fat Tree) # * 4 - Discussion # * 4.1 - Handling of conjunctions # * 4.2 - TBD # * 5 - Atribution and footnotes # * 6 - Required libraries # # 1 - Introduction # ##### [Back to TOC](#TOC) # This Jupyter Notebook demonstrates the effects of the differences in Text-Fabric datastructure between the GBI and LFT implementation. # # 2 - Load Text-Fabric app and data # ##### [Back to TOC](#TOC) # In[1]: get_ipython().run_line_magic('load_ext', 'autoreload') get_ipython().run_line_magic('autoreload', '2') # In[2]: # Loading the Text-Fabric code # Note: it is assumed Text-Fabric is installed in your environment. from tf.fabric import Fabric from tf.app import use # In[3]: # load the N1904GBI app and data # Since two distinct Text-Fabric dataset are loaed, the option hoist=globals() SHOULD NOT be used! N1904GBI = use ("tonyjurg/Nestle1904gbi",version='0.4') # In[4]: # The following will push the Text-Fabric stylesheet to this notebook (to facilitate proper display with notebook viewer) N1904GBI.dh(N1904GBI.getCss()) # Note: this only is required once, because both apps utilize the same stylesheets # In[5]: # Set default view in a way to limit noise as much as possible. N1904GBI.displaySetup(condensed=True, multiFeatures=False,queryFeatures=False) # In[6]: # load the N1904LFT app and data # Since two distinct Text-Fabric dataset are loaed, the option hoist=globals() SHOULD NOT be used! N1904LFT= use ("tonyjurg/Nestle1904lft",version='0.6') # In[7]: # Set default view in a way to limit noise as much as possible. N1904LFT.displaySetup(condensed=True, multiFeatures=False,queryFeatures=False) # # 3 - Performing the queries # ##### [Back to TOC](#TOC) # First we will define a query template to select John 1:1 which will be used for both queries on both the GBI and LFT Text-Fabric dataset. # In[6]: VerseQuery = ''' book book=John chapter chapter=1 verse verse=1 ''' GBIVerseResults = N1904GBI.search(VerseQuery) LFTVerseResults = N1904LFT.search(VerseQuery) # In[12]: EthosQuery = ''' verse word lemma=ἔθος ''' EthosResults = N1904GBI.search(EthosQuery) N1904GBI.table(EthosResults) # ## 3.1 - The GBI implementation # ##### [Back to TOC](#TOC) # # The following is the tree presentation for the GBI implementation: # ``` # # # # # # # Ἐν # # ἀρχῇ # # # # # # ἦν # # # # # # # Λόγος, # # # # # καὶ # # # # # # Λόγος # # # # # # ἦν # # # # # πρὸς # # τὸν # # Θεόν, # # # # # # καὶ # # # # Θεὸς # # # # # ἦν # # # # # # # Λόγος. # # # # # # # # ``` # ## 3.2 - The LFT implementation # ##### [Back to TOC](#TOC) # # The following is the tree presentation for the LFT implementation: # In[ ]: N1904LFT.show(LFTVerseResults, start=1, end=2) # ## 3.2.1 - The input XML (Low Fat Tree) # ##### [Back to TOC](#TOC) # # For comparison. This is the structure of the raw XML with most of the \ attributes removed). Click [here](https://github.com/tonyjurg/Nestle1904LFT/blob/main/data/xml/20230321/04-john.xml) to view the source file. # ``` # #

# JHN 1:1 Ἐν ἀρχῇ ἦν ὁ Λόγος, καὶ ὁ Λόγος ἦν πρὸς τὸν Θεόν, καὶ Θεὸς ἦν ὁ Λόγος.

# # # # # Ἐν # ἀρχῇ # # ἦν # # # Λόγος # # # # καὶ # # # # Λόγος # # ἦν # # πρὸς # # τὸν # Θεόν # # # # # # καὶ # # Θεὸς # ἦν # # # Λόγος # # # # # #
# ``` # This is the input XML for the low Fat Tree with the stylesheets # [`treedown.css`](../../data/xml/20230321/treedown.css) and [`boxwood.css`](../../data/xml/20230321/boxwood.css) applied: # # # # 4 - Discussion # ##### [Back to TOC](#TOC) # The following sections provide a discussion about the differences between GBI and LFT dataset. # ## 4.1 - Handling of conjunctions # ##### [Back to TOC](#TOC) # # There is a fundamental difference in handling of conjunctions between the GBI and LFT implementation. In the GBI they are concidered part of a clause, in the LFT outside the clause. (***note: this may be reconsidered.**) # # ## 4.2 - More ... # ##### [Back to TOC](#TOC) # # TBA # # 5 - Attribution and footnotes # ##### [Back to TOC](#TOC) # # N.A. # # 6 - Required libraries # ##### [Back to TOC](#TOC) # # The scripts in this notebook require (beside `text-fabric`) the following Python libraries to be installed in the environment: # # {none} # # You can install any missing library from within Jupyter Notebook using either`pip` or `pip3`. # In[ ]: