{
"cells": [
{
"cell_type": "markdown",
"id": "bec25f1a",
"metadata": {},
"source": [
"# Loading Text-Fabric (Nestle1904LFT)\n",
"\n",
"**Work in progress!**"
]
},
{
"cell_type": "markdown",
"id": "fa7f85d5",
"metadata": {
"tags": []
},
"source": [
"## Table of content \n",
"* 1 - Introduction\n",
" * 1.1 - Text-Fabric data versions\n",
"* 2 - Preparation / installation\n",
" * 2.1 - Install Python\n",
" * 2.2 - Install Text-Fabric\n",
" * 2.3 - Raise rate limit on Github\n",
"* 3 - Load Text-Fabric into memory\n",
" * 3.1 - Load the code\n",
" * 3.2 - Load the app and data\n",
"* 4 - Add additional features\n",
" * 4.1 - The official method\n",
" * 4.2 - The unofficial method\n",
" * 4.3 - Additional dataset\n",
" * 4.4 - Further reference\n",
"* 5 - Using multiple Text-Fabric corpora"
]
},
{
"cell_type": "markdown",
"id": "c2c48614-5571-47f8-b70c-28f1ea58f97b",
"metadata": {
"tags": []
},
"source": [
"# 1 - Introduction \n",
"\n",
"Basic instructions on loading the Text-Fabric and start using it on your system. It will provide examples of the various ways you can invoke Text-Fabric."
]
},
{
"cell_type": "markdown",
"id": "76d1044b-e3b6-4a51-b9fa-5f3234a6d08b",
"metadata": {},
"source": [
"### 1.1 - Text-Fabric data versions \n",
"\n",
"Some discussion related to versions"
]
},
{
"cell_type": "markdown",
"id": "2e01787a-7480-43df-8ae4-6b73e0805f72",
"metadata": {},
"source": [
"## 2 - Preparation / installation\n",
"##### [back to TOC](#TOC)\n",
"\n",
"The instructions in this section are only required once to be executed. This will result in the Text-Fabric code being available for loading into memory of your system."
]
},
{
"cell_type": "markdown",
"id": "bf3f556a-a84d-423d-833d-5a1f39dfd733",
"metadata": {},
"source": [
"### 2.1 - Install Python \n",
"\n",
"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**.\n",
"\n",
"Install it from [python.org](https://www.python.org) or from\n",
"[Anaconda](https://www.anaconda.com/products/distribution)."
]
},
{
"cell_type": "markdown",
"id": "d5a6e05a",
"metadata": {},
"source": [
"### 2.2 - Install Text-Fabric \n",
"\n",
"(if not yet installed) \n",
" \n",
"**TF itself**\n",
"\n",
" pip3 install text-fabric\n",
" \n",
"**When using Jupyter notebook**\n",
"\n",
"You can install Jupyter Notebook by command:\n",
"\n",
" pip3 install jupyter\n",
" \n",
"**When using Anaconda**\n",
"\n",
"A platform like [Anaconda](https://www.anaconda.com/products/distribution) allows for easy installation of Jupyter.\n",
"\n",
"It is advisable to define a new environment in Anaconda on which Text-Fabric can be installed [(documentation)](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html)."
]
},
{
"cell_type": "markdown",
"id": "8684bf30",
"metadata": {},
"source": [
"### 2.3 - Raise rate limit on Github \n",
"##### [back to TOC](#TOC)\n",
"\n",
"It may be required to increase rate limit for GitHub. [See instructions](https://annotation.github.io/text-fabric/tf/advanced/repo.html#increase-the-rate-limit) on aquiring and setting the GHPERS variable. \n",
"See [here](https://www.howtogeek.com/789660/how-to-use-windows-cmd-environment-variables/#autotoc_anchor_2) if you want to set the varibale on windows using the command prompt."
]
},
{
"cell_type": "markdown",
"id": "edadeba4",
"metadata": {},
"source": [
"## 3 - Load Text-Fabric into memory \n",
"##### [back to TOC](#TOC)\n",
"\n",
"The instructions in this section are required once to be executed each time you want to use Text_Fabric. It will load the Text-Fabric code and data into memory."
]
},