Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Adapted to the new runes module in the core CLTK
  • Loading branch information
clemsciences committed Jul 11, 2018
1 parent 9d4d196 commit 05f4184
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions languages/old-norse/runes.ipynb
Expand Up @@ -8,6 +8,16 @@
"Note: in order to use this Jupyter notebook, you need at least python 3.6 or above."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Install required modules.\n",
"```bash\n",
"$ sudo pip3.6 install requests lxml \n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -57,7 +67,7 @@
"metadata": {},
"outputs": [],
"source": [
"from runesanalyzer import data"
"from cltk.corpus.old_norse import runes"
]
},
{
Expand All @@ -83,7 +93,7 @@
}
],
"source": [
"for alphabet in [data.ELDER_FUTHARK, data.YOUNGER_FUTHARK, data.SHORT_TWIG_YOUNGER_FUTHARK]:\n",
"for alphabet in [runes.ELDER_FUTHARK, runes.YOUNGER_FUTHARK, runes.SHORT_TWIG_YOUNGER_FUTHARK]:\n",
" print(alphabet)"
]
},
Expand All @@ -100,7 +110,7 @@
"metadata": {},
"outputs": [],
"source": [
"from runesanalyzer import runes"
"from cltk.corpus.old_norse import runes"
]
},
{
Expand All @@ -116,7 +126,7 @@
"metadata": {},
"outputs": [],
"source": [
"from runesanalyzer.data import RunicAlphabetName"
"from cltk.corpus.old_norse.runes import RunicAlphabetName"
]
},
{
Expand All @@ -143,7 +153,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Some famous runic inscriptions"
"Some famous runic inscriptions like the Jelling stones."
]
},
{
Expand All @@ -163,27 +173,17 @@
}
],
"source": [
"data.little_jelling_stone"
"little_jelling_stone = '᛬ᚴᚢᚱᛘᛦ᛬ᚴᚢᚾᚢᚴᛦ᛬ᚴ(ᛅᚱ)ᚦᛁ᛬ᚴᚢᛒᛚ᛬ᚦᚢᛋᛁ᛬ᛅ(ᚠᛏ)᛬ᚦᚢᚱᚢᛁ᛬ᚴᚢᚾᚢ᛬ᛋᛁᚾᛅ᛬ᛏᛅᚾᛘᛅᚱᚴᛅᛦ᛬ᛒᚢᛏ᛬'\n",
"little_jelling_stone"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'ᚼᛅᚱᛅᛚᛏᚱ᛬ᚴᚢᚾᚢᚴᛦ᛬ᛒᛅᚦ᛬ᚴᛅᚢᚱᚢᛅ ᚴᚢᛒᛚ᛬ᚦᛅᚢᛋᛁ᛬ᛅᚠᛏ᛬ᚴᚢᚱᛘ ᚠᛅᚦᚢᚱ ᛋᛁᚾ ᛅᚢᚴ ᛅᚠᛏ᛬ᚦᚭᚢᚱᚢᛁ᛬ᛘᚢᚦᚢᚱ᛬ᛋᛁᚾᛅ᛬ᛋᛅ ᚼᛅᚱᛅᛚᛏᚱ(᛬)ᛁᛅᛋ᛬ᛋᚭᛦ᛫ᚢᛅᚾ᛫ᛏᛅᚾᛘᛅᚢᚱᚴ\\nᛅᛚᛅ᛫ᛅᚢᚴ᛫ᚾᚢᚱᚢᛁᚴ\\n᛫ᛅᚢᚴ᛫ᛏ(ᛅ)ᚾᛁ(᛫ᚴᛅᚱᚦᛁ᛫)ᚴᚱᛁᛋᛏᚾᚭ'"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"data.big_jelling_stone"
"big_jelling_stone = 'ᚼᛅᚱᛅᛚᛏᚱ᛬ᚴᚢᚾᚢᚴᛦ᛬ᛒᛅᚦ᛬ᚴᛅᚢᚱᚢᛅ ᚴᚢᛒᛚ᛬ᚦᛅᚢᛋᛁ᛬ᛅᚠᛏ᛬ᚴᚢᚱᛘ ᚠᛅᚦᚢᚱ ᛋᛁᚾ ᛅᚢᚴ ᛅᚠᛏ᛬ᚦᚭᚢᚱᚢᛁ᛬ᛘᚢᚦᚢᚱ᛬ᛋᛁᚾᛅ᛬ᛋᛅ ᚼᛅᚱᛅᛚᛏᚱ(᛬)ᛁᛅᛋ᛬ᛋᚭᛦ᛫ᚢᛅᚾ᛫ᛏᛅᚾᛘᛅᚢᚱᚴ\\nᛅᛚᛅ᛫ᛅᚢᚴ᛫ᚾᚢᚱᚢᛁᚴ\\n᛫ᛅᚢᚴ᛫ᛏ(ᛅ)ᚾᛁ(᛫ᚴᛅᚱᚦᛁ᛫)ᚴᚱᛁᛋᛏᚾᚭ'"
]
},
{
Expand Down Expand Up @@ -220,7 +220,7 @@
}
],
"source": [
"data.ELDER_FUTHARK[0]"
"runes.ELDER_FUTHARK[0]"
]
},
{
Expand All @@ -247,7 +247,7 @@
}
],
"source": [
"data.Rune(data.RunicAlphabetName.elder_futhark, \"\\u16A0\", \"f\", \"f\", \"fehu\")"
"runes.Rune(runes.RunicAlphabetName.elder_futhark, \"\\u16A0\", \"f\", \"f\", \"fehu\")"
]
},
{
Expand All @@ -274,7 +274,7 @@
}
],
"source": [
"data.Transcriber.transcribe(data.little_jelling_stone, data.YOUNGER_FUTHARK)"
"runes.Transcriber.transcribe(little_jelling_stone, runes.YOUNGER_FUTHARK)"
]
},
{
Expand All @@ -295,7 +295,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 12,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -329,7 +329,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"By Clément Besnier, email address: clemsciences@aol.com"
"By Clément Besnier, email address: clemsciences@aol.com, web site: https://clementbesnier.pythonanywhere.com/, twitter: clemsciences"
]
}
],
Expand Down

0 comments on commit 05f4184

Please sign in to comment.