split docs and labels from training data.