Skip to content

Commit

Permalink
small update on the script
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyjurg committed Jan 24, 2024
1 parent 8bc0384 commit 5d140f5
Show file tree
Hide file tree
Showing 13 changed files with 179 additions and 30 deletions.
45 changes: 27 additions & 18 deletions CreateFeatureDoc.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -106,24 +106,15 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 1,
"id": "177f91d0-0baf-45eb-8450-dcce0e6b4b86",
"metadata": {
"slideshow": {
"slide_type": "slide"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The autoreload extension is already loaded. To reload it, use:\n",
" %reload_ext autoreload\n"
]
}
],
"outputs": [],
"source": [
"%load_ext autoreload\n",
"%autoreload 2"
Expand Down Expand Up @@ -195,6 +186,13 @@
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" | 29s T sibling from ~/text-fabric-data/github/saulocantanhede/tfgreek2/tf/0.5.5\n"
]
},
{
"data": {
"text/html": [
Expand Down Expand Up @@ -817,6 +815,16 @@
"\n",
"<div class=\"frow\">\n",
" <div class=\"fnamecat edge\">\n",
"<a target=\"_blank\" href=\"https://github.com/saulocantanhede/tfgreek2/blob/master/docs/transcription.md\" title=\"~/text-fabric-data/github/saulocantanhede/tfgreek2/tf/0.5.5/sibling.tf\">sibling</a>\n",
"</div>\n",
"<div class=\"fmono\">int</div>\n",
"\n",
"<span> this is XML attribute sibling</span>\n",
"\n",
"</div>\n",
"\n",
"<div class=\"frow\">\n",
" <div class=\"fnamecat edge\">\n",
"<a target=\"_blank\" href=\"https://github.com/saulocantanhede/tfgreek2/blob/master/docs/transcription.md\" title=\"~/text-fabric-data/github/saulocantanhede/tfgreek2/tf/0.5.5/subjref.tf\">subjref</a>\n",
"</div>\n",
"<div class=\"fmono\">none</div>\n",
Expand Down Expand Up @@ -1495,7 +1503,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 4,
"id": "dd126f03-48a6-4980-bac5-8ec86d6c840e",
"metadata": {
"tags": []
Expand Down Expand Up @@ -1565,7 +1573,7 @@
"text": [
"Gathering generic details\n",
"Analyzing Node Features: ..................................................\n",
"Analyzing Edge Features: ....\n",
"Analyzing Edge Features: .....\n",
"Finished\n"
]
}
Expand Down Expand Up @@ -1695,7 +1703,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 6,
"id": "c4b5e148-c336-4d95-a238-5fe79fa9525c",
"metadata": {
"tags": []
Expand All @@ -1705,7 +1713,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Finished (written 108 html and md files to directory C:\\Users\\tonyj\\OneDrive\\Documents\\GitHub\\Doc4TF\\results)\n"
"Finished (written 110 html and md files to directory C:\\Users\\tonyj\\OneDrive\\Documents\\GitHub\\Doc4TF\\results)\n"
]
}
],
Expand Down Expand Up @@ -1742,8 +1750,9 @@
" # Populating tables with frequency data\n",
" itemData = frequencyData.get(node).get('freq')\n",
" for item in itemData:\n",
" tableListHTML += f'<tr><td>{item[0]}</td><td>{item[1]}</td></tr>'\n",
" tableListMD += f'{item[0]}|{item[1]}\\n'\n",
" handleSpace = item[0] if item[0] != ' ' else 'space' # prevent garbling of tables where the value itself is a space\n",
" tableListHTML += f'<tr><td>{handleSpace}</td><td>{item[1]}</td></tr>'\n",
" tableListMD += f'{handleSpace}|{item[1]}\\n'\n",
" tableListHTML += f'</table>\\n'\n",
"\n",
" # Creating info blocks for HTML and Markdown\n",
Expand Down Expand Up @@ -1796,7 +1805,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 7,
"id": "bb568470-a2ed-446b-86c9-e298fb4bc6b3",
"metadata": {
"tags": []
Expand Down
6 changes: 3 additions & 3 deletions results/after.htm
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ <h1 id="start">Feature: after</h1>
<h2>Description</h2>
<p>material after the end of the word</p>
<h2>Feature Values</h2>
<h3>Frequency for nodetype <a href="featurebynodetype.htm#phrase">phrase</a></h3><table><tr><th>Value</th><th>Occurences</th></tr><tr><td> </td><td>35751</td></tr><tr><td>,</td><td>3593</td></tr><tr><td>.</td><td>2501</td></tr><tr><td>·</td><td>1106</td></tr><tr><td>;</td><td>518</td></tr><tr><td>,—</td><td>8</td></tr><tr><td>).</td><td>4</td></tr><tr><td></td><td>3</td></tr><tr><td>,)</td><td>2</td></tr><tr><td>·—</td><td>2</td></tr></table>
<h3>Frequency for nodetype <a href="featurebynodetype.htm#subphrase">subphrase</a></h3><table><tr><th>Value</th><th>Occurences</th></tr><tr><td> </td><td>119261</td></tr><tr><td>,</td><td>9439</td></tr><tr><td>.</td><td>5704</td></tr><tr><td>·</td><td>2355</td></tr><tr><td>;</td><td>969</td></tr><tr><td>,—</td><td>18</td></tr><tr><td></td><td>7</td></tr><tr><td>).</td><td>6</td></tr><tr><td>.]]</td><td>4</td></tr><tr><td>·—</td><td>4</td></tr></table>
<h3>Frequency for nodetype <a href="featurebynodetype.htm#word">word</a></h3><table><tr><th>Value</th><th>Occurences</th></tr><tr><td> </td><td>119261</td></tr><tr><td>,</td><td>9439</td></tr><tr><td>.</td><td>5704</td></tr><tr><td>·</td><td>2355</td></tr><tr><td>;</td><td>969</td></tr><tr><td>,—</td><td>18</td></tr><tr><td></td><td>7</td></tr><tr><td>).</td><td>6</td></tr><tr><td>.]]</td><td>4</td></tr><tr><td>·—</td><td>4</td></tr></table>
<h3>Frequency for nodetype <a href="featurebynodetype.htm#phrase">phrase</a></h3><table><tr><th>Value</th><th>Occurences</th></tr><tr><td>space</td><td>35751</td></tr><tr><td>,</td><td>3593</td></tr><tr><td>.</td><td>2501</td></tr><tr><td>·</td><td>1106</td></tr><tr><td>;</td><td>518</td></tr><tr><td>,—</td><td>8</td></tr><tr><td>).</td><td>4</td></tr><tr><td></td><td>3</td></tr><tr><td>,)</td><td>2</td></tr><tr><td>·—</td><td>2</td></tr></table>
<h3>Frequency for nodetype <a href="featurebynodetype.htm#subphrase">subphrase</a></h3><table><tr><th>Value</th><th>Occurences</th></tr><tr><td>space</td><td>119261</td></tr><tr><td>,</td><td>9439</td></tr><tr><td>.</td><td>5704</td></tr><tr><td>·</td><td>2355</td></tr><tr><td>;</td><td>969</td></tr><tr><td>,—</td><td>18</td></tr><tr><td></td><td>7</td></tr><tr><td>).</td><td>6</td></tr><tr><td>.]]</td><td>4</td></tr><tr><td>·—</td><td>4</td></tr></table>
<h3>Frequency for nodetype <a href="featurebynodetype.htm#word">word</a></h3><table><tr><th>Value</th><th>Occurences</th></tr><tr><td>space</td><td>119261</td></tr><tr><td>,</td><td>9439</td></tr><tr><td>.</td><td>5704</td></tr><tr><td>·</td><td>2355</td></tr><tr><td>;</td><td>969</td></tr><tr><td>,—</td><td>18</td></tr><tr><td></td><td>7</td></tr><tr><td>).</td><td>6</td></tr><tr><td>.]]</td><td>4</td></tr><tr><td>·—</td><td>4</td></tr></table>

