This Jupyter Notebook investigates the pressense of 'odd' values for feature 'after'.
%load_ext autoreload
%autoreload 2
# Loading the New Testament TextFabric code
# Note: it is assumed Text-Fabric is installed in your environment.
from tf.fabric import Fabric
from tf.app import use
# load the app and data
N1904 = use ("tonyjurg/Nestle1904GBI", version="0.4", hoist=globals())
Locating corpus resources ...
The requested app is not available offline ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/app not found
The requested data is not available offline ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 not found
| 0.22s T otype from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 1.91s T oslots from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.56s T after from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.57s T chapter from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.67s T book from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.66s T word from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.58s T verse from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | | 0.05s C __levels__ from otype, oslots, otext | | 1.53s C __order__ from otype, oslots, __levels__ | | 0.07s C __rank__ from otype, __order__ | | 2.45s C __levUp__ from otype, oslots, __rank__ | | 1.50s C __levDown__ from otype, __levUp__, __rank__ | | 0.06s C __characters__ from otext | | 0.99s 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.56s T booknum from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.65s T bookshort from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.53s T case from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.54s T clause from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.07s T clauserule from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.02s T clausetype from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.47s T degree from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.57s T formaltag from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.58s T functionaltag from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.63s T gloss from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.53s T gn from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.63s T lemma from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.58s T lex_dom from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.60s T ln from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.50s T monad from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.51s T mood from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.71s T nodeID from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.66s T normalized from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.56s T nu from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.55s T number from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.50s T person from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.79s T phrase from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.30s T phrasefunction from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.31s T phrasefunctionlong from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.30s T phrasetype from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.51s T sentence from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.57s T sp from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.57s T splong from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.59s T strongs from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.50s T subj_ref from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.50s T tense from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.51s T type from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4 | 0.50s T voice from ~/text-fabric-data/github/tonyjurg/Nestle1904GBI/tf/0.4
Name | # of nodes | # slots/node | % coverage |
---|---|---|---|
book | 27 | 5102.93 | 100 |
chapter | 260 | 529.92 | 100 |
sentence | 5720 | 24.09 | 100 |
verse | 7943 | 17.35 | 100 |
clause | 16124 | 8.54 | 100 |
phrase | 72674 | 1.90 | 100 |
word | 137779 | 1.00 | 100 |
First get a list of all unique words in unicode (including punctuations, critical signs and trailing spaces):
unicodeList = F.word.freqList()
print ('Number of results:',len(unicodeList))
Number of results: 19506
Now just look at the first character:
# Initialize an empty dictionary to store the frequencies
frequencyList = {}
criticalSignsList ={}
criticalSigns={"—","[","("}
# Iterate through the list (which is a list of ordered tuples)
for item in unicodeList:
# Get the first character of the item
firstChar = item[0][0]
# Update the frequency in the dictionary for the full list
frequencyList[firstChar] = frequencyList.get(firstChar, 0) + 1
# add to other list if critical sign
if firstChar in criticalSigns:
criticalSignsList[firstChar]=criticalSignsList.get(firstChar, 0) + 1
print("Frequency list of all first character:")
print(frequencyList)
print("\nFrequency list of critical character:")
print(criticalSignsList)
Frequency list of all first character: {'κ': 1477, 'ὁ': 100, 'ἐ': 2305, 'δ': 1009, 'τ': 533, 'ε': 485, 'α': 197, 'ὅ': 47, 'ο': 187, 'ἡ': 96, 'γ': 389, 'μ': 707, 'Θ': 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 'Ἓ': 2, 'Ἤ': 9, 'Ἥ': 4, 'ἶ': 1, 'Ὄ': 5, '—': 15, 'Ξ': 1, 'Ψ': 2, 'ὂ': 1, 'Ὗ': 1, 'Ὤ': 1, 'ᾑ': 1} Frequency list of critical character: {'(': 7, '[': 6, '—': 15}
# Library to format table
from tabulate import tabulate
# The actual query
SearchLeadingCriticalMarks = '''
word word~[(\(\[—\)\])]
'''
MarksList = N1904.search(SearchLeadingCriticalMarks)
# Postprocess the query results
Results=[]
for tuple in MarksList:
node=tuple[0]
location="{} {}:{}".format(F.book.v(node),F.chapter.v(node),F.verse.v(node))
result=(location,F.word.v(node),F.after.v(node))
Results.append(result)
# Produce the table
headers = ["location","unicode","word","after"]
print(tabulate(Results, headers=headers, tablefmt='fancy_grid'))
0.11s 55 results ╒═════════════════════╤══════════════════╤════════╕ │ location │ unicode │ word │ ╞═════════════════════╪══════════════════╪════════╡ │ Mark 1:1 │ (Υἱοῦ │ │ ├─────────────────────┼──────────────────┼────────┤ │ Mark 1:1 │ Θεοῦ) │ . │ ├─────────────────────┼──────────────────┼────────┤ │ Mark 16:9 │ [[Ἀναστὰς │ │ ├─────────────────────┼──────────────────┼────────┤ │ Mark 16:20 │ σημείων.]] │ │ ├─────────────────────┼──────────────────┼────────┤ │ Mark 16:99 │ [[Πάντα │ │ ├─────────────────────┼──────────────────┼────────┤ │ Mark 16:99 │ σωτηρίας.]] │ │ ├─────────────────────┼──────────────────┼────────┤ │ Luke 2:35 │ —καὶ │ │ ├─────────────────────┼──────────────────┼────────┤ │ Luke 2:35 │ ῥομφαία— │ , │ ├─────────────────────┼──────────────────┼────────┤ │ Luke 23:51 │ —οὗτος │ │ ├─────────────────────┼──────────────────┼────────┤ │ Luke 24:12 │ [[Ὁ │ │ ├─────────────────────┼──────────────────┼────────┤ │ Luke 24:12 │ γεγονός.]] │ │ ├─────────────────────┼──────────────────┼────────┤ │ Luke 24:36 │ [[καὶ │ │ ├─────────────────────┼──────────────────┼────────┤ │ Luke 24:36 │ ὑμῖν]] │ . │ ├─────────────────────┼──────────────────┼────────┤ │ Luke 24:40 │ [[καὶ │ │ ├─────────────────────┼──────────────────┼────────┤ │ Luke 24:40 │ πόδας.]] │ │ ├─────────────────────┼──────────────────┼────────┤ │ Luke 24:51 │ [[καὶ │ │ ├─────────────────────┼──────────────────┼────────┤ │ Luke 24:51 │ οὐρανόν]] │ . │ ├─────────────────────┼──────────────────┼────────┤ │ Luke 24:52 │ [[προσκυνήσαντες │ │ ├─────────────────────┼──────────────────┼────────┤ │ Luke 24:52 │ αὐτὸν]] │ │ ├─────────────────────┼──────────────────┼────────┤ │ John 1:38 │ (ὃ │ │ ├─────────────────────┼──────────────────┼────────┤ │ John 1:38 │ Διδάσκαλε,) │ │ ├─────────────────────┼──────────────────┼────────┤ │ John 1:41 │ (ὅ │ │ ├─────────────────────┼──────────────────┼────────┤ │ John 1:41 │ Χριστός) │ . │ ├─────────────────────┼──────────────────┼────────┤ │ John 1:42 │ (ὃ │ │ ├─────────────────────┼──────────────────┼────────┤ │ John 1:42 │ Πέτρος) │ . │ ├─────────────────────┼──────────────────┼────────┤ │ John 4:2 │ —καίτοιγε │ │ ├─────────────────────┼──────────────────┼────────┤ │ John 5:3 │ ξηρῶν( │ , │ ├─────────────────────┼──────────────────┼────────┤ │ John 5:4 │ νοσήματι) │ . │ ├─────────────────────┼──────────────────┼────────┤ │ John 7:22 │ —οὐχ │ │ ├─────────────────────┼──────────────────┼────────┤ │ John 7:53 │ (Καὶ │ │ ├─────────────────────┼──────────────────┼────────┤ │ John 8:11 │ ἁμάρτανε.) │ │ ├─────────────────────┼──────────────────┼────────┤ │ John 9:7 │ (ὃ │ │ ├─────────────────────┼──────────────────┼────────┤ │ John 9:7 │ Ἀπεσταλμένος) │ . │ ├─────────────────────┼──────────────────┼────────┤ │ John 20:16 │ (ὃ │ │ ├─────────────────────┼──────────────────┼────────┤ │ John 20:16 │ Διδάσκαλε) │ . │ ├─────────────────────┼──────────────────┼────────┤ │ Acts 22:2 │ —ἀκούσαντες │ │ ├─────────────────────┼──────────────────┼────────┤ │ Romans 4:16 │ (ὅς │ │ ├─────────────────────┼──────────────────┼────────┤ │ Romans 4:17 │ σε,) │ │ ├─────────────────────┼──────────────────┼────────┤ │ Romans 15:25 │ —νυνὶ │ │ ├─────────────────────┼──────────────────┼────────┤ │ I_Corinthians 9:15 │ —τὸ │ │ ├─────────────────────┼──────────────────┼────────┤ │ II_Corinthians 6:2 │ —λέγει │ │ ├─────────────────────┼──────────────────┼────────┤ │ II_Corinthians 12:2 │ —εἴτε │ │ ├─────────────────────┼──────────────────┼────────┤ │ II_Corinthians 12:2 │ —ἁρπαγέντα │ │ ├─────────────────────┼──────────────────┼────────┤ │ II_Corinthians 12:3 │ —εἴτε │ │ ├─────────────────────┼──────────────────┼────────┤ │ Galatians 2:6 │ —ὁποῖοί │ │ ├─────────────────────┼──────────────────┼────────┤ │ Ephesians 1:1 │ [ἐν │ │ ├─────────────────────┼──────────────────┼────────┤ │ Ephesians 1:1 │ Ἐφέσῳ] │ │ ├─────────────────────┼──────────────────┼────────┤ │ Ephesians 5:9 │ —ὁ │ │ ├─────────────────────┼──────────────────┼────────┤ │ Ephesians 5:10 │ —δοκιμάζοντες │ │ ├─────────────────────┼──────────────────┼────────┤ │ Colossians 4:10 │ (περὶ │ │ ├─────────────────────┼──────────────────┼────────┤ │ Colossians 4:10 │ αὐτόν,) │ │ ├─────────────────────┼──────────────────┼────────┤ │ I_Timothy 3:5 │ (εἰ │ │ ├─────────────────────┼──────────────────┼────────┤ │ I_Timothy 3:5 │ ἐπιμελήσεται;) │ │ ├─────────────────────┼──────────────────┼────────┤ │ Hebrews 7:20 │ —οἱ │ │ ├─────────────────────┼──────────────────┼────────┤ │ Hebrews 7:22 │ —κατὰ │ │ ╘═════════════════════╧══════════════════╧════════╛
Note: The following site can be used to build and verify a regular expression: regex101.com (choose the 'Pyton flavor')