Skip to content

Commit 05f4184

Browse files
committed
Adapted to the new runes module in the core CLTK
1 parent 9d4d196 commit 05f4184

1 file changed

Lines changed: 24 additions & 24 deletions

File tree

languages/old-norse/runes.ipynb

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88
"Note: in order to use this Jupyter notebook, you need at least python 3.6 or above."
99
]
1010
},
11+
{
12+
"cell_type": "markdown",
13+
"metadata": {},
14+
"source": [
15+
"Install required modules.\n",
16+
"```bash\n",
17+
"$ sudo pip3.6 install requests lxml \n",
18+
"```"
19+
]
20+
},
1121
{
1222
"cell_type": "markdown",
1323
"metadata": {},
@@ -57,7 +67,7 @@
5767
"metadata": {},
5868
"outputs": [],
5969
"source": [
60-
"from runesanalyzer import data"
70+
"from cltk.corpus.old_norse import runes"
6171
]
6272
},
6373
{
@@ -83,7 +93,7 @@
8393
}
8494
],
8595
"source": [
86-
"for alphabet in [data.ELDER_FUTHARK, data.YOUNGER_FUTHARK, data.SHORT_TWIG_YOUNGER_FUTHARK]:\n",
96+
"for alphabet in [runes.ELDER_FUTHARK, runes.YOUNGER_FUTHARK, runes.SHORT_TWIG_YOUNGER_FUTHARK]:\n",
8797
" print(alphabet)"
8898
]
8999
},
@@ -100,7 +110,7 @@
100110
"metadata": {},
101111
"outputs": [],
102112
"source": [
103-
"from runesanalyzer import runes"
113+
"from cltk.corpus.old_norse import runes"
104114
]
105115
},
106116
{
@@ -116,7 +126,7 @@
116126
"metadata": {},
117127
"outputs": [],
118128
"source": [
119-
"from runesanalyzer.data import RunicAlphabetName"
129+
"from cltk.corpus.old_norse.runes import RunicAlphabetName"
120130
]
121131
},
122132
{
@@ -143,7 +153,7 @@
143153
"cell_type": "markdown",
144154
"metadata": {},
145155
"source": [
146-
"Some famous runic inscriptions"
156+
"Some famous runic inscriptions like the Jelling stones."
147157
]
148158
},
149159
{
@@ -163,27 +173,17 @@
163173
}
164174
],
165175
"source": [
166-
"data.little_jelling_stone"
176+
"little_jelling_stone = '᛬ᚴᚢᚱᛘᛦ᛬ᚴᚢᚾᚢᚴᛦ᛬ᚴ(ᛅᚱ)ᚦᛁ᛬ᚴᚢᛒᛚ᛬ᚦᚢᛋᛁ᛬ᛅ(ᚠᛏ)᛬ᚦᚢᚱᚢᛁ᛬ᚴᚢᚾᚢ᛬ᛋᛁᚾᛅ᛬ᛏᛅᚾᛘᛅᚱᚴᛅᛦ᛬ᛒᚢᛏ᛬'\n",
177+
"little_jelling_stone"
167178
]
168179
},
169180
{
170181
"cell_type": "code",
171182
"execution_count": 7,
172183
"metadata": {},
173-
"outputs": [
174-
{
175-
"data": {
176-
"text/plain": [
177-
"'ᚼᛅᚱᛅᛚᛏᚱ᛬ᚴᚢᚾᚢᚴᛦ᛬ᛒᛅᚦ᛬ᚴᛅᚢᚱᚢᛅ ᚴᚢᛒᛚ᛬ᚦᛅᚢᛋᛁ᛬ᛅᚠᛏ᛬ᚴᚢᚱᛘ ᚠᛅᚦᚢᚱ ᛋᛁᚾ ᛅᚢᚴ ᛅᚠᛏ᛬ᚦᚭᚢᚱᚢᛁ᛬ᛘᚢᚦᚢᚱ᛬ᛋᛁᚾᛅ᛬ᛋᛅ ᚼᛅᚱᛅᛚᛏᚱ(᛬)ᛁᛅᛋ᛬ᛋᚭᛦ᛫ᚢᛅᚾ᛫ᛏᛅᚾᛘᛅᚢᚱᚴ\\nᛅᛚᛅ᛫ᛅᚢᚴ᛫ᚾᚢᚱᚢᛁᚴ\\n᛫ᛅᚢᚴ᛫ᛏ(ᛅ)ᚾᛁ(᛫ᚴᛅᚱᚦᛁ᛫)ᚴᚱᛁᛋᛏᚾᚭ'"
178-
]
179-
},
180-
"execution_count": 7,
181-
"metadata": {},
182-
"output_type": "execute_result"
183-
}
184-
],
184+
"outputs": [],
185185
"source": [
186-
"data.big_jelling_stone"
186+
"big_jelling_stone = 'ᚼᛅᚱᛅᛚᛏᚱ᛬ᚴᚢᚾᚢᚴᛦ᛬ᛒᛅᚦ᛬ᚴᛅᚢᚱᚢᛅ ᚴᚢᛒᛚ᛬ᚦᛅᚢᛋᛁ᛬ᛅᚠᛏ᛬ᚴᚢᚱᛘ ᚠᛅᚦᚢᚱ ᛋᛁᚾ ᛅᚢᚴ ᛅᚠᛏ᛬ᚦᚭᚢᚱᚢᛁ᛬ᛘᚢᚦᚢᚱ᛬ᛋᛁᚾᛅ᛬ᛋᛅ ᚼᛅᚱᛅᛚᛏᚱ(᛬)ᛁᛅᛋ᛬ᛋᚭᛦ᛫ᚢᛅᚾ᛫ᛏᛅᚾᛘᛅᚢᚱᚴ\\nᛅᛚᛅ᛫ᛅᚢᚴ᛫ᚾᚢᚱᚢᛁᚴ\\n᛫ᛅᚢᚴ᛫ᛏ(ᛅ)ᚾᛁ(᛫ᚴᛅᚱᚦᛁ᛫)ᚴᚱᛁᛋᛏᚾᚭ'"
187187
]
188188
},
189189
{
@@ -220,7 +220,7 @@
220220
}
221221
],
222222
"source": [
223-
"data.ELDER_FUTHARK[0]"
223+
"runes.ELDER_FUTHARK[0]"
224224
]
225225
},
226226
{
@@ -247,7 +247,7 @@
247247
}
248248
],
249249
"source": [
250-
"data.Rune(data.RunicAlphabetName.elder_futhark, \"\\u16A0\", \"f\", \"f\", \"fehu\")"
250+
"runes.Rune(runes.RunicAlphabetName.elder_futhark, \"\\u16A0\", \"f\", \"f\", \"fehu\")"
251251
]
252252
},
253253
{
@@ -274,7 +274,7 @@
274274
}
275275
],
276276
"source": [
277-
"data.Transcriber.transcribe(data.little_jelling_stone, data.YOUNGER_FUTHARK)"
277+
"runes.Transcriber.transcribe(little_jelling_stone, runes.YOUNGER_FUTHARK)"
278278
]
279279
},
280280
{
@@ -295,7 +295,7 @@
295295
},
296296
{
297297
"cell_type": "code",
298-
"execution_count": null,
298+
"execution_count": 12,
299299
"metadata": {},
300300
"outputs": [
301301
{
@@ -329,7 +329,7 @@
329329
"cell_type": "markdown",
330330
"metadata": {},
331331
"source": [
332-
"By Clément Besnier, email address: clemsciences@aol.com"
332+
"By Clément Besnier, email address: clemsciences@aol.com, web site: https://clementbesnier.pythonanywhere.com/, twitter: clemsciences"
333333
]
334334
}
335335
],

0 commit comments

Comments
 (0)