generic corpus constructor functions and replacement/accessor texts functions