SMS: Kernels for structured data