Skip to content

Commit

Permalink
readme badges
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkroorda committed Jun 26, 2020
1 parent 8d87675 commit 4fc68c6
Show file tree
Hide file tree
Showing 14 changed files with 49 additions and 56 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[![DOI](https://zenodo.org/badge/180373562.svg)](https://zenodo.org/badge/latestdoi/180373562)

This is a
[Text-Fabric](https://githubv.com/annotation/text-fabric)
[Text-Fabric](https://github.com/annotation/text-fabric)
example app for working with
a mini corpus consisting of just 99 words from the book
[Consider Phlebas](https://en.wikipedia.org/wiki/Consider_Phlebas)
Expand Down Expand Up @@ -45,5 +45,4 @@ Authors

This repo is by

* [Dirk Roorda](https://www.linkedin.com/in/dirkroorda/) at
[DANS](https://www.dans.knaw.nl)
* Dirk Roorda @ [annotation](https://www.annotation.nl)
78 changes: 36 additions & 42 deletions programs/convert.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -126,22 +126,6 @@
"TF = Fabric(locations=TF_PATH, silent=True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Next we initialize the conversion machinery: we obtain an object with methods."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"cv = CV(TF)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -164,7 +148,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -185,7 +169,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -233,7 +217,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -262,7 +246,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -288,7 +272,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -354,6 +338,7 @@
" in the sense that it will be linked to subsequent slot nodes, before it is terminated,\n",
" or after it has been resumed;\n",
"* If a fatal error is encountered, the director can simply say `cv.stop(message)`;\n",
" the director is responsible for returning control after issuing a `cv.stop)`;\n",
"* If the actions involve section nodes, it will be checked whether all slots occur in a section,\n",
" and whether big sections such as books will not start, end, or terminate inside small sections such\n",
" as verses. Warnings will be issued, but you can suppress them;\n",
Expand All @@ -362,7 +347,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -379,7 +364,7 @@
"\n",
" wordRe = re.compile(r'^(.*?)([^A-Za-z0-9]*)$')\n",
" metaRe = re.compile(r'^\\$\\s*([^= ]+)\\s*=\\s*(.*)')\n",
"\n",
" \n",
" for line in source.strip().split('\\n'):\n",
" line = line.rstrip()\n",
" if not line:\n",
Expand Down Expand Up @@ -498,9 +483,16 @@
"We are going to run the conversion and check whether all is well."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Next we initialize the conversion machinery: we obtain an object with methods."
]
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 13,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -536,7 +528,7 @@
" | 119 nodes of all types\n",
" | 0.01s OK\n",
" | 0.00s Removing unlinked nodes ... \n",
" | | 0.00s 2 unlinked \"sentence\" nodes: [1, 4]\n",
" | | -0.00s 2 unlinked \"sentence\" nodes: [1, 4]\n",
" | | 0.00s 2 unlinked nodes\n",
" | | 0.00s Leaving 117 nodes\n",
" | 0.00s checking for nodes and edges ... \n",
Expand Down Expand Up @@ -567,9 +559,9 @@
" 0.00s OK: oslots is valid\n",
" | 0.00s T author to /Users/dirk/github/annotation/banks/tf/0.2\n",
" | 0.00s T gap to /Users/dirk/github/annotation/banks/tf/0.2\n",
" | 0.00s T letters to /Users/dirk/github/annotation/banks/tf/0.2\n",
" | 0.00s T number to /Users/dirk/github/annotation/banks/tf/0.2\n",
" | 0.00s T otype to /Users/dirk/github/annotation/banks/tf/0.2\n",
" | 0.01s T letters to /Users/dirk/github/annotation/banks/tf/0.2\n",
" | 0.01s T number to /Users/dirk/github/annotation/banks/tf/0.2\n",
" | 0.01s T otype to /Users/dirk/github/annotation/banks/tf/0.2\n",
" | 0.00s T punc to /Users/dirk/github/annotation/banks/tf/0.2\n",
" | 0.00s T terminator to /Users/dirk/github/annotation/banks/tf/0.2\n",
" | 0.00s T title to /Users/dirk/github/annotation/banks/tf/0.2\n",
Expand All @@ -584,12 +576,14 @@
"True"
]
},
"execution_count": 11,
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"cv = CV(TF)\n",
"\n",
"good = cv.walk(\n",
" director,\n",
" slotType,\n",
Expand All @@ -615,7 +609,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 37,
"metadata": {},
"outputs": [
{
Expand All @@ -632,7 +626,7 @@
"@valueType=str\n",
"@version=0.2\n",
"@writtenBy=Text-Fabric\n",
"@dateWritten=2019-06-03T07:30:41Z\n",
"@dateWritten=2020-02-13T06:46:28Z\n",
"\n",
"1-99\tword\n",
"100\tbook\n",
Expand All @@ -657,7 +651,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 38,
"metadata": {},
"outputs": [
{
Expand All @@ -680,7 +674,7 @@
"@url=https://www.goodreads.com/work/quotes/14366-consider-phlebas\n",
"@version=0.2\n",
"@writtenBy=Text-Fabric\n",
"@dateWritten=2019-06-03T07:30:41Z\n",
"@dateWritten=2020-02-13T06:46:28Z\n",
"\n",
"\n"
]
Expand All @@ -700,7 +694,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 39,
"metadata": {},
"outputs": [
{
Expand All @@ -717,7 +711,7 @@
"@valueType=str\n",
"@version=0.2\n",
"@writtenBy=Text-Fabric\n",
"@dateWritten=2019-06-03T07:30:41Z\n",
"@dateWritten=2020-02-13T06:46:28Z\n",
"\n",
"100\t1-99\n",
"1-55\n",
Expand Down Expand Up @@ -767,7 +761,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 40,
"metadata": {},
"outputs": [
{
Expand All @@ -785,7 +779,7 @@
"@valueType=int\n",
"@version=0.2\n",
"@writtenBy=Text-Fabric\n",
"@dateWritten=2019-06-03T07:30:41Z\n",
"@dateWritten=2020-02-13T06:46:28Z\n",
"\n",
"101\t1\n",
"2\n",
Expand Down Expand Up @@ -838,7 +832,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 41,
"metadata": {},
"outputs": [
{
Expand All @@ -856,7 +850,7 @@
"@valueType=str\n",
"@version=0.2\n",
"@writtenBy=Text-Fabric\n",
"@dateWritten=2019-06-03T07:30:41Z\n",
"@dateWritten=2020-02-13T06:46:28Z\n",
"\n",
"Everything\n",
"about\n",
Expand Down Expand Up @@ -984,7 +978,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 42,
"metadata": {},
"outputs": [
{
Expand All @@ -1003,7 +997,7 @@
"@valueType=str\n",
"@version=0.2\n",
"@writtenBy=Text-Fabric\n",
"@dateWritten=2019-06-03T07:30:41Z\n",
"@dateWritten=2020-02-13T06:46:28Z\n",
"\n",
"3\t,\n",
"6\t,\n",
Expand Down
Binary file removed sha.png
Binary file not shown.
2 changes: 1 addition & 1 deletion sim/tf/0.2/sim.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@valueType=int
@version=0.2
@writtenBy=Text-Fabric
@dateWritten=2019-05-17T11:29:52Z
@dateWritten=2020-06-10T19:40:37Z

15 7
1 2,9,12,23,41,43,47,76 8
Expand Down
2 changes: 1 addition & 1 deletion tf/0.2/author.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
@valueType=str
@version=0.2
@writtenBy=Text-Fabric
@dateWritten=2019-06-03T07:30:41Z
@dateWritten=2020-02-13T13:37:47Z

100 Iain M. Banks
2 changes: 1 addition & 1 deletion tf/0.2/gap.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@valueType=int
@version=0.2
@writtenBy=Text-Fabric
@dateWritten=2019-06-03T07:30:41Z
@dateWritten=2020-02-13T13:37:47Z

10 1
1
Expand Down
2 changes: 1 addition & 1 deletion tf/0.2/letters.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@valueType=str
@version=0.2
@writtenBy=Text-Fabric
@dateWritten=2019-06-03T07:30:41Z
@dateWritten=2020-02-13T13:37:47Z

Everything
about
Expand Down
2 changes: 1 addition & 1 deletion tf/0.2/number.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@valueType=int
@version=0.2
@writtenBy=Text-Fabric
@dateWritten=2019-06-03T07:30:41Z
@dateWritten=2020-02-13T13:37:47Z

101 1
2
Expand Down
2 changes: 1 addition & 1 deletion tf/0.2/oslots.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@valueType=str
@version=0.2
@writtenBy=Text-Fabric
@dateWritten=2019-06-03T07:30:41Z
@dateWritten=2020-02-13T13:37:47Z

100 1-99
1-55
Expand Down
2 changes: 1 addition & 1 deletion tf/0.2/otext.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
@url=https://www.goodreads.com/work/quotes/14366-consider-phlebas
@version=0.2
@writtenBy=Text-Fabric
@dateWritten=2019-06-03T07:30:41Z
@dateWritten=2020-02-13T13:37:47Z

2 changes: 1 addition & 1 deletion tf/0.2/otype.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@valueType=str
@version=0.2
@writtenBy=Text-Fabric
@dateWritten=2019-06-03T07:30:41Z
@dateWritten=2020-02-13T13:37:47Z

1-99 word
100 book
Expand Down
2 changes: 1 addition & 1 deletion tf/0.2/punc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@valueType=str
@version=0.2
@writtenBy=Text-Fabric
@dateWritten=2019-06-03T07:30:41Z
@dateWritten=2020-02-13T13:37:47Z

3 ,
6 ,
Expand Down
2 changes: 1 addition & 1 deletion tf/0.2/terminator.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@valueType=str
@version=0.2
@writtenBy=Text-Fabric
@dateWritten=2019-06-03T07:30:41Z
@dateWritten=2020-02-13T13:37:47Z

103 ,
,
Expand Down
2 changes: 1 addition & 1 deletion tf/0.2/title.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
@valueType=str
@version=0.2
@writtenBy=Text-Fabric
@dateWritten=2019-06-03T07:30:41Z
@dateWritten=2020-02-13T13:37:47Z

100 Consider Phlebas

0 comments on commit 4fc68c6

Please sign in to comment.