Code for Kaggle competition sponsored by ICDAR 2013