
{
"cell_type": "markdown",
"id": "2152b562-5135-4b27-bd56-b3dc7abaa031",
"metadata": {},
"source": [
"### 3.1 - Load the code \n",
"##### [back to TOC](#TOC)"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "a5bc2a5d",
"metadata": {},
"outputs": [],
"source": [
"%load_ext autoreload\n",
"%autoreload 2"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "31f3bbde",
"metadata": {},
"outputs": [],
"source": [
"# Loading the Text-Fabric code\n",
"# Note: it is assumed Text-Fabric is installed in your environment\n",
"from tf.fabric import Fabric\n",
"from tf.app import use"
]
},
{
"cell_type": "markdown",
"id": "f8a57edd-2c89-406a-873f-e7f71a5539c3",
"metadata": {},
"source": [
"### 3.2 - Load app and data \n",
"##### [back to TOC](#TOC)\n",
"\n",
"The following invocation of function [`use`](https://annotation.github.io/text-fabric/tf/about/usefunc.html) loads all features of the corpus (and extra modules, see section 4). It creates an variable (in this example `N1904LFT`) with its associated methods and function, the 'Advanced API'. In the 'cheat sheet' there are many references to `A.*something*`. In this notebook they should be read as `N1904LFT`. "
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "b8574f48",
"metadata": {},
"outputs": [
{
"data": {
"text/markdown": [
"**Locating corpus resources ...**"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"The requested app is not available offline\n",
"\t~/text-fabric-data/github/tonyjurg/Nestle1904LFT/app not found\n"
]
},
{
"data": {
"text/html": [
"Status: latest release online v0.6a versus None locally"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"downloading app, main data and requested additions ..."
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"app: ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/app"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"The requested data is not available offline\n",
"\t~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6 not found\n"
]
},
{
"data": {
"text/html": [
"Status: latest release online v0.6a versus None locally"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"downloading app, main data and requested additions ..."
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"data: ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" | 0.19s T otype from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 2.50s T oslots from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.46s T verse from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.61s T word from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.51s T after from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.60s T wordtranslit from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.50s T chapter from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.62s T normalized from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.61s T unicode from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.57s T book from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.60s T wordunacc from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | | 0.06s C __levels__ from otype, oslots, otext\n",
" | | 1.82s C __order__ from otype, oslots, __levels__\n",
" | | 0.07s C __rank__ from otype, __order__\n",
" | | 3.26s C __levUp__ from otype, oslots, __rank__\n",
" | | 1.93s C __levDown__ from otype, __levUp__, __rank__\n",
" | | 0.22s C __characters__ from otext\n",
" | | 0.95s C __boundary__ from otype, oslots, __rank__\n",
" | | 0.04s C __sections__ from otype, oslots, otext, __levUp__, __levels__, book, chapter, verse\n",
" | | 0.23s C __structure__ from otype, oslots, otext, __rank__, __levUp__, book, chapter, verse\n",
" | 0.45s T booknumber from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.51s T bookshort from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.48s T case from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.33s T clausetype from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.58s T containedclause from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.42s T degree from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.58s T gloss from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.49s T gn from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.03s T headverse from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.33s T junction from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.60s T lemma from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.56s T lex_dom from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.58s T ln from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.42s T markafter from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.43s T markbefore from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.44s T markorder from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.46s T monad from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.46s T mood from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.52s T morph from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.54s T nodeID from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.48s T nu from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.48s T number from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.43s T person from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.43s T punctuation from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.64s T ref from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.64s T reference from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.48s T roleclausedistance from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.46s T sentence from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.50s T sp from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.50s T sp_full from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.54s T strongs from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.44s T subj_ref from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.43s T tense from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.45s T type from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.44s T voice from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.39s T wgclass from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.33s T wglevel from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.36s T wgnum from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.35s T wgrole from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.35s T wgrolelong from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.39s T wgrule from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.33s T wgtype from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.50s T wordlevel from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.50s T wordrole from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n",
" | 0.52s T wordrolelong from ~/text-fabric-data/github/tonyjurg/Nestle1904LFT/tf/0.6\n"
]
},
{
"data": {
"text/html": [
"\n",
" TF: TF API 12.1.5, tonyjurg/Nestle1904LFT/app v3, Search Reference
\n",
" Data: tonyjurg - Nestle1904LFT 0.6, Character table, Feature docs
\n",
" Node types
\n",
"\n",
" \n",
" Name | \n",
" # of nodes | \n",
" # slots / node | \n",
" % coverage | \n",
"
\n",
"\n",
"\n",
" book | \n",
" 27 | \n",
" 5102.93 | \n",
" 100 | \n",
"
\n",
"\n",
"\n",
" chapter | \n",
" 260 | \n",
" 529.92 | \n",
" 100 | \n",
"
\n",
"\n",
"\n",
" verse | \n",
" 7943 | \n",
" 17.35 | \n",
" 100 | \n",
"
\n",
"\n",
"\n",
" sentence | \n",
" 8011 | \n",
" 17.20 | \n",
" 100 | \n",
"
\n",
"\n",
"\n",
" wg | \n",
" 105430 | \n",
" 6.85 | \n",
" 524 | \n",
"
\n",
"\n",
"\n",
" word | \n",
" 137779 | \n",
" 1.00 | \n",
" 100 | \n",
"
\n",
"
\n",
" Sets: no custom sets
\n",
" Features:
\n",
"Nestle 1904 (Low Fat Tree)
\n",
" \n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Characters (eg. punctuations) following the word\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Book name (in English language)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
int
\n",
"\n",
"
✅ NT book number (Matthew=1, Mark=2, ..., Revelation=27)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Book name (abbreviated)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Gramatical case (Nominative, Genitive, Dative, Accusative, Vocative)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
int
\n",
"\n",
"
✅ Chapter number inside book\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Clause type details (e.g. Verbless, Minor)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
🆗 Contained clause (WG number)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Degree (e.g. Comparitative, Superlative)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ English gloss\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Gramatical gender (Masculine, Feminine, Neuter)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Start verse number of a sentence\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Junction data related to a wordgroup\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Lexeme (lemma)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Lexical domain according to Semantic Dictionary of Biblical Greek, SDBG (not present everywhere?)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Lauw-Nida lexical classification (not present everywhere?)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
🆗 Text critical marker after word\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
🆗 Text critical marker before word\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
Order of punctuation and text critical marker\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
int
\n",
"\n",
"
✅ Monad (smallest token matching word order in the corpus)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Gramatical mood of the verb (passive, etc)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Morphological tag (Sandborg-Petersen morphology)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Node ID (as in the XML source data)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Surface word with accents normalized and trailing punctuations removed\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Gramatical number (Singular, Plural)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Gramatical number of the verb (e.g. singular, plural)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Gramatical person of the verb (first, second, third)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Punctuation after word\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Value of the ref ID (taken from XML sourcedata)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Reference (to nodeID in XML source data, not yet post-processes)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
⚠️ Distance to the wordgroup defining the syntactical role of this word\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
int
\n",
"\n",
"
✅ Sentence number (counted per chapter)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Part of Speech (abbreviated)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Part of Speech (long description)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Strongs number\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
🆗 Subject reference (to nodeID in XML source data, not yet post-processes)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Gramatical tense of the verb (e.g. Present, Aorist)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Gramatical type of noun or pronoun (e.g. Common, Personal)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Word as it apears in the text in Unicode (incl. punctuations)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
int
\n",
"\n",
"
✅ Verse number inside chapter\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Gramatical voice of the verb (e.g. active,passive)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Class of the wordgroup (e.g. cl, np, vp)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
int
\n",
"\n",
"
🆗 Number of the parent wordgroups for a wordgroup\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
int
\n",
"\n",
"
✅ Wordgroup number (counted per book)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Syntactical role of the wordgroup (abbreviated)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Syntactical role of the wordgroup (full)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Wordgroup rule information (e.g. Np-Appos, ClCl2, PrepNp)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Wordgroup type details (e.g. group, apposition)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Word as it appears in the text (excl. punctuations)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
🆗 Number of the parent wordgroups for a word\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Syntactical role of the word (abbreviated)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Syntactical role of the word (full)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
🆗 Transliteration of the text (in latin letters, excl. punctuations)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
str
\n",
"\n",
"
✅ Word without accents (excl. punctuations)\n",
"\n",
"
\n",
"\n",
"
\n",
"
\n",
"
none
\n",
"\n",
"
\n",
"\n",
"
\n",
"\n",
"
\n",
" \n",
"\n",
" Settings:
specified
- apiVersion:
3
- appName:
tonyjurg/Nestle1904LFT
appPath:
C:/Users/tonyj/text-fabric-data/github/tonyjurg/Nestle1904LFT/app
- commit: no value
- css:
''
dataDisplay:
excludedFeatures:
orig_order
verse
book
chapter
noneValues:
- showVerseInTuple:
0
- textFormat:
text-orig-full
docs:
- docBase:
https://github.com/tonyjurg/Nestle1904LFT/blob/main/docs/
- docPage:
about
- docRoot:
https://github.com/tonyjurg/Nestle1904LFT
featureBase:
https://github.com/tonyjurg/Nestle1904LFT/blob/main/docs/features/<feature>.md
- interfaceDefaults: {fmt:
layout-orig-full
} - isCompatible:
True
- local: no value
localDir:
C:/Users/tonyj/text-fabric-data/github/tonyjurg/Nestle1904LFT/_temp
provenanceSpec:
- corpus:
Nestle 1904 (Low Fat Tree)
- doi:
10.5281/zenodo.10182594
- org:
tonyjurg
- relative:
/tf
- repo:
Nestle1904LFT
- repro:
Nestle1904LFT
- version:
0.6
- webBase:
https://learner.bible/text/show_text/nestle1904/
- webHint:
Show this on the Bible Online Learner website
- webLang:
en
webUrl:
https://learner.bible/text/show_text/nestle1904/<1>/<2>/<3>
- webUrlLex:
{webBase}/word?version={version}&id=<lid>
- release: no value
typeDisplay:
book:
- condense:
True
- hidden:
True
- label:
{book}
- style:
''
chapter:
- condense:
True
- hidden:
True
- label:
{chapter}
- style:
''
sentence:
- hidden:
0
- label:
#{sentence} (start: {book} {chapter}:{headverse})
- style:
''
verse:
- condense:
True
- excludedFeatures:
chapter verse
- label:
{book} {chapter}:{verse}
- style:
''
wg:
- hidden:
0
label:
#{wgnum}: {wgtype} {wgclass} {clausetype} {wgrole} {wgrule} {junction}
- style:
''
word:
- base:
True
- features:
lemma
- featuresBare:
gloss
- surpress:
chapter verse
- writing:
grc
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
""
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"
"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# load the app and data\n",
"N1904LFT = use (\"tonyjurg/Nestle1904LFT\", version=\"0.6\", hoist=globals())"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "932992c9-3fd9-4b5a-aa22-48eb376c8622",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
""
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# The following will push the Text-Fabric stylesheet to this notebook (to facilitate proper display with notebook viewer)\n",
"N1904LFT.dh(N1904LFT.getCss())"
]
},