# Named Entity Recognition in the Field of Small Sample Electric Submersible Pump Based on FLAT
## 2 Materials and Methods
### A Method for NER in the Field of Small Sample ESP Based on FLAT  
Based on the knowledge of ESP faults, this paper categorizes the entities in the literature into four types: \"System\", \"Component\", \"Fault Symptom\", and \"Fault\", forming four ontologies. The distribution of knowledge in these documents is uneven, with some fault-related knowledge being scarce in text and containing rare characters and words. To address the issues of poor handling of small sample data and rare words, overfitting, and low accuracy in entity recognition by general-purpose Chinese named entity recognition models, this section constructs a char-CNN-FLAT-CRF model to achieve NER task in small-scale domain knowledge texts. 2.1 A Chinese Word Segmentation Method for ESP Domain Based on Dictionary Matching with Semantic Analysis  
To effectively perform character and word embeddings, dictionary-based word segmentation methods are more efficient. They can address the ambiguity and complexity of the Chinese language and are suitable for domain-specific knowledge in the ESP well field. To compensate for the poor adaptability of dictionary matching, this paper introduces a syntactic and semantic analysis module to assist with word segmentation. To improve dictionary-based word segmentation in the ESP well domain, a domain-specific dictionary is built using the corpus data. The text data are preprocessed according to a general list of Chinese stop words to remove words and special symbols that lack practical significance in the corpus. The jieba word segmentation tool is used, in combination with the dictionary from the People's Daily word segmentation corpus, to conduct initial segmentation and create the initial vocabulary set. A hash table-based deduplication method is used to remove duplicate words from a dictionary. The process is as follows: Construct a hash table, iterate through the vocabulary set, use the SHA-256 method to generate hash values, compare the hash values to determine if an element is a duplicate. Map each element of the vocabulary set to a fixed index position in the hash table for deduplication. Manually review the deduplicated dictionary. Using domain knowledge of ESP wells, identify and eliminate words with language errors to ensure the dictionary's quality and accuracy. Enrich the dictionary by integrating specialized vocabulary and industry terminology. Use Equation (1) to calculate the frequency of words in the corpus data, and then sort the words by frequency to improve the accuracy of the word segmentation algorithm. \[\text{TF}(x)=\frac{N_{x}}{N_{text}} \tag{1}\]TF(\(x\)) is the frequency of the word \(x\), \(N_{x}\) represents the number of occurrences of the word \(x\) in the corpus, and \(N_{text}\) is the total number of words in the corpus. The dictionary matching module completes the main work of word segmentation matching through the constructed ESP domain-specific dictionary. A syntactic and semantic analysis module is introduced based on the characteristics described in the ESP literature to assist in verifying the correctness of word segmentation. This paper analyzes the parts of speech of segmented words based on the particularity of domain vocabulary in ESP corpora. When multiple nouns, verbs, or polysemous words appear consecutively in segmentation, noun or verb phrases are formed based on their associative and mutually exclusive relationships. A check is carried out to see if the compound word exists in the domain dictionary, and the word is output if it does. After that, Context-Free Grammar (CFG) is used to verify the correctness of word segmentation results and identify possible errors. In Chinese corpora, there are cases where verbs function as complements, such as in the sentence \"He comes running\", where \"running\" is a verb that supplements the verb \"comes\". For Chinese corpora of ESP, CFG rules include a production body with two consecutive verbs for verb phrases.