Work in progress!
In this Jupyter NoteBook we will examine the use of lemma προσκυνέω in the Greek New Testament.
There is an ongoing debate whether προσκυνέω must mean "worship" in a divine sense, especialy when it refers to Jesus or God. The word can refer to homage or respect given to people in authority (see also entry in Liddel-Scott-Jones Greek-English Lexion). So verses that refer to Jesus receiving προσκυνέω may not always prove worship of him as God. The meaning depends on context.
The following examples gather data related to the use of προσκυνέω using various methods and present the results in different ways.
%load_ext autoreload
%autoreload 2
# 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
# load the N1904 app and data
N1904 = use ("tonyjurg/Nestle1904LFT", version="0.6", hoist=globals())
Locating corpus resources ...
The requested app is not available offline ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/app not found
The requested data is not available offline ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 not found
| 0.19s T otype from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 2.41s T oslots from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.58s T wordtranslit from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.48s T chapter from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.60s T normalized from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.49s T after from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.59s T word from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.47s T verse from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.60s T book from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.59s T wordunacc from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.62s T unicode from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | | 0.06s C __levels__ from otype, oslots, otext | | 1.84s C __order__ from otype, oslots, __levels__ | | 0.07s C __rank__ from otype, __order__ | | 3.33s C __levUp__ from otype, oslots, __rank__ | | 1.89s C __levDown__ from otype, __levUp__, __rank__ | | 0.22s C __characters__ from otext | | 0.94s C __boundary__ from otype, oslots, __rank__ | | 0.04s C __sections__ from otype, oslots, otext, __levUp__, __levels__, book, chapter, verse | | 0.24s C __structure__ from otype, oslots, otext, __rank__, __levUp__, book, chapter, verse | 0.44s T booknumber from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.51s T bookshort from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.49s T case from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.33s T clausetype from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.56s T containedclause from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.41s T degree from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.58s T gloss from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.47s T gn from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.04s T headverse from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.33s T junction from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.56s T lemma from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.51s T lex_dom from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.54s T ln from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.41s T markafter from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.41s T markbefore from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.41s T markorder from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.45s T monad from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.46s T mood from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.52s T morph from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.55s T nodeID from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.48s T nu from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.49s T number from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.43s T person from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.44s T punctuation from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.69s T ref from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.66s T reference from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.50s T roleclausedistance from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.48s T sentence from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.52s T sp from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.50s T sp_full from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.52s T strongs from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.44s T subj_ref from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.44s T tense from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.47s T type from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.46s T voice from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.40s T wgclass from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.34s T wglevel from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.37s T wgnum from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.35s T wgrole from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.35s T wgrolelong from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.39s T wgrule from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.34s T wgtype from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.50s T wordlevel from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.49s T wordrole from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 | 0.52s T wordrolelong from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6
Name | # of nodes | # slots / node | % coverage |
---|---|---|---|
book | 27 | 5102.93 | 100 |
chapter | 260 | 529.92 | 100 |
verse | 7943 | 17.35 | 100 |
sentence | 8011 | 17.20 | 100 |
wg | 105430 | 6.85 | 524 |
word | 137779 | 1.00 | 100 |
3
tonyjurg/Nestle1904LFT
C:/Users/tonyj/text-fabric-data/github/tonyjurg/Nestle1904LFT/app
''
orig_order
verse
book
chapter
none
unknown
NA
''
0
text-orig-full
https://github.com/tonyjurg/Nestle1904LFT/blob/main/docs/
about
https://github.com/tonyjurg/Nestle1904LFT
https://github.com/tonyjurg/Nestle1904LFT/blob/main/docs/features/<feature>.md
layout-orig-full
}True
C:/Users/tonyj/text-fabric-data/github/tonyjurg/Nestle1904LFT/_temp
Nestle 1904 (Low Fat Tree)
notyet
tonyjurg
/tf
Nestle1904LFT
Nestle1904LFT
0.6
https://learner.bible/text/show_text/nestle1904/
Show this on the Bible Online Learner website
en
https://learner.bible/text/show_text/nestle1904/<1>/<2>/<3>
{webBase}/word?version={version}&id=<lid>
True
True
{book}
''
True
True
{chapter}
''
0
#{sentence} (start: {book} {chapter}:{headverse})
''
True
chapter verse
{book} {chapter}:{verse}
''
0
#{wgnum}: {wgtype} {wgclass} {clausetype} {wgrole} {wgrule} {junction}
''
True
lemma
gloss
chapter verse
grc
# The following will push the Text-Fabric stylesheet to this notebook (to facilitate proper display with notebook viewer)
N1904.dh(N1904.getCss())
# Set default view in a way to limit noise as much as possible.
N1904.displaySetup(condensed=True, multiFeatures=False, queryFeatures=False)
This code will produce a list of occurrences of the lemma 'προσκυνέω' along with their accompanying gloss.
# Library to format table
from tabulate import tabulate
# Gather the results
Results=[]
for node in F.lemma.s('προσκυνέω'):
# Following line creates a nicely formated presentation of the verse
location="{} {}:{}".format(F.book.v(node),F.chapter.v(node),F.verse.v(node))
result=(location,F.word.v(node),F.gloss.v(node))
Results.append(result)
# Produce the table
headers = ["location","word","gloss"]
print(tabulate(Results, headers=headers, tablefmt='fancy_grid'))
╒═════════════════════╤═════════════════╤═════════════════════════╕ │ location │ word │ gloss │ ╞═════════════════════╪═════════════════╪═════════════════════════╡ │ Matthew 2:2 │ προσκυνῆσαι │ to worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Matthew 2:8 │ προσκυνήσω │ may worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Matthew 2:11 │ προσεκύνησαν │ they worshiped │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Matthew 4:9 │ προσκυνήσῃς │ You will worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Matthew 4:10 │ προσκυνήσεις │ you shall worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Matthew 8:2 │ προσεκύνει │ was worshipping │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Matthew 9:18 │ προσεκύνει │ was kneeling down │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Matthew 14:33 │ προσεκύνησαν │ worshiped │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Matthew 15:25 │ προσεκύνει │ she was worshiping │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Matthew 18:26 │ προσεκύνει │ was bowing on his knees │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Matthew 20:20 │ προσκυνοῦσα │ kneeling down │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Matthew 28:9 │ προσεκύνησαν │ worshiped │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Matthew 28:17 │ προσεκύνησαν │ they worshiped │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Mark 5:6 │ προσεκύνησεν │ fell on his knees │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Mark 15:19 │ προσεκύνουν │ they were kneeling down │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Luke 4:7 │ προσκυνήσῃς │ You will worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Luke 4:8 │ Προσκυνήσεις │ You shall worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Luke 24:52 │ προσκυνήσαντες │ having worshiped │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ John 4:20 │ προσεκύνησαν │ worshiped │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ John 4:20 │ προσκυνεῖν │ to worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ John 4:21 │ προσκυνήσετε │ will you worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ John 4:22 │ προσκυνεῖτε │ worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ John 4:22 │ προσκυνοῦμεν │ worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ John 4:23 │ προσκυνήσουσιν │ will worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ John 4:23 │ προσκυνοῦντας │ worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ John 4:24 │ προσκυνοῦντας │ worshiping │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ John 4:24 │ προσκυνεῖν │ to worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ John 9:38 │ προσεκύνησεν │ he worshiped │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ John 12:20 │ προσκυνήσωσιν │ they might worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Acts 7:43 │ προσκυνεῖν │ to worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Acts 8:27 │ προσκυνήσων │ to worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Acts 10:25 │ προσεκύνησεν │ worshiped [him] │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Acts 24:11 │ προσκυνήσων │ to worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ I_Corinthians 14:25 │ προσκυνήσει │ he will worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Hebrews 1:6 │ προσκυνησάτωσαν │ let worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Hebrews 11:21 │ προσεκύνησεν │ worshiped │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Revelation 3:9 │ προσκυνήσουσιν │ will worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Revelation 4:10 │ προσκυνήσουσιν │ they will worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Revelation 5:14 │ προσεκύνησαν │ worshiped │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Revelation 7:11 │ προσεκύνησαν │ worshiped │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Revelation 9:20 │ προσκυνήσουσιν │ │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Revelation 11:1 │ προσκυνοῦντας │ worshiping │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Revelation 11:16 │ προσεκύνησαν │ worshiped │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Revelation 13:4 │ προσεκύνησαν │ they worshiped │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Revelation 13:4 │ προσεκύνησαν │ they worshiped │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Revelation 13:8 │ προσκυνήσουσιν │ will worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Revelation 13:12 │ προσκυνήσουσιν │ they will worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Revelation 13:15 │ προσκυνήσωσιν │ would worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Revelation 14:7 │ προσκυνήσατε │ worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Revelation 14:9 │ προσκυνεῖ │ worships │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Revelation 14:11 │ προσκυνοῦντες │ worshiping │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Revelation 15:4 │ προσκυνήσουσιν │ will worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Revelation 16:2 │ προσκυνοῦντας │ worshiping │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Revelation 19:4 │ προσεκύνησαν │ they worshiped │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Revelation 19:10 │ προσκυνῆσαι │ to worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Revelation 19:10 │ προσκύνησον │ worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Revelation 19:20 │ προσκυνοῦντας │ worshiping │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Revelation 20:4 │ προσεκύνησαν │ │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Revelation 22:8 │ προσκυνῆσαι │ to worship │ ├─────────────────────┼─────────────────┼─────────────────────────┤ │ Revelation 22:9 │ προσκύνησον │ worship │ ╘═════════════════════╧═════════════════╧═════════════════════════╛
Note that the the following line of code in previous example:
for node in F.lemma.s('προσκυνέω'):
{rest of the code}
is functionaly equivalent to this three line of code:
for node in F.otype.s('word'):
lemma=F.lemma.v(node)
if lemma == 'προσκυνέω':
{rest of the code}
The same selection can also be made using a search template. Note that the number of results (56) differs from the previous code(59). The reasone is that here the selection is on clause and in the previous code on words. (John 4:23&24 and Revelation 13:4 and 19:10 have duplicate occurances of lemma προσκυνέω).
SearchWorship = '''
book
chapter
verse
wg
word lemma=προσκυνέω gloss
'''
# This will create a list containing ordered tuples consisting of node numbers of the items as they appear in the query
WorshipList = N1904.search(SearchWorship)
0.17s 242 results
The resulting data (stored in WorshipList) can be further processed. For example to print the first 5 occurences in a table:
N1904.table(WorshipList, condensed=True, end=5)
n | p | verse | wg (+1) | wg | wg | wg | word (+1) | wg | wg | wg (+1) |
---|---|---|---|---|---|---|---|---|---|---|
1 | Matthew 2:2 | λέγοντες Ποῦ ἐστιν ὁ τεχθεὶς βασιλεὺς τῶν Ἰουδαίων; εἴδομεν γὰρ αὐτοῦ τὸν ἀστέρα ἐν τῇ ἀνατολῇ καὶ ἤλθομεν προσκυνῆσαι αὐτῷ. | Ποῦ ἐστιν ὁ τεχθεὶς βασιλεὺς τῶν Ἰουδαίων; εἴδομεν γὰρ αὐτοῦ τὸν ἀστέρα ἐν τῇ ἀνατολῇ καὶ ἤλθομεν προσκυνῆσαι αὐτῷ. | εἴδομεν γὰρ αὐτοῦ τὸν ἀστέρα ἐν τῇ ἀνατολῇ καὶ ἤλθομεν προσκυνῆσαι αὐτῷ. | εἴδομεν αὐτοῦ τὸν ἀστέρα ἐν τῇ ἀνατολῇ καὶ ἤλθομεν προσκυνῆσαι αὐτῷ. | καὶ ἤλθομεν προσκυνῆσαι αὐτῷ. | ἤλθομεν προσκυνῆσαι αὐτῷ. | προσκυνῆσαι αὐτῷ. | προσκυνῆσαι | |
2 | Matthew 2:8 | προσκυνήσω | ἐπὰν δὲ εὕρητε, ἀπαγγείλατέ μοι, ὅπως κἀγὼ ἐλθὼν προσκυνήσω αὐτῷ. | ἐπὰν εὕρητε, ἀπαγγείλατέ μοι, ὅπως κἀγὼ ἐλθὼν προσκυνήσω αὐτῷ. | ὅπως κἀγὼ ἐλθὼν προσκυνήσω αὐτῷ. | κἀγὼ ἐλθὼν προσκυνήσω αὐτῷ. | καὶ πέμψας αὐτοὺς εἰς Βηθλέεμ εἶπεν· Πορευθέντες ἐξετάσατε ἀκριβῶς περὶ τοῦ παιδίου· ἐπὰν δὲ εὕρητε, ἀπαγγείλατέ μοι, ὅπως κἀγὼ ἐλθὼν προσκυνήσω αὐτῷ. | πέμψας αὐτοὺς εἰς Βηθλέεμ εἶπεν· Πορευθέντες ἐξετάσατε ἀκριβῶς περὶ τοῦ παιδίου· ἐπὰν δὲ εὕρητε, ἀπαγγείλατέ μοι, ὅπως κἀγὼ ἐλθὼν προσκυνήσω αὐτῷ. | Πορευθέντες ἐξετάσατε ἀκριβῶς περὶ τοῦ παιδίου· ἐπὰν δὲ εὕρητε, ἀπαγγείλατέ μοι, ὅπως κἀγὼ ἐλθὼν προσκυνήσω αὐτῷ. | |
3 | Matthew 2:11 | καὶ ἐλθόντες εἰς τὴν οἰκίαν εἶδον τὸ παιδίον μετὰ Μαρίας τῆς μητρὸς αὐτοῦ, καὶ πεσόντες προσεκύνησαν αὐτῷ, καὶ ἀνοίξαντες τοὺς θησαυροὺς αὐτῶν προσήνεγκαν αὐτῷ δῶρα, χρυσὸν καὶ λίβανον καὶ σμύρναν. | ἐλθόντες εἰς τὴν οἰκίαν εἶδον τὸ παιδίον μετὰ Μαρίας τῆς μητρὸς αὐτοῦ, καὶ πεσόντες προσεκύνησαν αὐτῷ, καὶ ἀνοίξαντες τοὺς θησαυροὺς αὐτῶν προσήνεγκαν αὐτῷ δῶρα, χρυσὸν καὶ λίβανον καὶ σμύρναν. | καὶ πεσόντες προσεκύνησαν αὐτῷ, | πεσόντες προσεκύνησαν αὐτῷ, | προσεκύνησαν | ||||
4 | Matthew 4:9 | πεσὼν προσκυνήσῃς μοι. | καὶ εἶπεν αὐτῷ Ταῦτά σοι πάντα δώσω, ἐὰν πεσὼν προσκυνήσῃς μοι. | εἶπεν αὐτῷ Ταῦτά σοι πάντα δώσω, ἐὰν πεσὼν προσκυνήσῃς μοι. | Ταῦτά σοι πάντα δώσω, ἐὰν πεσὼν προσκυνήσῃς μοι. | προσκυνήσῃς | ἐὰν πεσὼν προσκυνήσῃς μοι. | |||
5 | Matthew 4:10 | γέγραπται γάρ Κύριον τὸν θεόν σου προσκυνήσεις καὶ αὐτῷ μόνῳ λατρεύσεις. | γέγραπται Κύριον τὸν θεόν σου προσκυνήσεις καὶ αὐτῷ μόνῳ λατρεύσεις. | Κύριον τὸν θεόν σου προσκυνήσεις καὶ αὐτῷ μόνῳ λατρεύσεις. | Κύριον τὸν θεόν σου προσκυνήσεις | προσκυνήσεις |
this section needs rework!
A more interesting query is to print all occurences of the lemma προσκυνέω while adding the object of προσκυνέω.
This query is using a number of Locality functions from the Text-Fabric API. The following diagram shows the concept.
for node in F.lemma.s('προσκυνέω'):
gloss=F.gloss.v(node)
# Following line creates a nicely formated presentation of the verse
location="{} {}:{}".format(F.book.v(node),F.chapter.v(node),F.verse.v(node))
print('\n',location)
# This finds the parrent clause
ParrentClause= L.u(node,'wg')[0]
# Create a list of phrases included in the ParrentClause
PhraseList=L.d(ParrentClause,'wg')
for phrase in PhraseList:
# check for the phrase containing the object
object_text=object_gloss=''
if F.phrasefunction.v(wg)=='O':
WordList=L.d(phrase, 'word')
for word in WordList:
object_text=object_text+F.word.v(word)+' '
object_gloss=object_gloss+F.gloss_EN.v(word)+' '
break
# print the result
print('\tGreek:',F.word.v(node),' - ',object_text,'\n\tGloss:',F.gloss_EN.v(node),' - ',object_gloss)
Matthew 2:2
--------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[9], line 22 19 break 21 # print the result ---> 22 print('\tGreek:',F.word.v(node),' - ',object_text,'\n\tGloss:',F.gloss_EN.v(node),' - ',object_gloss) NameError: name 'object_text' is not defined
The next code generates a pie diagram showing the distribution of renderings of the word προσκυνέω. The grouping is basicly along 'kneeling' and 'worshipping'. When the rendering does not match one of these, it is counted as 'other'. In terms of coding, in this example, we first import the matplotlib.pyplot
module. Then, we define the data for our pie chart: labels
and results
. Additionally, a legend will be included.
import matplotlib.pyplot as plt
worship=knee=other=0
# This section can also be implemented using a different method (see below)
for node in F.otype.s('word'):
lemma=F.lemma.v(node)
if lemma == 'προσκυνέω':
gloss=F.gloss.v(node)
if 'worship' in gloss:
worship+=1
else:
if 'knee' in gloss:
knee+=1
else:
other+=1
# Dataset for the plot
labels = ['Worship', 'Kneeling', 'Other']
results = [worship, knee, other]
# create the pie chart with percentage and number of occurances
explode = [0.1,0.1,0.1] # To slice the perticuler section
plt.pie(results,
labels=labels,
explode = explode,
autopct=lambda pct: f'{pct:.1f}%\n({int(pct / 100 * sum(results)+0.5)})',
# The addition of 0.5 in the lambda function is to prevent rounding errors by the int() function.
textprops={'color': 'black'})
# add a title to the pie chart
plt.title('Renderings of προσκυνέω')
# Add a legend to the pie chart
plt.legend(title="English renderings",
loc="center left",
bbox_to_anchor=(1.5, 0, 1, 1))
# Show plot
plt.show()
Alternatively the first part of this section could be implemented by means of a search function:
# Define the query template
ProskuneoQuery = '''
word lemma=προσκυνέω
'''
# This will create a list containing ordered tuples consisting of node numbers of the items as they appear in the query
ProskuneoResult = N1904.search(ProskuneoQuery)
worship=knee=other=0
for NodeTuple in ProskuneoResult:
# The query result will be a list of node tuple. Hence we need to add index [0].
gloss=F.gloss.v(NodeTuple[0])
if 'worship' in gloss:
worship+=1
else:
if 'knee' in gloss:
knee+=1
else:
other+=1
# Print to compare the results
print ('worship=',worship,' knee=',knee,' other=',other)
0.08s 60 results worship= 53 knee= 5 other= 2
The scripts in this notebook require (beside text-fabric
) the following Python libraries to be installed in the environment:
???
You can install any missing library from within Jupyter Notebook using eitherpip
or pip3
.