
{
"cell_type": "markdown",
"id": "9f8b75f6-3bf8-40ee-bb1e-a05714794a5b",
"metadata": {},
"source": [
"# 4 - Add additional features\n",
"##### [back to TOC](#TOC)\n",
"\n",
"\n",
"**The following is optional.**\n"
]
},
{
"cell_type": "markdown",
"id": "d0a09e00-481a-4c33-a7f6-9a53a84d8a31",
"metadata": {},
"source": [
"## 4.1 - The official method\n",
"##### [back to TOC](#TOC)\n",
"\n",
"Still to be done: find good example"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "266af257-e70a-4ae9-87af-405ddb57fb3a",
"metadata": {},
"outputs": [
{
"ename": "SyntaxError",
"evalue": "invalid syntax (851510525.py, line 2)",
"output_type": "error",
"traceback": [
"\u001b[1;36m Input \u001b[1;32mIn [7]\u001b[1;36m\u001b[0m\n\u001b[1;33m N1904LFT = use (\"tonyjurg/Nestle1904LFT:latest\", mod=f\"annotation/banks/sim/tf\" hoist=globals())\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
]
}
],
"source": [
"# load the app and data with additional features\n",
"N1904LFT = use (\"tonyjurg/Nestle1904LFT:latest\", mod=f\"annotation/banks/sim/tf\" hoist=globals())"
]
},