A Cognition-Driven Approach To Modeling Document Generation And Learning Underlying Contexts From Documents