Revised encapsulation for document and sentence