Chinese named entity recognition method based on pinyin enhancement
The method enhances Chinese named entity recognition by using pinyin grid embeddings and word vectors to compute fusion features, improving accuracy and efficiency in Chinese named entity recognition.
Patent Information
- Application Number
- CN202510788621.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2045-06-13
AI Technical Summary
The existing Chinese named entity recognition method based on pinyin enhancement faces the problems of fuzzy character boundaries, entity segmentation errors and semantic feature extraction difficulties in Chinese text, resulting in low recognition performance.
By obtaining the two-dimensional pinyin grid embedding vectors and word representation vectors of the text to be identified, the fusion characteristics and prediction scores between characters are calculated using the two-dimensional expansion convolutional neural network and the Biaffine classifier, and context modeling is combined with the BERT model and BiLSTM to improve the accuracy and efficiency of entity recognition.
It improves the accuracy and efficiency of Chinese named entity recognition, solves the problems of fuzzy character boundaries and errors in entity segmentation in Chinese text, and achieves more efficient entity recognition.
Smart Images

Figure CN120317255A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field related to Chinese named entity recognition enhanced by pinyin, and particularly to a Chinese named entity recognition method enhanced by pinyin. Background Art
[0002] Chinese named entity recognition enhanced by pinyin is a basic task in the field of information extraction, and plays an extremely important role in many downstream applications such as information retrieval, entity linking, and relation extraction.
[0003] Currently, most research on Chinese named entity recognition enhanced by pinyin mainly focuses on English texts. In contrast, Chinese named entity recognition enhanced by pinyin faces additional challenges, mainly because Chinese lacks clear word boundaries (such as spaces), does not distinguish between uppercase and lowercase letters, contains a large number of multi-syllable characters, and has a complex entity structure. These characteristics lead to blurred character boundaries, incorrect entity segmentation, and difficult semantic feature extraction, significantly increasing the complexity of the Chinese named entity recognition task enhanced by pinyin. Moreover, the current Chinese named entity recognition methods enhanced by pinyin mainly achieve entity recognition through text modeling by predicting the relationships between characters, which has certain limitations, resulting in relatively low overall performance of Chinese entity recognition. Summary of the Invention
[0004] This application aims to at least solve the technical problems existing in the prior art. For this purpose, this application proposes a Chinese named entity recognition method enhanced by pinyin, which can improve the efficiency and accuracy of Chinese named entity recognition enhanced by pinyin.
[0005] In the first aspect of this application, a Chinese named entity recognition method enhanced by pinyin is provided, including the following steps: Obtain the two-dimensional pinyin grid embedding vector and word representation vector of the text to be recognized; Perform projection based on the word representation vector to obtain a two-dimensional grid feature vector; Calculate the fusion feature between every two arbitrary characters of the text to be recognized based on the pinyin grid embedding vector and the two-dimensional grid feature vector; Calculate the first corresponding prediction score vector based on the fusion feature between every two arbitrary characters; Calculate the second corresponding prediction score vector based on the word representation vector; Calculate the total prediction score vector based on the first corresponding prediction score vector and the second corresponding prediction score vector; Output the named entity of the text to be recognized based on the total prediction score vector.
[0006] The control method according to the embodiments of the present application has at least the following beneficial effects: This method obtains the two-dimensional pinyin grid embedding vector and the word representation vector of the text to be recognized; projects based on the word representation vector to obtain the two-dimensional grid feature vector; calculates the fusion feature between every two arbitrary characters of the text to be recognized based on the pinyin grid embedding vector and the two-dimensional grid feature vector; by fusing the pinyin grid embedding vector and the two-dimensional grid feature vector, the accuracy of Chinese named entity recognition based on pinyin enhancement is improved. Calculate the first corresponding prediction score vector based on the fusion feature between every two arbitrary characters; calculate the second corresponding prediction score vector based on the word representation vector; calculate the total prediction score vector based on the first corresponding prediction score vector and the second corresponding prediction score vector; output the named entity of the text to be recognized based on the total prediction score vector, improving the efficiency of Chinese named entity recognition based on pinyin enhancement.
[0007] According to some embodiments of the present application, calculating the fusion feature between every two arbitrary characters of the text to be recognized based on the pinyin grid embedding vector and the two-dimensional grid feature vector includes: Calculate the semantic grid feature vector based on the pinyin grid embedding vector, the two-dimensional grid feature vector, the preset region matrix, and the preset distance matrix through the following formula: ; Wherein, is the semantic grid feature vector, is the preset distance matrix, is the preset region matrix, is the pinyin grid embedding vector, is the th character and the th character's two-dimensional grid feature vector; Extract features from the semantic grid feature vector through a two-dimensional dilated convolutional neural network through the following formula to obtain the fusion feature: ; Wherein, is the fusion feature, is the preset dilation rate of the two-dimensional dilated convolutional neural network.
[0008] According to some embodiments of the present application, calculating the first corresponding prediction score vector based on the fusion feature between every two arbitrary characters includes: Calculate the first corresponding prediction score vector based on the fusion feature between every two arbitrary characters through an MLP predictor through the following formula: ; Wherein, is the The first corresponding prediction score vector of the character and the th character is the fused feature of the th character and the
[0009] According to some embodiments of the present application, calculating the second corresponding prediction score vector based on the word representation vector includes: Calculating the MLP word representation vector based on the word representation vector through the following formula: ; where is the MLP word representation vector of the th character, is the word representation vector of the th character, is the MLP word representation vector of the th character, ; where is the second corresponding prediction score vector of the th character and the is a preset first parameter, is a preset second parameter, is a preset third parameter.
[0010] According to some embodiments of the present application, calculating the total prediction score vector based on the first corresponding prediction score vector and the second corresponding prediction score vector includes: Calculating the sum of the first corresponding prediction score vector and the second corresponding prediction score vector; Taking the sum as the total prediction score vector.
[0011] According to some embodiments of the present application, obtaining the two-dimensional pinyin grid embedding vector and the word representation vector of the text to be recognized includes: Performing context modeling on the text to be recognized based on a pre-trained BERT model to obtain token representations; Inputting the token representations into a BiLSTM to obtain the word representation vector; Using the open-source PyPinyin package to convert the text to be recognized into a pinyin sequence; Extract features from the pinyin sequence through one-dimensional convolution to obtain local speech feature vectors; Perform max pooling on the local speech feature vectors to obtain pinyin embedding vectors; Perform two-way broadcasting on the pinyin embedding vectors to obtain the two-dimensional pinyin grid embedding vectors.
[0012] According to some embodiments of the present application, outputting the named entities of the text to be recognized based on the total prediction score vector includes: Output the corresponding named entity categories for every two arbitrary characters based on the total prediction score vector; Deduplicate the corresponding named entities to obtain the named entities of the text to be recognized.
[0013] In the second aspect of the present application, a Chinese named entity recognition system based on pinyin enhancement is provided. The Chinese named entity recognition system based on pinyin enhancement includes: A data acquisition module for acquiring the two-dimensional pinyin grid embedding vector and the word representation vector of the text to be recognized; A projection module for projecting based on the word representation vector to obtain two-dimensional grid feature vectors; A fusion feature calculation module for calculating the fusion features between every two arbitrary characters of the text to be recognized based on the pinyin grid embedding vector and the two-dimensional grid feature vectors; A first corresponding prediction score vector calculation module for calculating a first corresponding prediction score vector based on the fusion features between every two arbitrary characters; A second corresponding prediction score vector calculation module for calculating a second corresponding prediction score vector based on the word representation vector; A total prediction score vector calculation module for calculating a total prediction score vector based on the first corresponding prediction score vector and the second corresponding prediction score vector; A named entity output module for outputting the named entities of the text to be recognized based on the total prediction score vector.
[0014] The system obtains the two-dimensional pinyin grid embedding vector and the word representation vector of the text to be recognized; projects based on the word representation vector to obtain the two-dimensional grid feature vector; calculates the fusion feature between every two arbitrary characters of the text to be recognized based on the pinyin grid embedding vector and the two-dimensional grid feature vector; this application improves the accuracy of Chinese named entity recognition based on pinyin enhancement by fusing the pinyin grid embedding vector and the two-dimensional grid feature vector, calculates the first corresponding prediction score vector based on the fusion feature between every two arbitrary characters; calculates the second corresponding prediction score vector based on the word representation vector; calculates the total prediction score vector based on the first corresponding prediction score vector and the second corresponding prediction score vector; outputs the named entity of the text to be recognized based on the total prediction score vector, improving the efficiency of Chinese named entity recognition based on pinyin enhancement.
[0015] In a third aspect of this application, an electronic device for Chinese named entity recognition based on pinyin enhancement is provided, including at least one control processor and a memory for communicating with at least one control processor; the memory stores instructions executable by at least one control processor, and the instructions are executed by at least one control processor to enable at least one control processor to execute the above-mentioned Chinese named entity recognition method based on pinyin enhancement.
[0016] In a fourth aspect of this application, a computer-readable storage medium is provided, and the computer-readable storage medium stores computer-executable instructions for enabling a computer to execute the above-mentioned Chinese named entity recognition method based on pinyin enhancement.
[0017] It should be noted that the beneficial effects between the second to fourth aspects of this application and the prior art are the same as those between a Chinese named entity recognition system based on pinyin enhancement and the prior art, and will not be elaborated here.
[0018] Additional aspects and advantages of this application will be partially given in the following description, partially become apparent from the following description, or be understood through the practice of this application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and / or additional aspects and advantages of this application will become apparent and be easily understood from the description of the embodiments in conjunction with the following drawings, where: Figure 1 is a flowchart of a Chinese named entity recognition method based on pinyin enhancement according to an embodiment of this application; Figure 2 is a schematic structural diagram of an embodiment of a Chinese named entity recognition system based on pinyin enhancement provided by this application; Figure 3 is a schematic structural diagram of an embodiment of an electronic device provided by this application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0020] Embodiments of the present application will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where like or similar reference numerals designate like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the accompanying drawings are exemplary and are only for explaining the present application, and should not be construed as a limitation to the present application.
[0021] In the description of the present application, if the first, second, etc. are described, they are only for the purpose of distinguishing technical features, and should not be construed as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features or implicitly indicating the sequence relationship of the indicated technical features.
[0022] In the description of the present application, it should be understood that the orientation or positional relationship indicated by terms such as up, down, etc. is based on the orientation or positional relationship shown in the accompanying drawings. It is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as a limitation to the present application.
[0023] In the description of the present application, it should be noted that unless otherwise clearly defined, terms such as setting, installation, connection, etc. should be understood in a broad sense, and those skilled in the art can reasonably determine the specific meanings of the above terms in the present application in combination with the specific content of the technical solution.
[0024] Pinyin-enhanced Chinese named entity recognition is a fundamental task in the field of information extraction and plays an extremely important role in many downstream applications such as information retrieval, entity linking, and relation extraction.
[0025] Currently, most research on pinyin-enhanced Chinese named entity recognition mainly focuses on English texts. In contrast, pinyin-enhanced Chinese named entity recognition faces additional challenges, mainly because Chinese lacks clear word boundaries (such as spaces), does not distinguish between uppercase and lowercase letters, contains a large number of polysyllabic characters, and has a complex entity structure. These characteristics lead to blurred character boundaries, incorrect entity segmentation, and difficult semantic feature extraction, significantly increasing the complexity of the pinyin-enhanced Chinese named entity recognition task. Moreover, the current pinyin-enhanced Chinese named entity recognition methods mainly achieve entity recognition through predicting the relationships between characters and text modeling, which has certain limitations, resulting in relatively low overall performance of Chinese entity recognition.
[0026] To address the above technical deficiencies, an embodiment of the present application provides a pinyin-enhanced Chinese named entity recognition method.
[0027] Please refer to Figure 1, which is a schematic flowchart of a Chinese named entity recognition method based on pinyin enhancement provided by an embodiment of this application. This method is applied to an electronic device, which can be a server or the like. As Figure 1 shown, the Chinese named entity recognition method based on pinyin enhancement includes: Step S101, obtain the two-dimensional pinyin grid embedding vector and word representation vector of the text to be recognized; Step S102, project based on the word representation vector to obtain a two-dimensional grid feature vector; Step S103, calculate the fusion feature between every two arbitrary characters of the text to be recognized based on the pinyin grid embedding vector and the two-dimensional grid feature vector; Step S104, calculate the first corresponding prediction score vector based on the fusion feature between every two arbitrary characters; Step S105, calculate the second corresponding prediction score vector based on the word representation vector; Step S106, calculate the total prediction score vector based on the first corresponding prediction score vector and the second corresponding prediction score vector; Step S107, output the named entity of the text to be recognized based on the total prediction score vector.
[0028] This method obtains the two-dimensional pinyin grid embedding vector and word representation vector of the text to be recognized; projects based on the word representation vector to obtain a two-dimensional grid feature vector; calculates the fusion feature between every two arbitrary characters of the text to be recognized based on the pinyin grid embedding vector and the two-dimensional grid feature vector; this application improves the accuracy of Chinese named entity recognition based on pinyin enhancement by fusing the pinyin grid embedding vector and the two-dimensional grid feature vector, calculates the first corresponding prediction score vector based on the fusion feature between every two arbitrary characters; calculates the second corresponding prediction score vector based on the word representation vector; calculates the total prediction score vector based on the first corresponding prediction score vector and the second corresponding prediction score vector; outputs the named entity of the text to be recognized based on the total prediction score vector, improving the efficiency of Chinese named entity recognition based on pinyin enhancement. In some embodiments, calculating the fusion feature between every two arbitrary characters of the text to be recognized based on the pinyin grid embedding vector and the two-dimensional grid feature vector includes: Calculate the semantic grid feature vector based on the pinyin grid embedding vector, the two-dimensional grid feature vector, a preset region matrix, and a preset distance matrix through the following formula: ; where is the semantic grid feature vector, is the preset distance matrix, is the preset region matrix, is the pinyin grid embedding vector, is the two-dimensional grid feature vector of the th character and the th character; The semantic grid feature vector is subjected to feature extraction through a two-dimensional dilated convolutional neural network by the following formula to obtain a fused feature: ; where is the fused feature, is the preset dilation rate of the two-dimensional dilated convolutional neural network.
[0029] Specifically, in this application, conditional layer normalization is used to project the word representation vector into a two-dimensional grid, and a two-dimensional grid is generated by the following formula : ; where is the gain parameter, is the bias parameter, is the first weight matrix, is the second weight matrix, is the first bias vector, is the second bias vector, is the average value in the standard layer normalization, is the standard deviation in the standard layer normalization.
[0030] In this application, by controlling the dilation rate in the multi-granularity dilated convolution, the global interaction across the feature grid is captured, avoiding the loss of semantic features caused by simple connection.
[0031] In some embodiments, calculating the first corresponding prediction score vector based on the fused feature between every two arbitrary characters includes: Calculating the first corresponding prediction score vector based on the fused feature between every two arbitrary characters through an MLP predictor by the following formula: ; where is the first corresponding prediction score vector of the th character and the th character, is the th character and the th character's fused feature.
[0032] This application provides a data basis for subsequent total score calculation by calculating the first corresponding prediction score vector, improving the accuracy of named entity recognition.
[0033] In some embodiments, calculating the second corresponding prediction score vector based on the word representation vector includes: Calculate the MLP word representation vector based on the word representation vector through the following formula: ; where, is the MLP word representation vector of the th character, is the word representation vector of the th character, is the MLP word representation vector of the th character, is the word representation vector of the th character; Calculate the second corresponding prediction score vector based on the MLP word representation vector through the Biaffine classifier through the following formula: ; where, is the second corresponding prediction score vector of the th character and the th character, is a preset first parameter, is a preset second parameter, is a preset third parameter.
[0034] This application provides a data basis for subsequent total score calculation by calculating the second corresponding prediction score vector, improving the accuracy of named entity recognition.
[0035] In some embodiments, calculating the total prediction score vector based on the first corresponding prediction score vector and the second corresponding prediction score vector includes: Calculating the sum of the first corresponding prediction score vector and the second corresponding prediction score vector; Taking the sum as the total prediction score vector.
[0036] This application provides a data basis for subsequent named entity recognition by calculating the total prediction score vector, improving the accuracy of named entity recognition.
[0037] In some embodiments, obtaining the two-dimensional pinyin grid embedding vector and the word representation vector of the text to be recognized includes: Performing context modeling on the text to be recognized based on the pre-trained BERT model to obtain the token representation; Inputting the token representation into a BiLSTM to obtain the word representation vector; Using the open-source PyPinyin package to convert the text to be recognized into a pinyin sequence; Performing feature extraction on the pinyin sequence through one-dimensional convolution to obtain the local speech feature vector; Performing max pooling on the local speech feature vector to obtain the pinyin embedding vector; The pinyin embedding vector is bidirectionally broadcasted to obtain a two-dimensional pinyin grid embedding vector.
[0038] Specifically, it targets a piece of text; the encoder layer consists of three parts. First, the pre-trained BERT model performs tokenization and initial context modeling to generate token-level representations. To further enhance context understanding, BiLSTM is applied to generate the final word representation vector.
[0039] Specifically, in order to effectively utilize the semantic richness of Chinese Pinyin and solve the recognition challenges caused by polyphonic ambiguity, this application extracts and integrates Pinyin information from the input text, and converts each Chinese character into a Pinyin sequence consisting of Roman letters and tones by using the PyPinyin package, and fills it with "-" to a fixed length of 8 for alignment. For example, the Pinyin sequence length of the Chinese character "太" is 4, of which the first three positions represent Pinyin and the last position represents the tone. First, a one-dimensional convolution with a kernel size of 2 is used to extract local speech features, and then Max-Pooling is performed to obtain a Pinyin embedding vector.
[0040] In some embodiments, outputting the named entity of the text to be recognized based on the total prediction score vector includes: Output the corresponding named entity category of every two arbitrary characters based on the total prediction score vector; The corresponding named entities are deduplicated to obtain the named entities of the text to be recognized. Specifically, the present application first processes the text at the character level through the encoder layer, and performs pinyin and lexical unit processing; then extracts features for each grid through feature fusion, and generates an entity feature grid through a collaborative prediction module, and finally decodes the entity through the model to complete the recognition.
[0041] Specifically, this application calculates the loss value by the following formula: ; in, is the loss value, The total number of characters, is the total number of pre-set named entity categories, For the Characters and The true named entity category of characters, For the Characters and The predicted category of the characters; When the loss value is greater than the preset value, the recognition model is updated based on the loss value until the loss value is less than or equal to the preset value.
[0042] Specifically, in order to facilitate understanding by those skilled in the art, a set of optimal embodiments is provided below: I. Data acquisition: Obtain the two-dimensional pinyin grid embedding vector and word representation vector of the text to be recognized, specifically: Perform context modeling on the text to be recognized based on the pre-trained BERT model to obtain token representations; Input the token representations into a BiLSTM to obtain word representation vectors; Use the open-source PyPinyin package to convert the text to be recognized into a pinyin sequence; Extract features from the pinyin sequence through one-dimensional convolution to obtain local speech feature vectors; Perform max pooling on the local speech feature vectors to obtain pinyin embedding vectors; Perform two-way broadcasting on the pinyin embedding vectors to obtain two-dimensional pinyin grid embedding vectors.
[0043] II. Data projection: Perform projection based on the word representation vectors to obtain two-dimensional grid feature vectors.
[0044] III. Feature fusion: Calculate the fusion features between every two arbitrary characters of the text to be recognized based on the pinyin grid embedding vectors and two-dimensional grid feature vectors, specifically: Calculate the semantic grid feature vectors based on the pinyin grid embedding vectors, two-dimensional grid feature vectors, a preset region matrix, and a preset distance matrix through the following formula: ; where, is the semantic grid feature vector, is the preset distance matrix, is the preset region matrix, is the pinyin grid embedding vector, is the th character and the th character's two-dimensional grid feature vector; Extract features from the semantic grid feature vectors through a two-dimensional dilated convolutional neural network through the following formula to obtain fusion features: ; where, is the fusion feature, is the preset dilation rate of the two-dimensional dilated convolutional neural network.
[0045] IV. Calculation of the first corresponding prediction score vector: Calculate the first corresponding prediction score vector based on the fusion features between every two arbitrary characters, specifically: The first corresponding prediction score vector is calculated by an MLP predictor based on the fusion features between every two arbitrary characters through the following formula: ; where, is the first corresponding prediction score vector of the -th character and the -th character, is the fusion feature of the -th character and the -th character.
[0046] V. Calculation of the second corresponding prediction score vector: The second corresponding prediction score vector is calculated based on the word representation vector, specifically: The MLP word representation vector is calculated based on the word representation vector through the following formula: ; where, is the MLP word representation vector of the -th character, is the word representation vector of the -th character, is the MLP word representation vector of the -th character, is the word representation vector of the -th character; The second corresponding prediction score vector is calculated based on the MLP word representation vector through a Biaffine classifier by the following formula: ; where, is the second corresponding prediction score vector of the -th character and the -th character, is a preset first parameter, is a preset second parameter, is a preset third parameter.
[0047] VI. Calculation of the total prediction score vector: The total prediction score vector is calculated based on the first corresponding prediction score vector and the second corresponding prediction score vector, specifically: Calculate the sum of the first corresponding prediction score vector and the second corresponding prediction score vector; Take the sum as the total prediction score vector.
[0048] VI. Chinese named entity recognition based on pinyin enhancement: Output the named entities of the text to be recognized based on the total prediction score vector.
[0049] Output the corresponding named entity categories for every two arbitrary characters based on the total predicted score vector; Deduplicate the corresponding named entities to obtain the named entities of the text to be recognized.
[0050] In addition, referring to Figure 2 , an embodiment of the present application provides a Chinese named entity recognition system based on pinyin enhancement, including a data acquisition module 1100, a projection module 1200, a fusion feature calculation module 1300, a first corresponding predicted score vector calculation module 1400, a second corresponding predicted score vector calculation module 1500, a total predicted score vector calculation module 1600, and a named entity output module 1700, where: The data acquisition module 1100 is used to acquire the two-dimensional pinyin grid embedding vector and the word representation vector of the text to be recognized; The projection module 1200 is used to project based on the word representation vector to obtain a two-dimensional grid feature vector; The fusion feature calculation module 1300 is used to calculate the fusion features between every two arbitrary characters of the text to be recognized based on the pinyin grid embedding vector and the two-dimensional grid feature vector; The first corresponding predicted score vector calculation module 1400 is used to calculate the first corresponding predicted score vector based on the fusion features between every two arbitrary characters; The second corresponding predicted score vector calculation module 1500 is used to calculate the second corresponding predicted score vector based on the word representation vector; The total predicted score vector calculation module 1600 is used to calculate the total predicted score vector based on the first corresponding predicted score vector and the second corresponding predicted score vector; The named entity output module 1700 is used to output the named entities of the text to be recognized based on the total predicted score vector.
[0051] This system acquires the two-dimensional pinyin grid embedding vector and the word representation vector of the text to be recognized; projects based on the word representation vector to obtain a two-dimensional grid feature vector; calculates the fusion features between every two arbitrary characters of the text to be recognized based on the pinyin grid embedding vector and the two-dimensional grid feature vector; by fusing the pinyin grid embedding vector and the two-dimensional grid feature vector, the present application improves the accuracy of Chinese named entity recognition based on pinyin enhancement, calculates the first corresponding predicted score vector based on the fusion features between every two arbitrary characters; calculates the second corresponding predicted score vector based on the word representation vector; calculates the total predicted score vector based on the first corresponding predicted score vector and the second corresponding predicted score vector; outputs the named entities of the text to be recognized based on the total predicted score vector, improving the efficiency of Chinese named entity recognition based on pinyin enhancement.
[0052] It should be noted that the embodiments of this system and the above - mentioned method embodiments are based on the same inventive concept. Therefore, the relevant content of the above - mentioned method embodiments also applies to the embodiments of this system, and will not be elaborated here.
[0053] Figure 3 The figure shows a schematic hardware structure diagram of Chinese named - entity recognition based on pinyin enhancement provided by an embodiment of the present application.
[0054] In the Chinese named - entity recognition device based on pinyin enhancement, it may include a processor 301 and a memory 302 storing computer program instructions.
[0055] Specifically, the above - mentioned processor 301 may include a central processing unit (CPU), or an application - specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0056] The memory 302 may include a mass storage for data or instructions. By way of example and not limitation, the memory 302 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disc, a magneto - optical disc, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. In a suitable case, the memory 302 may include removable or non - removable (or fixed) media. In a suitable case, the memory 302 may be inside or outside the integrated gateway disaster - tolerance device. In a specific embodiment, the memory 302 is a non - volatile solid - state memory.
[0057] In some embodiments, the memory 302 may include a read - only memory (ROM), a random - access memory (RAM), a magnetic disk storage media device, an optical storage media device, a flash memory device, an electrical, optical, or other physical / tangible memory storage device. Thus, generally, the memory includes one or more tangible (non - transitory) computer - readable storage media (e.g., memory devices) encoded with software including computer - executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0058] The processor 301 reads and executes the computer program instructions stored in the memory 302 to implement any one of the Chinese named - entity recognition methods based on pinyin enhancement in the above - mentioned embodiments.
[0059] In one example, the Chinese named - entity recognition device based on pinyin enhancement may further include a communication interface 303 and a bus 310. Among them, asFigure 3 As shown, a processor 301, a memory 302, and a communication interface 303 are connected via a bus 310 to complete communication with each other.
[0060] The communication interface 303 is mainly used to implement communication between various modules, devices, units, and / or apparatuses in the embodiments of the present application.
[0061] The bus 310 includes hardware, software, or both, and couples the components of the Chinese named entity recognition device based on pinyin enhancement together. By way of example and not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses or a combination of two or more of these. In a suitable case, the bus 310 may include one or more buses. Although the embodiments of the present application describe and illustrate specific buses, the present application contemplates any suitable bus or interconnect.
[0062] The Chinese named entity recognition device based on pinyin enhancement may execute the Chinese named entity recognition method based on pinyin enhancement in the embodiments of the present application based on a three-dimensional design model, thereby implementing the combination Figure 1 and Figure 2 the Chinese named entity recognition method and system described.
[0063] In addition, in combination with the Chinese named entity recognition method in the above embodiments, the embodiments of the present application may provide a computer storage medium to implement. Computer program instructions are stored on the computer storage medium; when the computer program instructions are executed by a processor, any one of the Chinese named entity recognition methods in the above embodiments is implemented.
[0064] It should be clear that the present application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications, and additions, or change the order between steps after understanding the spirit of the present application.
[0065] The functional blocks shown in the above structural block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, and so on. When implemented in software, the elements of the present application are programs or code segments for performing the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted via a data signal carried in a carrier wave on a transmission medium or a communication link. A "machine-readable medium" can include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical discs, hard disks, fiber optic media, radio frequency (RF) links, and so on. The code segment can be downloaded via a computer network such as the Internet, an intranet, and so on.
[0066] It should also be noted that the exemplary embodiments mentioned in the present application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above steps, that is, the steps can be executed in the order mentioned in the embodiments, can be different from the order in the embodiments, or several steps can be executed simultaneously.
[0067] Aspects of the present disclosure have been described above with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block in the flowcharts and / or block diagrams, and the combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, a special purpose computer, or other programmable data processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the functions / actions specified in one or more blocks of the flowcharts and / or block diagrams. Such a processor can be, but is not limited to, a general purpose processor, a special purpose processor, a special application processor, or a field programmable logic circuit. It should also be understood that each block in the block diagrams and / or flowcharts, and the combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware for performing the specified functions or actions, or by a combination of dedicated hardware and computer instructions.
[0068] As described above, this is only the specific implementation manner of the present application. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein. It should be understood that the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered within the protection scope of the present application.
Claims
1. A Chinese named entity recognition method based on pinyin enhancement, characterized in that The Chinese named entity recognition method based on pinyin enhancement includes: Obtain the two-dimensional pinyin grid embedding vector and word representation vector of the text to be recognized; Perform projection based on the word representation vector to obtain a two-dimensional grid feature vector; Calculate the fusion feature between every two arbitrary characters of the text to be recognized based on the pinyin grid embedding vector and the two-dimensional grid feature vector; Calculate the first corresponding prediction score vector based on the fusion feature between every two arbitrary characters; Calculate the second corresponding prediction score vector based on the word representation vector; Calculate the total prediction score vector based on the first corresponding prediction score vector and the second corresponding prediction score vector; Output the named entity of the text to be recognized based on the total prediction score vector.
2. The Chinese named entity recognition method based on pinyin enhancement according to claim 1, wherein The calculating the fusion feature between every two arbitrary characters of the text to be recognized based on the pinyin grid embedding vector and the two-dimensional grid feature vector includes: Calculate the semantic grid feature vector based on the pinyin grid embedding vector, the two-dimensional grid feature vector, a preset region matrix, and a preset distance matrix through the following formula: ; Among them, is the semantic grid feature vector, is the preset distance matrix, is the preset region matrix, is the pinyin grid embedding vector, is the th character and the th character's two-dimensional grid feature vector; Perform feature extraction on the semantic grid feature vector through a two-dimensional dilated convolutional neural network through the following formula to obtain the fusion feature: ; Among them, is the fusion feature, is the preset dilation rate of the two-dimensional dilated convolutional neural network.
3. A Chinese named entity recognition method based on pinyin enhancement according to claim 1, characterized in that The calculating the first corresponding prediction score vector based on the fusion feature between every two arbitrary characters includes: Calculate the first corresponding prediction score vector based on the fusion feature between every two arbitrary characters through an MLP predictor through the following formula: ; Among them, is the first corresponding prediction score vector of the -th character and the -th character, is the fusion feature of the -th character and the -th character.
4. A Chinese named entity recognition method based on pinyin enhancement according to claim 1, characterized in that, The calculating the second corresponding prediction score vector based on the word representation vector includes: Calculate the MLP word representation vector based on the word representation vector through the following formula: ; Among them, is the MLP word representation vector of the th character, is the word representation vector of the th character, is the MLP word representation vector of the th character, is the word representation vector of the th character; Calculate the second corresponding prediction score vector based on the MLP word representation vector through a Biaffine classifier through the following formula: ; wherein, is the second corresponding predicted score vector of the th character and the th character, is a preset first parameter, is a preset second parameter, is a preset third parameter.
5. A method for Chinese named entity recognition based on pinyin enhancement according to claim 1, characterized in that, The calculating the total prediction score vector based on the first corresponding prediction score vector and the second corresponding prediction score vector includes: Calculate the sum of the first corresponding prediction score vector and the second corresponding prediction score vector; Use the sum as the total prediction score vector.
6. The method for identifying Chinese named entities based on pinyin enhancement according to claim 1, wherein The obtaining the two-dimensional pinyin grid embedding vector and word representation vector of the text to be recognized includes: Perform context modeling on the text to be recognized based on a pre-trained BERT model to obtain a tokenized representation; Input the tokenized representation into a BiLSTM to obtain the word representation vector; Use the open-source PyPinyin package to convert the text to be recognized into a pinyin sequence; Perform feature extraction on the pinyin sequence through a one-dimensional convolution to obtain a local speech feature vector; Perform max pooling on the local speech feature vector to obtain a pinyin embedding vector; Perform bidirectional broadcasting on the pinyin embedding vector to obtain the two-dimensional pinyin grid embedding vector.
7. A Chinese named entity recognition method based on pinyin enhancement according to claim 6, characterized in that The outputting the named entity of the text to be recognized based on the total prediction score vector includes: Output the corresponding named entity category for every two arbitrary characters based on the total prediction score vector; Remove duplicates from the corresponding named entities to obtain the named entity of the text to be recognized.
8. A Chinese named entity recognition system based on pinyin enhancement, characterized in that, The Chinese named entity recognition system based on pinyin enhancement includes: A data acquisition module, configured to acquire the two-dimensional pinyin grid embedding vector and the word representation vector of the text to be recognized; A projection module, configured to perform projection based on the word representation vector to obtain a two-dimensional grid feature vector; A fusion feature calculation module, configured to calculate the fusion feature between any two arbitrary characters of the text to be recognized based on the pinyin grid embedding vector and the two-dimensional grid feature vector; A first corresponding prediction score vector calculation module, configured to calculate a first corresponding prediction score vector based on the fusion feature between any two arbitrary characters; A second corresponding prediction score vector calculation module, configured to calculate a second corresponding prediction score vector based on the word representation vector; A total prediction score vector calculation module, configured to calculate a total prediction score vector based on the first corresponding prediction score vector and the second corresponding prediction score vector; A named entity output module, configured to output the named entity of the text to be recognized based on the total prediction score vector.
9. A Chinese named entity recognition device based on pinyin enhancement, characterized in that, Comprising at least one control processor and a memory for communicatively connecting with the at least one control processor; the memory stores instructions executable by the at least one control processor, and the instructions are executed by the at least one control processor to enable the at least one control processor to execute a Chinese named entity recognition method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions for causing a computer to execute a Chinese named entity recognition method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Named entity identification method and apparatus, electronic device and machine-readable storage medium
CN109446521A
Electronic medical record named entity recognition method based on data enhancement
CN113990421A
Chinese named entity recognition method based on bert and word vector combination
CN115310448A
Entity information determining method and apparatus, and device
WO2024124913A1