Research Article
An Improved BERT and Syntactic Dependency Representation Model for Sentiment Analysis
| {//initial configuration | | STACK stack = [root] | | BUFFER buffer_words = [,…,] | | POS pos = [.pos, …, .pos]//POS = {NN, JJ, VBZ, …} | | ARCS arc_set = {empty}//ARCS = {dobj, amod, nsubj, …} | | while (the buffer is not empty and the stack contains more than one node) | | {//The following operations are performed according to the words and their POS of the top stack and the buffer | | if (the shift will be used in the transition) | | then { run op_shift operation } | | if (the left arc will be used in the transition) | | then { run op_left_arc operation; | | add a left arc about the two words to the arc_set.} | | if (the right arc will be used in the transition) | | then { run op_right_arc operation; | | add a right arc about the two words to the arc_set.} | | } | | }//the end. |
|