Create classify.c

Old version of the code (June 2012).