"
]
},
"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",
"N1904.dh(N1904.getCss())"
]
},
{
"cell_type": "code",
"execution_count": 28,
"id": "be2da1a6-7dc6-47b5-88c1-c854ab4bcaaf",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"# Set default view in a way to limit noise as much as possible.\n",
"N1904.displaySetup(condensed=True, multiFeatures=False,queryFeatures=False)\n",
"# Define the list of features to be displayed\n",
"WGinfoList={'roleclausedistance','wgrole','wordrole', 'wgrule','wgclass','wglevel','wgnum'}"
]
},
{
"cell_type": "markdown",
"id": "38ba1e92-4459-4e4c-bb07-3b002d1a60a3",
"metadata": {},
"source": [
"# 3 - Performing the queries \n",
"##### [Back to TOC](#TOC)"
]
},
{
"cell_type": "markdown",
"id": "e0204b00-a2dc-43f2-9968-86b57d29e8f9",
"metadata": {},
"source": [
"First we will define a query template to select John 1:14."
]
},
{
"cell_type": "code",
"execution_count": 29,
"id": "12aed999-b3fb-4d0a-95ad-1b2e2a62debc",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.01s 2 results\n"
]
}
],
"source": [
"VerseQuery = '''\n",
"verse book=John chapter=1 verse=1|2\n",
"'''\n",
"\n",
"VerseResults = N1904.search(VerseQuery)\n"
]
},
{
"cell_type": "code",
"execution_count": 30,
"id": "5444cb75-86e4-4691-a417-fc200b4ba1ea",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"verse 1"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"verse John 1:1
sentence #1 (start: John 1:1)
wg #2: cl* Conj3CL
wgclass=cl*wglevel=2wgnum=2wgrule=Conj3CL
wg #3: cl P-VC-S
wgclass=clwglevel=3wgnum=3wgrule=P-VC-S
wg #4: pp p PrepNp
wgclass=ppwglevel=4wgnum=4wgrole=pwgrule=PrepNp
Ἐν
roleclausedistance=1wordrole=p
ἀρχῇ
roleclausedistance=1wordrole=p
ἦν
roleclausedistance=0wordrole=vc
wg #5: np s DetNP
wgclass=npwglevel=4wgnum=5wgrole=swgrule=DetNP
ὁ
roleclausedistance=1wordrole=s
Λόγος,
roleclausedistance=1wordrole=s
wg #6: group
wglevel=3wgnum=6
wg #7: cl S-VC-P
wgclass=clwglevel=4wgnum=7wgrule=S-VC-P
wg #8: np s DetNP
wgclass=npwglevel=5wgnum=8wgrole=swgrule=DetNP
ὁ
roleclausedistance=1wordrole=s
Λόγος
roleclausedistance=1wordrole=s
ἦν
roleclausedistance=0wordrole=vc
wg #9: pp p PrepNp
wgclass=ppwglevel=5wgnum=9wgrole=pwgrule=PrepNp
πρὸς
roleclausedistance=1wordrole=p
wg #10: np DetNP
wgclass=npwglevel=6wgnum=10wgrule=DetNP
τὸν
roleclausedistance=2wordrole=p
Θεόν,
roleclausedistance=2wordrole=p
wg #11: group
wglevel=3wgnum=11
wg #12: cl P-VC-S
wgclass=clwglevel=4wgnum=12wgrule=P-VC-S
Θεὸς
roleclausedistance=0wordrole=p
ἦν
roleclausedistance=0wordrole=vc
wg #13: np s DetNP
wgclass=npwglevel=5wgnum=13wgrole=swgrule=DetNP
ὁ
roleclausedistance=1wordrole=s
Λόγος.
roleclausedistance=1wordrole=s
"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"verse 2"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"verse John 1:2
sentence #2 (start: John 1:2)
wg #15: cl S-VC-ADV-P
wgclass=clwglevel=2wgnum=15wgrule=S-VC-ADV-P
Οὗτος
roleclausedistance=0wordrole=s
ἦν
roleclausedistance=0wordrole=vc
wg #16: pp adv PrepNp
wgclass=ppwglevel=3wgnum=16wgrole=advwgrule=PrepNp
ἐν
roleclausedistance=1wordrole=adv
ἀρχῇ
roleclausedistance=1wordrole=adv
wg #17: pp p PrepNp
wgclass=ppwglevel=3wgnum=17wgrole=pwgrule=PrepNp
πρὸς
roleclausedistance=1wordrole=p
wg #18: np DetNP
wgclass=npwglevel=4wgnum=18wgrule=DetNP
τὸν
roleclausedistance=2wordrole=p
Θεόν.
roleclausedistance=2wordrole=p
"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#N1904.show(VerseResults, start=1, end=2, extraFeatures=SyntaxList.union(StructureList))\n",
"#N1904.show(VerseResults, start=1, end=6, extraFeatures=OrthoList)\n",
"N1904.show(VerseResults, start=1, end=2, extraFeatures=WGinfoList)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "95849528-609d-480b-b9cd-3201a27ed3dc",
"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
}