Update README.md
Browse files
README.md
CHANGED
|
@@ -13,6 +13,10 @@ tags:
|
|
| 13 |
## <h1>Spongebob Transcripts Dataset 🧽</h1>
|
| 14 |
The Spongebob Transcripts Dataset is a collection of transcripts from the beloved animated television series, Spongebob Squarepants. This dataset includes information on each line of dialogue spoken by a character, including the character's name, their replica, and the episode ID.
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
## <h3>Dataset Overview 📊</h3>
|
| 17 |
|
| 18 |
|Column | Description |
|
|
@@ -24,9 +28,7 @@ The Spongebob Transcripts Dataset is a collection of transcripts from the belove
|
|
| 24 |
## <h3>System Replicas🔍</h3>
|
| 25 |
The system replicas describe the actions and events that occur in each episode. These replicas are written in a specific format, using brackets to indicate actions and events.
|
| 26 |
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
**The format for a system replica:**
|
| 30 |
|
| 31 |
`{system} : [The episode opens with a bubble transition, and we see a coral reef under the sea. The camera zooms to initiate parallax scrolling, which reveals the city of Bikini Bottom. It continues zooming to show a brown rock, a Moai head, and a pineapple, which each contain inhabitants.]`
|
| 32 |
|
|
@@ -39,6 +41,38 @@ The system replicas describe the actions and events that occur in each episode.
|
|
| 39 |
|**Spongebob** | I guess so. |s1e3_24|
|
| 40 |
|**Patrick** | That's just fancy talk. If you wanna be fancy, hold your pinky up like this. The higher you hold it, the fancier you are. |s1e3_25|
|
| 41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
## <h3>Data Sources 📝</h3>
|
| 43 |
The transcripts were sourced *Encyclopedia SpongeBobia*.
|
| 44 |
|
|
|
|
| 13 |
## <h1>Spongebob Transcripts Dataset 🧽</h1>
|
| 14 |
The Spongebob Transcripts Dataset is a collection of transcripts from the beloved animated television series, Spongebob Squarepants. This dataset includes information on each line of dialogue spoken by a character, including the character's name, their replica, and the episode ID.
|
| 15 |
|
| 16 |
+
The number of characters in the dataset: **68**
|
| 17 |
+
|
| 18 |
+
Total number of words in the dataset: **~56,000 words**, **~2800 rows**, **last updated to Season 1 Episode 30**
|
| 19 |
+
|
| 20 |
## <h3>Dataset Overview 📊</h3>
|
| 21 |
|
| 22 |
|Column | Description |
|
|
|
|
| 28 |
## <h3>System Replicas🔍</h3>
|
| 29 |
The system replicas describe the actions and events that occur in each episode. These replicas are written in a specific format, using brackets to indicate actions and events.
|
| 30 |
|
| 31 |
+
**<h5>Replica Format</h5>**
|
|
|
|
|
|
|
| 32 |
|
| 33 |
`{system} : [The episode opens with a bubble transition, and we see a coral reef under the sea. The camera zooms to initiate parallax scrolling, which reveals the city of Bikini Bottom. It continues zooming to show a brown rock, a Moai head, and a pineapple, which each contain inhabitants.]`
|
| 34 |
|
|
|
|
| 41 |
|**Spongebob** | I guess so. |s1e3_24|
|
| 42 |
|**Patrick** | That's just fancy talk. If you wanna be fancy, hold your pinky up like this. The higher you hold it, the fancier you are. |s1e3_25|
|
| 43 |
|
| 44 |
+
## <h3>📊 Interactions with Dataset</h3>
|
| 45 |
+
|
| 46 |
+
**<h5>Using Pandas to filter rows</h5>**
|
| 47 |
+
|
| 48 |
+
1. To find all rows with a specific ep_id, you can use the following code:
|
| 49 |
+
|
| 50 |
+
```
|
| 51 |
+
import pandas as pd
|
| 52 |
+
#Read the CSV file into a Pandas DataFrame
|
| 53 |
+
df = pd.read_csv('dataset.csv')
|
| 54 |
+
#Define the ep_id you want to filter by
|
| 55 |
+
ep_id = 's1e2'
|
| 56 |
+
#Filter the DataFrame to get rows with an ep_id that starts with the defined ep_id
|
| 57 |
+
filtered_df = df[df['ep_id'].str.startswith(ep_id)]
|
| 58 |
+
#Print the filtered DataFrame
|
| 59 |
+
print(filtered_df)
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
2. To find rows where a specific character says a specific word or phrase, you can use the following code:
|
| 63 |
+
|
| 64 |
+
```
|
| 65 |
+
#Filter the DataFrame to get rows where a specific character says a specific word or phrase
|
| 66 |
+
speaker = 'SpongeBob'
|
| 67 |
+
word_or_phrase = 'jellyfish'
|
| 68 |
+
filtered_df = df[df['speaker'] == speaker]
|
| 69 |
+
filtered_df = filtered_df[filtered_df['replica'].str.contains(word_or_phrase)]
|
| 70 |
+
#Print the filtered DataFrame
|
| 71 |
+
print(filtered_df)
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
You can replace `SpongeBob` and `jellyfish` with any other speaker and word/phrase that you want to filter by.
|
| 75 |
+
|
| 76 |
## <h3>Data Sources 📝</h3>
|
| 77 |
The transcripts were sourced *Encyclopedia SpongeBobia*.
|
| 78 |
|