Fast support vector machines for structural kernels