"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# The following will push the Text-Fabric stylesheet to this notebook (to facilitate proper display with notebook viewer)\n",
"# The stylesheets of N1904GBI and N1904LFT will be identical, so one call will suffice.\n",
"N1904GBI.dh(N1904GBI.getCss())"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "1747daf0-3f04-461e-8c26-2ba9ecaab846",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"# Set default view in a way to limit noise as much as possible.\n",
"# These settings need to be done for both datasets\n",
"N1904GBI.displaySetup(condensed=True, multiFeatures=False,queryFeatures=False)\n",
"N1904LFT.displaySetup(condensed=True, multiFeatures=False,queryFeatures=False)"
]
},
{
"cell_type": "markdown",
"id": "a29a3dc3-f727-458d-b90b-bee8e4545859",
"metadata": {},
"source": [
"# 3 - Performing the queries \n",
"##### [Back to TOC](#TOC)"
]
},
{
"cell_type": "markdown",
"id": "5b98ec15-fdbe-4b7f-a5fe-8364d26dcb7e",
"metadata": {
"tags": []
},
"source": [
"## 3.1 - Louw Nida and John 1:1 (Ἐν ἀρχῇ)\n",
"##### [Back to TOC](#TOC)\n",
"\n",
"Examin the Greek ἀρχῇ in John 1:1:"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "7a6b5c40-7a4f-4a8e-bc8c-363c9691c40e",
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.08s 1 result\n",
"word: ἀρχῇ Louw-Nida: 67.65\n"
]
}
],
"source": [
"WordQuery = '''\n",
"word book=John chapter=1 verse=1 word=ἀρχῇ\n",
"'''\n",
"WordResult = N1904LFT.search(WordQuery) \n",
"api=N1904LFT.api\n",
"# returns list of ordered tuples, even when only containing one node, hence indexed with [0][0] on next line\n",
"print(\"word:\",api.T.text(WordResult[0][0]),\" Louw-Nida:\",api.F.ln.v(WordResult[0][0]))"
]
},
{
"cell_type": "markdown",
"id": "15e2c041-7305-43f9-8347-25478d844200",
"metadata": {},
"source": [
"However, the ἀρχή of John 1:1, according to Louw-Nida Lexicon can be either:\n",
">```\n",
"a:beginning (aspect)=68.1 [^1]\n",
"b:beginning (time)=67.65 [^2]\n",
"\n",
"Only the second meaning is provided by the feature 'ln'. Although the most appropriate, the meaning of the second one (aspect) might also be implied by the author. Queries depending on 'ln' (or, by consequence, 'lex_dom') may yield incorrect or incomplete results.\n",
"\n",
"[^1] Louw, Johannes P., and Eugene Albert Nida. *Greek-English Lexicon of the New Testament: Based on Semantic Domains, Vol. I* (New York: United Bible Societies, 1996), 654.\n",
"\n",
"[^2] ibid., 636."
]
},
{
"cell_type": "markdown",
"id": "434ae56a-d68e-49b2-af5a-b22346688775",
"metadata": {},
"source": [
"## 3.2 - Formal and functional tags (ἔρχεται)\n",
"##### [Back to TOC](#TOC)"
]
},
{
"cell_type": "markdown",
"id": "650d23c8-62c1-4954-b6e4-4af5e913ba51",
"metadata": {},
"source": [
"Functional tags are only available on GBI, so the data will be taken from that Text-Fabric dataset. See [this Jupyter notebook](https://github.com/tonyjurg/Nestle1904GBI/blob/main/docs/usecases/formal_versus_functional_tag.ipynb) for an indepth discussion about formal and functional tags.\n",
"\n",
"Consider the two following verses, both containing the same verb ἔρχεται:\n",
"> Καὶ ἐξῆλθεν ἐκεῖθεν, καὶ **ἔρχεται** εἰς τὴν πατρίδα αὐτοῦ, .. (He went away from there and **came** to his hometown, Mark 6:1a, ESV) \n",
"\n",
"> Ἰδοὺ **ἔρχεται** μετὰ τῶν νεφελῶν, καὶ ὄψεται αὐτὸν πᾶς ὀφθαλμὸς ... (Behold, **he is coming** with the clouds, and every eye will see him, Rev. 1:7a ESV)\n",
"\n",
"The following query pulls the relevant data from the GBI Text-Fabric dataset"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "7bfc5821-a5a6-43da-a022-6c1a7a2ca6e3",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.08s 2 results\n",
"('Mark', 6, 1) word: ἔρχεται Formal tag: V-PNI-3S Functional tag V-PNI-3S gloss: came\n",
"('Revelation', 1, 7) word: ἔρχεται Formal tag: V-PNI-3S Functional tag V-PNI-3S gloss: He is coming\n"
]
}
],
"source": [
"ErgetaiQuery = '''\n",
"word word=ἔρχεται\n",
"/with/\n",
"book=Mark chapter=6 verse=1 \n",
"/or/\n",
"book=Revelation chapter=1 verse=7 \n",
"/-/\n",
"'''\n",
"\n",
"ErgetaiResult = N1904GBI.search(ErgetaiQuery) \n",
"# returns list of ordered tuples\n",
"\n",
"# We also need to add the app reference (N1904GBI) before we can access the F API functions\n",
"api=N1904GBI.api\n",
"for tuple in ErgetaiResult:\n",
" node=tuple[0]\n",
" print(api.T.sectionFromNode(node), \" word:\",api.T.text(node),\" Formal tag:\",api.F.formaltag.v(node),\n",
" \" Functional tag \",api.F.functionaltag.v(node),\" gloss:\",api.F.gloss.v(node))"
]
},
{
"cell_type": "markdown",
"id": "38b6ab64-63a3-4853-af27-f618cc081a22",
"metadata": {},
"source": [
"Both instances are the same praesens indicativus of ἔρχομαι, with identical formal and functional tag, but require to be translated rather different. "
]
},
{
"cell_type": "markdown",
"id": "a5583155-be42-4577-a88d-788c24a0b8d9",
"metadata": {},
"source": [
"## 3.3 - Handling of multiple appositions\n",
"##### [Back to TOC](#TOC)\n",
"\n",
"Consider the following text from Matthew 1:1:\n",
"\n",
"> Βίβλος γενέσεως Ἰησοῦ Χριστοῦ υἱοῦ Δαυεὶδ υἱοῦ Ἀβραάμ. \n",
"\n",
"In this verse there are two appositions to 'Ἰησοῦ Χριστοῦ': 'υἱοῦ Δαυεὶδ' and 'υἱοῦ Ἀβραάμ'. The LFT Text-Fabric data presents 'υἱοῦ Δαυεὶδ' as apposition to 'Ἰησοῦ Χριστοῦ' and 'υἱοῦ Ἀβραάμ' as apposition to 'Ἰησοῦ Χριστοῦ υἱοῦ Δαυεὶδ'. Another choice of apposition can also be argued: both 'υἱοῦ Δαυεὶδ' and 'υἱοῦ Ἀβραάμ' being appositions to 'Ἰησοῦ Χριστοῦ'. This actualy the case in the XML data for the GBI nodes.\n",
"\n",
"This Example is discussed in detail in a separate [Jupiter NoteBook](https://github.com/tonyjurg/Nestle1904LFT/blob/main/docs/usecases/appostions.ipynb)"
]
},
{
"cell_type": "markdown",
"id": "6e488392-6aae-4f0f-ad2b-5543b55aea78",
"metadata": {},
"source": [
"## 3.4 Adverbial to what?\n",
"##### [Back to TOC](#TOC)\n",
"\n",
"To what is the κατὰ in 1 Cor. 16:2 the adverbial? The Text-Farbic data suggest to 'μίαν σαββάτου'."
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "e204c171-9be6-4c52-9b58-2c3e68a9fb84",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.00s 1 result\n"
]
}
],
"source": [
"# create the query template\n",
"VerseQuery = '''\n",
"verse verse=2 chapter=16 book=I_Corinthians\n",
"'''\n",
"# execute the query template\n",
"VerseResult = N1904LFT.search(VerseQuery) "
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "9cf135f0-7f08-4784-93ed-b04d4b282e98",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"verse 1"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"verse I_Corinthians 16:2
sentence #499 (start: I_Corinthians 16:2)
wg #5381: cl
wg #5386: cl adv V-O
wg #5387: apposition np o NP-CL
wg #5388: cl* PtclCL apposition
wg #5388: cl* PtclCL apposition
wg #5390: cl* adv sub-CL
wg #5391: cl ADV-ADV-ADV-S-V
"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"N1904LFT.show(VerseResult, condensed=True, multiFeatures=False)"
]
},
{
"cell_type": "markdown",
"id": "15130691-475e-4c78-b435-96470cc89d71",
"metadata": {},
"source": [
"Query for following syntactical construction:"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "b8166e32-3fac-4f76-9858-35753f389b5e",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.21s 6 results\n"
]
},
{
"data": {
"text/html": [
""
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# create the query template\n",
"SyntacticQuery1 = '''\n",
"verse\n",
" wg wgrule=PrepNp\n",
" word lemma=κατά sp=prep\n",
" word lemma=εἷς case=accusative\n",
"'''\n",
"SyntacticResult1 = N1904LFT.search(SyntacticQuery1) \n",
"N1904LFT.table(SyntacticResult1, condensed=True, multiFeatures=False)"
]
},
{
"cell_type": "markdown",
"id": "31d887e4-5470-4a20-915c-9a1cdd5d6385",
"metadata": {},
"source": [
"Query for next syntactical construction: {note below: in the recent dataset the function of feature wgtype has changed - this query needs to be reconsidered}"
]
},
{
"cell_type": "code",
"execution_count": 20,
"id": "cdab8f1d-a9f9-4ba3-a651-82b7c1055a54",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.35s 0 results\n"
]
},
{
"data": {
"text/html": [
""
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# create the query template\n",
"SyntacticQuery2 = '''\n",
"verse\n",
" wg wgrule=PrepNp wgrole=adv\n",
" word sp=prep lemma=κατά\n",
" word sp=adj case=accusative \n",
" wg wgtype=modifier-scope\n",
" word sp=noun \n",
"'''\n",
"SyntacticResult2 = N1904LFT.search(SyntacticQuery2) \n",
"N1904LFT.table(SyntacticResult2, condensed=True, multiFeatures=False)"
]
},
{
"cell_type": "code",
"execution_count": 21,
"id": "f1b4f6cf-e3d8-409f-bb43-0799e8ca70cf",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.18s 10 results\n"
]
},
{
"data": {
"text/html": [
"n | p | verse | wg (+1) | word (+1) | wg (+1) | wg (+1) | wg |
\n",
"1 | Matthew 28:1 | | μίαν | Ὀψὲ δὲ σαββάτων, τῇ ἐπιφωσκούσῃ εἰς μίαν σαββάτων, ἦλθεν Μαριὰμ ἡ Μαγδαληνὴ καὶ ἡ ἄλλη Μαρία θεωρῆσαι τὸν τάφον. | Ὀψὲ σαββάτων, τῇ ἐπιφωσκούσῃ εἰς μίαν σαββάτων, ἦλθεν Μαριὰμ ἡ Μαγδαληνὴ καὶ ἡ ἄλλη Μαρία θεωρῆσαι τὸν τάφον. | Ὀψὲ |
\n",
"2 | Mark 15:6 | | Κατὰ ἑορτὴν ἀπέλυεν αὐτοῖς ἕνα δέσμιον ὃν παρῃτοῦντο. | ἕνα | Κατὰ | Κατὰ δὲ ἑορτὴν ἀπέλυεν αὐτοῖς ἕνα δέσμιον ὃν παρῃτοῦντο. |
\n",
"3 | Acts 28:13 | | μετὰ | μίαν | μετὰ μίαν ἡμέραν ἐπιγενομένου νότου δευτεραῖοι ἤλθομεν εἰς Ποτιόλους, | μετὰ μίαν ἡμέραν ἐπιγενομένου νότου | μετὰ μίαν ἡμέραν |
\n",
"4 | I_Corinthians 16:2 | | κατὰ μίαν σαββάτου | κατὰ | κατὰ μίαν σαββάτου ἕκαστος ὑμῶν παρ’ ἑαυτῷ τιθέτω θησαυρίζων ὅ τι ἐὰν εὐοδῶται, ἵνα μὴ ὅταν ἔλθω τότε λογίαι γίνωνται. | μίαν |
\n",
"5 | Titus 3:10 | | μετὰ μίαν καὶ δευτέραν νουθεσίαν | μετὰ | μίαν |
"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# create the query template\n",
"SyntacticQuery3 = '''\n",
"verse\n",
" wg \n",
" word sp=prep lex_dom=067002\n",
" word lemma=εἷς case=accusative\n",
"'''\n",
"SyntacticResult3 = N1904LFT.search(SyntacticQuery3) \n",
"N1904LFT.table(SyntacticResult3, condensed=True, multiFeatures=False)"
]
},
{
"cell_type": "code",
"execution_count": 22,
"id": "6fe7d15d-4ca1-4369-963a-d73f8c34149f",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.25s 8 results\n"
]
},
{
"data": {
"text/html": [
"n | p | verse | word (+1) | word | word | wg (+1) | wg | wg | wg |
\n",
"1 | Matthew 5:18 | | ἓν | ἢ | μία | ἀμὴν γὰρ λέγω ὑμῖν, ἕως ἂν παρέλθῃ ὁ οὐρανὸς καὶ ἡ γῆ, ἰῶτα ἓν ἢ μία κεραία οὐ μὴ παρέλθῃ ἀπὸ τοῦ νόμου, ἕως ἂν πάντα γένηται. | ἀμὴν λέγω ὑμῖν, ἕως ἂν παρέλθῃ ὁ οὐρανὸς καὶ ἡ γῆ, ἰῶτα ἓν ἢ μία κεραία οὐ μὴ παρέλθῃ ἀπὸ τοῦ νόμου, ἕως ἂν πάντα γένηται. | ἕως ἂν παρέλθῃ ὁ οὐρανὸς καὶ ἡ γῆ, ἰῶτα ἓν ἢ μία κεραία οὐ μὴ παρέλθῃ ἀπὸ τοῦ νόμου, ἕως ἂν πάντα γένηται. | ἰῶτα ἓν ἢ μία κεραία |
\n",
"2 | Ephesians 4:7 | | Ἑνὶ δὲ ἑκάστῳ ἡμῶν ἐδόθη ἡ χάρις κατὰ τὸ μέτρον τῆς δωρεᾶς τοῦ Χριστοῦ. | Ἑνὶ | δὲ | ἑκάστῳ |
\n",
"3 | Titus 3:10 | | μίαν | καὶ | δευτέραν | μετὰ μίαν καὶ δευτέραν νουθεσίαν | μίαν καὶ δευτέραν νουθεσίαν | μίαν καὶ δευτέραν |
"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# create the query template\n",
"SyntacticQuery4 = '''\n",
"verse\n",
" wg \n",
" a:word sp=adj lemma=εἷς\n",
" b:word sp=conj\n",
" c:word sp=adj\n",
"a <: b\n",
"b <: c\n",
"'''\n",
"SyntacticResult4 = N1904LFT.search(SyntacticQuery4) \n",
"N1904LFT.table(SyntacticResult4, condensed=True, multiFeatures=False)"
]
},
{
"cell_type": "code",
"execution_count": 24,
"id": "7cca165f-731a-4aed-8386-5ecfa33499cc",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.07s 8 results\n"
]
},
{
"data": {
"text/html": [
"verse 1"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"verse Titus 3:10
sentence #28 (start: Titus 3:10)
"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"WordQuery = '''\n",
"word book=Titus chapter=3 verse=10 word\n",
"'''\n",
"VerseResult = N1904LFT.search(WordQuery) \n",
"N1904LFT.show(VerseResult, condensed=True, multiFeatures=False)"
]
},
{
"cell_type": "code",
"execution_count": 25,
"id": "478157af-7f1d-416c-9d09-efe4141d3df8",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" = left equal to right (as node)\n",
" # left unequal to right (as node)\n",
" < left before right (in canonical node ordering)\n",
" > left after right (in canonical node ordering)\n",
" == left occupies same slots as right\n",
" && left has overlapping slots with right\n",
" ## left and right do not have the same slot set\n",
" || left and right do not have common slots\n",
" [[ left embeds right\n",
" ]] left embedded in right\n",
" << left completely before right\n",
" >> left completely after right\n",
" =: left and right start at the same slot\n",
" := left and right end at the same slot\n",
" :: left and right start and end at the same slot\n",
" <: left immediately before right\n",
" :> left immediately after right\n",
" =k: left and right start at k-nearly the same slot\n",
" :k= left and right end at k-nearly the same slot\n",
" :k: left and right start and end at k-near slots\n",
" left k-nearly after right\n",
" .f. left.f = right.f\n",
" .f=g. left.f = right.g\n",
" .f~r~g. left.f matches right.g\n",
" .f#g. left.f # right.g\n",
" .f>g. left.f > right.g\n",
" .f\n",
"##### [Back to TOC](#TOC)\n",
"\n",
"N.A."
]
},
{
"cell_type": "markdown",
"id": "9c74ecb9-5e06-4dfd-bef2-0d5d8a97bef9",
"metadata": {},
"source": [
"# 5 - Attribution and footnotes\n",
"##### [Back to TOC](#TOC)\n",
"\n",
"N.A."
]
},
{
"cell_type": "markdown",
"id": "47003d27-ae95-48e4-8d6e-80d443850eed",
"metadata": {
"tags": []
},
"source": [
"# 6 - Required libraries \n",
"##### [Back to TOC](#TOC)\n",
"\n",
"The scripts in this notebook require (beside `text-fabric`) the following Python libraries to be installed in the environment:\n",
"\n",
" {none}\n",
"\n",
"You can install any missing library from within Jupyter Notebook using either`pip` or `pip3`."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9a110495-7c60-4f64-92d4-748a7c12b99d",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}