
{
"cell_type": "markdown",
"id": "b144959b-2e67-414a-9d26-535e04cfeddf",
"metadata": {},
"source": [
"## 4.2 - The unofficial method\n",
"##### [back to TOC](#TOC)\n",
"\n",
"Warning: to use this method it is critical to verify that **ALL** the following match:\n",
"* most importantly, the Text-Fabric dataset should be based upon the same corpus (in the most literal sense of the word!)\n",
"* the node range(s) (check output of command `F.otype.all` or values found in file `otype.tf`).\n",
"* the slot order (i.e. the order of the wordsin the Text-Fabric corpus; usualy refered to as monad).\n",
"\n",
"If these conditions are met, it is possible to copy the .tf files from the donor dataset to your local Text-Fabric directory.."
]
},
{
"cell_type": "markdown",
"id": "44fd949d-c638-42d1-a235-b700c0a3454a",
"metadata": {
"jp-MarkdownHeadingCollapsed": true,
"tags": []
},
"source": [
"## 4.3 - Additional dataset\n",
"##### [back to TOC](#TOC)\n",
"\n",
"Some additional dataset that should work with this Text-Fabric implementation are:\n",
"\n",
"Dataset location | additions\n",
"--- | ---\n",
"[CenterBLC](https://github.com/CenterBLC/NA/tree/main/tf/202201) | *additional grammatical features, Bible Online Learner details*\n",
" "
]
},