Approximate structure preserving semantic matching