Allow corpus to be passed in