
DeepBreath: Preventing angry emails with machine learning - duck
https://cloud.google.com/blog/big-data/2017/04/deepbreath-preventing-angry-emails-with-machine-learning
======
grinich
Kind of crazy the Google Cloud team is using gmail.js to build this extension.
Gmail.js is a side project by Kartik Talwar who just graduated college and the
codebase isn't exactly active.

I guess even Google can't find a good way to extend Gmail with their own
APIs...

~~~
robbiemitchell
Google isn't a monolith. The author is on one team that wanted a way to
encourage use of its services. They used an open source project to achieve it.
Doesn't seem _that_ crazy to do rather than wait for some other team to build
you an API.

~~~
kartikt
The original comment is meant as an observation rather than an attack. It's
great to see the author of the post use gmail.js to quickly get the sentiment
analysis working with 30 lines of code.

The library was a fun side project and has been used by many companies (big
and small) over the past few years. Its always nice to see someone make a cool
extension on top of gmail.

Here is another one that came out a while ago (uses gmail.js) and on the same
theme as this original post:

[http://www.slate.com/blogs/xx_factor/2015/12/29/new_chrome_a...](http://www.slate.com/blogs/xx_factor/2015/12/29/new_chrome_app_helps_women_stop_saying_just_and_sorry_in_emails.html)

~~~
waprin
Thanks for the library! It's super awesome, useful, and easy to use. And yes,
it made writing this ridiculously simple, it's borderline embarrassing how
little code I wrote, but that was also part of what made it neat to me.

This was just a "let's spend a few hours playing with the Natural Language
API" hack day type thing. Robbie's comment perfectly explains the context
behind it. Google search pointed me to your library, which fit the need
perfectly well, so that's what I used and I really appreciate that you wrote
it and gave it permissive license!

~~~
thesandlord
^ waprin is the author of the blog post

------
oakwhiz
I wonder if machine learning will lead to worsening of the echo-chamber
problem.

"Error: The message cannot be sent because it does not conform to accepted
groupthink."

~~~
AndrewKemendo
Anytime someone has a scary thought about ML it all comes down to control
problems - eg. the machine having the final say about what happens without
human being able to override it.

In gmail now, if you say "attached" in your email but don't attach something,
you can still send the message, it just gives you a warning. You're
consistently shown improved interfaces and content because of ML, yet those
aren't scary and you don't feel out of control.

I think people have seen way too many scary movies about AI, and it's tainted
our whole discipline.

~~~
Danihan
Look at red lights as an example. Those are just primitive robots. Yet, when
I'm sitting at an empty intersection at night, even though I have excellent,
advanced sensors in my eyes, I'm not allowed to just run a red light.

Red lights aren't just a "helpful warning." The robots already have the final
say in that arena, because human law (for now) backs them up.

It's not based on scary movies... primitive robots already force me to waste
my time on a nightly basis.

~~~
Bartweiss
> Red lights aren't just a "helpful warning."

The town where I grew up has a red light which only changes when a weight
sensor is tripped. But weight sensors are expensive, and the approaching two-
lane road only has a sensor in one lane. Worse, it's calibrated for cars, so
motorcycles never trip it.

Yes, _only_. If you ride up late at night on a motorcycle, you have a choice
between committing a serious traffic offense and waiting several _hours_ for
the light to change. No, this problem isn't ever going to be addressed.

I think it's damned reasonable to be scared of what we'll get when people hand
authority to machines. Not for _Terminator_ reasons, but for simple
bureaucratic stupidity.

~~~
mortehu
Are you sure it's a weight sensor? It's usually an inductive loop[1], which
detects metal. They're usually supposed to detect motorcycles, but are
sometimes incorrectly calibrated. I've been able to trigger most troublesome
detectors by tilting my motorcycle while on top of it.

Some people also put magnets in their boots[2].

1\.
[https://en.wikipedia.org/wiki/Induction_loop](https://en.wikipedia.org/wiki/Induction_loop)

2\. [http://www.instructables.com/id/Traffic-Light-Trigger-for-
yo...](http://www.instructables.com/id/Traffic-Light-Trigger-for-your-Bike/)

~~~
Bartweiss
Oh, interesting! I didn't realize that, but thinking back on how it looked, it
probably is induction. Didn't know motorcyclists had tricks for that.

Shame they only put the loop in one of two lanes, though...

------
draw_down
I think anger is ok and justified at times, and not always just a consequence
of being in the wrong state of mind, etc. I think we're more and more moving
to a mindset where anger is just not really ever acceptable, either to feel or
to display.

But, that's all a bit heavy for what this is trying to accomplish, which is
certainly an understandable goal.

~~~
siliconc0w
Anger is definitely not okay. Ideally, you say - 'This project isn't working
because you failed to gather requirements from the right users." or "You spent
three months choosing a vendor without proper due diligence who doesn't have a
working client library, documentation, or a functioning test endpoint".

However the proper way to express anger in our enlightened business
environment is passively and non specifically. "I'm unsure that this project
is accomplishing it's goals." or "the team is having trouble with the vendor
you chose" and then you schedule a 1:1 meeting to talk about it over a warm
beverage where you adhere to a 10:1 complement to criticism ratio.

~~~
JoshTriplett
> Ideally, you say - 'This project isn't working because you failed to gather
> requirements from the right users." or "You spent three months choosing a
> vendor without proper due diligence who doesn't have a working client
> library, documentation, or a functioning test endpoint".

Both of those statements are completely reasonable. Don't conflate directness
with anger, berating, personal attacks, etc. It's entirely possible to be
direct without attacking people.

~~~
HappyTypist
Totally. It often helps to depersonalise the message by saying "this project
isn't working because the requirements weren't gathered from the right users"
tho.

------
zitterbewegung
This brings back memories. Does anyone remember Eudora ? With the spicy pepper
that would show how angry you are sending that email?

~~~
dasil003
[http://www.metafilter.com/3222/Moodwatch-now-in-
Eudora-50](http://www.metafilter.com/3222/Moodwatch-now-in-Eudora-50)

------
chejazi
Of all the Deep* and *.ai branding going around, this is by far the best yet.
Email is a great starting point, since we're often more prone to being
(brutally, rudely) honest in isolation. Is there a wearable that does this
sort of thing with Biometrics and/or sound monitoring?

------
mtgx
I'm sorry Dave, I'm afraid I can't send that message.

~~~
zeptomu
Not sure why you are down-voted, that comment is spot on, nice reference.

------
danvoell
I could see this being applied in general customer service. Provide a
sentiment analysis on the way in. Determine best way (sentiment) and time to
communicate a response.

------
joering2
Unless Im slow I spend time going through it, includign pricing page, and I
still did not get answer to 2 questions

1) Can I run it out of Google Gmail GUI? I want to send curl in PHP with my
key and sentence and get result.

2) So how much will I be charged?

------
unhammer
The latter half of [http://bikeshed.com/](http://bikeshed.com/) has some nice
ideas on how to phrase the feedback ;-)

------
j2kun
> These OKRs are entirely unrealistic to finish this quarter.

Same score as

> THIS IS ENTIRELY UNFAIR

These are qualitatively different sentiments.

------
randomerr
Slippery slope - This seems like a couple of steps away from forced censoring
of emails. I can see this becoming mandatory in emails and messages. But who
would control the filters? Will extra meta data with content rating be sent
along with message?

~~~
_iao
Google offers their consumers as products to data-mining/ad companies. This is
like telling the farmer that ignoring the angry "moos" of their cattle is
censorship.

------
sjg007
Smart. But Gmail also needs a grammar checker.

~~~
arlindohall
"Careful! This comment is getting pretty negative."

------
nebabyte
"Care to change that tone, citizen?"

