CN112417874A - Named entity recognition method and device, storage medium and electronic device - Google Patents

Named entity recognition method and device, storage medium and electronic device Download PDF

Info

Publication number
CN112417874A
CN112417874A CN202011279896.3A CN202011279896A CN112417874A CN 112417874 A CN112417874 A CN 112417874A CN 202011279896 A CN202011279896 A CN 202011279896A CN 112417874 A CN112417874 A CN 112417874A
Authority
CN
China
Prior art keywords
layer
target text
text
named entity
attention
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.)
Withdrawn
Application number
CN202011279896.3A
Other languages
Chinese (zh)
Inventor
唐光远
李卓茜
陈海波
罗琴
张俊杰
李润静
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co Ltd
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Gree Electric Appliances Inc of Zhuhai, Zhuhai Lianyun Technology Co Ltd filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202011279896.3A priority Critical patent/CN112417874A/en
Publication of CN112417874A publication Critical patent/CN112417874A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Databases & Information Systems (AREA)
  • Machine Translation (AREA)

Abstract

The application discloses a named entity identification method and device, a storage medium and an electronic device. Wherein, the method comprises the following steps: acquiring a target text, wherein the target text is a text of a named entity to be extracted; and obtaining the named entity in the target text by utilizing the bidirectional semantic representation of the target text, and improving the recognition accuracy of the named entity by using a deep learning method. The method and the device solve the technical problem that the named entity in the related technology is low in extraction accuracy.

Description

