Basic instructions on loading the Text-Fabric and start using it on your system.
[Example 1: show all object phrases in clauses](#fifth-bullet)
You need to have Python on your system. Most systems have it out of the box, but alas, that is python2 and we need at least python 3.6.
Install it from python.org or from Anaconda.
pip3 install text-fabric
You need Jupyter or a platform like Anaconda which includes Jupyter.
If it is not already installed:
pip3 install jupyter
It may be required to increase rate limit for GitHub. See instructions on aquiring and setting the GHPERS variable. See here if you want to set the varibale on windows using the command prompt.
%load_ext autoreload
%autoreload 2
# Loading the New Testament TextFabric code
from tf.fabric import Fabric
from tf.app import use
# load the app and data
N1904GBI = use ("tonyjurg/Nestle1904GBI", hoist=globals())
Locating corpus resources ...
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 | 73547 | 1.87 | 100 |
word | 137779 | 1.00 | 100 |
The following example will query (and indicate) phrases with function 'O' (=Object). This is done by selecting versed containing the value 'O' for feature 'phrasefunction' belonging to node type 'phrase'. See also the feature description of 'phrasefunction'. It starts with examining at the first verse of Matthews. The first Object phrase in Matthew is found in verse 2. The display is limited to the first two verses found containing an Object phrase.
Search0 = '''
book book=Matthew
phrase phrasefunction=O
'''
Search0 = NA.search(Search0)
N1904GBI.show(Search0, start=1, end=2, condensed=True, extraFeatures={'sp', 'clausetype'}, multiFeatures=True)
0.08s 10813 results
verse 1
verse 2