# Enhanced Chinese Domain Named Entity Recognition:
## 3 Methods
### Preprocessing  
To obtain domain term frequency weight features, we base our calculations on the collected corpus in the domain of Chinese paleontology popular science. TF-IDF [39] is a statistical method that consists of term frequency (TF) and inverse document frequency (IDF) and evaluates the importance of a term to a document set or one of the documents in a corpus, the TF-IDF scores of domain terms are computed as domain term frequency weights in our approach. Specifically, for the raw text corpus we collected, we employ the Chinese word segmentation tool pkuseg [40] for segmentation. After removing stop words and segmenting the Chinese text, the TF-IDF scores of each term are calculated as the weight feature for domain term frequency. Since there are \(N\) documents in total, term \(t\) has \(N\) TF-IDF scores, and we integrate these scores using the averaging strategy because this approach preserves more features, thereby better assessing the weight of a term in the corpus and obtaining the final feature for domain term frequency. The method for calculating domain term frequency weights is as follows:  
\[W_{t,d}=tf_{t,d}\cdot log(\frac{N}{1+df_{t}}), \tag{1}\]  
\[Weight_{t}=\frac{\sum_{i=0}^{N}W_{t,d}^{i}}{N}, \tag{2}\]  
where \(tf_{t,d}\) represents the term frequency of term \(t\) in document \(d\), \(log\) is the natural logarithm, \(df_{t}\) represents the number of documents out of \(N\) that contain term \(t\), \(W_{t,d}\) is the TF-IDF score of term \(t\) in document \(d\), and \(Weight_{t}\) represents the average weighted domain term frequency weight of term \(t\). The final domain term frequency weights are shown in Table 1.  
Figure 2: BERT-LPN: The input is processed through BERT to obtain character-level embedding vectors and the Chinese lexicon-level feature module to acquire lexicon-level embedding vectors (red box). After concatenation, a dual pointer network composed of two fully connected networks is used to accomplish the NER. Usually, the NER based on a dual pointer network and the MRC-QA mechanism faces the problem of inconsistency between training and prediction tasks. That is, during training, fitting is carried out with the correct entity type as a prompt, while in prediction tasks, it is often not possible to specify the correct prompt for prediction, meaning the prediction task also includes an entity classification task. To alleviate this inconsistency and enhance the model's generalization ability, we propose a data augmentation method based on the set difference between all entity types and sample entity types. As shown in Figure 3, our dataset includes 13 types of entities, denoted as the set _AllTypes_ = {Strata, FossilClassification (FossilClass), Subject, Event, Position, Time, Feature, Person, Organization, GeologicalTime (GeoTime), Address, Fossil, BiologicalClassification (BioClass)), while the current set of entity types included in the samples is denoted as set _Gold\({}_{sample}\)_. Through set difference operations on the sets, the entity types not included in the current samples are generated. In this way, after calculating the difference set for all samples, the labels of the enhanced data are set to an empty set to avoid introducing noisy data, as follows :  
\[Diff_{sample}=\left\{type\in AllTypes:type\
otin Gold_{sample}\right\}, \tag{3}\]  
\[DA^{item}_{sample}=\left\{\text{\emph{Text}}_{sample},EntityType=Diff^{item}_ {sample},\ Label=\varnothing\right\}, \tag{4}\]  
where \(Diff^{item}_{sample}\) is an element in the collection \(Diff_{sample}\) and \(DA^{item}_{sample}\) is a piece of data generated when the entity type is \(Diff^{item}_{sample}\). Then, based on the given predefined data augmentation ratio, a certain number of augmented data are generated through a random sampling algorithm and merged into the training dataset for model training. By introducing augmented data, the model's perception of entity types not present in the sample data is strengthened, effectively alleviating the inconsistency between the training and prediction tasks.