-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathdataset.py
More file actions
94 lines (86 loc) · 2.57 KB
/
Copy pathdataset.py
File metadata and controls
94 lines (86 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
"""
Shared data for the Mood Machine lab.
This file defines:
- POSITIVE_WORDS: starter list of positive words
- NEGATIVE_WORDS: starter list of negative words
- SAMPLE_POSTS: short example posts for evaluation and training
- TRUE_LABELS: human labels for each post in SAMPLE_POSTS
"""
# ---------------------------------------------------------------------
# Starter word lists
# ---------------------------------------------------------------------
POSITIVE_WORDS = [
"happy",
"great",
"good",
"love",
"excited",
"awesome",
"fun",
"chill",
"relaxed",
"amazing",
]
NEGATIVE_WORDS = [
"sad",
"bad",
"terrible",
"awful",
"angry",
"upset",
"tired",
"stressed",
"hate",
"boring",
]
# ---------------------------------------------------------------------
# Starter labeled dataset
# ---------------------------------------------------------------------
# Short example posts written as if they were social media updates or messages.
SAMPLE_POSTS = [
"I love this class so much",
"Today was a terrible day",
"Feeling tired but kind of hopeful",
"This is fine",
"So excited for the weekend",
"I am not happy about this",
]
# Human labels for each post above.
# Allowed labels in the starter:
# - "positive"
# - "negative"
# - "neutral"
# - "mixed"
TRUE_LABELS = [
"positive", # "I love this class so much"
"negative", # "Today was a terrible day"
"mixed", # "Feeling tired but kind of hopeful"
"neutral", # "This is fine"
"positive", # "So excited for the weekend"
"negative", # "I am not happy about this"
]
# TODO: Add 5-10 more posts and labels.
#
# Requirements:
# - For every new post you add to SAMPLE_POSTS, you must add one
# matching label to TRUE_LABELS.
# - SAMPLE_POSTS and TRUE_LABELS must always have the same length.
# - Include a variety of language styles, such as:
# * Slang ("lowkey", "highkey", "no cap")
# * Emojis (":)", ":(", "🥲", "😂", "💀")
# * Sarcasm ("I absolutely love getting stuck in traffic")
# * Ambiguous or mixed feelings
#
# Tips:
# - Try to create some examples that are hard to label even for you.
# - Make a note of any examples that you and a friend might disagree on.
# Those "edge cases" are interesting to inspect for both the rule based
# and ML models.
#
# Example of how you might extend the lists:
#
# SAMPLE_POSTS.append("Lowkey stressed but kind of proud of myself")
# TRUE_LABELS.append("mixed")
#
# Remember to keep them aligned:
# len(SAMPLE_POSTS) == len(TRUE_LABELS)