A method includes constructing a hierarchal graph associated with a document. The hierarchal graph includes a document node, a set of paragraph nodes, a set of sentence nodes, and a set of token nodes. The method further includes determining, based on a language attention model, a set of weights associated with a set of edges between a first node and each connected second set of nodes. The method further includes applying a GNN model on the hierarchal graph based on a set of first features associated with each token node, and the set of weights. The method further includes updating a set of features associated with each node based on the application, and generating a document vector for an NLP task, based on the updated set of features. The method further includes displaying an output of the NLP task for the document, based on the document vector.
ANALYSIS OF NATURAL LANGUAGE TEXT IN DOCUMENT USING HIERARCHICAL GRAPH