Work in progress!
This Jupyter Notebook demonstrates the effects of the differences in Text-Fabric datastructure between the GBI and LFT implementation.
%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 N1904GBI app and data
# Since two distinct Text-Fabric dataset are loaed, the option hoist=globals() SHOULD NOT be used!
N1904GBI = use ("tonyjurg/Nestle1904gbi",version='0.4')
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.16s T otype from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 1.89s T oslots from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.59s T book from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.49s T after from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.59s T word from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.51s T verse from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.51s T chapter from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | | 0.05s C __levels__ from otype, oslots, otext | | 1.60s C __order__ from otype, oslots, __levels__ | | 0.07s C __rank__ from otype, __order__ | | 2.25s C __levUp__ from otype, oslots, __rank__ | | 1.43s C __levDown__ from otype, __levUp__, __rank__ | | 0.06s C __characters__ from otext | | 0.92s C __boundary__ from otype, oslots, __rank__ | | 0.04s C __sections__ from otype, oslots, otext, __levUp__, __levels__, book, chapter, verse | | 0.22s C __structure__ from otype, oslots, otext, __rank__, __levUp__, book, chapter, verse | 0.51s T booknum from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.60s T bookshort from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.54s T case from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.49s 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.42s T degree from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.52s T formaltag from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.52s T functionaltag from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.58s T gloss from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.47s T gn from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.56s T lemma from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.51s T lex_dom from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.54s T ln from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.44s T monad from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.43s T mood from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.64s T nodeID from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.59s T normalized from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.48s T nu from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.49s T number from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.44s T person from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.70s T phrase from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.26s T phrasefunction from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.28s T phrasefunctionlong from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.27s T phrasetype from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.45s T sentence from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.50s T sp from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.51s T splong from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.52s T strongs from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.43s T subj_ref from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.43s T tense from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.45s T type from ~/text-fabric-data/github/tonyjurg/Nestle1904gbi/tf/0.4 | 0.44s 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 |
3
tonyjurg/Nestle1904gbi
C:/Users/tonyj/text-fabric-data/github/tonyjurg/Nestle1904gbi/app
reference
]none
unknown
NA
''
text-orig-full
layout-orig-full
}True
C:/Users/tonyj/text-fabric-data/github/tonyjurg/Nestle1904gbi/_temp
Nestle 1904 (GBI nodes)
tonyjurg
/tf
Nestle1904gbi
Nestle1904GBI
0.4
https://bibleol.3bmoodle.dk/text/show_text/nestle1904/<1>/<2>/<3>
{book}
''
#{clause}
''
#{phrase}
''
lemma
strongs
gloss
]grc
# The following will push the Text-Fabric stylesheet to this notebook (to facilitate proper display with notebook viewer)
N1904GBI.dh(N1904GBI.getCss())
# Note: this only is required once, because both apps utilize the same stylesheets
# Set default view in a way to limit noise as much as possible.
N1904GBI.displaySetup(condensed=True, multiFeatures=False,queryFeatures=False)
# load the N1904LFT app and data
# Since two distinct Text-Fabric dataset are loaed, the option hoist=globals() SHOULD NOT be used!
N1904LFT= use ("tonyjurg/Nestle1904lft",version='0.6')
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.20s T otype from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | 2.31s T oslots 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.57s 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.57s T book from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | 0.50s T after from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | 0.60s T word from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | 0.60s T wordunacc 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.61s T unicode from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | | 0.06s C __levels__ from otype, oslots, otext | | 1.81s C __order__ from otype, oslots, __levels__ | | 0.08s C __rank__ from otype, __order__ | | 3.42s C __levUp__ from otype, oslots, __rank__ | | 1.95s C __levDown__ from otype, __levUp__, __rank__ | | 0.23s C __characters__ from otext | | 0.90s C __boundary__ from otype, oslots, __rank__ | | 0.05s C __sections__ from otype, oslots, otext, __levUp__, __levels__, book, chapter, verse | | 0.23s C __structure__ from otype, oslots, otext, __rank__, __levUp__, book, chapter, verse | 0.43s 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.32s T clausetype from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | 0.55s 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.57s 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.32s T junction from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | 0.55s 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.53s 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.42s T markbefore from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | 0.42s T markorder from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | 0.46s T monad from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | 0.47s T mood from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | 0.59s T morph from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | 0.56s T nodeID from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | 0.50s 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.43s T punctuation from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | 0.65s T ref from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | 0.65s T reference from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | 0.49s T roleclausedistance from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | 0.47s T sentence from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | 0.50s T sp from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | 0.51s T sp_full from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | 0.54s 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.45s T type from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | 0.44s T voice from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | 0.38s 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.36s T wgrolelong from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | 0.41s T wgrule from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | 0.35s 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.51s T wordrole from ~/text-fabric-data/github/tonyjurg/Nestle1904lft/tf/0.6 | 0.51s 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)
10.5281/zenodo.10182594
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
# Set default view in a way to limit noise as much as possible.
N1904LFT.displaySetup(condensed=True, multiFeatures=False,queryFeatures=False)
First we will define a query template to select John 1:1 which will be used for both queries on both the GBI and LFT Text-Fabric dataset.
VerseQuery = '''
book book=John
chapter chapter=1
verse verse=1
'''
GBIVerseResults = N1904GBI.search(VerseQuery)
LFTVerseResults = N1904LFT.search(VerseQuery)
0.01s 1 result 0.01s 1 result
EthosQuery = '''
verse
word lemma=ἔθος
'''
EthosResults = N1904GBI.search(EthosQuery)
N1904GBI.table(EthosResults)
0.08s 12 results
n | p | verse | word |
---|---|---|---|
1 | Luke 1:9 | ἔθος | |
2 | Luke 2:42 | ἔθος | |
3 | Luke 22:39 | ἔθος | |
4 | John 19:40 | ἔθος | |
5 | Acts 6:14 | ἔθη | |
6 | Acts 15:1 | ἔθει | |
7 | Acts 16:21 | ἔθη | |
8 | Acts 21:21 | ἔθεσιν | |
9 | Acts 25:16 | ἔθος | |
10 | Acts 26:3 | ἐθῶν | |
11 | Acts 28:17 | ἔθεσι | |
12 | Hebrews 10:25 | ἔθος |
The following is the tree presentation for the GBI implementation:
<Tree>
<Node Cat="S" ... >
<Node Cat="CL" ... Rule="Conj3CL" ... >
<Node Cat="CL" ... Rule="P-VC-S" ... >
<Node Cat="P" ... Rule="pp2P" ... >
<Node Cat="pp" ... Rule="PrepNp" ... >
<Node ... Cat="prep" ... >Ἐν</Node>
<Node Cat="np" ... Rule="N2NP" ... ">
<Node ... Cat="noun" ... >ἀρχῇ</Node>
</Node>
</Node>
</Node>
<Node Cat="VC" ... Rule="vp2VC" ... >
<Node Cat="vp" ... Rule="V2VP" ... >
<Node ... Cat="verb" ... >ἦν</Node>
</Node>
</Node>
<Node Cat="S" ... Rule="Np2S" ... >
<Node Cat="np" ... Rule="DetNP" ... >
<Node ... Cat="det" ...>ὁ</Node>
<Node Cat="np" ... Rule="N2NP" ... >
<Node ... Cat="noun" ... >Λόγος,</Node>
</Node>
</Node>
</Node>
</Node>
<Node ... Cat="conj" ...>καὶ</Node>
<Node Cat="CL" ... Rule="S-VC-P" ... >
<Node Cat="S" ... Rule="Np2S" ... >
<Node Cat="np" ... Rule="DetNP" ... >
<Node ... Cat="det" ... >ὁ</Node>
<Node Cat="np" ... Rule="N2NP" ...>
<Node ... Cat="noun" ... >Λόγος</Node>
</Node>
</Node>
</Node>
<Node Cat="VC" ... Rule="vp2VC" ... >
<Node Cat="vp" ... Rule="V2VP" ... >
<Node ... Cat="verb" ... >ἦν</Node>
</Node>
</Node>
<Node Cat="P" ... Rule="pp2P" ... >
<Node Cat="pp" ... Rule="PrepNp" ... >
<Node ... Cat="prep" ... >πρὸς</Node>
<Node Cat="np" ... Rule="DetNP" ... >
<Node ... Cat="det" ... >τὸν</Node>
<Node Cat="np" ... Rule="N2NP" ... >
<Node ... Cat="noun" ... >Θεόν,</Node>
</Node>
</Node>
</Node>
</Node>
</Node>
<Node ... Cat="conj" ... >καὶ</Node>
<Node Cat="CL" ... Rule="P-VC-S" ... >
<Node Cat="P" ... Rule="Np2P" ... >
<Node Cat="np" ... Rule="N2NP" ... >
<Node ... Cat="noun" ... >Θεὸς</Node>
</Node>
</Node>
<Node Cat="VC" ... Rule="vp2VC" ... >
<Node Cat="vp" ... Rule="V2VP" ... >
<Node ... Cat="verb" ... >ἦν</Node>
</Node>
</Node>
<Node Cat="S" ... Rule="Np2S" ... >
<Node Cat="np" ... Rule="DetNP" ... >
<Node ... Cat="det" ... >ὁ</Node>
<Node Cat="np" ... Rule="N2NP" ... >
<Node ... Cat="noun" ... >Λόγος.</Node>
</Node>
</Node>
</Node>
</Node>
</Node>
</Node>
</Tree>
The following is the tree presentation for the LFT implementation:
N1904LFT.show(LFTVerseResults, start=1, end=2)
For comparison. This is the structure of the raw XML with most of the <w> attributes removed). Click here to view the source file.
<sentence>
<p>
<milestone unit="verse" id="JHN 1:1">JHN 1:1</milestone> Ἐν ἀρχῇ ἦν ὁ Λόγος, καὶ ὁ Λόγος ἦν πρὸς τὸν Θεόν, καὶ Θεὸς ἦν ὁ Λόγος.</p>
<wg>
<wg rule="Conj3CL">
<wg class="cl" rule="P-VC-S" ... >
<wg class="pp" rule="PrepNp" role="p">
<w ref="JHN 1:1!1" ... >Ἐν</w>
<w ref="JHN 1:1!2" ... >ἀρχῇ</w>
</wg>
<w role="vc"
ref="JHN 1:1!3" ... >ἦν</w>
<wg class="np" ... rule="DetNP" role="s">
<w ref="JHN 1:1!4" ... >ὁ</w>
<w ref="JHN 1:1!5" ... >Λόγος</w>
</wg>
</wg>
<wg type="group">
<w ref="JHN 1:1!6" ... >καὶ</w>
<wg class="cl" ... rule="S-VC-P" ... >
<wg class="np" ... rule="DetNP" role="s">
<w ref="JHN 1:1!7" ... >ὁ</w>
<w ref="JHN 1:1!8" ... >Λόγος</w>
</wg>
<w role="vc" ref="JHN 1:1!9" ... >ἦν</w>
<wg class="pp" ... rule="PrepNp" role="p">
<w ref="JHN 1:1!10" ... >πρὸς</w>
<wg class="np" ... rule="DetNP">
<w ref="JHN 1:1!11" ... >τὸν</w>
<w ref="JHN 1:1!12" ... >Θεόν</w>
</wg>
</wg>
</wg>
</wg>
<wg type="group">
<w ref="JHN 1:1!13" ... >καὶ</w>
<wg class="cl" rule="P-VC-S" junction="coordinate">
<w role="p" ref="JHN 1:1!14" ... >Θεὸς</w>
<w role="vc" ref="JHN 1:1!15" ... >ἦν</w>
<wg class="np" articular="true" rule="DetNP" role="s">
<w ref="JHN 1:1!16" ... >ὁ</w>
<w ref="JHN 1:1!17" ... >Λόγος</w>
</wg>
</wg>
</wg>
</wg>
</wg>
</sentence>
This is the input XML for the low Fat Tree with the stylesheets
treedown.css
and boxwood.css
applied:
The following sections provide a discussion about the differences between GBI and LFT dataset.
There is a fundamental difference in handling of conjunctions between the GBI and LFT implementation. In the GBI they are concidered part of a clause, in the LFT outside the clause. (*note: this may be reconsidered.)
The scripts in this notebook require (beside text-fabric
) the following Python libraries to be installed in the environment:
{none}
You can install any missing library from within Jupyter Notebook using eitherpip
or pip3
.