Musings of a dad with too much time on his hands and not enough to do. Wait. Reverse that.

Author: Brad (Page 12 of 57)

Dad. Technologist. Fan of English poet of John Lillison.

Maintaining a Positive Sentiment

For various reasons, companies like to know the emotional dispositions of their customers and, sometimes, their employees. One common way to determine these states is through a technique called Sentiment Analysis.

One challenge with sentiment analysis is simply knowing how to score words, one way or another. Our brains know that the word “happy” is usually associated with a positive sentiment because we have a dictionary of sorts in our brains that associates “happy” to a favorable emotional state. Computers don’t immediately know these associations, so you usually have to supply them such mappings, often in the form of simple lists of words.

Now, suppose you want to maintain the appearance of positivity with an organization with whom you interact–maybe through online reviews, email, chat, or some other written medium. Here’s an idea you can try.

Step 1: Downlist a list of positive words

Positive (and negative) word lists are easily available on the Internet. Here’s one I downloaded.

Step 2: Write some PowerShell to extract some random, positive words you can use in your correspondence

If you’re running Microsoft Windows, you’ll likely have PowerShell installed, which is a convenient tool to parse the file you downloaded and provide back a few random words. Here’s a one-liner I wrote:

((cat c:\positive-words.txt|? {!$_.startswith(';') -and $_.length -gt 0}|get-random -count 3) -join '. ') + '.'|set-clipboard

In this code, I load in the word file into memory and then filter out lines that start with semicolons–in the file I downloaded, the author used semicolons to denote comment lines I need to exclude–and empty lines. Next, I select three random lines as each word is on a new line. Next, I put a period between words. Finally, I send the results to the Windows clipboard for easy pasting into the editor in which you are communicating–email, chat window, etc. The result is something like this:

pleasantly. enthralled. idolize.

But wait, there’s more

The above is great, but to get your words, you’ll have to execute the code in a PowerShell command shell. Who has time for that? How about executing your PowerShell from a batch file? Add the following to a new bat file:

set c="((cat c:\positive-words.txt|? {!$_.startswith(';') -and $_.length -gt 0}|get-random -count 3) -join '. ') + '.'|set-clipboard "
powershell -command %c%

Now, place that bat file on your desktop or in a convenient area where you can double-click on it to get your words easily. Even better: make a shortcut to it with a tool like Slickrun.

Now, you can easily leverage positive words in your correspondence and maintain a positive persona to the watchers.

Oh, the Places You’ll Go!

Looking for a gift for the graduate in your life? Dr. Seuss’s Oh, the Places You’ll Go could be just the ticket. The book is a fantastic pep talk for those preparing to make their marks on the world.

Want to take this gift to the next level? If you’re hosting or participating in a graduation party for your graduate, have all the party attendees sign the book and write an encouraging note or memory in it.

Want to take this gift to the supreme level? Plan ahead: I’m talking months and even years. Every year your child or loved one is in school, make arrangements to have his favorite teachers write notes in the book–on whatever page they choose–and ask that they date their notes, as well. And don’t restrict yourself to just teachers, either: anyone who’s had a positive influence on your child should be included.

If you start this work early enough, you’ll have an amazing and heart-felt gift for your loved one at their graduation, especially if it’s many years away.

The Last Odyssey

I switched to ebooks several years ago, finding it quite convenient to pack my ebook reader with hundreds of tomes that I tote around with me to school parking lots while I wait for my kids to finish their practices, haircut establishments while I await my turn, the DMV while I wait…forever, etc. Nevertheless, I still have a backlog of physical books spread throughout the house and occasionally pick one up to read in-between electronic ones.

One of these I read recently was James Rollins’s The Last Odyssey. The Last Odyssey is a fast-paced, modern day adventure that pits a secret, U.S. government special operations team against the stereotypical bad people bent on sending humanity into the dark ages.

The thread that most endeared me to the novel was the interweaving of historical texts and mysteries–especially Homer’s The Odyssey–into the fabric of the story. I find it reminiscent of Umberto Eco’s Foucault’s Pendulum or Dan Brown’s Da Vinci Code. Or maybe National Treasure, if you’re not the reading type. The villians and protagonists are out to retrace Odysseus’s 10 year trek home, which turns out to be more true than myth (thanks to much literary license). What awaits at the end of the trek could spell doom for the masses in the hands of the wrong people.

If you’re like me, you’ll want to read the author’s notes at the end where he enumerates all the books and events from which he drew inspiration. I’ve already added several of these to my watchlist.

So, if you need a break from your daily grind, The Last Odyssey will entertain you without overly taxing your exhausted prefrontal cortex.

« Older posts Newer posts »

© 2024 DadOverflow.com

Theme by Anders NorenUp ↑