The source data for the conversion are the XML node files representing the macula-greek version of the Nestle 1904 Greek New Testment. The most recent source data can be found on github https://github.com/Clear-Bible/macula-greek/tree/main/Nestle1904/nodes. Attribution: "MACULA Greek Linguistic Datasets, available at https://github.com/Clear-Bible/macula-greek/".
The production of the Text-Fabric files consist of two steps. First the creation of piclke files (part 1). Secondly the actual TextFabric creation process (part 2). Both steps are independent allowing to start from Part 2 by using the pickle files as input.
Be advised that this Text-Fabric version is a test version (proof of concept) and requires further finetuning, especialy with regards of nomenclature and presentation of (sub)phrases and clauses.
This script harvests all information from the GBI tree data (XML nodes), puts it into a Panda DataFrame and stores the result per book in a pickle file. Note: pickling (in Python) is serialising an object into a disk file (or buffer).
In the context of this script, 'Leaf' refers to those node containing the Greek word as data, which happen to be the nodes without any child (hence the analogy with the leaves on the tree). These 'leafs' can also be refered to as 'terminal nodes'. Futher, Parent1 is the leaf's parent, Parent2 is Parent1's parent, etc.
For a full description of the source data see document MACULA Greek Treebank for the Nestle 1904 Greek New Testament.pdf
import pandas as pd
import sys
import os
import time
import pickle
import re #regular expressions
from os import listdir
from os.path import isfile, join
import xml.etree.ElementTree as ET
Change BaseDir, InputDir and OutputDir to match location of the datalocation and the OS used.
BaseDir = 'C:\\Users\\tonyj\\my_new_Jupyter_folder\\test_of_xml_etree\\'
InputDir = BaseDir+'inputfiles\\'
OutputDir = BaseDir+'outputfiles\\'
# key: filename, [0]=book_long, [1]=book_num, [3]=book_short
bo2book = {'01-matthew': ['Matthew', '1', 'Matt'],
'02-mark': ['Mark', '2', 'Mark'],
'03-luke': ['Luke', '3', 'Luke'],
'04-john': ['John', '4', 'John'],
'05-acts': ['Acts', '5', 'Acts'],
'06-romans': ['Romans', '6', 'Rom'],
'07-1corinthians': ['I_Corinthians', '7', '1Cor'],
'08-2corinthians': ['II_Corinthians', '8', '2Cor'],
'09-galatians': ['Galatians', '9', 'Gal'],
'10-ephesians': ['Ephesians', '10', 'Eph'],
'11-philippians': ['Philippians', '11', 'Phil'],
'12-colossians': ['Colossians', '12', 'Col'],
'13-1thessalonians':['I_Thessalonians', '13', '1Thess'],
'14-2thessalonians':['II_Thessalonians','14', '2Thess'],
'15-1timothy': ['I_Timothy', '15', '1Tim'],
'16-2timothy': ['II_Timothy', '16', '2Tim'],
'17-titus': ['Titus', '17', 'Titus'],
'18-philemon': ['Philemon', '18', 'Phlm'],
'19-hebrews': ['Hebrews', '19', 'Heb'],
'20-james': ['James', '20', 'Jas'],
'21-1peter': ['I_Peter', '21', '1Pet'],
'22-2peter': ['II_Peter', '22', '2Pet'],
'23-1john': ['I_John', '23', '1John'],
'24-2john': ['II_John', '24', '2John'],
'25-3john': ['III_John', '25', '3John'],
'26-jude': ['Jude', '26', 'Jude'],
'27-revelation': ['Revelation', '27', 'Rev']}
In order to traverse from the 'leafs' (terminating nodes) upto the root of the tree, it is required to add information to each node pointing to the parent of each node.
(concept taken from https://stackoverflow.com/questions/2170610/access-elementtree-node-parent-node)
def addParentInfo(et):
for child in et:
child.attrib['parent'] = et
addParentInfo(child)
def getParent(et):
if 'parent' in et.attrib:
return et.attrib['parent']
else:
return None
# set some globals
monad=1
CollectedItems= 0
# process books in order
for bo, bookinfo in bo2book.items():
CollectedItems=0
full_df=pd.DataFrame({})
book_long=bookinfo[0]
booknum=bookinfo[1]
book_short=bookinfo[2]
InputFile = os.path.join(InputDir, f'{bo}.xml')
OutputFile = os.path.join(OutputDir, f'{bo}.pkl')
print(f'Processing {book_long} at {InputFile}')
# send xml document to parsing process
tree = ET.parse(InputFile)
# Now add all the parent info to the nodes in the xtree [important!]
addParentInfo(tree.getroot())
start_time = time.time()
# walk over all the leaves and harvest the data
for elem in tree.iter():
if not list(elem):
# if no child elements, this is a leaf/terminal node
# show progress on screen
CollectedItems+=1
if (CollectedItems%100==0): print (".",end='')
#Leafref will contain list with book, chapter verse and wordnumber
Leafref = re.sub(r'[!: ]'," ", elem.attrib.get('ref')).split()
#push value for monad to element tree
elem.set('monad', monad)
monad+=1
# add some important computed data to the leaf
elem.set('LeafName', elem.tag)
elem.set('word', elem.text)
elem.set('book_long', book_long)
elem.set('booknum', int(booknum))
elem.set('book_short', book_short)
elem.set('chapter', int(Leafref[1]))
elem.set('verse', int(Leafref[2]))
# folling code will trace down parents upto the tree and store found attributes
parentnode=getParent(elem)
index=0
while (parentnode):
index+=1
elem.set('Parent{}Name'.format(index), parentnode.tag)
elem.set('Parent{}Type'.format(index), parentnode.attrib.get('Type'))
elem.set('Parent{}Cat'.format(index), parentnode.attrib.get('Cat'))
elem.set('Parent{}Start'.format(index), parentnode.attrib.get('Start'))
elem.set('Parent{}End'.format(index), parentnode.attrib.get('End'))
elem.set('Parent{}Rule'.format(index), parentnode.attrib.get('Rule'))
elem.set('Parent{}Head'.format(index), parentnode.attrib.get('Head'))
elem.set('Parent{}NodeId'.format(index),parentnode.attrib.get('nodeId'))
elem.set('Parent{}ClType'.format(index),parentnode.attrib.get('ClType'))
elem.set('Parent{}HasDet'.format(index),parentnode.attrib.get('HasDet'))
currentnode=parentnode
parentnode=getParent(currentnode)
elem.set('parents', int(index))
#this will push all elements found in the tree into a DataFrame
df=pd.DataFrame(elem.attrib, index={monad})
full_df=pd.concat([full_df,df])
#store the resulting DataFrame per book into a pickle file for further processing
df = df.convert_dtypes(convert_string=True)
output = open(r"{}".format(OutputFile), 'wb')
pickle.dump(full_df, output)
output.close()
print("\nFound ",CollectedItems, " items in %s seconds\n" % (time.time() - start_time))
Processing Matthew at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\01-matthew.xml ...................................................................................................................................................................................... Found 18299 items in 389.74775409698486 seconds Processing Mark at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\02-mark.xml ................................................................................................................ Found 11277 items in 167.02765321731567 seconds Processing Luke at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\03-luke.xml .................................................................................................................................................................................................. Found 19456 items in 1250.1772944927216 seconds Processing John at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\04-john.xml ............................................................................................................................................................ Found 15643 items in 280.0616319179535 seconds Processing Acts at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\05-acts.xml ....................................................................................................................................................................................... Found 18393 items in 468.59965777397156 seconds Processing Romans at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\06-romans.xml ....................................................................... Found 7100 items in 84.67976307868958 seconds Processing I_Corinthians at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\07-1corinthians.xml .................................................................... Found 6820 items in 74.35686826705933 seconds Processing II_Corinthians at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\08-2corinthians.xml ............................................ Found 4469 items in 44.4307804107666 seconds Processing Galatians at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\09-galatians.xml ...................... Found 2228 items in 15.330809116363525 seconds Processing Ephesians at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\10-ephesians.xml ........................ Found 2419 items in 17.31328582763672 seconds Processing Philippians at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\11-philippians.xml ................ Found 1630 items in 8.315221309661865 seconds Processing Colossians at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\12-colossians.xml ............... Found 1575 items in 12.938243389129639 seconds Processing I_Thessalonians at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\13-1thessalonians.xml .............. Found 1473 items in 9.84698224067688 seconds Processing II_Thessalonians at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\14-2thessalonians.xml ........ Found 822 items in 5.0917510986328125 seconds Processing I_Timothy at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\15-1timothy.xml ............... Found 1588 items in 13.463085651397705 seconds Processing II_Timothy at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\16-2timothy.xml ............ Found 1237 items in 7.479506731033325 seconds Processing Titus at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\17-titus.xml ...... Found 658 items in 3.523249626159668 seconds Processing Philemon at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\18-philemon.xml ... Found 335 items in 1.5144259929656982 seconds Processing Hebrews at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\19-hebrews.xml ................................................. Found 4955 items in 50.09538650512695 seconds Processing James at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\20-james.xml ................. Found 1739 items in 8.783202171325684 seconds Processing I_Peter at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\21-1peter.xml ................ Found 1676 items in 11.179571390151978 seconds Processing II_Peter at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\22-2peter.xml .......... Found 1098 items in 6.439285516738892 seconds Processing I_John at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\23-1john.xml ..................... Found 2136 items in 9.333310842514038 seconds Processing II_John at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\24-2john.xml .. Found 245 items in 1.206688404083252 seconds Processing III_John at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\25-3john.xml .. Found 219 items in 0.8371779918670654 seconds Processing Jude at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\26-jude.xml .... Found 457 items in 1.7181646823883057 seconds Processing Revelation at C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\inputfiles\27-revelation.xml .................................................................................................. Found 9832 items in 137.9426236152649 seconds
This script creates the TextFabric files by recursive calling the TF walker function. API info: https://annotation.github.io/text-fabric/tf/convert/walker.html
The pickle files created by step 1 are stored on Github location https://github.com/tonyjurg/NA1904/tree/main/resources/picklefiles
Change BaseDir, InputDir and OutputDir to match location of the datalocation and the OS used.
import pandas as pd
import os
import re
import gc
from tf.fabric import Fabric
from tf.convert.walker import CV
from tf.parameters import VERSION
from datetime import date
import pickle
BaseDir = 'C:\\Users\\tonyj\\my_new_Jupyter_folder\\test_of_xml_etree\\'
source_dir = BaseDir+'outputfiles\\' #the input for the walker is the output of the xml to excel
output_dir = BaseDir+'outputfilesTF\\' #the TextFabric files
output_dir = 'C:\\text-fabric-data\\github\\tjurg\\NA1904\\tf\\1904'
# key: filename, [0]=book_long, [1]=book_num, [3]=book_short
bo2book = {'01-matthew': ['Matthew', '1', 'Matt'],
'02-mark': ['Mark', '2', 'Mark'],
'03-luke': ['Luke', '3', 'Luke'],
'04-john': ['John', '4', 'John'],
'05-acts': ['Acts', '5', 'Acts'],
'06-romans': ['Romans', '6', 'Rom'],
'07-1corinthians': ['I_Corinthians', '7', '1Cor'],
'08-2corinthians': ['II_Corinthians', '8', '2Cor'],
'09-galatians': ['Galatians', '9', 'Gal'],
'10-ephesians': ['Ephesians', '10', 'Eph'],
'11-philippians': ['Philippians', '11', 'Phil'],
'12-colossians': ['Colossians', '12', 'Col'],
'13-1thessalonians':['I_Thessalonians', '13', '1Thess'],
'14-2thessalonians':['II_Thessalonians','14', '2Thess'],
'15-1timothy': ['I_Timothy', '15', '1Tim'],
'16-2timothy': ['II_Timothy', '16', '2Tim'],
'17-titus': ['Titus', '17', 'Titus'],
'18-philemon': ['Philemon', '18', 'Phlm'],
'19-hebrews': ['Hebrews', '19', 'Heb'],
'20-james': ['James', '20', 'Jas'],
'21-1peter': ['I_Peter', '21', '1Pet'],
'22-2peter': ['II_Peter', '22', '2Pet'],
'23-1john': ['I_John', '23', '1John'],
'24-2john': ['II_John', '24', '2John'],
'25-3john': ['III_John', '25', '3John'],
'26-jude': ['Jude', '26', 'Jude'],
'27-revelation': ['Revelation', '27', 'Rev']}
API info: https://annotation.github.io/text-fabric/tf/convert/walker.html
The logic of interpreting the data is included in the director function.
TF = Fabric(locations=output_dir, silent=False)
cv = CV(TF)
version = "0.1 (Initial)"
def sanitize(input):
if isinstance(input, float): return ''
else: return (input)
def director(cv):
NoneType = type(None) # needed as tool to validate certain data
prev_book = "Matthew" # start at first book
IndexDict = {} # init an empty dictionary
for bo,bookinfo in bo2book.items():
'''
load all data into a dataframe
process books in order (bookinfo is a list!)
'''
book=bookinfo[0]
booknum=int(bookinfo[1])
book_short=bookinfo[2]
book_loc = os.path.join(source_dir, f'{bo}.pkl')
print(f'\tloading {book_loc}...')
pkl_file = open(book_loc, 'rb')
df = pickle.load(pkl_file)
pkl_file.close()
FoundWords=0
phrasefunction='TBD'
phrasefunction_long='TBD'
this_clausetype="unknown" #just signal a not found case
this_clauserule="unknown"
phrasetype="unknown" #just signal a not found case
prev_chapter = int(1) # start at 1
prev_verse = int(1) # start at 1
prev_sentence = int(1) # start at 1
prev_clause = int(1) # start at 1
prev_phrase = int(1) # start at 1
# reset/load the following initial variables (we are at the start of a new book)
sentence_track = 1
sentence_done = False
clause_track = 1
clause_done = False
phrase_track = 1
phrase_done = False
verse_done=False
chapter_done = False
book_done=False
wrdnum = 0 # start at 0
# fill dictionary of column names for this book
ItemsInRow=1
for itemname in df.columns.to_list():
IndexDict.update({'i_{}'.format(itemname): ItemsInRow})
ItemsInRow+=1
'''
Walks through the texts and triggers
slot and node creation events.
'''
# iterate through words and construct objects
for row in df.itertuples():
wrdnum += 1
FoundWords +=1
'''
First get all the relevant information from the dataframe
'''
# get number of parent nodes
parents = row[IndexDict.get("i_parents")]
# get chapter and verse from the data
chapter = row[IndexDict.get("i_chapter")]
verse = row[IndexDict.get("i_verse")]
# get clause type info
for i in range(1,parents-1):
item = IndexDict.get("i_Parent{}Cat".format(i))
if row[item]=="CL":
clauseparent=i
prev_clausetype=this_clausetype
_rule="i_Parent{}Rule".format(i)
this_clausetype=row[IndexDict.get(_rule)]
# get phrase type info
prev_phrasetype=phrasetype
for i in range(1,parents-1):
item = IndexDict.get("i_Parent{}Cat".format(i))
if row[item]=="np":
_item ="i_Parent{}Rule".format(i)
phrasetype=row[IndexDict.get(_item)]
break
functionaltag=row[IndexDict.get('i_FunctionalTag')]
'''
determine if conditions are met to trigger some action
action will be executed after next word
'''
# detect book boundary
if prev_book != book:
prev_book=book
book_done = True
chapter_done = True
verse_done=True
sentence_done = True
clause_done = True
phrase_done = True
# detect chapter boundary
if prev_chapter != chapter:
chapter_done = True
verse_done=True
sentence_done = True
clause_done = True
phrase_done = True
# detect verse boundary
if prev_verse != verse:
verse_done=True
# determine syntactic categories of clause parts. See also the description in
# "MACULA Greek Treebank for the Nestle 1904 Greek New Testament.pdf" page 5&6
# (section 2.4 Syntactic Categories at Clause Level)
prev_phrasefunction=phrasefunction
prev_phrasefunction_long=phrasefunction_long
phrase_done = False
for i in range(1,clauseparent):
phrasefunction = row[IndexDict.get("i_Parent{}Cat".format(i))]
if phrasefunction=="ADV":
phrasefunction_long='Adverbial function'
if prev_phrasefunction!=phrasefunction: phrase_done = True
break
elif phrasefunction=="IO":
phrasefunction_long='Indirect Object function'
if prev_phrasefunction!=phrasefunction: phrase_done = True
break
elif phrasefunction=="O":
phrasefunction_long='Object function'
if prev_phrasefunction!=phrasefunction: phrase_done = True
break
elif phrasefunction=="O2":
phrasefunction_long='Second Object function'
if prev_phrasefunction!=phrasefunction: phrase_done = True
break
elif phrasefunction=="S":
phrasefunction_long='Subject function'
if prev_phrasefunction!=phrasefunction: phrase_done = True
break
elif phrasefunction=='P':
phrasefunction_long='Predicate function'
if prev_phrasefunction!=phrasefunction: phrase_done = True
break
elif phrasefunction=="V":
phrasefunction_long='Verbal function'
if prev_phrasefunction!=phrasefunction: phrase_done = True
break
elif phrasefunction=="VC":
phrasefunction_long='Verbal Copula function'
if prev_phrasefunction!=phrasefunction: phrase_done = True
break
# determine syntactic categories at word level. See also the description in
# "MACULA Greek Treebank for the Nestle 1904 Greek New Testament.pdf" page 6&7
# (2.2. Syntactic Categories at Word Level: Part of Speech Labels)
sp=sanitize(row[IndexDict.get("i_Cat")])
if sp=='adj':
sp_full='adjective'
elif sp=='adj':
sp_full='adjective'
elif sp=='conj':
sp_full='conjunction'
elif sp=='det':
sp_full='determiner'
elif sp=='intj':
sp_full='interjection'
elif sp=='noun':
sp_full='noun'
elif sp=='num':
sp_full='numeral'
elif sp=='prep':
sp_full='preposition'
elif sp=='ptcl':
sp_full='particle'
elif sp=='pron':
sp_full='pronoun'
elif sp=='verb':
sp_full='verb'
# Manage first word per book
if wrdnum==1:
prev_phrasetype=phrasetype
prev_phrasefunction=phrasefunction
prev_phrasefunction_long=phrasefunction_long
book_done = False
chapter_done = False
verse_done = False
phrase_done = False
clause_done = False
sentence_done = False
# create the first set of nodes
this_book = cv.node('book')
cv.feature(this_book, book=prev_book)
this_chapter = cv.node('chapter')
this_verse = cv.node('verse')
this_sentence = cv.node('sentence')
this_clause = cv.node('clause')
this_phrase = cv.node('phrase')
sentence_track += 1
clause_track += 1
phrase_track += 1
'''
-- handle TF events --
Determine what actions need to be done if proper condition is met.
'''
# act upon end of phrase (close)
if phrase_done or clause_done:
cv.feature(this_phrase, phrase=prev_phrase, phrasetype=prev_phrasetype, phrasefunction=prev_phrasefunction, phrasefunction_long=prev_phrasefunction_long)
cv.terminate(this_phrase)
# act upon end of clause (close)
if clause_done:
cv.feature(this_clause, clause=prev_clause, clausetype=prev_clausetype)
cv.terminate(this_clause)
# act upon end of sentence (close)
if sentence_done:
cv.feature(this_sentence, sentence=prev_sentence)
cv.terminate(this_sentence)
# act upon end of verse (close)
if verse_done:
cv.feature(this_verse, verse=prev_verse)
cv.terminate(this_verse)
prev_verse = verse
# act upon end of chapter (close)
if chapter_done:
cv.feature(this_chapter, chapter=prev_chapter)
cv.terminate(this_chapter)
prev_chapter = chapter
# act upon end of book (close and open new)
if book_done:
cv.terminate(this_book)
this_book = cv.node('book')
cv.feature(this_book, book=book)
prev_book = book
wrdnum = 1
phrase_track = 1
clause_track = 1
sentence_track = 1
book_done = False
# start of chapter (create new)
if chapter_done:
this_chapter = cv.node('chapter')
chapter_done = False
# start of verse (create new)
if verse_done:
this_verse = cv.node('verse')
verse_done = False
# start of sentence (create new)
if sentence_done:
this_sentence= cv.node('sentence')
prev_sentence = sentence_track
sentence_track += 1
sentence_done = False
# start of clause (create new)
if clause_done:
this_clause = cv.node('clause')
prev_clause = clause_track
clause_track += 1
clause_done = False
phrase_done = True
# start of phrase (create new)
if phrase_done:
this_phrase = cv.node('phrase')
prev_phrase = phrase_track
prev_phrasefunction=phrasefunction
prev_phrasefunction_long=phrasefunction_long
phrase_track += 1
phrase_done = False
# Detect boundaries of sentences, clauses and phrases
text=row[IndexDict.get("i_Unicode")]
if text[-1:] == "." :
sentence_done = True
clause_done = True
phrase_done = True
if text[-1:] == ";" or text[-1:] == ",":
clause_done = True
phrase_done = True
'''
-- create word nodes --
'''
# some attributes are not present inside some (small) books. The following is to prevent exceptions.
degree=''
if 'i_Degree' in IndexDict:
degree=sanitize(row[IndexDict.get("i_Degree")])
subjref=''
if 'i_SubjRef' in IndexDict:
subjref=sanitize(row[IndexDict.get("i_SubjRef")])
# make word object
this_word = cv.slot()
cv.feature(this_word,
word=row[IndexDict.get("i_Unicode")],
monad=row[IndexDict.get("i_monad")],
orig_order=row[IndexDict.get("i_monad")],
book_long=row[IndexDict.get("i_book_long")],
booknum=booknum,
book_short=row[IndexDict.get("i_book_short")],
chapter=chapter,
sp=sp,
sp_full=sp_full,
verse=verse,
sentence=prev_sentence,
clause=prev_clause,
phrase=prev_phrase,
normalized=sanitize(row[IndexDict.get("i_NormalizedForm")]),
formaltag=sanitize(row[IndexDict.get("i_FormalTag")]),
functionaltag=functionaltag,
strongs=sanitize(row[IndexDict.get("i_StrongNumber")]),
lex_dom=sanitize(row[IndexDict.get("i_LexDomain")]),
ln=sanitize(row[IndexDict.get("i_LN")]),
gloss_EN=sanitize(row[IndexDict.get("i_Gloss")]),
gn=sanitize(row[IndexDict.get("i_Gender")]),
nu=sanitize(row[IndexDict.get("i_Number")]),
case=sanitize(row[IndexDict.get("i_Case")]),
lemma=sanitize(row[IndexDict.get("i_UnicodeLemma")]),
person=sanitize(row[IndexDict.get("i_Person")]),
mood=sanitize(row[IndexDict.get("i_Mood")]),
tense=sanitize(row[IndexDict.get("i_Tense")]),
number=sanitize(row[IndexDict.get("i_Number")]),
voice=sanitize(row[IndexDict.get("i_Voice")]),
degree=degree,
type=sanitize(row[IndexDict.get("i_Type")]),
reference=sanitize(row[IndexDict.get("i_Ref")]), # the capital R is critical here!
subj_ref=subjref,
nodeID=row[1] #this is a fixed position.
)
cv.terminate(this_word)
'''
-- wrap up the book --
'''
# close all nodes (phrase, clause, sentence, verse, chapter and book)
cv.feature(this_phrase, phrase=phrase_track, phrasetype=prev_phrasetype,phrasefunction=prev_phrasefunction,phrasefunction_long=prev_phrasefunction_long)
cv.terminate(this_phrase)
cv.feature(this_clause, clause=prev_clause, clausetype=prev_clausetype)
cv.terminate(this_clause)
cv.feature(this_sentence, sentence=prev_sentence)
cv.terminate(this_sentence)
cv.feature(this_verse, verse=prev_verse)
cv.terminate(this_verse)
cv.feature(this_chapter, chapter=prev_chapter)
cv.terminate(this_chapter)
cv.feature(this_book, book=prev_book)
cv.terminate(this_book)
# clear dataframe for this book
del df
# clear the index dictionary
IndexDict.clear()
gc.collect()
'''
-- output definitions --
'''
slotType = 'word' # or whatever you choose
otext = { # dictionary of config data for sections and text formats
'fmt:text-orig-full':'{word}',
'sectionTypes':'book,chapter,verse',
'sectionFeatures':'book,chapter,verse',
'structureFeatures': 'book,chapter,verse',
'structureTypes': 'book,chapter,verse',
}
# configure metadata
generic = { # dictionary of metadata meant for all features
'Name': 'Greek New Testament (NA1904)',
'Version': '1904',
'Editors': 'Nestle & Aland',
'Data source': 'MACULA Greek Linguistic Datasets, available at https://github.com/Clear-Bible/macula-greek/tree/main/Nestle1904/nodes',
'Availability': 'Creative Commons Attribution 4.0 International (CC BY 4.0)',
'Converter_author': 'Tony Jurg, Vrije Universiteit Amsterdam, Netherlands',
'Converter_execution': 'Tony Jurg, Vrije Universiteit Amsterdam, Netherlands',
'Convertor_source': 'https://github.com/tonyjurg/NA1904/tree/main/resources/converter',
'Converter_version': '{}'.format(version),
'TextFabric version': '{}'.format(VERSION) #imported from tf.parameters
}
intFeatures = { # set of integer valued feature names
'booknum',
'chapter',
'verse',
'sentence',
'clause',
'phrase',
'orig_order',
'monad'
}
featureMeta = { # per feature dicts with metadata
'book': {'description': 'Book'},
'book_long': {'description': 'Book name (fully spelled out)'},
'booknum': {'description': 'NT book number (Matthew=1, Mark=2, ..., Revelation=27)'},
'book_short': {'description': 'Book name (abbreviated)'},
'chapter': {'description': 'Chapter number inside book'},
'verse': {'description': 'Verse number inside chapter'},
'sentence': {'description': 'Sentence number (counted per chapter)'},
'clause': {'description': 'Clause number (counted per chapter)'},
'clausetype' : {'description': 'Clause type information (verb, verbless, elided, minor, etc.)'},
'phrase' : {'description': 'Phrase number (counted per chapter)'},
'phrasetype' : {'description': 'Phrase type information'},
'phrasefunction' : {'description': 'Phrase function (abbreviated)'},
'phrasefunction_long' : {'description': 'Phrase function (long description)'},
'orig_order': {'description': 'Word order within corpus'},
'monad':{'description': 'Monad'},
'word': {'description': 'Word as it appears in the text'},
'sp': {'description': 'Part of Speech (abbreviated)'},
'sp_full': {'description': 'Part of Speech (long description)'},
'normalized': {'description': 'Surface word stripped of punctations'},
'lemma': {'description': 'Lexeme (lemma)'},
'formaltag': {'description': 'Formal tag (Sandborg-Petersen morphology)'},
'functionaltag': {'description': 'Functional tag (Sandborg-Petersen morphology)'},
# see also discussion on relation between lex_dom and ln @ https://github.com/Clear-Bible/macula-greek/issues/29
'lex_dom': {'description': 'Lexical domain according to Semantic Dictionary of Biblical Greek, SDBG (not present everywhere?)'},
'ln': {'description': 'Lauw-Nida lexical classification (not present everywhere?)'},
'strongs': {'description': 'Strongs number'},
'gloss_EN': {'description': 'English gloss'},
'gn': {'description': 'Gramatical gender (Masculine, Feminine, Neuter)'},
'nu': {'description': 'Gramatical number (Singular, Plural)'},
'case': {'description': 'Gramatical case (Nominative, Genitive, Dative, Accusative, Vocative)'},
'person': {'description': 'Gramatical person of the verb (first, second, third)'},
'mood': {'description': 'Gramatical mood of the verb (passive, etc)'},
'tense': {'description': 'Gramatical tense of the verb (e.g. Present, Aorist)'},
'number': {'description': 'Gramatical number of the verb'},
'voice': {'description': 'Gramatical voice of the verb'},
'degree': {'description': 'Degree (e.g. Comparitative, Superlative)'},
'type': {'description': 'Gramatical type of noun or pronoun (e.g. Common, Personal)'},
'reference': {'description': 'Reference (to nodeID in XML source data, not yet post-processes)'},
'subj_ref': {'description': 'Subject reference (to nodeID in XML source data, not yet post-processes)'},
'nodeID': {'description': 'Node ID (as in the XML source data, not yet post-processes)'}
}
'''
-- the main function --
'''
good = cv.walk(
director,
slotType,
otext=otext,
generic=generic,
intFeatures=intFeatures,
featureMeta=featureMeta,
warn=True,
force=False
)
if good:
print ("done")
This is Text-Fabric 11.2.3 44 features found and 0 ignored 0.00s Importing data from walking through the source ... | 0.00s Preparing metadata... | SECTION TYPES: book, chapter, verse | SECTION FEATURES: book, chapter, verse | STRUCTURE TYPES: book, chapter, verse | STRUCTURE FEATURES: book, chapter, verse | TEXT FEATURES: | | text-orig-full word | 0.00s OK | 0.00s Following director... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\01-matthew.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\02-mark.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\03-luke.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\04-john.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\05-acts.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\06-romans.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\07-1corinthians.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\08-2corinthians.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\09-galatians.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\10-ephesians.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\11-philippians.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\12-colossians.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\13-1thessalonians.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\14-2thessalonians.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\15-1timothy.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\16-2timothy.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\17-titus.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\18-philemon.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\19-hebrews.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\20-james.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\21-1peter.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\22-2peter.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\23-1john.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\24-2john.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\25-3john.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\26-jude.pkl... loading C:\Users\tonyj\my_new_Jupyter_folder\test_of_xml_etree\outputfiles\27-revelation.pkl... | 35s "edge" actions: 0 | 35s "feature" actions: 244296 | 35s "node" actions: 106490 | 35s "resume" actions: 0 | 35s "slot" actions: 137779 | 35s "terminate" actions: 244269 | 27 x "book" node | 260 x "chapter" node | 16124 x "clause" node | 76415 x "phrase" node | 5720 x "sentence" node | 7944 x "verse" node | 137779 x "word" node = slot type | 244269 nodes of all types | 35s OK | 0.00s checking for nodes and edges ... | 0.00s OK | 0.00s checking (section) features ... | 0.22s OK | 0.00s reordering nodes ... | 0.03s Sorting 27 nodes of type "book" | 0.04s Sorting 260 nodes of type "chapter" | 0.05s Sorting 16124 nodes of type "clause" | 0.08s Sorting 76415 nodes of type "phrase" | 0.17s Sorting 5720 nodes of type "sentence" | 0.20s Sorting 7944 nodes of type "verse" | 0.22s Max node = 244269 | 0.22s OK | 0.00s reassigning feature values ... | | 0.00s node feature "book" with 27 nodes | | 0.00s node feature "book_long" with 137779 nodes | | 0.04s node feature "book_short" with 137779 nodes | | 0.09s node feature "booknum" with 137779 nodes | | 0.13s node feature "case" with 137779 nodes | | 0.18s node feature "chapter" with 138039 nodes | | 0.22s node feature "clause" with 153903 nodes | | 0.27s node feature "clausetype" with 16124 nodes | | 0.27s node feature "degree" with 137779 nodes | | 0.32s node feature "formaltag" with 137779 nodes | | 0.36s node feature "functionaltag" with 137779 nodes | | 0.40s node feature "gloss_EN" with 137779 nodes | | 0.43s node feature "gn" with 137779 nodes | | 0.48s node feature "lemma" with 137779 nodes | | 0.53s node feature "lex_dom" with 137779 nodes | | 0.57s node feature "ln" with 137779 nodes | | 0.61s node feature "monad" with 137779 nodes | | 0.65s node feature "mood" with 137779 nodes | | 0.69s node feature "nodeID" with 137779 nodes | | 0.73s node feature "normalized" with 137779 nodes | | 0.77s node feature "nu" with 137779 nodes | | 0.81s node feature "number" with 137779 nodes | | 0.86s node feature "orig_order" with 137779 nodes | | 0.89s node feature "person" with 137779 nodes | | 0.94s node feature "phrase" with 214194 nodes | | 1.00s node feature "phrasefunction" with 76415 nodes | | 1.03s node feature "phrasefunction_long" with 76415 nodes | | 1.06s node feature "phrasetype" with 76415 nodes | | 1.10s node feature "reference" with 137779 nodes | | 1.15s node feature "sentence" with 143499 nodes | | 1.20s node feature "sp" with 137779 nodes | | 1.24s node feature "sp_full" with 137779 nodes | | 1.29s node feature "strongs" with 137779 nodes | | 1.34s node feature "subj_ref" with 137779 nodes | | 1.38s node feature "tense" with 137779 nodes | | 1.43s node feature "type" with 137779 nodes | | 1.47s node feature "verse" with 145723 nodes | | 1.52s node feature "voice" with 137779 nodes | | 1.56s node feature "word" with 137779 nodes | 1.68s OK 0.00s Exporting 40 node and 1 edge and 1 config features to C:/text-fabric-data/github/tjurg/NA1904/tf/1904: 0.00s VALIDATING oslots feature 0.02s VALIDATING oslots feature 0.02s maxSlot= 137779 0.02s maxNode= 244269 0.03s OK: oslots is valid | 0.01s T book to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.14s T book_long to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.13s T book_short to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.13s T booknum to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.16s T case to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.15s T chapter to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.16s T clause to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.03s T clausetype to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.16s T degree to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.15s T formaltag to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.14s T functionaltag to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.14s T gloss_EN to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.15s T gn to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.16s T lemma to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.14s T lex_dom to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.15s T ln to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.13s T monad to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.13s T mood to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.14s T nodeID to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.17s T normalized to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.14s T nu to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.14s T number to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.14s T orig_order to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.06s T otype to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.14s T person to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.20s T phrase to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.08s T phrasefunction to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.08s T phrasefunction_long to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.09s T phrasetype to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.14s T reference to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.14s T sentence to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.14s T sp to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.14s T sp_full to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.15s T strongs to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.15s T subj_ref to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.14s T tense to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.14s T type to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.14s T verse to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.14s T voice to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.17s T word to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.32s T oslots to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.00s M otext to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 5.70s Exported 40 node features and 1 edge features and 1 config features to C:/text-fabric-data/github/tjurg/NA1904/tf/1904 done
The TF will be loaded from local copy of github repository
%load_ext autoreload
%autoreload 2
# First, I have to laod different modules that I use for analyzing the data and for plotting:
import sys, os, collections
import pandas as pd
import numpy as np
import re
from tf.fabric import Fabric
from tf.app import use
The following cell loads the TextFabric files from a local disc. Change accordingly.
# Loading-the-New-Testament-Text-Fabric (from local disk)
NA = use ("tjurg/NA1904", checkData="clone", hoist=globals())
Locating corpus resources ...
| 0.24s T otype from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 1.94s T oslots from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.52s T verse from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.48s T chapter from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.00s T book from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.67s T word from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | | 0.05s C __levels__ from otype, oslots, otext | | 1.48s C __order__ from otype, oslots, __levels__ | | 0.07s C __rank__ from otype, __order__ | | 2.40s C __levUp__ from otype, oslots, __rank__ | | 1.53s C __levDown__ from otype, __levUp__, __rank__ | | 0.05s 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 book_long from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.56s T book_short from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.47s T booknum from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.53s T case from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.54s T clause from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.07s T clausetype from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.47s T degree from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.58s T formaltag from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.57s T functionaltag from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.62s T gloss_EN from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.53s T gn from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.61s T lemma from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.59s T lex_dom from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.60s T ln from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.50s T monad from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.51s T mood from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.72s T nodeID from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.66s T normalized from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.54s T nu from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.55s T number from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.50s T orig_order from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.50s T person from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.79s T phrase from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.31s T phrasefunction from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.32s T phrasefunction_long from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.32s T phrasetype from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.51s T sentence from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.57s T sp from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.57s T sp_full from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.59s T strongs from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.50s T subj_ref from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.50s T tense from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.52s T type from ~/text-fabric-data/github/tjurg/NA1904/tf/1904 | 0.50s T voice from ~/text-fabric-data/github/tjurg/NA1904/tf/1904
Name | # of nodes | # slots/node | % coverage |
---|---|---|---|
book | 27 | 5102.93 | 100 |
chapter | 260 | 529.92 | 100 |
sentence | 5720 | 24.09 | 100 |
verse | 7944 | 17.34 | 100 |
clause | 16124 | 8.54 | 100 |
phrase | 76415 | 1.80 | 100 |
word | 137779 | 1.00 | 100 |
note: the implementation with regards how phrases need to be displayed (esp. with regards to conjunctions) is still to be done.
Search0 = '''
book book=Matthew
chapter chapter=1
verse
'''
Search0 = NA.search(Search0)
NA.show(Search0, start=1, end=8, condensed=True, extraFeatures={'clausetype','sp_full','phrasetype', 'gloss_EN','person','tense','voice','number','gn','mood', 'phrasefunction_long'}, withNodes=False)
0.01s 25 results
verse 1
verse 2
verse 3
verse 4
verse 5
verse 6
verse 7
verse 8
T.structureInfo()
A heading is a tuple of pairs (node type, feature value) of node types and features that have been configured as structural elements These 3 structural elements have been configured node type book with heading feature book node type chapter with heading feature chapter node type verse with heading feature verse You can get them as a tuple with T.headings. Structure API: T.structure(node=None) gives the structure below node, or everything if node is None T.structurePretty(node=None) prints the structure below node, or everything if node is None T.top() gives all top-level nodes T.up(node) gives the (immediate) parent node T.down(node) gives the (immediate) children nodes T.headingFromNode(node) gives the heading of a node T.nodeFromHeading(heading) gives the node of a heading T.ndFromHd complete mapping from headings to nodes T.hdFromNd complete mapping from nodes to headings T.hdMult are all headings with their nodes that occur multiple times There are 8231 structural elements in the dataset.
WARNING: 1 structure headings with hdMult occurrences (total 2) book:I_Peter-chapter:4-verse:1 has 2 occurrences 232892, 232894
T.up(232892)
232892 is an sentence which is not configured as a structure type
TF.features['otext'].metaData
{'Availability': 'Creative Commons Attribution 4.0 International (CC BY 4.0)', 'Converter_author': 'Tony Jurg, Vrije Universiteit Amsterdam, Netherlands', 'Converter_execution': 'Tony Jurg, Vrije Universiteit Amsterdam, Netherlands', 'Converter_version': '0.1 (Initial)', 'Convertor_source': 'https://github.com/tonyjurg/NA1904/tree/main/resources/converter', 'Data source': 'MACULA Greek Linguistic Datasets, available at https://github.com/Clear-Bible/macula-greek/tree/main/Nestle1904/nodes', 'Editors': 'Nestle & Aland', 'Name': 'Greek New Testament (NA1904)', 'TextFabric version': '11.2.3', 'Version': '1904', 'fmt:text-orig-full': '{word}', 'sectionFeatures': 'book,chapter,verse', 'sectionTypes': 'book,chapter,verse', 'structureFeatures': 'book,chapter,verse', 'structureTypes': 'book,chapter,verse', 'writtenBy': 'Text-Fabric', 'dateWritten': '2023-03-21T20:46:23Z'}
!text-fabric app
This is Text-Fabric 11.2.3 Connecting to running kernel via 19685 Connecting to running webserver via 29685 Opening app in browser Press <Ctrl+C> to stop the TF browser
!text-fabric app -k
This is Text-Fabric 11.2.3 Killing processes: kernel % 18412: 19685 app: terminated web % 2700: 29685 app: terminated text-fabric % 3280 app: terminated 3 processes done.