parses the corpus