I try to understand the part 4 of Censor Dispenser project.
I wrote a function what find the negative words in email_three but all negative words occurred 0 or 1 times only. There is not any word with two or more times in the email_three… Or I not understand the task?
It is ever so slightly ambigious but I believe it’s intended as ‘after any “negative” word has occurred twice’. So two negative words and after that there’s a whole lot of censoring to do. I think the hint makes it clearer without actually giving you a coding answer if you click the dropdown.
Thank you to help me interpreted the task.
Based on your suggestion my function return the following output:
email thee censored
Board of Investors, Things have taken a <censored as negative word> turn down in the Lab. Helena's (<censored from list> has insisted on being called Helena, we're unsure how <censored from list> came to that moniker) is still progressing at a rapid rate. Every day we see new developments in <censored from list> thought patterns, but recently those developments have been more <censored as negative word> than exciting. Let me give you one of the more distressing examples of this. We had begun testing hypothetical humanitarian crises to observe how Helena determines best solutions. One scenario involved a famine plaguing an unresourced country. Horribly, Helena quickly recommended a course of action involving culling more than 60% of the local population. When pressed on reasoning, <censored from list> stated that this method would maximize "reduction in human suffering." This <censored as negative word> line of thinking has led many of us to think that we must have taken some wrong turns when developing some of the initial <censored from list>s. We are considering taking Helena offline for the time being before the situation can spiral <censored as negative word>. More updates soon, Francine, Head Scientist
is it the right output?
It looks like some things were censored too early to me (but I’m afraid I’m not going to check for you) and others weren’t censored as expected. Why not read through the text and work it out manually and determine whether or not your code performed as expected (which is the real goal).