The invention is suitable for the technical field of the computer, and provides a sentiment classification method and
system. The method comprises the following steps: according to a rhetorical structure theory, analyzing a text to be classified to obtain a rhetorical structure
parse tree; obtaining the initial vector of each node in the rhetorical structure
parse tree, wherein the node comprises an input gate, an output gate, a
memory cell, a hiding state and a forgetting gate; according to the hyperbolic curve
tangent function value of the output gate and the
memory cell of the node, carrying out dot product to obtain the hiding state of the node; and according to the hiding state of the node, carrying out sentiment classification on a classifier function. The text to be classified is constructed into the rhetorical structure
parse tree, each layer in the rhetorical structure parse tree is provided with two node fragments, each node is provided with an own forgetting gate, child node information is selected through the forgetting gate in a learning process, a
cell state is continuously updated, unimportant information is abandoned, core contents are added, and
semantic feature expression is improved so as to improve classification accuracy.