Named entity recognition method and device, storage medium and electronic device
Technical Field
The application relates to the field of artificial intelligence, in particular to a named entity identification method and device, a storage medium and an electronic device.
Background
Named entity recognition is a fundamental and important task in the fields of information extraction and natural language processing. In the modern information society, people usually obtain needed and important information from a piece of news or characters, so that the named entity recognition technology is very important at this time, and can help people to quickly retrieve the needed information from the text. Generally, named entity recognition includes a person's name, an organization's name, a place name, a time, and so on. NER (named entity recognition) can extract the above entities from many unstructured texts, and it can also recognize a larger variety of entities, so the entities are defined here according to business needs.
At present, the recognition effect of the named entity in Chinese is not good compared with English, because Chinese recognition has certain difficulty compared with English.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the application provides a method and a device for identifying a named entity, a storage medium and an electronic device, which are used for at least solving the technical problem of low extraction accuracy of the named entity in the related technology.
According to an aspect of an embodiment of the present application, there is provided a method for identifying a named entity, including: acquiring a target text, wherein the target text is a text of a named entity to be extracted; and obtaining the named entity in the target text by utilizing the bidirectional semantic representation of the target text.
Optionally, when obtaining the named entity in the target text by using the bidirectional semantic representation of the target text includes performing the following processing, performing semantic coding on the target text by using a BERT semantic representation layer, inputting the semantic coding to a BilStm layer for decoding, outputting the semantic coding to an attention mechanism layer to obtain an attention weight, and optimizing sequence information transmitted by the attention layer through a CRF layer.
Optionally, when the BERT semantic representation layer is used for semantically coding the target text, inputting the target text into the BERT semantic representation layer through a text input layer; and carrying out semantic coding on the words in the target text by using a BERT model at the BERT semantic representation layer to obtain word vectors of the words in the target text.
Optionally, when the word vectors are input into the BilSTM layer for decoding, the word vectors of the words in the target text are input into the BilSTM layer to fuse the information of the context features, so as to obtain the text feature vectors.
Optionally, when the attention mechanism layer is output to obtain the attention weight, inputting the output text feature vector of the BilSTM layer into the attention mechanism layer; determining, by the attention mechanism layer, attention weights for keywords in the target text.
Optionally, when the sequence information transmitted from the attention layer is optimized through the CRF layer, the optimal joint probability in the sequence information is calculated by using the CRF layer, so as to obtain an optimized global feature sequence.
According to another aspect of the embodiments of the present application, there is also provided a device for identifying a named entity, including: the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a target text, and the target text is a text of a named entity to be extracted; and the identification unit is used for obtaining the named entity in the target text by utilizing the bidirectional semantic representation of the target text.
Optionally, the identification unit is further configured to: and performing semantic coding on the target text by using a BERT semantic representation layer, inputting the semantic coding into a BilSTM layer for decoding, outputting the semantic coding to an attention mechanism layer to obtain attention weight, and optimizing sequence information transmitted by the attention layer through a CRF layer.
Optionally, the identification unit is further configured to: when the BERT semantic representation layer is used for carrying out semantic coding on the target text, the target text is input to the BERT semantic representation layer through a text input layer; and carrying out semantic coding on the words in the target text by using a BERT model at the BERT semantic representation layer to obtain word vectors of the words in the target text.
Optionally, the identification unit is further configured to: and when the word vectors are input into the BilSTM layer for decoding, the word vectors of the words in the target text are input into the BilSTM layer to fuse the information of the context characteristics to obtain the text characteristic vectors.
Optionally, the identification unit is further configured to: when the attention mechanism layer is output to obtain the attention weight, inputting the text feature vector output by the BilSTM layer into the attention mechanism layer; determining, by the attention mechanism layer, attention weights for keywords in the target text.
Optionally, the identification unit is further configured to: when the sequence information transmitted by the attention layer is optimized through the CRF layer, the optimal joint probability in the sequence information is calculated by using the CRF layer, and the optimized global characteristic sequence is obtained.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program which, when executed, performs the above-described method.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the above method through the computer program.
In the embodiment of the application, a target text is obtained, wherein the target text is a text of a named entity to be extracted; the named entities in the target text are obtained by utilizing the bidirectional semantic representation of the target text, the recognition accuracy of the named entities is improved by using a deep learning method, and the technical problem of low extraction accuracy of the named entities in the related technology can be solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow diagram of an alternative method of identifying a named entity according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an alternative network layer for named entity extraction according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an alternative named entity identification scheme in accordance with embodiments of the present application;
FIG. 4 is a schematic diagram of an alternative named entity recognition arrangement according to an embodiment of the present application;
and
fig. 5 is a block diagram of a terminal according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The early named entity extraction method is mainly based on a rule and a statistical method, the effect is not ideal, if a machine learning method such as a Conditional Random Field (CRF), a Support Vector Machine (SVM), a hidden Markov and the like is adopted, the effect is general, even if models such as CNN \ RNN and the like are adopted for realization, according to one aspect of the embodiment of the application, the embodiment of the named entity recognition method is provided, and deep learning algorithms such as RNN and the like can be improved. Fig. 1 is a flowchart of an alternative named entity identification method according to an embodiment of the present application, and as shown in fig. 1, the method may include the following steps:
step S1, obtaining a target text, wherein the target text is the text of the named entity to be extracted.
And step S2, obtaining the named entity in the target text by using the bidirectional semantic representation of the target text.
Optionally, when obtaining the named entity in the target text by using the bidirectional semantic representation of the target text includes performing the following processing, performing semantic coding on the target text by using a BERT semantic representation layer, inputting the semantic coding to a BilStm layer for decoding, outputting the semantic coding to an attention mechanism layer to obtain an attention weight, and optimizing sequence information transmitted by the attention layer through a CRF layer.
Optionally, when the BERT semantic representation layer is used for semantically coding the target text, inputting the target text into the BERT semantic representation layer through a text input layer; and carrying out semantic coding on the words in the target text by using a BERT model at the BERT semantic representation layer to obtain word vectors of the words in the target text.
Optionally, when the word vectors are input into the BilSTM layer for decoding, the word vectors of the words in the target text are input into the BilSTM layer to fuse the information of the context features, so as to obtain the text feature vectors.
Optionally, when the attention mechanism layer is output to obtain the attention weight, inputting the output text feature vector of the BilSTM layer into the attention mechanism layer; determining, by the attention mechanism layer, attention weights for keywords in the target text.
Optionally, when the sequence information transmitted from the attention layer is optimized through the CRF layer, the optimal joint probability in the sequence information is calculated by using the CRF layer, so as to obtain an optimized global feature sequence.
Through the steps, a target text is obtained, wherein the target text is a text of the named entity to be extracted; the named entities in the target text are obtained by utilizing the bidirectional semantic representation of the target text, the recognition accuracy of the named entities is improved by using a deep learning method, and the technical problem of low extraction accuracy of the named entities in the related technology can be solved.
Semantic coding is carried out by utilizing the strong semantic representation capability of BERT (bidirectional Encoder retrieval from transformations), word vectors are trained, then the word vectors are input into a BilSTM layer for further decoding, and then the word vectors are output to an attention mechanism layer to obtain the attention weight of the learning words, and then the sequence information transmitted by the attention layer is further optimized by a CRF layer.
As an alternative example, the technical solution of the present application is further described below with reference to specific embodiments.
The scheme is a naming identification method based on BERT-BilSTM-CRF. Semantic coding is carried out by utilizing the strong semantic representation capability of BERT, word vectors are trained, then the word vectors are input into a BilSTM layer for further decoding, and then the word vectors are output to an attention mechanism layer to obtain the attention weight of the learned words, and then sequence information transmitted by the attention layer is further optimized by a CRF layer. The BilSTM layer in the scheme is shown in figure 2, and the overall model block diagram of the scheme is shown in figure 3. The specific implementation steps are as follows:
step 1, a text input layer and a BERT semantic representation layer: the decoding part carries out semantic representation by using a BERT model, converts words of the text into a vector form and obtains word vectors represented by the text.
Step 2, a BilSTM layer: for the task of named entity recognition, in order to obtain continuously characterized context information, the context information is difficult to utilize by using a traditional neural network model, so a BilSTM (bidirectional LSTM) model is adopted for training to obtain a text feature vector of information fused with context features.
Step 3, attention is paid to a mechanical layer: although the BILSTM model can capture the context information of the text, the semantic vector representing the weight of the related words is difficult to obtain, so the attention is used for controlling the weight of the important words to improve the effect of named entity recognition. In addition, in named entity recognition, not every word contributes greatly to correctly recognizing an entity, so that after the BilSTM layer, an attention mechanism layer is added, and information which is most relevant to current recognition can be more accurately searched by a model, so that the recognition accuracy can be improved.
Step 4, CRF layer: CRF (conditional random field) is a probabilistic graphical model. Conditional random fields can compute the optimal joint probability in a sequence. The CRF layer is used to obtain an optimized global signature sequence.
Semantic coding is carried out by utilizing the strong semantic representation capability of BERT (bidirectional Encoder retrieval from transformations), word vectors are trained, then the word vectors are input into a BilSTM layer for further decoding, and then the word vectors are output to an attention mechanism layer to obtain the attention weight of the learning words, and then the sequence information transmitted by the attention layer is further optimized by a CRF layer. Based on the BERT-BilSTM-CRF technology, the method avoids the defects of the traditional method, improves the accuracy rate of named entity recognition by using a deep learning method, and solves the problem of poor effect of named entity recognition of the traditional and machine learning methods.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
According to another aspect of the embodiments of the present application, there is also provided a named entity recognition apparatus for implementing the above named entity recognition method. Fig. 4 is a schematic diagram of an alternative named entity recognition apparatus according to an embodiment of the present application, and as shown in fig. 4, the apparatus may include:
an obtaining unit 41, configured to obtain a target text, where the target text is a text of a named entity to be extracted; and the identifying unit 43 is configured to obtain the named entity in the target text by using the bidirectional semantic representation of the target text.
It should be noted that the obtaining unit 41 in this embodiment may be configured to execute step S1 in this embodiment, and the identifying unit 43 in this embodiment may be configured to execute step S2 in this embodiment.
Acquiring a target text through the module, wherein the target text is a text of a named entity to be extracted; the named entities in the target text are obtained by utilizing the bidirectional semantic representation of the target text, the recognition accuracy of the named entities is improved by using a deep learning method, and the technical problem of low extraction accuracy of the named entities in the related technology can be solved.
Optionally, the identification unit is further configured to: and performing semantic coding on the target text by using a BERT semantic representation layer, inputting the semantic coding into a BilSTM layer for decoding, outputting the semantic coding to an attention mechanism layer to obtain attention weight, and optimizing sequence information transmitted by the attention layer through a CRF layer.
Optionally, the identification unit is further configured to: when the BERT semantic representation layer is used for carrying out semantic coding on the target text, the target text is input to the BERT semantic representation layer through a text input layer; and carrying out semantic coding on the words in the target text by using a BERT model at the BERT semantic representation layer to obtain word vectors of the words in the target text.
Optionally, the identification unit is further configured to: and when the word vectors are input into the BilSTM layer for decoding, the word vectors of the words in the target text are input into the BilSTM layer to fuse the information of the context characteristics to obtain the text characteristic vectors.
Optionally, the identification unit is further configured to: when the attention mechanism layer is output to obtain the attention weight, inputting the text feature vector output by the BilSTM layer into the attention mechanism layer; determining, by the attention mechanism layer, attention weights for keywords in the target text.
Optionally, the identification unit is further configured to: when the sequence information transmitted by the attention layer is optimized through the CRF layer, the optimal joint probability in the sequence information is calculated by using the CRF layer, and the optimized global characteristic sequence is obtained.
The general model block diagram of the scheme is shown in fig. 3. The specific implementation mode is as follows:
step 1, a text input layer and a BERT semantic representation layer: the decoding part carries out semantic representation by using a BERT model, converts words of the text into a vector form and obtains word vectors represented by the text.
Step 2, a BilSTM layer: for the task of named entity recognition, in order to obtain continuously characterized context information, the context information is difficult to utilize by using a traditional neural network model, so a BilSTM (bidirectional LSTM) model is adopted for training to obtain a text feature vector of information fused with context features.
Step 3, attention is paid to a mechanical layer: although the BILSTM model can capture the context information of the text, the semantic vector representing the weight of the related words is difficult to obtain, so the attention is used for controlling the weight of the important words to improve the effect of named entity recognition. In addition, in named entity recognition, not every word contributes greatly to correctly recognizing an entity, so that after the BilSTM layer, an attention mechanism layer is added, and information which is most relevant to current recognition can be more accurately searched by a model, so that the recognition accuracy can be improved.
Step 4, CRF layer: CRF (conditional random field) is a probabilistic graphical model. Conditional random fields can compute the optimal joint probability in a sequence. The CRF layer is used to obtain an optimized global signature sequence.
Semantic coding is carried out by utilizing the strong semantic representation capability of BERT (bidirectional Encoder retrieval from transformations), word vectors are trained, then the word vectors are input into a BilSTM layer for further decoding, and then the word vectors are output to an attention mechanism layer to obtain the attention weight of the learning words, and then the sequence information transmitted by the attention layer is further optimized by a CRF layer. Based on the BERT-BilSTM-CRF technology, the method avoids the defects of the traditional method, improves the accuracy rate of named entity recognition by using a deep learning method, and solves the problem of poor effect of named entity recognition of the traditional and machine learning methods.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules as a part of the apparatus may run in a corresponding hardware environment, and may be implemented by software, or may be implemented by hardware, where the hardware environment includes a network environment.
According to another aspect of the embodiment of the present application, there is also provided a server or a terminal for implementing the above named entity identification method.
Fig. 5 is a block diagram of a terminal according to an embodiment of the present application, and as shown in fig. 5, the terminal may include: one or more processors 201 (only one shown), memory 203, and transmission means 205, as shown in fig. 5, the terminal may further comprise an input-output device 207.
The memory 203 may be configured to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for identifying a named entity in the embodiment of the present application, and the processor 201 executes various functional applications and data processing by running the software programs and modules stored in the memory 203, that is, implements the above-mentioned method for identifying a named entity. The memory 203 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 203 may further include memory located remotely from the processor 201, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 205 is used for receiving or sending data via a network, and can also be used for data transmission between a processor and a memory. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 205 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 205 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Wherein the memory 203 is specifically used for storing application programs.
The processor 201 may call the application stored in the memory 203 via the transmission means 205 to perform the following steps:
acquiring a target text, wherein the target text is a text of a named entity to be extracted; and obtaining the named entity in the target text by utilizing the bidirectional semantic representation of the target text.
The processor 201 is further configured to perform the following steps:
when the named entity in the target text is obtained by utilizing the bidirectional semantic representation of the target text, the following processing is carried out, the semantic coding is carried out on the target text by utilizing a BERT semantic representation layer, the semantic coding is input into a BilSTM layer for decoding, the decoding is output to an attention mechanism layer to obtain the attention weight, and the sequence information transmitted by the attention layer is optimized by a CRF layer.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It can be understood by those skilled in the art that the structure shown in fig. 5 is only an illustration, and the terminal may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a Mobile Internet Device (MID), a PAD, etc. Fig. 5 is a diagram illustrating a structure of the electronic device. For example, the terminal may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 5, or have a different configuration than shown in FIG. 5.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
Embodiments of the present application also provide a storage medium. Alternatively, in this embodiment, the storage medium may be a program code for executing the method for identifying a named entity.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
acquiring a target text, wherein the target text is a text of a named entity to be extracted; and obtaining the named entity in the target text by utilizing the bidirectional semantic representation of the target text.
Optionally, the storage medium is further arranged to store program code for performing the steps of:
when the named entity in the target text is obtained by utilizing the bidirectional semantic representation of the target text, the following processing is carried out, the semantic coding is carried out on the target text by utilizing a BERT semantic representation layer, the semantic coding is input into a BilSTM layer for decoding, the decoding is output to an attention mechanism layer to obtain the attention weight, and the sequence information transmitted by the attention layer is optimized by a CRF layer.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including instructions for causing one or more computer devices (which may be personal computers, servers, network devices, or the like) to execute all or part of the steps of the method described in the embodiments of the present application.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A method for identifying a named entity, comprising:
acquiring a target text, wherein the target text is a text of a named entity to be extracted;
and obtaining the named entity in the target text by utilizing the bidirectional semantic representation of the target text.
2. The method of claim 1, wherein obtaining the named entities in the target text using the bi-directional semantic representation of the target text comprises:
and performing semantic coding on the target text by using a BERT semantic representation layer, inputting the semantic coding into a BilSTM layer for decoding, outputting the semantic coding to an attention mechanism layer to obtain attention weight, and optimizing sequence information transmitted by the attention layer through a CRF layer.
3. The method of claim 2, wherein semantically encoding the target text with a BERT semantic representation layer comprises:
inputting the target text into a BERT semantic representation layer through a text input layer;
and carrying out semantic coding on the words in the target text by using a BERT model at the BERT semantic representation layer to obtain word vectors of the words in the target text.
4. The method of claim 2, wherein inputting into the BilSTM layer for decoding comprises:
and inputting the word vectors of the words in the target text into a BilSTM layer to fuse the information of the context characteristics to obtain the text characteristic vectors.
5. The method of claim 2, wherein outputting to the attention mechanism layer to obtain the attention weight comprises:
inputting the text feature vector output by the BilSTM layer into an attention mechanism layer;
determining, by the attention mechanism layer, attention weights for keywords in the target text.
6. The method of claim 2, wherein optimizing the sequence information conveyed by the attention layer over the CRF layer comprises:
and calculating the optimal joint probability in the sequence information by using the CRF layer to obtain an optimized global characteristic sequence.
7. An apparatus for identifying named entities, comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a target text, and the target text is a text of a named entity to be extracted;
and the identification unit is used for obtaining the named entity in the target text by utilizing the bidirectional semantic representation of the target text.
8. The apparatus of claim 7, wherein the identification unit is further configured to:
and performing semantic coding on the target text by using a BERT semantic representation layer, inputting the semantic coding into a BilSTM layer for decoding, outputting the semantic coding to an attention mechanism layer to obtain attention weight, and optimizing sequence information transmitted by the attention layer through a CRF layer.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program when executed performs the method of any of the preceding claims 1 to 6.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the method of any of the preceding claims 1 to 6 by means of the computer program.
CN202011279896.3A 2020-11-16 2020-11-16 Named entity recognition method and device, storage medium and electronic device Withdrawn CN112417874A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011279896.3A CN112417874A (en) 2020-11-16 2020-11-16 Named entity recognition method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011279896.3A CN112417874A (en) 2020-11-16 2020-11-16 Named entity recognition method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN112417874A true CN112417874A (en) 2021-02-26

