fix #9: introduce Corpus abstract class