## 3 Methodology
### Syntax Module  
At each time step \(i\), we use the pretrained model \(BERT_{base}\) to represent the sentence \(u_{i}\), which map the input words to a low-dimensional dense vector space, making the text into a language that computers can process. Such a mapping makes semantically similar words closer in the semantic space. We tokenize each sentence using \(BERT_{base}\) firstly, and then we decompose the sentence into tokens. We add the sentence start mark \([cls]\) and the segmentation mark \([sep]\). The input is finally represented as \(BERT_{base}(u_{i})=[[cls],x_{1},x_{2}\ldots,x_{n},[sep]]\), and the output corresponding to \([cls]\) is used as the sentence representation. Figure 1: Overview of our proposed approach SETD-ERC, which consists of a syntax module, a topic module, and a dialogue interaction module. Syntax module and topic module integrate dependency parsing with GCN and topic feature extraction to enhance the representation of the sentence. The dialogue interaction module incorporates topic segmentation and draws dialogue graphs to imitate emotional interactions. The syntax module models dependencies between words in a sentence. It mines the deep extended meaning of sentences by extracting their grammatical structure features. An existing natural language processing tool spaCy ([[https://spacy.io/](https://spacy.io/)]([https://spacy.io/](https://spacy.io/))) is used in this module to generate syntactic dependency trees and process them. For each sentence, each word in the sentence is treated as a node, and when there is a dependency between two nodes, a directed dependency edge between them is constructed. The syntactic dependency tree of the sentence \"Syntactic dependency trees have a wide range of applications\" is shown in Figure 2, where (\(\cdot\)) marks the part of speech of the word, and the directed edge represents the dependency of the word. For example, \"Syntactic\" is a dependency of \"tree\", and their relationship is \"amod\", which stands for \"adjective modifier\". The meanings of the tokens and relationship types mentioned in Figure 2 are shown in Table 1.  
We generate an adjacency matrix A through the dependency tree, and the construction algorithm of the adjacency matrix is shown in Algorithm 1. If there is an edge from node \(i\) to node \(j\), the corresponding element in the matrix is set to 1, which is expressed as \(A_{ij}=1\), otherwise, it is 0. In addition, we also consider the self-influence of the node on itself and set \(A_{i=-j}=1\). ```
0: sentence matrix \([x_{1},x_{2},\cdots,x_{n}]\)
0: adjacency matrix \(A\)
1: define zero matrix \(A\);
2: use the spaCy tool to generate a dependency tree \(Tree\);
3:for each edge \(<i,j>\) in \(Tree\)do:
4: set the value of \(A_{ij}\) to 1;
5:endfor;
6:for each edge \(i==j\) in \(Tree\)do:
7: set the value of \(A_{ij}\) to 1;
8:endfor;
9:return adjacency matrix \(A\);
```  
**Algorithm 1** Syntactic information construction algorithm. To fuse the obtained syntactic structure information into the sentence embedding, we use GCN to convolve the hidden states of neighboring nodes to obtain syntax-enhanced features. For an input sentence \(u_{i}\) with \(n\) words, the generated adjacency matrix size is \(n\times n\), We use a two-layer GCN to operate on the current node, convolve the sentence matrix \([x_{1},x_{2},\cdots,x_{n}]\) and the adjacency matrix \(A\), so as to realize the iteration of information. The output is a sentence representation with structural information.