Family

ID=74832371

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011279896.3A Withdrawn CN112417874A (en) 2020-11-16 2020-11-16 Named entity recognition method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN112417874A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113407672A (en) * 2021-06-22 2021-09-17 珠海格力电器股份有限公司 Named entity identification method and device, storage medium and electronic equipment
CN114564958A (en) * 2022-01-11 2022-05-31 平安科技(深圳)有限公司 Text recognition method, device, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108536679A (en) * 2018-04-13 2018-09-14 腾讯科技(成都)有限公司 Name entity recognition method, device, equipment and computer readable storage medium
CN109359293A (en) * 2018-09-13 2019-02-19 内蒙古大学 Mongolian name entity recognition method neural network based and its identifying system
CN110705272A (en) * 2019-08-28 2020-01-17 昆明理工大学 Named entity identification method for automobile engine fault diagnosis
US20200065374A1 (en) * 2018-08-23 2020-02-27 Shenzhen Keya Medical Technology Corporation Method and system for joint named entity recognition and relation extraction using convolutional neural network
CN111444726A (en) * 2020-03-27 2020-07-24 河海大学常州校区 Method and device for extracting Chinese semantic information of long-time and short-time memory network based on bidirectional lattice structure
CN111783462A (en) * 2020-06-30 2020-10-16 大连民族大学 Chinese named entity recognition model and method based on dual neural network fusion

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108536679A (en) * 2018-04-13 2018-09-14 腾讯科技(成都)有限公司 Name entity recognition method, device, equipment and computer readable storage medium
US20200065374A1 (en) * 2018-08-23 2020-02-27 Shenzhen Keya Medical Technology Corporation Method and system for joint named entity recognition and relation extraction using convolutional neural network
CN109359293A (en) * 2018-09-13 2019-02-19 内蒙古大学 Mongolian name entity recognition method neural network based and its identifying system
CN110705272A (en) * 2019-08-28 2020-01-17 昆明理工大学 Named entity identification method for automobile engine fault diagnosis
CN111444726A (en) * 2020-03-27 2020-07-24 河海大学常州校区 Method and device for extracting Chinese semantic information of long-time and short-time memory network based on bidirectional lattice structure
CN111783462A (en) * 2020-06-30 2020-10-16 大连民族大学 Chinese named entity recognition model and method based on dual neural network fusion

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113407672A (en) * 2021-06-22 2021-09-17 珠海格力电器股份有限公司 Named entity identification method and device, storage medium and electronic equipment
CN114564958A (en) * 2022-01-11 2022-05-31 平安科技(深圳)有限公司 Text recognition method, device, equipment and medium
CN114564958B (en) * 2022-01-11 2023-08-04 平安科技(深圳)有限公司 Text recognition method, device, equipment and medium

