Skip to content

Commit f810eb6

Browse files
author
Charles Pletcher
committed
Attempt to add favicon, fix up site navigation
1 parent 5646d4a commit f810eb6

11 files changed

Lines changed: 40 additions & 192 deletions

08-tfidf.ipynb

Lines changed: 23 additions & 184 deletions
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,9 @@
4646
},
4747
{
4848
"cell_type": "code",
49-
"execution_count": 1,
49+
"execution_count": null,
5050
"metadata": {},
51-
"outputs": [
52-
{
53-
"name": "stdout",
54-
"output_type": "stream",
55-
"text": [
56-
"Collecting lxml\n",
57-
" Downloading lxml-5.3.1-cp313-cp313-manylinux_2_28_x86_64.whl.metadata (3.7 kB)\n",
58-
"Downloading lxml-5.3.1-cp313-cp313-manylinux_2_28_x86_64.whl (5.0 MB)\n",
59-
"\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m5.0/5.0 MB\u001b[0m \u001b[31m11.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m31m12.4 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\n",
60-
"\u001b[?25hInstalling collected packages: lxml\n",
61-
"Successfully installed lxml-5.3.1\n",
62-
"Note: you may need to restart the kernel to use updated packages.\n"
63-
]
64-
}
65-
],
51+
"outputs": [],
6652
"source": [
6753
"%pip install lxml"
6854
]
@@ -78,7 +64,7 @@
7864
},
7965
{
8066
"cell_type": "code",
81-
"execution_count": 2,
67+
"execution_count": null,
8268
"metadata": {},
8369
"outputs": [],
8470
"source": [
@@ -101,7 +87,7 @@
10187
},
10288
{
10389
"cell_type": "code",
104-
"execution_count": 9,
90+
"execution_count": null,
10591
"metadata": {},
10692
"outputs": [],
10793
"source": [
@@ -119,7 +105,7 @@
119105
},
120106
{
121107
"cell_type": "code",
122-
"execution_count": 4,
108+
"execution_count": null,
123109
"metadata": {},
124110
"outputs": [],
125111
"source": [
@@ -143,24 +129,9 @@
143129
},
144130
{
145131
"cell_type": "code",
146-
"execution_count": 10,
132+
"execution_count": null,
147133
"metadata": {},
148-
"outputs": [
149-
{
150-
"name": "stdout",
151-
"output_type": "stream",
152-
"text": [
153-
"xml/tlg0012/tlg001/tlg0012.tlg001.perseus-eng3.xml\n",
154-
"xml/tlg0012/tlg001/tlg0012.tlg001.perseus-eng4.xml\n",
155-
"xml/tlg0012/tlg001/tlg0012.tlg001.perseus-grc2.xml\n",
156-
"xml/tlg0012/tlg002/tlg0012.tlg002.perseus-eng3.xml\n",
157-
"xml/tlg0012/tlg002/tlg0012.tlg002.perseus-eng4.xml\n",
158-
"xml/tlg0012/tlg002/tlg0012.tlg002.perseus-grc2.xml\n",
159-
"xml/tlg0012/tlg003/tlg0012.tlg003.perseus-eng1.xml\n",
160-
"xml/tlg0012/tlg003/tlg0012.tlg003.perseus-grc1.xml\n"
161-
]
162-
}
163-
],
134+
"outputs": [],
164135
"source": [
165136
"for file in files:\n",
166137
" # print the name of the file as a sanity check\n",
@@ -222,36 +193,9 @@
222193
},
223194
{
224195
"cell_type": "code",
225-
"execution_count": 6,
196+
"execution_count": null,
226197
"metadata": {},
227-
"outputs": [
228-
{
229-
"name": "stdout",
230-
"output_type": "stream",
231-
"text": [
232-
"Collecting nltk\n",
233-
" Downloading nltk-3.9.1-py3-none-any.whl.metadata (2.9 kB)\n",
234-
"Collecting click (from nltk)\n",
235-
" Downloading click-8.1.8-py3-none-any.whl.metadata (2.3 kB)\n",
236-
"Collecting joblib (from nltk)\n",
237-
" Downloading joblib-1.4.2-py3-none-any.whl.metadata (5.4 kB)\n",
238-
"Collecting regex>=2021.8.3 (from nltk)\n",
239-
" Downloading regex-2024.11.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (40 kB)\n",
240-
"Collecting tqdm (from nltk)\n",
241-
" Downloading tqdm-4.67.1-py3-none-any.whl.metadata (57 kB)\n",
242-
"Downloading nltk-3.9.1-py3-none-any.whl (1.5 MB)\n",
243-
"\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.5/1.5 MB\u001b[0m \u001b[31m12.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
244-
"\u001b[?25hDownloading regex-2024.11.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (796 kB)\n",
245-
"\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m796.9/796.9 kB\u001b[0m \u001b[31m17.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
246-
"\u001b[?25hDownloading click-8.1.8-py3-none-any.whl (98 kB)\n",
247-
"Downloading joblib-1.4.2-py3-none-any.whl (301 kB)\n",
248-
"Downloading tqdm-4.67.1-py3-none-any.whl (78 kB)\n",
249-
"Installing collected packages: tqdm, regex, joblib, click, nltk\n",
250-
"Successfully installed click-8.1.8 joblib-1.4.2 nltk-3.9.1 regex-2024.11.6 tqdm-4.67.1\n",
251-
"Note: you may need to restart the kernel to use updated packages.\n"
252-
]
253-
}
254-
],
198+
"outputs": [],
255199
"source": [
256200
"%pip install nltk"
257201
]
@@ -267,31 +211,9 @@
267211
},
268212
{
269213
"cell_type": "code",
270-
"execution_count": 13,
214+
"execution_count": null,
271215
"metadata": {},
272-
"outputs": [
273-
{
274-
"name": "stderr",
275-
"output_type": "stream",
276-
"text": [
277-
"[nltk_data] Downloading package punkt to /home/charles/nltk_data...\n",
278-
"[nltk_data] Package punkt is already up-to-date!\n",
279-
"[nltk_data] Downloading package punkt_tab to\n",
280-
"[nltk_data] /home/charles/nltk_data...\n",
281-
"[nltk_data] Unzipping tokenizers/punkt_tab.zip.\n"
282-
]
283-
},
284-
{
285-
"data": {
286-
"text/plain": [
287-
"True"
288-
]
289-
},
290-
"execution_count": 13,
291-
"metadata": {},
292-
"output_type": "execute_result"
293-
}
294-
],
216+
"outputs": [],
295217
"source": [
296218
"import nltk\n",
297219
"\n",
@@ -313,20 +235,9 @@
313235
},
314236
{
315237
"cell_type": "code",
316-
"execution_count": 17,
238+
"execution_count": null,
317239
"metadata": {},
318-
"outputs": [
319-
{
320-
"name": "stdout",
321-
"output_type": "stream",
322-
"text": [
323-
"There are 200625 tokens in tlg0012.tlg001.perseus-eng3.txt.\n",
324-
"There are 175611 tokens in tlg0012.tlg001.perseus-eng4.txt.\n",
325-
"There are 152631 tokens in tlg0012.tlg002.perseus-eng3.txt.\n",
326-
"There are 135463 tokens in tlg0012.tlg002.perseus-eng4.txt.\n"
327-
]
328-
}
329-
],
240+
"outputs": [],
330241
"source": [
331242
"# Initialize the tokenizer\n",
332243
"from nltk.tokenize import word_tokenize\n",
@@ -372,7 +283,7 @@
372283
},
373284
{
374285
"cell_type": "code",
375-
"execution_count": 18,
286+
"execution_count": null,
376287
"metadata": {},
377288
"outputs": [],
378289
"source": [
@@ -400,20 +311,9 @@
400311
},
401312
{
402313
"cell_type": "code",
403-
"execution_count": 19,
314+
"execution_count": null,
404315
"metadata": {},
405-
"outputs": [
406-
{
407-
"data": {
408-
"text/plain": [
409-
"128"
410-
]
411-
},
412-
"execution_count": 19,
413-
"metadata": {},
414-
"output_type": "execute_result"
415-
}
416-
],
316+
"outputs": [],
417317
"source": [
418318
"tokenized_texts[\"tlg0012.tlg001.perseus-eng3.txt\"][\"counts\"][\"odysseus\"]"
419319
]
@@ -430,17 +330,9 @@
430330
},
431331
{
432332
"cell_type": "code",
433-
"execution_count": 29,
333+
"execution_count": null,
434334
"metadata": {},
435-
"outputs": [
436-
{
437-
"name": "stdout",
438-
"output_type": "stream",
439-
"text": [
440-
"0.0\n"
441-
]
442-
}
443-
],
335+
"outputs": [],
444336
"source": [
445337
"df_achilles = 0\n",
446338
"df_odysseus = 0\n",
@@ -469,40 +361,9 @@
469361
},
470362
{
471363
"cell_type": "code",
472-
"execution_count": 32,
364+
"execution_count": null,
473365
"metadata": {},
474-
"outputs": [
475-
{
476-
"name": "stdout",
477-
"output_type": "stream",
478-
"text": [
479-
"In tlg0012.tlg001.perseus-eng3.txt:\n",
480-
"TF of achilles: 0.002043613707165109\n",
481-
"TF of odysseus: 0.000638006230529595\n",
482-
"TF-IDF of achilles: 0.0\n",
483-
"TF-IDF of odysseus: 0.0\n",
484-
"\n",
485-
"In tlg0012.tlg001.perseus-eng4.txt:\n",
486-
"TF of achilles: 0.002403038534032606\n",
487-
"TF of odysseus: 0.0007061061095261686\n",
488-
"TF-IDF of achilles: 0.0\n",
489-
"TF-IDF of odysseus: 0.0\n",
490-
"\n",
491-
"In tlg0012.tlg002.perseus-eng3.txt:\n",
492-
"TF of achilles: 0.0001048279838302835\n",
493-
"TF of odysseus: 0.0041603606082643765\n",
494-
"TF-IDF of achilles: 0.0\n",
495-
"TF-IDF of odysseus: 0.0\n",
496-
"\n",
497-
"In tlg0012.tlg002.perseus-eng4.txt:\n",
498-
"TF of achilles: 0.0001254955227626732\n",
499-
"TF of odysseus: 0.0042816119530794386\n",
500-
"TF-IDF of achilles: 0.0\n",
501-
"TF-IDF of odysseus: 0.0\n",
502-
"\n"
503-
]
504-
}
505-
],
366+
"outputs": [],
506367
"source": [
507368
"# Now let's calculate the TF-IDF \"score\" for each term in each document.\n",
508369
"\n",
@@ -559,20 +420,9 @@
559420
},
560421
{
561422
"cell_type": "code",
562-
"execution_count": 33,
423+
"execution_count": null,
563424
"metadata": {},
564-
"outputs": [
565-
{
566-
"data": {
567-
"text/plain": [
568-
"{1, 2, 3}"
569-
]
570-
},
571-
"execution_count": 33,
572-
"metadata": {},
573-
"output_type": "execute_result"
574-
}
575-
],
425+
"outputs": [],
576426
"source": [
577427
"my_list = [1, 1, 2, 3, 3]\n",
578428
"\n",
@@ -590,18 +440,7 @@
590440
"cell_type": "code",
591441
"execution_count": null,
592442
"metadata": {},
593-
"outputs": [
594-
{
595-
"data": {
596-
"text/plain": [
597-
"2286"
598-
]
599-
},
600-
"execution_count": 37,
601-
"metadata": {},
602-
"output_type": "execute_result"
603-
}
604-
],
443+
"outputs": [],
605444
"source": [
606445
"non_universal_terms = {}\n",
607446
"\n",

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
# Tufts University — Intro to Digital Humanities
1+
# Tufts Introduction to Digital Humanities — Course Site
22

3-
This is a work in progress. To get started, you can follow along with any of the notebooks, or you can open a notebook directly in a GitHub codespace.
3+
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.14805610.svg)](https://doi.org/10.5281/zenodo.14805610)
4+
5+
This site was built using the tools made available by MyST Markdown. More information can be found at the link above.
46

57
## Licenses
68

index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Tufts University — Intro to Digital Humanities
2+
3+
This is a work in progress. To get started, you can follow along with any of the notebooks, or you can open a notebook directly in a GitHub codespace.
4+
5+
## Licenses
6+
7+
All of the code in this repository is MIT-licensed.
8+
9+
All else is licensed under CC-BY 4.0.

myst.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
# See docs at: https://mystmd.org/guide/frontmatter
22
version: 1
33
project:
4-
id: cf58ebae-6a0e-4148-a15a-335cb48db8b2
5-
# description:
6-
# keywords: []
7-
# authors: []
8-
# github: https://github.com/jupyter-book/mystmd-quickstart
4+
github: https://github.com/TuftsIntroDH/TuftsIntroDH.github.io/
95
license: CC-BY-4.0
106
open_access: true
117
short_title: "Intro DH"
128
title: "Tufts Intro DH"
139
toc:
14-
- file: README.md
10+
- file: index.md
1511
- pattern: "*.ipynb"
1612
site:
1713
template: book-theme
14+
favicon: public/favicon.ico
1815
options:
1916
logo_text: "Tufts Intro to DH"

public/android-chrome-192x192.png

9.66 KB
Loading

public/android-chrome-512x512.png

24.9 KB
Loading

public/apple-touch-icon.png

8.72 KB
Loading

public/favicon-16x16.png

454 Bytes
Loading

public/favicon-32x32.png

1008 Bytes
Loading

public/favicon.ico

15 KB
Binary file not shown.

0 commit comments

Comments
 (0)