Added function for generating corpora