CN112861539B - Nested named entity recognition method, apparatus, electronic device and storage medium - Google Patents
Nested named entity recognition method, apparatus, electronic device and storage medium Download PDFInfo
- Publication number
- CN112861539B CN112861539B CN202110283633.8A CN202110283633A CN112861539B CN 112861539 B CN112861539 B CN 112861539B CN 202110283633 A CN202110283633 A CN 202110283633A CN 112861539 B CN112861539 B CN 112861539B
- Authority
- CN
- China
- Prior art keywords
- matrix
- word level
- feature map
- named entity
- determining
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 54
- 239000011159 matrix material Substances 0.000 claims abstract description 128
- 230000011218 segmentation Effects 0.000 claims abstract description 27
- 239000003550 marker Substances 0.000 claims abstract description 18
- 238000004364 calculation method Methods 0.000 claims description 12
- 238000005070 sampling Methods 0.000 claims description 8
- 238000011176 pooling Methods 0.000 claims description 6
- 230000000694 effects Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 11
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 238000004891 communication Methods 0.000 description 3
- 230000008520 organization Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000006467 substitution reaction Methods 0.000 description 3
- 230000004075 alteration Effects 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/289—Phrasal analysis, e.g. finite state techniques or chunking
- G06F40/295—Named entity recognition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Machine Translation (AREA)
Abstract
The application relates to a nested named entity identification method, a nested named entity identification device, electronic equipment and a storage medium, wherein the method comprises the following steps: obtaining a marker sequence; determining a semantic representation from the tag sequence; determining a feature map matrix from the marker sequence and the semantic representation; predicting a word level matrix according to the feature map matrix; and identifying a named entity according to the word level matrix value. The embodiment of the application provides a nested named entity recognition method based on image semantic segmentation, which can avoid the problem of entity overlapping by carrying out semantic representation, feature map matrix and word level matrix on the image semantic segmentation, so that the named entity recognition is realized, the attention to local and global information is realized, and the named entity is recognized by the coordinates and the category of the word level matrix, and the recognition effect of the named entity is improved.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and apparatus for identifying nested named entities, an electronic device, and a storage medium.
Background
Named entity recognition (Named Entity Recognition, NER) tasks are mainly aimed at extracting entities of a specific type from a piece of text, the entity types including person names, place names, time and institution names, etc. A nested named entity is a special form of named entity, i.e., the identified entity may include other entities, such as "Shandong university" is an organization name, where "Shandong" is a place name. The traditional named entity recognition model based on sequence labeling is difficult to effectively process the condition that one word corresponds to a plurality of labels, so researchers propose a model which is specially suitable for nested named entity recognition.
The current nested named entity recognition comprises a method based on sequence multi-label classification, a method based on machine reading understanding (Machine Reading Comprehension, MRC), a method based on Seq2Seq sequence generation and the like, but no named entity recognition method based on semantic segmentation class exists.
Disclosure of Invention
The application provides a nested named entity identification method, a nested named entity identification device, electronic equipment and a storage medium.
The technical scheme for solving the technical problems is as follows:
in a first aspect, an embodiment of the present application provides a method for identifying nested named entities, including:
obtaining a marker sequence;
determining a semantic representation from the tag sequence;
determining a feature map matrix from the marker sequence and the semantic representation;
predicting a word level matrix according to the feature map matrix;
and identifying a named entity according to the word level matrix value.
In some embodiments, the above method further comprises: and regarding the feature map matrix as a d-channel image, and predicting the word level matrix by a segmentation layer, wherein the segmentation layer uses a UNet structure in image semantic segmentation.
In some embodiments, the UNet structure in the above method is formed by a cross-layer connection of two downsampling modules and two upsampling modules,
each downsampling module comprises two convolution layers and a maximum pooling layer;
wherein each up-sampling module comprises two convolutional layers and one deconvolution layer.
In some embodiments, the method predicts a word level matrix according to the feature map matrix, and further includes:
the full-connection network carries out single tag classification on each element of the matrix to obtain the word level matrix;
the abscissa of each element in the word level matrix corresponds to the beginning position of the entity in the sentence;
the abscissa of each element in the word-level matrix corresponds to the ending position of the entity in the sentence.
In some embodiments, identifying the named entity from the word level matrix value includes:
and determining the entity according to the category and coordinate value of each element in the word level matrix.
In some embodiments, determining the semantic representation from the tag sequence includes:
determining corresponding word embedding, sentence embedding and position embedding according to the mark sequence;
embedding the word, the sentence embedding and the position embedding are summed;
and inputting the added mark sequence into a BERT model to obtain semantic representation.
In some embodiments, determining a feature map matrix from the marker sequence and the semantic representation in the above method is determined from a similarity calculation.
In a second aspect, an embodiment of the present application further provides a nested named entity recognition apparatus, including:
the acquisition module is used for: for obtaining a marker sequence;
a first determination module: for determining a semantic representation from the sequence;
a second determination module: determining a feature map matrix from the marker sequence and the semantic representation;
and a prediction module: predicting a word level matrix according to the feature map matrix;
and an identification module: for identifying named entities from the word level matrix values.
In some embodiments, the feature map matrix is regarded as a d-channel image in the above device, and a segmentation layer is used to predict the word-level matrix, and the segmentation layer uses UNet structure in semantic segmentation of the image.
In some embodiments, the UNet structure in the above device is formed by cross-layer connection of two downsampling modules and two upsampling modules,
each downsampling module comprises two convolution layers and a maximum pooling layer;
wherein each up-sampling module comprises two convolutional layers and one deconvolution layer.
In some embodiments, the apparatus predicts a word level matrix according to the feature map matrix, and further includes:
the full-connection network carries out single tag classification on each element of the matrix to obtain the word level matrix;
the abscissa of each element in the word level matrix corresponds to the beginning position of the entity in the sentence;
the abscissa of each element in the word-level matrix corresponds to the ending position of the entity in the sentence.
In some embodiments, the identification module in the above apparatus is further configured to determine the entity according to a category and coordinate value of each element in the word level matrix.
In some embodiments, the first determining module in the above apparatus is further configured to:
determining corresponding word embedding, sentence embedding and position embedding according to the mark sequence;
embedding the word, the sentence embedding and the position embedding are summed;
and inputting the added mark sequence into a BERT model to obtain semantic representation.
In some embodiments, determining the feature map matrix from the marker sequence and the semantic representation in the apparatus is determined from a similarity calculation.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor and a memory;
the processor is configured to execute the nested named entity recognition method according to any one of the above by calling a program or instructions stored in the memory.
In a fourth aspect, embodiments of the present application also provide a computer-readable storage medium storing a program or instructions that cause a computer to perform the nested named entity recognition method according to any one of the above.
The beneficial effects of the application are as follows: the application relates to a nested named entity identification method, a nested named entity identification device, electronic equipment and a storage medium, wherein the method comprises the following steps: obtaining a marker sequence; determining a semantic representation from the tag sequence; determining a feature map matrix from the marker sequence and the semantic representation; predicting a word level matrix according to the feature map matrix; and identifying a named entity according to the word level matrix value. The embodiment of the application provides a nested named entity recognition method based on image semantic segmentation, which can avoid the problem of entity overlapping by carrying out semantic representation, feature map matrix and word level matrix on the image semantic segmentation, so that the named entity recognition is realized, the attention to local and global information is realized, and the named entity is recognized by the coordinates and the category of the word level matrix, and the named entity recognition effect is improved.
Drawings
FIG. 1 is a diagram of a method for identifying nested named entities according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a method for identifying nested named entities according to an embodiment of the present application;
FIG. 3 is a second diagram of a method for identifying nested named entities according to an embodiment of the present application;
FIG. 4 is a diagram of a nested named entity recognition device according to an embodiment of the present application;
FIG. 5 is a schematic block diagram of an electronic device according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a process for obtaining a semantic representation according to an embodiment of the present application.
Detailed Description
The principles and features of the present application are described below with reference to the drawings, the examples are illustrated for the purpose of illustrating the application and are not to be construed as limiting the scope of the application.
FIG. 1 is a diagram of a method for identifying nested named entities according to an embodiment of the present application.
With reference to fig. 1, in a first aspect, an embodiment of the present application provides a method for identifying nested named entities, including:
s101: a marker sequence is obtained.
Specifically, in the embodiment of the present application, the tag sequence is expressed as x= ([ cls)],x 1 ,x 2 ,x 3 ,x 4 ,…,x n [sep]) The method comprises the steps of carrying out a first treatment on the surface of the Label [ cls ]]The corresponding final hidden state is typically used for classification tasks, marking [ sep ]]Representing the end of a sentence; these two labels are symbols agreed upon by the BERT model.
S102: determining a semantic representation from the tag sequence.
Specifically, in the embodiment of the present application, a tag sequence is input to a BERT model to obtain a semantic representation e= (e) [cls] ,e 1 ,e 2 ,e 3 ,e 4 ,…,e n ,e [sep] )。
S103: and determining a feature map matrix according to the marking sequence and the semantic representation.
Specifically, in the embodiment of the application, the feature map matrix is determined through similarity calculation.
S104: and predicting a word level matrix according to the feature map matrix.
Specifically, in the embodiment of the present application, the feature map matrix is regarded as a d-channel image, and the segmentation layer is used for predicting a word level matrix, similar to a pixel mask.
S105: and identifying a named entity according to the word level matrix value.
Specifically, in the embodiment of the application, the entity is determined according to the category and coordinate value of each element in the word level matrix.
In some embodiments, the above method further comprises: and regarding the feature map matrix as a d-channel image, and predicting the word level matrix by a segmentation layer, wherein the segmentation layer uses a UNet structure in image semantic segmentation.
In some embodiments, the UNet structure in the above method is formed by a cross-layer connection of two downsampling modules and two upsampling modules,
wherein each downsampling module comprises two convolutional layers and one max-pooling layer.
Wherein each up-sampling module comprises two convolutional layers and one deconvolution layer.
Specifically, in the embodiment of the application, the segmentation layer uses a UNet structure in image semantic segmentation, and the structure is similar to a letter U and is formed by cross-layer connection of two downsampling modules and two upsampling modules. Each downsampling module comprises two convolution layers and a maximum pooling layer, extends the receptive field of each element of the image, and provides rich global information for the final classification. Each up-sampling module includes two convolutional layers and one deconvolution layer.
In some embodiments, the method predicts a word level matrix according to the feature map matrix, and further includes:
and the full-connection network carries out single tag classification on each element of the matrix to obtain the word level matrix.
The abscissa of each element in the word-level matrix corresponds to the beginning position of an entity in a sentence.
The abscissa of each element in the word-level matrix corresponds to the ending position of the entity in the sentence.
Specifically, in the embodiment of the application, after being processed by the up-sampling module and the down-sampling module, the full-connection network carries out single-label classification on each element of the matrix to obtain a word level matrix, and the abscissa of each element of the matrix corresponds to the starting position and the ending position of the potential entity in the sentence respectively. By integrating the BERT coding layer and the segmentation layer, local and global information of matrix elements can be captured. The total number of categories is c+1, such as the entity type is person name, place name, organization name and time, then c=4, and more categories represent not entities, similar to the background category in the semantic segmentation of images.
Fig. 2 is a schematic diagram of a method for identifying nested named entities according to an embodiment of the present application.
In some embodiments, identifying the named entity from the word level matrix value includes:
and determining the entity according to the category and coordinate value of each element in the word level matrix.
Specifically, in the embodiment of the present application, the entity is determined according to the category and the coordinates of each element in the matrix. For example, in fig. 2, the matrix coordinates (1, 2) and coordinates (1, 4) are respectively the place name and the organization name, wherein the abscissa 1 of the coordinates (1, 2) represents the position of the beginning of the entity, the ordinate represents the position of the ending of the entity, the entity 'shandong' can be positioned in the sentence as the place name according to the beginning and ending positions of the entity, and the analysis method of the coordinates (1, 4) is the same as above. Note that since the entity end position cannot be in front of the start position, the entity coordinates cannot appear in the lower triangle area of the matrix, and with the above method, the false recognition case can be reduced, and the calculation amount of the loss function can be reduced.
FIG. 3 is a second diagram of a method for identifying nested named entities according to an embodiment of the present application.
In some embodiments, in connection with fig. 3, determining the semantic representation from the tag sequence includes:
s301: and determining corresponding word embedding, sentence embedding and position embedding according to the mark sequence.
S302: and embedding the word, and adding the sentence embedding and the position embedding.
S303: and inputting the added mark sequence into a BERT model to obtain semantic representation.
Specifically, in connection with fig. 6, the process of obtaining the semantic representation can be intuitively seen.
In some embodiments, determining a feature map matrix from the marker sequence and the semantic representation in the above method is determined from a similarity calculation.
Specifically, in the embodiment of the application, a plurality of similarity calculation modes are fused to encode and obtain the correlation between words.
The ith word x of the input sentence i And the j-th word x j Is a vector f= (x) i ,x j )=[e i We j ;cos(e i ,e j ;MultiHead(e i ,e j )]The three parts of contents are respectivelyBilinear similarity, cosine similarity, and multi-head attention mechanisms, wherein the multi-head in the multi-head attention mechanism is considered as the number of channels in the image, where W,is a parameter that can be learned, h is the number of heads in attention, < >>Is the vector dimension for each header.
MultiHead(e i ,e j )=Concat(head 1 ,head 2 ,…,head h )
Fig. 4 is a diagram of a nested named entity recognition device according to an embodiment of the present application.
In a second aspect, an embodiment of the present application further provides a nested named entity recognition apparatus, including:
acquisition module 401: for obtaining the tag sequence.
Specifically, in the embodiment of the present application, the acquisition module acquires a tag sequence, where the tag sequence is represented as x= ([ cls)],x 1 ,x 2 ,x 3 ,x 4 ,…,x n [sep]) The method comprises the steps of carrying out a first treatment on the surface of the Label [ cls ]]The corresponding final hidden state is typically used for classification tasks, marking [ sep ]]Representing the end of a sentence; these two labels are symbols agreed upon by the BERT model.
The first determination module 402: for determining a semantic representation from the tag sequence.
Specifically, in the embodiment of the present application, the first determining module inputs the marker sequence into the BERT model to determine the semantic representation e= (e) [cls] ,e 1 ,e 2 ,e 3 ,e 4 ,…,e n ,e [sep] )。
The second determination module 403: a feature matrix for determination from the tag sequence and the semantic representation.
Specifically, in the embodiment of the present application, the feature map matrix is determined by the similarity calculation in the second determining module 303.
The prediction module 404: and predicting a word level matrix according to the feature map matrix.
Specifically, in the embodiment of the present application, the feature map matrix is regarded as a d-channel image, and the segmentation layer is used for predicting a word level matrix, similar to a pixel mask.
The identification module 405: for identifying named entities from the word level matrix values.
Specifically, in the embodiment of the application, the entity is determined according to the category and coordinate value of each element in the word level matrix.
In some embodiments, the feature map matrix is regarded as a d-channel image in the above device, and a segmentation layer is used to predict the word-level matrix, and the segmentation layer uses UNet structure in semantic segmentation of the image.
In some embodiments, the UNet structure in the above device is formed by connecting two downsampling modules and two upsampling modules in a cross-layer manner.
Wherein each downsampling module comprises two convolutional layers and one max-pooling layer.
Wherein each up-sampling module comprises two convolutional layers and one deconvolution layer.
In some embodiments, the apparatus predicts a word level matrix according to the feature map matrix, and further includes:
and the full-connection network carries out single tag classification on each element of the matrix to obtain the word level matrix.
The abscissa of each element in the word-level matrix corresponds to the beginning position of an entity in a sentence.
The abscissa of each element in the word-level matrix corresponds to the ending position of the entity in the sentence.
In some embodiments, the identification module in the above apparatus is further configured to determine the entity according to a category and coordinate value of each element in the word level matrix.
In some embodiments, the first determining module 402 in the foregoing apparatus is further configured to:
and determining corresponding word embedding, sentence embedding and position embedding according to the mark sequence.
And embedding the word, and adding the sentence embedding and the position embedding.
And inputting the added mark sequence into a BERT model to obtain semantic representation.
In some embodiments, the second determining module 403 in the foregoing apparatus is further configured to: determining a feature map matrix from the tag sequence and the semantic representation is determined from a similarity calculation.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor and a memory;
the processor is configured to execute the nested named entity recognition method according to any one of the above by calling a program or instructions stored in the memory.
In a fourth aspect, embodiments of the present application also provide a computer-readable storage medium storing a program or instructions that cause a computer to perform the nested named entity recognition method according to any one of the above.
Fig. 5 is a schematic block diagram of an electronic device provided by an embodiment of the present disclosure.
As shown in fig. 5, the electronic device includes: at least one processor 501, at least one memory 502, and at least one communication interface 503. The various components in the electronic device are coupled together by a bus system 504. A communication interface 503 for information transfer with an external device. It is to be appreciated that bus system 504 is employed to enable connected communications between these components. The bus system 504 includes a power bus, a control bus, and a status signal bus in addition to the data bus. But for clarity of illustration, the various buses are labeled as bus system 504 in fig. 5.
It is to be appreciated that the memory 502 in the present embodiment can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory.
In some implementations, the memory 502 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system and application programs.
The operating system includes various system programs, such as a framework layer, a core library layer, a driving layer, and the like, and is used for realizing various basic services and processing hardware-based tasks. Applications, including various applications such as Media Player (Media Player), browser (Browser), etc., are used to implement various application services. The program for implementing any one of the nested named entity recognition methods provided by the embodiments of the present application may be included in an application program.
In the embodiment of the present application, the processor 501 is configured to execute the steps of each embodiment of the nested named entity identification method provided by the embodiment of the present application by calling a program or an instruction stored in the memory 502, specifically, a program or an instruction stored in an application program.
Obtaining a marker sequence;
determining a semantic representation from the tag sequence;
determining a feature map matrix from the marker sequence and the semantic representation;
predicting a word level matrix according to the feature map matrix;
and identifying a named entity according to the word level matrix value.
Any one of the methods for identifying nested named entities provided in the embodiments of the present application may be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuitry in hardware or instructions in software in the processor 501. The processor 501 may be a general purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The steps of any method in the nested named entity identification method provided by the embodiment of the application can be directly embodied as the execution completion of the hardware decoding processor or the combined execution completion of the hardware and software units in the decoding processor. The software elements may be located in a random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory 502 and the processor 501 reads information in the memory 502 and, in combination with its hardware, performs the steps of the method.
Those skilled in the art will appreciate that while some embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the application and form different embodiments.
Those skilled in the art will appreciate that the descriptions of the various embodiments are each focused on, and that portions of one embodiment that are not described in detail may be referred to as related descriptions of other embodiments.
Although the embodiments of the present application have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and alterations without departing from the spirit and scope of the present application, and such modifications and alterations fall within the scope of the appended claims, which are to be construed as merely illustrative of the present application, but the scope of the application is not limited thereto, and various equivalent modifications and substitutions will be readily apparent to those skilled in the art within the scope of the present application, and are intended to be included within the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.
The present application is not limited to the above embodiments, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the present application, and these modifications and substitutions are intended to be included in the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.
Claims (6)
1. The nested named entity identification method is characterized by comprising the following steps:
obtaining a marker sequence;
determining a semantic representation from the tag sequence;
determining a feature map matrix according to the marking sequence and the semantic representation, wherein the determining of the feature map matrix comprises determining the feature map matrix through similarity calculation, and the determining of the feature map matrix through similarity calculation comprises encoding through a similarity calculation mode to obtain the correlation between words;
predicting a word level matrix according to the feature map matrix, wherein the predicting the word level matrix according to the feature map matrix comprises regarding the feature map matrix as a d-channel image, and a segmentation layer is used for predicting the word level matrix and uses a UNet structure in image semantic segmentation;
identifying a named entity according to the word level matrix value, wherein the identifying the named entity according to the word level matrix value comprises determining the named entity according to the category and coordinate value of each element in the word level matrix;
wherein, the predicting word level matrix according to the feature map matrix further comprises:
the full-connection network carries out single tag classification on each element of the matrix to obtain the word level matrix;
the abscissa of each element in the word level matrix corresponds to the beginning position of the entity in the sentence;
the ordinate of each element in the word level matrix corresponds to the ending position of the entity in the sentence.
2. The method of claim 1, wherein the UNet structure is formed by a cross-layer connection of two downsampling modules and two upsampling modules,
each downsampling module comprises two convolution layers and a maximum pooling layer;
wherein each up-sampling module comprises two convolutional layers and one deconvolution layer.
3. The method of claim 1, wherein said determining a semantic representation from said tag sequence comprises:
determining corresponding word embedding, sentence embedding and position embedding according to the mark sequence;
embedding the word, the sentence embedding and the position embedding are summed;
and inputting the added mark sequence into the BERT model to obtain semantic representation.
4. Nested named entity recognition device, characterized by comprising:
the acquisition module is used for: for obtaining a marker sequence;
a first determination module: for determining a semantic representation from the sequence;
a second determination module: determining a feature map matrix according to the marker sequence and the semantic representation, wherein the determining the feature map matrix comprises determining the feature map matrix through similarity calculation;
and a prediction module: the method comprises the steps of predicting a word level matrix according to the feature map matrix, wherein the predicting the word level matrix according to the feature map matrix comprises regarding the feature map matrix as a d-channel image, and a segmentation layer is used for predicting the word level matrix and uses a UNet structure in image semantic segmentation;
and an identification module: the method comprises the steps of identifying a named entity according to a word level matrix value, wherein the step of identifying the named entity according to the word level matrix value comprises the step of determining the named entity according to the category and coordinate value of each element in a word level matrix;
wherein, the predicting word level matrix according to the feature map matrix further comprises:
the full-connection network carries out single tag classification on each element of the matrix to obtain the word level matrix;
the abscissa of each element in the word level matrix corresponds to the beginning position of the entity in the sentence;
the ordinate of each element in the word level matrix corresponds to the ending position of the entity in the sentence.
5. An electronic device, comprising: a processor and a memory;
the processor is configured to execute the nested named entity recognition method according to any one of claims 1 to 3 by calling a program or instructions stored in the memory.
6. A computer-readable storage medium storing a program or instructions that cause a computer to perform the nested named entity recognition method of any one of claims 1 to 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110283633.8A CN112861539B (en) | 2021-03-16 | 2021-03-16 | Nested named entity recognition method, apparatus, electronic device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110283633.8A CN112861539B (en) | 2021-03-16 | 2021-03-16 | Nested named entity recognition method, apparatus, electronic device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112861539A CN112861539A (en) | 2021-05-28 |
CN112861539B true CN112861539B (en) | 2023-12-15 |
Family
ID=75994961
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110283633.8A Active CN112861539B (en) | 2021-03-16 | 2021-03-16 | Nested named entity recognition method, apparatus, electronic device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112861539B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113656555B (en) * | 2021-08-19 | 2024-03-12 | 云知声智能科技股份有限公司 | Training method, device, equipment and medium for nested named entity recognition model |
CN114547301A (en) * | 2022-02-21 | 2022-05-27 | 北京百度网讯科技有限公司 | Document processing method, document processing device, recognition model training equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111178080A (en) * | 2020-01-02 | 2020-05-19 | 杭州涂鸦信息技术有限公司 | Named entity identification method and system based on structured information |
CN112257421A (en) * | 2020-12-21 | 2021-01-22 | 完美世界(北京)软件科技发展有限公司 | Nested entity data identification method and device and electronic equipment |
CN112347785A (en) * | 2020-11-18 | 2021-02-09 | 湖南国发控股有限公司 | Nested entity recognition system based on multitask learning |
CN112487812A (en) * | 2020-10-21 | 2021-03-12 | 上海旻浦科技有限公司 | Nested entity identification method and system based on boundary identification |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11138425B2 (en) * | 2018-09-26 | 2021-10-05 | Leverton Holding Llc | Named entity recognition with convolutional networks |
-
2021
- 2021-03-16 CN CN202110283633.8A patent/CN112861539B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111178080A (en) * | 2020-01-02 | 2020-05-19 | 杭州涂鸦信息技术有限公司 | Named entity identification method and system based on structured information |
CN112487812A (en) * | 2020-10-21 | 2021-03-12 | 上海旻浦科技有限公司 | Nested entity identification method and system based on boundary identification |
CN112347785A (en) * | 2020-11-18 | 2021-02-09 | 湖南国发控股有限公司 | Nested entity recognition system based on multitask learning |
CN112257421A (en) * | 2020-12-21 | 2021-01-22 | 完美世界(北京)软件科技发展有限公司 | Nested entity data identification method and device and electronic equipment |
Non-Patent Citations (2)
Title |
---|
A Boundary Regressing Model for Nested Named Entity Recognition;Yanping Chen 等;《https://arxiv.org/pdf/2011.14330v1.pdf》;1-10 * |
基于标签聚类的中文重叠命名实体识别方法;温秀秀;马超;高原原;康子路;;计算机工程(第05期);45-52 * |
Also Published As
Publication number | Publication date |
---|---|
CN112861539A (en) | 2021-05-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109902622B (en) | Character detection and identification method for boarding check information verification | |
CN113157936B (en) | Entity relationship joint extraction method, device, electronic equipment and storage medium | |
Fu et al. | Contextual deconvolution network for semantic segmentation | |
CN112861539B (en) | Nested named entity recognition method, apparatus, electronic device and storage medium | |
CN111881768B (en) | Document layout analysis method | |
CN111914654B (en) | Text layout analysis method, device, equipment and medium | |
CN114254071B (en) | Querying semantic data from unstructured documents | |
CN113869138A (en) | Multi-scale target detection method and device and computer readable storage medium | |
Song et al. | Vision-language pre-training for boosting scene text detectors | |
CN114462412B (en) | Entity identification method, entity identification device, electronic equipment and storage medium | |
Zeng et al. | Nlfftnet: A non-local feature fusion transformer network for multi-scale object detection | |
CN115577768A (en) | Semi-supervised model training method and device | |
Yu et al. | WaterHRNet: A multibranch hierarchical attentive network for water body extraction with remote sensing images | |
CN116266259A (en) | Image and text structured output method and device, electronic equipment and storage medium | |
CN114092931A (en) | Scene character recognition method and device, electronic equipment and storage medium | |
CN114332484A (en) | Key point detection method and device, computer equipment and storage medium | |
CN117422065A (en) | Natural language data processing system based on reinforcement learning algorithm | |
CN116740570A (en) | Remote sensing image road extraction method, device and equipment based on mask image modeling | |
CN115810152A (en) | Remote sensing image change detection method and device based on graph convolution and computer equipment | |
Yu et al. | Remote sensing building damage assessment with a multihead neighbourhood attention transformer | |
JP2023017759A (en) | Training method and training apparatus for image recognition model based on semantic enhancement | |
CN112785601B (en) | Image segmentation method, system, medium and electronic terminal | |
CN113283241A (en) | Text recognition method and device, electronic equipment and computer readable storage medium | |
Zhang et al. | ME-Net: Multi-Step Enhancement Network for Semantic Segmentation | |
CN114005043B (en) | Small sample city remote sensing image information extraction method based on domain conversion and pseudo tag |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |