"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"PhrasesDict = {}\n",
"for (wg,det,noun) in ArticulatedResult:\n",
" location=T.sectionFromNode(wg)\n",
" # Check if this location already exists in PhrasesDict\n",
" if location in PhrasesDict:\n",
" # If it exists, it is a duplicate: add the count to the existing value\n",
" PhrasesDict[location]+=1\n",
" else:\n",
" # If it doesn't exist, mark it down\n",
" PhrasesDict[location]=1\n",
" \n",
"# Convert the dictionary into a list of key-value pairs and sort it according to frequency\n",
"UnsortedTableData = [[key, value] for key, value in PhrasesDict.items()]\n",
"TableData= sorted(UnsortedTableData, key=lambda row: row[1], reverse=True)\n",
"\n",
"# In this example the table will be truncated \n",
"max_rows = 10 # Set your desired number of rows here\n",
"TruncatedTable = TableData[:max_rows]\n",
"\n",
"# Produce the table\n",
"headers = [\"verselocation\",\"Frequency\"]\n",
"print(tabulate(TruncatedTable, headers=headers, tablefmt='fancy_grid'))\n",
"\n",
"# Add a warning using markdown (API call A.dm) allowing it to be printed in bold type\n",
"N1904.dm(\"**Warning: table truncated!**\")"
]
},
{
"cell_type": "markdown",
"id": "c3440c98-f022-4e34-9bc1-b3eaaf4780b2",
"metadata": {},
"source": [
"The following will show the first result in a graph:\n"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "2b8d4f8b-aa24-46dd-8c87-81038d9ae69a",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"verse 1"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"verse Matthew 1:2
sentence #2 (start: Matthew 1:2)
"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Note the options \"condensed=True, multiFeatures=False,queryFeatures=False\" are included below due to the earlier N1904.displaySetup(...)\n",
"N1904.show(ArticulatedResult, start=1, end=1)"
]
},
{
"cell_type": "markdown",
"id": "36b6f6c9-d4b9-4305-b121-410275905aba",
"metadata": {},
"source": [
"# 4 - Discussion\n",
"##### [Back to TOC](#TOC)"
]
},
{
"cell_type": "markdown",
"id": "f45e187c-65da-4c93-8b8d-89d4b7d994ec",
"metadata": {},
"source": [
"## 4.1 - Textual variants \n",
"##### [Back to TOC](#TOC)\n",
"\n",
"The research in articulated proper nouns is also relevant in relation to variant readings. Consider for exemple Acts 18:1.\n",
"\n",
"NA28:\n",
"> Μετὰ ταῦτα χωρισθεὶς ἐκ τῶν Ἀθηνῶν ἦλθεν εἰς Κόρινθον\n",
"\n",
"Stephanus Textus Receptus 1550: \n",
"> Μετὰ **δὲ** ταῦτα χωρισθεὶς **ὁ Παῦλος** ἐκ τῶν Ἀθηνῶν ἦλθεν εἰς Κόρινθον"
]
},
{
"cell_type": "markdown",
"id": "03cee91a-944c-49cb-8cfc-582213e01260",
"metadata": {},
"source": [
"# 5 - Attribution and footnotes\n",
"##### [Back to TOC](#TOC)\n",
"\n",
"#### Atrribution: \n",
"\n",
"Thanks to Prof. Willem van Peursen (VU) for pointing me to this question and raising the following interesting issue in respect to the use of a definite article: \n",
"> In Muraoka’s *Why Read the Bible in the Original Languages*,1 I found the following examples:\n",
"(...)\n",
"The definite article e.g. “the truth will set you free” (John 8:32; TJ) how to translate in Japanese, which doesn’t have the definite article.\n",
"\n",
"#### Footnotes:\n",
"\n",
"1 Muraoka, Takamitsu. Why Read the Bible in the Original Languages? (Leuven: Peeters Publishers, 2020), 71."
]
},
{
"cell_type": "markdown",
"id": "19b273ce-a030-4f78-99db-12476ea1497e",
"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": "5fda3537-c41c-452a-b248-4f9ef3d146f6",
"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
}