format data into liblinear format