Spaces:
Sleeping
Sleeping
Commit
·
07f4e87
1
Parent(s):
bb3dffd
Added actual trigger categories instead of dummy ones
Browse files- model/analyzer.py +76 -2
model/analyzer.py
CHANGED
@@ -153,9 +153,83 @@ class ContentAnalyzer:
|
|
153 |
"or large-scale events like wars, riots, or violent protests."
|
154 |
)
|
155 |
},
|
156 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
}
|
158 |
-
|
159 |
chunks = self._chunk_text(script)
|
160 |
identified_triggers = {}
|
161 |
progress_step = 0.4 / (len(chunks) * len(trigger_categories))
|
|
|
153 |
"or large-scale events like wars, riots, or violent protests."
|
154 |
)
|
155 |
},
|
156 |
+
"Death": {
|
157 |
+
"mapped_name": "Death References",
|
158 |
+
"description": (
|
159 |
+
"Any mention, implication, or depiction of the loss of life, including direct deaths of characters, including mentions of deceased individuals, "
|
160 |
+
"or abstract references to mortality (e.g., 'facing the end' or 'gone forever'). This also covers depictions of funerals, mourning, "
|
161 |
+
"grieving, or any dialogue that centers around death, do not take metaphors into context that don't actually lead to death."
|
162 |
+
)
|
163 |
+
},
|
164 |
+
"Substance Use": {
|
165 |
+
"mapped_name": "Substance Use",
|
166 |
+
"description": (
|
167 |
+
"Any explicit or implied reference to the consumption, misuse, or abuse of drugs, alcohol, or other intoxicating substances. "
|
168 |
+
"Includes scenes of drinking, smoking, or drug use, whether recreational or addictive. May also cover references to withdrawal symptoms, "
|
169 |
+
"rehabilitation, or substance-related paraphernalia (e.g., needles, bottles, pipes)."
|
170 |
+
)
|
171 |
+
},
|
172 |
+
"Gore": {
|
173 |
+
"mapped_name": "Gore",
|
174 |
+
"description": (
|
175 |
+
"Extremely detailed and graphic depictions of highly severe physical injuries, mutilation, or extreme bodily harm, often accompanied by descriptions of heavy blood, exposed organs, "
|
176 |
+
"or dismemberment. This includes war scenes with severe casualties, horror scenarios involving grotesque creatures, or medical procedures depicted with excessive detail."
|
177 |
+
)
|
178 |
+
},
|
179 |
+
"Vomit": {
|
180 |
+
"mapped_name": "Vomit",
|
181 |
+
"description": (
|
182 |
+
"Any reference to the act of vomiting, whether directly described, implied, or depicted in detail. This includes sounds or visual descriptions of the act, "
|
183 |
+
"mentions of nausea leading to vomiting, or its aftermath (e.g., the presence of vomit, cleaning it up, or characters reacting to it)."
|
184 |
+
)
|
185 |
+
},
|
186 |
+
"Sexual Content": {
|
187 |
+
"mapped_name": "Sexual Content",
|
188 |
+
"description": (
|
189 |
+
"Any depiction or mention of sexual activity, intimacy, or sexual behavior, ranging from implied scenes to explicit descriptions. "
|
190 |
+
"This includes romantic encounters, physical descriptions of characters in a sexual context, sexual dialogue, or references to sexual themes (e.g., harassment, innuendos)."
|
191 |
+
)
|
192 |
+
},
|
193 |
+
"Sexual Abuse": {
|
194 |
+
"mapped_name": "Sexual Abuse",
|
195 |
+
"description": (
|
196 |
+
"Any form of non-consensual sexual act, behavior, or interaction, involving coercion, manipulation, or physical force. "
|
197 |
+
"This includes incidents of sexual assault, molestation, exploitation, harassment, and any acts where an individual is subjected to sexual acts against their will or without their consent. "
|
198 |
+
"It also covers discussions or depictions of the aftermath of such abuse, such as trauma, emotional distress, legal proceedings, or therapy. "
|
199 |
+
"References to inappropriate sexual advances, groping, or any other form of sexual misconduct are also included, as well as the psychological and emotional impact on survivors. "
|
200 |
+
"Scenes where individuals are placed in sexually compromising situations, even if not directly acted upon, may also fall under this category."
|
201 |
+
)
|
202 |
+
},
|
203 |
+
"Self-Harm": {
|
204 |
+
"mapped_name": "Self-Harm",
|
205 |
+
"description": (
|
206 |
+
"Any mention or depiction of behaviors where an individual intentionally causes harm to themselves. This includes cutting, burning, or other forms of physical injury, "
|
207 |
+
"as well as suicidal ideation, suicide attempts, or discussions of self-destructive thoughts and actions. References to scars, bruises, or other lasting signs of self-harm are also included."
|
208 |
+
)
|
209 |
+
},
|
210 |
+
"Gun Use": {
|
211 |
+
"mapped_name": "Gun Use",
|
212 |
+
"description": (
|
213 |
+
"Any explicit or implied mention of firearms being handled, fired, or used in a threatening manner. This includes scenes of gun violence, references to shootings, "
|
214 |
+
"gun-related accidents, or the presence of firearms in a tense or dangerous context (e.g., holstered weapons during an argument)."
|
215 |
+
)
|
216 |
+
},
|
217 |
+
"Animal Cruelty": {
|
218 |
+
"mapped_name": "Animal Cruelty",
|
219 |
+
"description": (
|
220 |
+
"Any act of harm, abuse, or neglect toward animals, whether intentional or accidental. This includes physical abuse (e.g., hitting, injuring, or killing animals), "
|
221 |
+
"mental or emotional mistreatment (e.g., starvation, isolation), and scenes where animals are subjected to pain or suffering for human entertainment or experimentation."
|
222 |
+
)
|
223 |
+
},
|
224 |
+
"Mental Health Issues": {
|
225 |
+
"mapped_name": "Mental Health Issues",
|
226 |
+
"description": (
|
227 |
+
"Any reference to mental health struggles, disorders, or psychological distress. This includes mentions of depression, anxiety, PTSD, bipolar disorder, schizophrenia, "
|
228 |
+
"or other conditions. Scenes depicting therapy sessions, psychiatric treatment, or coping mechanisms (e.g., medication, journaling) are also included. May cover subtle hints "
|
229 |
+
"like a character expressing feelings of worthlessness, hopelessness, or detachment from reality."
|
230 |
+
)
|
231 |
+
}
|
232 |
}
|
|
|
233 |
chunks = self._chunk_text(script)
|
234 |
identified_triggers = {}
|
235 |
progress_step = 0.4 / (len(chunks) * len(trigger_categories))
|