#!/usr/bin/env python
# coding: utf-8
# # The particles μέν and δέ (Nestle1904GBI)
#
# **Work in progress**
# ## Table of content
# * 1 - Introduction
# * 1.1 - Why is this relevant?
# * 1.2 - Translating into Text-Fabric queries
# * 2 - Load Text-Fabric app and data
# * 3 - Performing the queries
# * 3.1 - Identifying the use of δέ
# * 3.2 - Gathering additional syntactic details regarding the surrounding
# * 4 - Attribution and footnotes
# * 5 - Required libraries
# # 1 - Introduction
# ##### [Back to TOC](#TOC)
#
# Greek has many particles, such as [μέν](https://stephanus.tlg.uci.edu/lsj/#eid=68439) and [δέ](https://stephanus.tlg.uci.edu/lsj/#eid=24443), that are used to indicate contrast or emphasis.
# ## 1.1 - Why is this relevant?
# ##### [Back to TOC](#TOC)
#
# The particle δέ, commonly found in the Greek New Testament, can be used in either an adversative (contrasting) or copulative (confirming) manner, affecting the meaning and interpretation of the surrounding text. The challenge in translating δέ into English arises due to the inherent ambiguity of the particle. English equivalents such as "but," "and," or "now" often fail to capture the full range of its meaning.
#
# In its adversative usage, δέ introduces a contrast or a counterpoint to what has been previously mentioned. It serves to emphasize a distinction or a shift in thought, often presenting an alternative viewpoint or introducing a new topic. This contrasting function of δέ can be theologically significant as it highlights the tensions or conflicts within the text, revealing different perspectives or opposing ideas.
#
# In its copulative usage, δέ functions as a confirming particle, connecting statements or thoughts in a continuous and cohesive manner. It serves to link ideas together, reinforcing the flow of the discourse. This copulative function of δέ is relevant in conveying theological concepts by maintaining a logical progression in the text, presenting ideas that build upon each other or providing additional supporting information.
# ## 1.2 - Translating into Text-Fabric queries
# ##### [Back to TOC](#TOC)
#
# Identifying the use of δέ is easily done using Text-Fabric. The challenge lies in creating queries that gather relevant information regarding the syntactical surroundings, which could hint at whether δέ is intended adversative or copulative.
# # 2 - Load Text-Fabric app and data
# ##### [Back to TOC](#TOC)
# In[11]:
get_ipython().run_line_magic('load_ext', 'autoreload')
get_ipython().run_line_magic('autoreload', '2')
# In[1]:
# 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[2]:
# load the N1904 app and data
N1904 = use ("tonyjurg/Nestle1904GBI", version="0.4", hoist=globals())
# In[3]:
# The following will push the Text-Fabric stylesheet to this notebook (to facilitate proper display with notebook viewer)
N1904.dh(N1904.getCss())
# # 3 - Performing the queries
# ##### [Back to TOC](#TOC)
# ## 3.1 - Identifying the use of δέ
# ##### [Back to TOC](#TOC)
#
# This can be done using a straight forward query. The node numbers of sentence,clause and phrase containing the δέ will also be gathered allowing easier further processing.
# In[4]:
# Define the query template
DeQuery= '''
sentence
clause
phrase
word lemma=δέ
'''
# The following will create a list containing ordered tuples consisting of node numbers of the items as they appear in the query
DeResult = N1904.search(DeQuery)
# ## 3.2 - Gathering additional syntactic details regarding the surrounding
# ##### [Back to TOC](#TOC)
#
# TBD.
# In[5]:
for (sentence,clause,phrase,word) in DeResult:
# do something...
break
# # 4 - Attribution and footnotes
# ##### [Back to TOC](#TOC)
#
# N.A.
# # 5 - 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[ ]: