Learning Kernels for Structured Prediction using Polynomial Kernel Transformations