teaching machines

Levenshtein distance

We’re looking at methods for comparing the distance between two sequences of text. A fairly simple one is Levenshtein distance, which calculates how many edits it takes to go from one string to another. I wrote a little calculator to demonstrate its results. Enter two words and calculate their distance. Cell (i, j) reports the minimum […]

Timing Android voice recognition

I was curious whether the EXTRA_MAX_RESULTS value affected the time it takes to get voice recognition results back to an Android device, so I ran a couple of quick tests. In the first, I spoke the phrase “Binky the ball bounced away” a few times each for different EXTRA_MAX_RESULTS settings. I tried 1, 5, 20, […]

Voice recognition sans dialog box

Android provides a nice speech recognition system. Many examples show how you can push out an ACTION_RECOGNIZE_SPEECH intent to trigger an Activity that shows the listening status on a big dialog box. I wanted speech recognition without the dialog box and was able to do so with the following code: The XML layout defines a […]

Installing OpenCV on Linux

I was able to get OpenCV installed without too much trouble on my Ubuntu Linux machine. A simple did the trick. I tested the installation by writing a short C program to pop up an image: To test video playback and webcam capturing, I wrote another little program to play a video frame-by-frame: I compiled […]

A man on the bus

In Knoxville, Tennessee, a gentleman was talking with a friend of mine on the bus about some troubles he was having with modern technology. I thought the incident would make a nice limerick: I once met a man who was miffed ‘Tween email and him was a rift When he pressed the @ key Number […]

Lucy and the Linear Search

My wife and I are reading C.S. Lewis’ The Voyage of the Dawn Treader together before we go see it in the theater. We stumbled upon this nice little discussion on computational complexity in chapter 10: One thing that worried [Lucy] a good deal was the size of the Book. The Chief Voice had not been able […]

IEEE-754 sighting

I was walking through our local transit system’s headquarters yesterday when I saw what I presumed was someone dividing 0 by 0 in the marquee software: When I showed my non-programming wife, she politely chuckled and moved on with her business. On questioning, she confessed she didn’t think much of it — just a cute […]