Similar Documents

Publication Publication Date Title
US20200301954A1 (en) Reply information obtaining method and apparatus
CN109918662B (en) Electronic resource label determination method, device and readable medium
US10755048B2 (en) Artificial intelligence based method and apparatus for segmenting sentence
CN111160191B (en) Video key frame extraction method, device and storage medium
CN111831911A (en) Query information processing method and device, storage medium and electronic device
KR102517843B1 (en) Chatbot system based on artificial intelligence markup language and method for proding chatbot service
CN108319888B (en) Video type identification method and device and computer terminal
CN103959282A (en) Selective feedback for text recognition systems
CN112287069B (en) Information retrieval method and device based on voice semantics and computer equipment
CN113283238B (en) Text data processing method and device, electronic equipment and storage medium
CN111625715B (en) Information extraction method and device, electronic equipment and storage medium
CN112801719A (en) User behavior prediction method, user behavior prediction device, storage medium, and apparatus
CN113673260A (en) Model processing method, device, storage medium and processor
CN109766422A (en) Information processing method, apparatus and system, storage medium, terminal
CN113051486A (en) Friend-making scene-based recommendation model training method and device, electronic equipment and computer-readable storage medium
CN112417874A (en) Named entity recognition method and device, storage medium and electronic device
CN112765981A (en) Text information generation method and device
CN111651674B (en) Bidirectional searching method and device and electronic equipment
CN112906361A (en) Text data labeling method and device, electronic equipment and storage medium
CN113486173A (en) Text labeling neural network model and labeling method thereof
CN113158687A (en) Semantic disambiguation method and device, storage medium and electronic device
CN114398973B (en) Media content tag identification method, device, equipment and storage medium
CN110795558B (en) Label acquisition method and device, storage medium and electronic device
US11289071B2 (en) Information processing system, information processing device, computer program, and method for updating dictionary database
CN111368552A (en) Network user group division method and device for specific field

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20210226