<p>Created on Jan. 24, 2024 using <a href="https://github.com/tonyjurg/Doc4TF">Doc4TF - version 0.3 (Jan. 24, 2024)</a></p></body></html>
6 changes: 3 additions & 3 deletions results/after.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ material after the end of the word
### Frequency for nodetype [phrase](featurebynodetype.md#phrase)
Value|Occurences
---|---
|35751
space|35751
,|3593
.|2501
·|1106
Expand All @@ -22,7 +22,7 @@ Value|Occurences
### Frequency for nodetype [subphrase](featurebynodetype.md#subphrase)
Value|Occurences
---|---
|119261
space|119261
,|9439
.|5704
·|2355
Expand All @@ -35,7 +35,7 @@ Value|Occurences
### Frequency for nodetype [word](featurebynodetype.md#word)
Value|Occurences
---|---
|119261
space|119261
,|9439
.|5704
·|2355
Expand Down
1 change: 1 addition & 0 deletions results/featurebydatatype.htm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ <h1>Overview features per datatype</hl><h2 id="Integer">Integer</h2>
<tr><td><a href="num.htm#start">num</a></td><td><a href="featurebytype.htm#Node">Node</a></td><td><a href="featurebynodetype.htm#book">book</a> <a href="featurebynodetype.htm#sentence">sentence</a> <a href="featurebynodetype.htm#group">group</a> <a href="featurebynodetype.htm#clause">clause</a> <a href="featurebynodetype.htm#wg">wg</a> <a href="featurebynodetype.htm#phrase">phrase</a> <a href="featurebynodetype.htm#subphrase">subphrase</a> <a href="featurebynodetype.htm#word">word</a> </td><td>generated number (not in xml): book: (Matthew=1, Mark=2, ..., Revelation=27); sentence: numbered per chapter; word: numbered per verse.</td><td>`1` `2` `3` `4`</td></tr>
<tr><td><a href="strong.htm#start">strong</a></td><td><a href="featurebytype.htm#Node">Node</a></td><td><a href="featurebynodetype.htm#phrase">phrase</a> <a href="featurebynodetype.htm#subphrase">subphrase</a> <a href="featurebynodetype.htm#word">word</a> </td><td>strong number</td><td>`846` `3004` `4771` `1473`</td></tr>
<tr><td><a href="verse.htm#start">verse</a></td><td><a href="featurebytype.htm#Node">Node</a></td><td><a href="featurebynodetype.htm#verse">verse</a> <a href="featurebynodetype.htm#word">word</a> </td><td>verse number, from ref attribute in xml</td><td>`1` `2` `3` `4`</td></tr>
<tr><td><a href="sibling.htm#start">sibling</a></td><td><a href="featurebytype.htm#Edge">Edge</a></td><td><a href="featurebynodetype.htm#sentence">sentence</a> <a href="featurebynodetype.htm#group">group</a> <a href="featurebynodetype.htm#clause">clause</a> <a href="featurebynodetype.htm#wg">wg</a> <a href="featurebynodetype.htm#phrase">phrase</a> <a href="featurebynodetype.htm#subphrase">subphrase</a> <a href="featurebynodetype.htm#word">word</a> </td><td>this is XML attribute sibling</td><td>`1` `2` `3` `4`</td></tr>
</table>
<h2 id="String">String</h2>
<table><tr><th>Feature</th><th>Featuretype</th><th>Available on nodes</th><th>Description</th><th>Examples</th></tr>
Expand Down
1 change: 1 addition & 0 deletions results/featurebydatatype.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Feature|Featuretype|Available on nodes|Description|Examples
[`num`](num.md#readme)|[`Node`](featurebytype.md#node)|[`book`](featurebynodetype.md#book) [`sentence`](featurebynodetype.md#sentence) [`group`](featurebynodetype.md#group) [`clause`](featurebynodetype.md#clause) [`wg`](featurebynodetype.md#wg) [`phrase`](featurebynodetype.md#phrase) [`subphrase`](featurebynodetype.md#subphrase) [`word`](featurebynodetype.md#word) |generated number (not in xml): book: (Matthew=1, Mark=2, ..., Revelation=27); sentence: numbered per chapter; word: numbered per verse.|`1` `2` `3` `4`
[`strong`](strong.md#readme)|[`Node`](featurebytype.md#node)|[`phrase`](featurebynodetype.md#phrase) [`subphrase`](featurebynodetype.md#subphrase) [`word`](featurebynodetype.md#word) |strong number|`846` `3004` `4771` `1473`
[`verse`](verse.md#readme)|[`Node`](featurebytype.md#node)|[`verse`](featurebynodetype.md#verse) [`word`](featurebynodetype.md#word) |verse number, from ref attribute in xml|`1` `2` `3` `4`
[`sibling`](sibling.md#readme)|[`Edge`](featurebytype.md#edge)|[`sentence`](featurebynodetype.md#sentence) [`group`](featurebynodetype.md#group) [`clause`](featurebynodetype.md#clause) [`wg`](featurebynodetype.md#wg) [`phrase`](featurebynodetype.md#phrase) [`subphrase`](featurebynodetype.md#subphrase) [`word`](featurebynodetype.md#word) |this is XML attribute sibling|`1` `2` `3` `4`
## String

Feature|Featuretype|Available on nodes|Description|Examples
Expand Down
Loading

0 comments on commit 5d140f5

Please sign in to comment.