Add corpus creation code as appendix