## 3 Materials and Methods
### DLCTC Model
#### 3.2.2 Word Embedding  
Word embeddings here come to represent words in a continuous vector space. Unlike character embedding, which focuses on fine-grained features, word embeddings capture their meanings and relationships based on the co-occurrence of words for semantic understanding, allowing the model to understand and differentiate between similar words as presented in Figure 3. The skip-gram model is used to maximize the probability of a word's surrounding context given the word itself. Equation (1) shows the objective function used, where \(\mathcal{T}\) is the total number of words in the corpus, \(e\) is the context window size, \(\omega_{\ell}\) is the target word at position, \(\ell\), \(\omega_{\ell+,\ell}\) are the context words within the window \(\omega_{\ell}\).  
\[max\ \
icefrac{{1}}{{\tau}}\sum{(t=1)}^{T}\sum{(-c\leq j\leq c,j\
eq 0)}log\ p \Big{(}w_{(t+j)}\Big{|}w_{t}\Big{)} \tag{1}\]Equation (2) represents the positive score \(\ Score_{pos}\), which is calculated as the dot product between the sum of the subword vectors \(\ Z_{g}\), of the input word \(\omega_{I}\), and the vector \(\mathcal{V}_{w0}\), of the output (context) word \(\omega_{0}\). This computation captures the similarity between the two vectors \(\omega_{I}\) and \(\omega_{I}\).  
Figure 3: Word embedding framework.  
Figure 2: Character embedding framework.  
the input word and its context by aggregating subword information to enhance the word representation.  
\[Score_{pos}=\left(\sum_{g\in Gw_{I}}z_{g}\right)^{\top}v_{w_{O}} \tag{2}\]  
The loss function \(\mathcal{L}\) combines the likelihoods of the positive and negative samples, where \(\sigma\) denotes the sigmoid function as given in Equation (3). It aims to maximize the probability of the positive context word by minimizing \(-\text{log}\sigma\big{(}-Score_{neg_{i}}\big{)}\), while simultaneously minimizing the probability of negative samples through \(-\sum_{i=1}^{k}\text{log}\sigma\big{(}-Score_{neg_{i}}\big{)}\), thereby enhancing the model's discriminative capability.  
\[\mathcal{L}=-\text{log}\sigma\big{(}\text{Score}_{\text{pos}}\big{)}-\sum_{i=1 }^{\text{k}}\text{log}\sigma\big{(}-\text{Score}_{\text{neg_{i}}}\big{)} \tag{3}\]  
For subword vectors \(z_{g}\) and context word vectors \(v_{w}\), the embeddings are updated using stochastic gradient descent, where \(\eta\) represents the learning rate. By computing the gradients \(\frac{\partial\mathcal{L}}{\partial v_{w}}\) and \(\frac{\partial\mathcal{L}}{\partial z_{g}}\), the model adjusts the subword and context word vectors to minimize the loss function \(\mathcal{L}\), thus refining the embeddings to better capture linguistic relationships in Equations (4) and (5).  
\[\text{v}_{\text{w}}\leftarrow\text{v}_{\text{w}}-\eta\frac{\partial\mathcal{ L}}{\partial\text{v}_{\text{w}}} \tag{4}\]  
\[\text{z}_{\text{g}}\leftarrow\text{z}_{\text{g}}-\eta\frac{\partial\mathcal{ L}}{\partial\text{z}_{\text{g}}} \tag{5}\]  
The sentence embedding \(vS\) is obtained by averaging the embeddings of all words in the sentence, where each word's embedding is the sum of its subword vectors \(z_{g}\) in Equation (6). This process yields a fixed-dimensional representation that encapsulates the semantic content of the entire sentence by aggregating the subword-level information across all \(N\) words.  
\[vS=\
icefrac{{1}}{{N}}\sum\left(i=1\right)^{N}\big{[}\sum\left(g\in G_{w}i \right)z_{g}\big{]} \tag{6}\]