
{
"cell_type": "markdown",
"id": "0f50a69e-794d-4fa1-87c3-3cfdf7bd8b97",
"metadata": {},
"source": [
"## 4.4 - Further reference\n",
"##### [back to TOC](#TOC)"
]
},
{
"cell_type": "markdown",
"id": "17574d99-d4d9-4b00-a1f8-f5f7b721e391",
"metadata": {},
"source": [
"Further reference [module tf.about.datasharing](https://annotation.github.io/text-fabric/tf/about/datasharing.html)"
]
},
{
"cell_type": "markdown",
"id": "392e108c-fea8-44bd-9e20-213b9d68e499",
"metadata": {},
"source": [
"# 5 - Using multiple Text-Fabric corpora\n",
"##### [back to TOC](#TOC)\n",
"\n",
"When using multiple Text-Fabric corpora there are a few things to take care of.\n",
"The most important are to invocate function [`use`](https://annotation.github.io/text-fabric/tf/about/usefunc.html) twice using a different variables (name) to create two Advanced API's. In the following example two `A` (Advanced API) objects are created named CORPUS1 and CORPUS2:\n"
]
},
{
"cell_type": "raw",
"id": "da5e4866-9506-4ccc-bccc-d3e230201f3a",
"metadata": {},
"source": [
"CORPUS1 = use ( ... )\n",
"CORPUS2 = use ( ... )"
]
},
{
"cell_type": "markdown",
"id": "ea086155-a0dc-485f-aa6a-8c5e909b3f3c",
"metadata": {},
"source": [
"**IMPORTANT:** When working with multiple corpora, do not add 'hoist=globals()' to the invocation!. See the comments on [section hoist of function use](https://annotation.github.io/text-fabric/tf/about/usefunc.html#hoisting).\n",
"\n",
"In order to access to the variables `F`, `L`, `T`, and `TF` for the relevant CORPUS dataset, you need to first issue `api = A.api` like in the following example. This example will create two lists containing the nodes for that corpus where feature `word` has value `λόγος`. See also [Hoisting](https://annotation.github.io/text-fabric/tf/about/usefunc.html#hoisting)."
]
},
{
"cell_type": "raw",
"id": "731a6016-a6ee-44c0-b8e1-9a5122d35898",
"metadata": {},
"source": [
"# We also need to add the app reference before we can access the F API functions\n",
"api=CORPUS1.api\n",
"LogosList1=api.F.word.s(λόγος)\n",
"api=CORPUS2.api\n",
"LogosList2=api.F.word.s(λόγος)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}