"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"File is not a zip file\n",
"\tcould not save corpus data to ~/text-fabric-data/github"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"rate limit is 5000 requests per hour, with 4978 left for this hour\n",
"\tconnecting to online GitHub repo tonyjurg/Nestle1904GBI ... connected\n",
"No directory /tf/1904 in #af5dd4a4b6ea90e435d1caee5b8a8648e48a62b9Will try something else\n",
"\tFailed\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"No directory /tf/1904 in #4b7b74b85283250f048b4fcbafbb00ce48da25e1\tFailed\n",
"There were problems with loading data.\n",
"The Text-Fabric API has not been loaded!\n",
"The app \"tonyjurg/Nestle1904GBI\" will not work!\n"
]
}
],
"source": [
"# load the app and data\n",
"NA = use (\"tonyjurg/Nestle1904GBI\", hoist=globals())"
]
},
{
"cell_type": "markdown",
"id": "63ab413a",
"metadata": {},
"source": [
"# Some basic usage example\n",
"##### [back to TOC](#TOC)\n",
"\n",
"### Example 1: show all object phrases in clauses\n",
"\n",
"The following example will query (and indicate) the phrases with function 'O' (=Object). This is done by selecting versed containing the value 'O' for feature 'phrasefunction' belonging to node type 'phrase'. See also the [feature description of 'phrasefunction'](https://tonyjurg.github.io/Nestle1904GBI/features/phrasefunction.html)."
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "adc48de9",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.05s 51 results\n"
]
},
{
"data": {
"text/html": [
"verse 1"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"verse
clause #2
clausetype=S-V-O
phrase #2
phrasefunction=S
phrase #3
phrasefunction=V
phrase #4
phrasefunction=O
clause #3
clausetype=S-V-O
phrase #5
phrasefunction=S
phrase #6
phrasefunction=V
phrase #7
phrasefunction=O
clause #4
clausetype=S-V-O-ADV
phrase #8
phrasefunction=S
phrase #9
phrasefunction=V
phrase #10
phrasefunction=O
"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"verse 2"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"verse
clause #5
clausetype=S-V-O
phrase #11
phrasefunction=S
phrase #12
phrasefunction=V
phrase #13
phrasefunction=O
phrase #14
phrasefunction=ADV
clause #6
clausetype=S-V-O
phrase #15
phrasefunction=S
phrase #16
phrasefunction=V
phrase #17
phrasefunction=O
clause #7
clausetype=S-V-O
phrase #18
phrasefunction=S
phrase #19
phrasefunction=V
phrase #20
phrasefunction=O
"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"Search0 = '''\n",
"book book=Matthew\n",
" chapter chapter=1\n",
" phrase phrasefunction=O\n",
"'''\n",
"Search0 = NA.search(Search0)\n",
"NA.show(Search0, start=1, end=2, condensed=True, extraFeatures={'sp', 'clausetype'}, suppress={'chapter'}, colorMap={4:'pink', 5:'turquoise', 6:'lightblue', 7:'red'}, multiFeatures=False)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "67c0b9e1",
"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.9.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}