Category Archives: Programming

A first adventure in Windows batch scripting.

Scripting on a Unix terminal is so darn easy – the tools are documented in the man pages, online or from a buddy on the phone. Windows batch scripting was another beast entirely. It took me nearly an hour to craft this simple script, which honestly would have been as easy as a more/grep/awk pipe [...]

Posted in Programming | Tagged | Comments closed

Serializing Stanford Parser Objects.

Recently, I found the need to serialize Stanford Parser objects to a file. Though I was familiar with the concept of serialization, I had never done such a thing in Java before. The following is an example on how to do just that: serializing Stanford Parser Tree objects to a file. The example accomplishes the [...]

Also posted in NLP | Tagged , , | Comments closed

Hadoop example for Exim logs with Python.

The following is an example of parsing an exim_mainlog using Hadoop streaming. I’ve implemented both the mapper and the reducer in Python. The mapper and reducer don’t handle all of Exim’s log formats yet but this can be easily extended in the mapper and reducer if you actually end up using the output (this is [...]

Posted in Programming | Tagged , , , | Comments closed