extracted the splitting stuff from abbyy process