I want to do document classification using hierarchical lstm described in http://aclweb.org/anthology/N/N16/N16-1174.pdf 3, I don’t know how to prepare data for this task. Could anybody help me?
Each document is stored in a separate file. I want to use sentence level RNN to get sentence level representation, which will be sent to document level RNN to get the document level representation. I don’t know how to process data for this task using torchtext. Could anybody help me?
I know how to process data using the whole document. But when it comes to the hierarchical level preprocessing, it stucks me. My code for the whole document preprocessing is as follows:

1526873348(1).png905×819 19.7 KB