Linguo

Linguo

A while back I built my first Slackbot, Linguo. This is a project I'm still quite proud of and often think about. I didn't have this blog at the time so I never had a chance to share why I built it or why I think it matters (in its own small, funny way). Now that I'm writing, I'd like to say a bit about it.

Background

I think a lot about words. And in 2017 I was thinking about words and language more than ever. The lexicon was swelling with new words and concepts, the importance of gender and pronouns went mainstream, and public figures faced serious consequences for their past words.

That same year I read Do I Make Myself Clear?: Why Writing Well Matters by Harold Evans. In it, Evans dedicates an entire chapter to the damage caused by Silicon Valley corporate-speak.

When we get lost in unraveling how menaced we are by a software licensing agreement setting out what is forbidden by "concurrent use," it's the Silicon Valley syntax, stupid. We should respect grammatical rules that make for clarity, but never be scared to reject rules that seem not to.

As a 10 year resident of San Francisco and tech worker, this hit too close to home. I was working for a small, but quickly growing, startup at the time and was noticing that as we grew, the way we spoke started changing. Words like "synergy" and "learnings" sprouted up during meetings and subjects went suspiciously missing from sentences. It felt wrong, and I wanted to do something about it.

Linguo (is) born

I started thinking about how I might stop the encroaching jargon and corporate speak. I'd read Elon Musk's famous Acronyms Seriously Suck email and debated sending a manifesto of my own. But that would have been condescending and heavy-handed. As much as I wanted to stop the corruption of our language, I preferred for my coworkers to like me. Then it struck me. What if I built a grammar robot? A kind, but firm protector of our company culture. No one could get mad at a robot. And even if they did, at least they wouldn't be mad at me :)

I knew the name of my bot right away: Linguo. There's a famous episode of The Simpsons where Lisa builds a grammar robot named Linguo for her school science fair (which Homer breaks by pouring beer down its throat). This felt right. Now I just had to build it.

Building a bot

I knew how I wanted Linguo to work; Linguo would monitor our company's public Slack channels and if someone posted a message that included corporate jargon it would reply, encouraging them to use a different word or phrase.

The implementation seemed simple. First, Linguo needed to listen to every message posted in our public Slack channels. Second, Linguo needed to identify messages containing a key word or phrase (e.g., "take it offline"). Third, Linguo needed to reply to that person and suggest a more appropriate word or phrase.

User story map

I quickly realized Linguo would be prone to false positives. Certain words can be appropriate or inappopriate depending on how they're used in a sentence. For example, "Can I ask you a question?" is perfectly fine since "ask" is a verb. But "What is your ask?"–a common corporate-speak phrase–is not since "ask" is not a noun.

To solve this, Linguo needed to understand sentence structure and parts of speech. Fortunately, the Google NLP API provides a service that helps with exactly that–you pass it a sentence and it returns the part of speech for each word in that sentence.

Example Google NLP API response 

With that solved, now all I needed to do was code it. I'm not an engineer by trade but I knew enough Node.js to get the job done. Here's a diagram of the system I built:

System diagram (source code)

Last of all, Linguo needed a profile picture. I thought it important that Linguo not be taken too seriously; my coworkers might be more willing to accept a friendly correction from an imperfect and approachable messenger. With that in mind, I sketched a flat, rough, and intentionally skewed image of Linguo based on its likeness in The Simpsons.

Linguo's profile pic

Once everything was coded and deployed to Heroku, all that was left was to enable Linguo on Slack...

Linguo unleashed

I launched Linguo without warning.

Linguo mockup (based on actual events)

My coworkers reacted as expected: confused, slightly irritated, but mainly amused. It was great fun to see Linguo interrupt a conversation about our sales funnel to remind us that "lift" is a verb. It sparked lively debate about how and why word meanings and uses change over time. My team and I brainstormed ways we might improve Linguo ("Maybe Linguo could direct message employees who use gender-charged words to help make the workplace more inclusive.").

Final thoughts

It's been 4 years since I built Linguo. Ultimately, it was a silly project that helped me better understand Slackbots, Node, and natural language processing. It didn't change the world or even much how our company spoke. But Linguo did get some laughs, and for a moment, made a few of us pause to think about the words we use and why they matter. And for that, I'm happy Linguo existed.

You can view the source code to Linguo on GitHub.

Show Comments