Automated Spelling Correction – The Basics of How it Works

In this post, I am going to talk about automated spelling correction. Let’s say you are writing a document on your computer, and instead of typing “morning”, you accidentally type “mornig”. If you have automated spelling correction enabled, you will probably see that “mornig” has been transformed to “morning” on its own. How does this work? How does your computer know that when you typed “mornig”, you actually meant “morning”? We are going to see how in this post.

Spelling mistakes could turn out to be real words!

Before we actually go through how spelling correction works, let’s think about the complexity of this problem. In the previous example, “mornig” was not a real word, so we knew it had to be a spelling mistake. But what if you misspelled “college” as “collage”, or you misspelled “three” as “tree”? In these cases, the word you typed incorrectly happens to be an actual word itself! Correcting these types of errors is called real word spelling correction. On the other hand, if the error is not a real word (like “mornig” instead of “morning”), correcting those errors is called non-word spelling correction. You can see that real world spelling correction seems more difficult than non-word spelling correction because every word that you type could be an error (even if it has a correct spelling). For example, the sentence “The tree threes were tail” makes no sense because every word except “the” and “were” is an error even though they are all actual words. The actual sentence should be “The three trees were tall”. In this post, I am going to talk about non-word spelling correction with a basic approach to it.

Continue reading

The walled gardens we use for our project communication

Over the past decade, we have seen a shift that caught many long-time computer users and developers off-guard: The advent of apps. Up to ten years ago, there was a clear trend of distributed applications becoming webapps, and the browser was seen as the new universal program delivery interface. And, as I will explain, we now see yet another quite popular webapp, Slack, closing their interoperable, standards-adhering interface to further trap users into their controlled ecosystem. Continue reading

Web-based voice command recognition

Last time we converted audio buffers into images. This time we’ll take these images and train a neural network using deeplearn.js. The result is a browser-based demo that lets you speak a command (“yes” or “no”), and see the output of the classifier in real-time, like this:

Curious to play with it, see whether or not it recognizes yay or nay in addition to yes and noTry it out live. You will quickly see that the performance is far from perfect. But that’s ok with me: this example is intended to be a reasonable starting point for doing all sorts of audio recognition on the web. Now, let’s dive into how this works. Continue reading

Audio features for web-based ML

One of the first problems presented to students of deep learning is to classify handwritten digits in the MNIST dataset. This was recently ported to the web thanks to deeplearn.js. The web version has distinct educational advantages over the relatively dry TensorFlow tutorial. You can immediately get a feeling for the model, and start building intuition for what works and what doesn’t. Let’s preserve this interactivity, but change domains to audio. This post sets the scene for the auditory equivalent of MNIST. Rather than recognize handwritten digits, we will focus on recognizing spoken commands. We’ll do this by converting sounds like this:

Into images like this, called log-mel spectrograms, and in the next post, feed these images into the same types of models that do handwriting recognition so well:


The audio feature extraction technique I discuss here is generic enough to work for all sorts of audio, not just human speech. The rest of the post explains how. If you don’t care and just want to see the code, or play with some live demos, be my guest! Continue reading

How to publish about your research results for academic and non-academic audiences

As a graduate student, one of our goals is to produce research that will be useful to the world, that will be known and used by other people. This usefulness can come in many forms; for example, our work can serve to inspire future research, which will take the topic one step further, or it can be used by people in the industry as part of their work. But for any of this to happen, the methods, results, and takeaways of our research need to be communicated to the world. Of course, most research programs require the student to write a thesis or dissertation, but the reality is that very few people will read it besides the evaluation committee. A thesis or dissertation might eventually be also read by other graduate students that are working on the same topic and want to know the existing literature in details. But other than that, most people would prefer to read a summarized version of the research instead of the whole thesis or dissertation. Continue reading