# An Ante Hoc Enhancement Method for Image-Based Complex Financial Table Extraction
## 2 Related Work
### Text Semantic Matching  
Text matching is a common task in natural language processing. Initially, statistical methods such as bag-of-words, TF-IDF, and BM25 [23] were used for text matching. However, these traditional methods exhibit certain shortcomings that cannot be ignored. Firstly, they do not consider contextual relationships among words, which may significantly impact the semantics of a sentence. For instance, the phrases \"airplane from Seoul to Tokyo\" and \"airplane from Tokyo to Seoul\" contain identical words, but their different orderings result in completely different meanings. Additionally, using similarity as a measure of text matching is not always appropriate. For example, in question-answering tasks, the relationship between text pairs is that of \"question and answer\" rather than \"similarity\". Finally, these conventional methods are inadequate for solving the problems of \"polysemy\" and \"synonymy\". For instance, the word \"apple\" can refer to either a fruit or a technology company, while \"China\" and \"sino\" denote the same country. To address these issues, researchers have begun studying \"text semantic matching\", which involves matching text pairs based on their meaning rather than quantitative word characteristics. Depending on the model framework employed, text semantic matching models can be classified into two categories: representation-based models, and interaction-based models. The representation-based model, also known as the dual-encoder model, utilizes semantic embedding models to produce the semantic vectors of text A and text B, respectively. It then calculates the degree of semantic matching between text A and text B based on the semantic vectors, using methods such as Euclidean distance, cosine similarity, or artificial neural networks. Microsoft's DSSR model [24] is a pioneering work in representational modeling. It studies the matching relationship between a query and document in the context of a web search. DSSR employs a bag-of-words model to embed the query and document. It then uses a DNN (deep neural network) to transform the sparse, high-dimensional embedding vectors into low-dimensional thick embedding vectors. Finally, it uses cosine similarity to compute the degree of matching between the two. More recently, several models have emerged which are consistent with DSSM in terms of framework, such as CDSSM [25], MV-LSTM [26], ARC-I [27], LSTM-RNN [28], and Sentence-BERT [29]. These models replace the semantic embedding or matching models with newer, more complex, and more effective ones. For instance, ARC-I utilizes CNNs (convolutional neural networks) to acquire semantic vectors and MLP (multilayer perceptron) to assess the degree of semantic matching. Sentence-BERT employs BERT to obtain semantic vectors and a Softmax classifier to predict matching degrees. The representation-based model has the advantages of supporting offline computation and fast matching speeds. However, its matching accuracy is often lower than that of the interaction-based model due to the loss of contextual information between texts caused by separate embedding and the limited semantic modeling ability of the matching layer. The interaction-based model, also known as the cross-encoder model, abandons the idea of encoding and then matching that is used in the representation-based model. Instead, it allows text A and text B to interact directly, and then calculates the degree of matching between the two using interaction information. Inspired by image recognition, [PERSON] et al. [30] proposed a CNN-based text matching model called MatchPyramid. The model embeds text A and text B as a list of word embedding vectors and calculates the interaction information between each position using three methods: Boolean, cosine similarity, and vector inner product. This produces an interaction matrix of size m \(\times\) n (where m and n are the lengths of text A and text B, respectively). The matrix is then fed into a CNN to make predictions about their relationship. [PERSON] et al.