CN110399616A - Name entity detection method, device, electronic equipment and readable storage medium storing program for executing - Google Patents
Name entity detection method, device, electronic equipment and readable storage medium storing program for executing Download PDFInfo
- Publication number
- CN110399616A CN110399616A CN201910704579.2A CN201910704579A CN110399616A CN 110399616 A CN110399616 A CN 110399616A CN 201910704579 A CN201910704579 A CN 201910704579A CN 110399616 A CN110399616 A CN 110399616A
- Authority
- CN
- China
- Prior art keywords
- character
- sample
- vector
- entity
- text
- 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.)
- Pending
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 141
- 239000013598 vector Substances 0.000 claims abstract description 269
- 238000012360 testing method Methods 0.000 claims abstract description 116
- 230000009466 transformation Effects 0.000 claims description 49
- 238000012549 training Methods 0.000 claims description 46
- 238000000034 method Methods 0.000 claims description 43
- 230000008569 process Effects 0.000 claims description 28
- 230000015654 memory Effects 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 6
- 238000007689 inspection Methods 0.000 claims description 3
- 230000008859 change Effects 0.000 claims description 2
- 238000013507 mapping Methods 0.000 abstract description 2
- 206010012601 diabetes mellitus Diseases 0.000 description 7
- 230000009467 reduction Effects 0.000 description 7
- 238000006243 chemical reaction Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 6
- 238000013528 artificial neural network Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 5
- 230000000873 masking effect Effects 0.000 description 5
- WQZGKKKJIJFFOK-GASJEMHNSA-N Glucose Natural products OC[C@H]1OC(O)[C@H](O)[C@@H](O)[C@@H]1O WQZGKKKJIJFFOK-GASJEMHNSA-N 0.000 description 4
- 239000008280 blood Substances 0.000 description 4
- 210000004369 blood Anatomy 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 201000010099 disease Diseases 0.000 description 4
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 description 4
- 239000008103 glucose Substances 0.000 description 4
- 230000000630 rising effect Effects 0.000 description 4
- 238000012512 characterization method Methods 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000003068 static effect Effects 0.000 description 3
- 208000024891 symptom Diseases 0.000 description 3
- 230000006399 behavior Effects 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 230000001419 dependent effect Effects 0.000 description 2
- 230000004069 differentiation Effects 0.000 description 2
- 235000013399 edible fruits Nutrition 0.000 description 2
- 230000000306 recurrent effect Effects 0.000 description 2
- 208000013016 Hypoglycemia Diseases 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000002218 hypoglycaemic effect Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 238000011176 pooling Methods 0.000 description 1
- 230000005180 public health Effects 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 230000006403 short-term memory Effects 0.000 description 1
- 210000002700 urine Anatomy 0.000 description 1
- 230000004584 weight gain Effects 0.000 description 1
- 235000019786 weight gain Nutrition 0.000 description 1
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
This application involves knowledge mapping technical fields, in particular to name entity detection method, device, electronic equipment and readable storage medium storing program for executing.The embodiment of the present application is by inputting trained encoding model for the character vector of character each in target text, the contextual information vector of each character can be generated, since contextual information vector can symbolize context of co-text of the corresponding character in target text, therefore, the contextual information vector of each character is inputted into trained detection model, the accuracy of the provider location testing result of determining target text can be improved, and the name entity in target text is determined according to provider location testing result, the contextual information vector of each name entity is inputted into identification model, it can determine the entity type testing result of target text, in this way, by being detected respectively to the position and type of naming entity, without judging simultaneously the position and type of naming entity, name entity detection efficiency can be improved.
Description
Technical field
This application involves knowledge mapping technical fields, set in particular to name entity detection method, device, electronics
Standby and readable storage medium storing program for executing.
Background technique
Name entity refers to name, mechanism name, place name, item name etc. with the entity of entitled mark.Name entity detection
Refer to that the entity segment that will include in text is detected and identified, is the first step of Knowledge Extraction.
Currently, name entity detection technique is normally based on the mode of statistics dictionary, it is also each name entity structure
Huge denotion dictionary is made, entity detection is named based on the denotion dictionary constructed, since the variation of context may be led
There are ambiguities for fatal name entity, therefore, based on censure dictionary be named entity detection mode it is larger there are detection error and
The low problem of detection efficiency.
Summary of the invention
In view of this, the embodiment of the present application is designed to provide a kind of name entity detection method, device, electronic equipment
And readable storage medium storing program for executing, by being detected respectively to the position and type of naming entity, without the position simultaneously to name entity
It sets and is judged with type, name entity detection efficiency and accuracy rate can be improved.The application mainly includes the following aspects:
In a first aspect, the embodiment of the present application provides a kind of name entity detection method, the name entity detection method
Include:
Obtain the character vector of each character in target text;
The character vector of each character is input in trained encoding model, the corresponding context of respective symbols is generated
Information vector;
The corresponding contextual information vector of each character is input in trained detection model, determines the target text
This corresponding provider location testing result;
According to the corresponding provider location testing result of the target text, the name entity in the target text is determined;
The corresponding contextual information vector of each name entity is input in trained identification model, determines the mesh
Mark the corresponding entity type testing result of text.
In some embodiments, the trained detection model includes that the first full articulamentum and condition random field are handled
Layer;Then determine the corresponding provider location testing result of the target text, comprising:
The corresponding contextual information vector of each character is input to the described first full articulamentum, determines that respective symbols are corresponding
The first dimension convert vector;
The corresponding first dimension transformation vector of each character is input to the condition random field process layer, determines the mesh
Mark the corresponding provider location testing result of text.
In some embodiments, the trained identification model includes the second full articulamentum and pond layer;Then determine institute
State the corresponding entity type testing result of target text, comprising:
The corresponding contextual information vector of each name entity is input to the described second full articulamentum, determines corresponding name
Corresponding second dimension of entity converts vector;
The corresponding second dimension transformation vector of each name entity is input to the pond layer, determines corresponding name entity
Corresponding entity type testing result;
According to the corresponding entity type testing result of each name entity, the corresponding entity type of the target text is determined
Testing result.
In some embodiments, detection model is trained according to the following steps:
The corresponding sample character vector of each sample character and the sample text in acquisition sample text is corresponding
Provider location markup information;
According to the sample character vector, the corresponding sample contextual information vector of each sample character is generated;
The corresponding sample contextual information vector of each sample character is input in detection model to be trained, determines institute
State the corresponding provider location testing result of sample text;
According to the corresponding provider location testing result of the sample text and the provider location markup information, training is treated
Detection model be trained.
In some embodiments, identification model is trained according to the following steps:
The corresponding sample character vector of each sample character and the sample text in acquisition sample text is corresponding
Provider location markup information and entity type markup information;
According to the sample character vector, the corresponding sample contextual information vector of each sample character is generated;
Based on the corresponding provider location markup information of the sample text, the name entity in the sample text is determined;
The corresponding sample contextual information vector of each name entity is input to identification model to be trained, determine described in
The corresponding entity type testing result of sample text;
According to the corresponding entity type testing result of the sample text and the entity type markup information, training is treated
Identification model be trained.
In some embodiments, the corresponding sample contextual information vector of each sample character is generated according to the following steps:
At least one sample character is determined as at random to convert sample character;
The corresponding sample character vector of each transformation sample character is converted, it is corresponding to generate corresponding transformation sample character
Transformation sample character vector;
By the corresponding transformation sample character vector of each transformation sample character, and, other corresponding samples of sample character
Character vector is input in encoding model to be trained, and generates the corresponding sample contextual information vector of respective sample character;
Wherein, other sample characters are the sample character converted except sample character in sample text.
Second aspect, the embodiment of the present application provide a kind of name entity detection device, the name entity detection device
Include:
Module is obtained, for obtaining the character vector of each character in target text;
The character vector of generation module, each character for obtaining the acquisition module is input to trained coding
In model, the corresponding contextual information vector of respective symbols is generated;
First determining module, the corresponding contextual information vector input of each character for generating the generation module
To in trained detection model, the corresponding provider location testing result of the target text is determined;
Second determining module, the corresponding provider location of the target text for being determined according to first determining module
Testing result determines the name entity in the target text;
Third determining module, the corresponding contextual information vector of each name entity for generating the generation module
It is input in trained identification model, determines the corresponding entity type testing result of the target text.
In some embodiments, the trained detection model includes that the first full articulamentum and condition random field are handled
Layer;First determining module, for determining the corresponding provider location testing result of the target text according to the following steps:
The corresponding contextual information vector of each character is input to the described first full articulamentum, determines that respective symbols are corresponding
The first dimension convert vector;
The corresponding first dimension transformation vector of each character is input to the condition random field process layer, determines the mesh
Mark the corresponding provider location testing result of text.
In some embodiments, the trained identification model includes the second full articulamentum and pond layer;The third
Determining module, for determining the corresponding entity type testing result of the target text according to the following steps:
The corresponding contextual information vector of each name entity is input to the described second full articulamentum, determines corresponding name
Corresponding second dimension of entity converts vector;
The corresponding second dimension transformation vector of each name entity is input to the pond layer, determines corresponding name entity
Corresponding entity type testing result;
According to the corresponding entity type testing result of each name entity, the corresponding entity type of the target text is determined
Testing result.
In some embodiments, the name entity detection device further includes the first training module;The first training mould
Block, for training detection model according to the following steps:
The corresponding sample character vector of each sample character and the sample text in acquisition sample text is corresponding
Provider location markup information;
According to the sample character vector, the corresponding sample contextual information vector of each sample character is generated;
The corresponding sample contextual information vector of each sample character is input in detection model to be trained, determines institute
State the corresponding provider location testing result of sample text;
According to the corresponding provider location testing result of the sample text and the provider location markup information, training is treated
Detection model be trained.
In some embodiments, the name entity detection device further includes the second training module;The second training mould
Block, for training identification model according to the following steps:
The corresponding sample character vector of each sample character and the sample text in acquisition sample text is corresponding
Provider location markup information and entity type markup information;
According to the sample character vector, the corresponding sample contextual information vector of each sample character is generated;
Based on the corresponding provider location markup information of the sample text, the name entity in the sample text is determined;
The corresponding sample contextual information vector of each name entity is input to identification model to be trained, determine described in
The corresponding entity type testing result of sample text;
According to the corresponding entity type testing result of the sample text and the entity type markup information, training is treated
Identification model be trained.
In some embodiments, the generation module, for generating the corresponding sample of each sample character according to the following steps
This contextual information vector:
At least one sample character is determined as at random to convert sample character;
The corresponding sample character vector of each transformation sample character is converted, it is corresponding to generate corresponding transformation sample character
Transformation sample character vector;
By the corresponding transformation sample character vector of each transformation sample character, and, other corresponding samples of sample character
Character vector is input in encoding model to be trained, and generates the corresponding sample contextual information vector of respective sample character;
Wherein, other sample characters are the sample character converted except sample character in sample text.
The third aspect, the embodiment of the present application provide a kind of electronic equipment, comprising: processor, memory and bus, storage
Device is stored with the executable machine readable instructions of processor, when electronic equipment operation, by total between processor and memory
Line communication, executes above-mentioned first aspect or first aspect any possible embodiment party when machine readable instructions are run by processor
The step of name entity detection method in formula.
Fourth aspect, the embodiment of the present application also provides a kind of computer readable storage medium, computer-readable storage mediums
It is stored with computer program in matter, above-mentioned first aspect is executed when computer program is run by processor or first aspect is any
The step of name entity detection method in possible embodiment.
Based on any of the above-described aspect, the embodiment of the present application is by inputting instruction for the character vector of character each in target text
The contextual information vector of each character can be generated in the encoding model perfected, since contextual information vector can symbolize
Context of co-text of the corresponding character in target text, it is therefore, the contextual information vector input of each character is trained
Detection model can be improved the accuracy of the provider location testing result of determining target text, and be detected and be tied according to provider location
Fruit determines the name entity in target text, and the contextual information vector of each name entity is inputted identification model, can be true
Set the goal the entity type testing result of text, in this manner it is achieved that respectively the position to name entity and type carry out it is independent
Detection, and after determining name entity, the detection of entity type is carried out only for determining name entity, to improve name
Entity detection efficiency.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application, below will be to needed in the embodiment attached
Figure is briefly described, it should be understood that the following drawings illustrates only some embodiments of the application, therefore is not construed as pair
The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this
A little attached drawings obtain other relevant attached drawings.
Fig. 1 shows a kind of flow chart for naming entity detection method provided by the embodiment of the present application;
Fig. 2 shows the flow charts of a kind of method of trained detection model provided by the embodiment of the present application;
Fig. 3 shows a kind of flow chart of the method for trained identification model provided by the embodiment of the present application;
Fig. 4 shows a kind of functional block diagram for naming entity detection device provided by the embodiment of the present application;
Fig. 5 shows the structural schematic diagram of a kind of electronic equipment provided by the embodiment of the present application.
Specific embodiment
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application
In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it should be understood that attached drawing in the application
The purpose of illustration and description is only played, is not used to limit the protection scope of the application.In addition, it will be appreciated that schematical attached
Figure does not press scale.Process used herein shows the behaviour realized according to some embodiments of the present application
Make.It should be understood that the operation of flow chart can be realized out of order, the step of context relation of logic can not inverted suitable
Sequence is implemented simultaneously.In addition, those skilled in the art are under the guide of teachings herein, can be added to flow chart one or
Other multiple operations, can also remove one or more operations from flow chart.
In addition, described embodiments are only a part of embodiments of the present application, instead of all the embodiments.Usually exist
The component of the embodiment of the present application described and illustrated in attached drawing can be arranged and be designed with a variety of different configurations herein.Cause
This, is not intended to limit claimed the application's to the detailed description of the embodiments herein provided in the accompanying drawings below
Range, but it is merely representative of the selected embodiment of the application.Based on embodiments herein, those skilled in the art are not being done
Every other embodiment obtained under the premise of creative work out, shall fall in the protection scope of this application.
In order to enable those skilled in the art are able to use teachings herein, " entity is named in conjunction with specific application scene
Detection ", provides following implementation.To those skilled in the art, in the feelings for not departing from spirit and scope
Under condition, the General Principle defined here can be applied to other embodiments and application scenarios.
The embodiment of the present application following methods, device, electronic equipment or computer storage medium can be applied to any need
It is named the scene of entity detection, the embodiment of the present application is not restricted specific application scenarios, any to use the application
The scheme for the name entity detection that embodiment provides is in the application protection scope.
Currently, name entity detection technique is normally based on the mode of statistics dictionary, it is also each name entity structure
Huge denotion dictionary is made, entity detection, but the expression side for naming entity to censure are named based on the denotion dictionary constructed
Formula is ever-changing, and since the variation of context may result in name entity there are ambiguity, it is carried out based on dictionary is censured
The mode of name entity detection has that detection error is larger and detection efficiency is low.
In view of the above-mentioned problems, name entity detection method provided by the embodiments of the present application, by will in target text it is each
The character vector of character inputs trained encoding model, the contextual information vector of each character can be generated, due to upper and lower
Literary information vector can symbolize context of co-text of the corresponding character in target text, therefore the context of each character is believed
It ceases vector and inputs trained detection model, the accuracy of the provider location testing result of determining target text can be improved, and
The name entity in target text is determined according to provider location testing result, the contextual information vector of each name entity is defeated
Enter identification model, can determine the entity type testing result of target text, in this manner it is achieved that respectively to the position of name entity
It sets and carries out independent detection with type, and after determining name entity, the inspection of entity type is carried out only for determining name entity
It surveys, to improve name entity detection efficiency.
To be carried out combined with specific embodiments below to technical solution provided by the present application detailed convenient for understanding the application
It describes in detail bright.
Shown in Figure 1, Fig. 1 is a kind of flow chart for naming entity detection method provided by the embodiments of the present application, described
Detection method includes:
S101: the character vector of each character in target text is obtained.
In specific implementation, each character in target text in alphabet is obtained, for each character, is carried out following
Processing: character vector is converted by each character correspondence, corresponds character and character vector, specifically, conversion process is
The corresponding character vector of each character is found in the character dictionary pre-established.
Here, the character in target text can be text character, or character string;Character vector can indicate
The feature of character out is the static attribute to character;The corresponding character vector of each text character is stored in character dictionary.
In one example, the character in target text has i, respectively y1、y2..., yi, from character dictionary RN×dMiddle lookup
Character vector corresponding with character each in target text out, obtains character y1Corresponding character vector is g1, character y2It is corresponding
Character vector is g2... ..., character yiCorresponding character vector is gi, wherein N is the quantity of character in character dictionary, and d is word
Accord with the dimensional parameter of dictionary.
It should be noted that using the character in target text as input, rather than using the word in target text as
Input, the case where can preventing the name entity boundary due to caused by segmenting from destroying, so that raising in target text to naming
The accuracy rate of entity detection.
S102: the character vector of each character is input in trained encoding model, and it is corresponding to generate respective symbols
Contextual information vector.
In specific implementation, the corresponding character vector of characters all in target text is input to encoding model, In together
It generates in the contextual information vector process of each character, the information of the character of context corresponding with the character is also taken into account
Come, in this way, the contextual information vector generated can symbolize context of co-text of the character in target text, context letter
Breath vector is dynamic characterization to character, determine contextual information vector can adequately, be quickly detected from name entity
It lays the foundation, wherein character and contextual information vector are correspondingly that is, each character, which respectively corresponds a context, to be believed
Cease vector.
Here, encoding model can be forward-backward recutrnce neural network (Bi-directional Long Short-Term
Memory, BiLSTM), forward-backward recutrnce neural network is in recurrent neural network (Recurrent Neural Network, RNN)
One kind, be to be composed of forward direction LSTM and backward LSTM.
In one example, the corresponding character vector of each character is g in target text1, g2..., gi, i is target text
The quantity of character in this, by g1, g2..., giForward-backward recutrnce neural network BiLSTM is inputted together, and it is right respectively to generate each character
The contextual information vector s answered1, s2..., si, st=BiLSTM (st-1,st+1,gt), 1≤t≤i, t are positive integer.
In one example, by taking character A, B, C as an example, the corresponding character vector of character A, B, C is respectively a, b, c, by character to
Amount a, b, c in input coding model, export contextual information vector a ' corresponding with character A, B, C, b ', c ' respectively together.
S103: the corresponding contextual information vector of each character is input in trained detection model, described in determination
The corresponding provider location testing result of target text.
In specific implementation, the corresponding contextual information vector of character whole in target text is input to detection together
In model, be named the detection of provider location, the detection model can export each name entity in target text and
Position of each name entity in target text, that is, determine the corresponding provider location testing result of target text.This ring
Section only detects the position of name entity, does not detect to the type of name entity, in this way, can be improved in target
The efficiency of name provider location is identified in text.
Here, detection model is used to detect the position of name entity from target text.
Further, trained detection model includes the first full articulamentum and condition random field process layer;Then step
The corresponding provider location testing result of the target text is determined in S103, comprising the following steps:
Step 1031: the corresponding contextual information vector of each character being input to the described first full articulamentum, determines phase
Answer the corresponding first dimension transformation vector of character.
In specific implementation, it for each character, performs the following operation: the corresponding context vector of each character is inputted
To the first full articulamentum, corresponding first dimension variable of each character is obtained.It specifically, can be by alphabet in target text
Corresponding contextual information vector is input to the first full articulamentum together, exports each character corresponding first in target text and ties up
Degree transformation vector.
Here, the first full articulamentum (Fully Connected Layers, FC), for each character difference to input
Corresponding contextual information vector carries out dimensionality reduction, to export the transformation vector of the first dimension corresponding with each character after dimensionality reduction.
In one example, the corresponding contextual information vector of a character is R2l, wherein l is the dimensional parameter of unidirectional LSTM,
By R2lIt is input to the first full articulamentum, the corresponding first dimension transformation vector of the character after exporting dimensionality reduction is Rk1, k1 indicates the
The dimensional parameter of one full articulamentum, wherein k1 < 2l.
Step 1032: the corresponding first dimension transformation vector of each character is input to the condition random field process layer,
Determine the corresponding provider location testing result of the target text.
In specific implementation, for each character, perform the following operation: by corresponding first dimension of each character convert to
Amount is input to condition random field process layer, is named the detection of provider location, can detecte out each name entity in target
Position in text.Specifically, the corresponding first dimension transformation vector of alphabet in target text can be input to together
Condition random field process layer, the corresponding provider location testing result of output target text.
Here, condition random field process layer (Conditional Random Field, CRF), for the character to input
Element in corresponding first dimension transformation vector is calculated, and exports in target text each character in each target position
Probability, and then determine provider location testing result corresponding with each character, target position includes the initial position of entity
B, the middle position M of entity, the end position E of entity, non-physical position O.
In one example, corresponding first dimension of a character of the first full articulamentum output is converted into vector RK, input at CFR
Reason layer obtains R4, K > 4, R4The character is indicated in the probability of each provider location, if R4=(0.8,0.05,0.1,0.05) determines
Out the character initial position B probability highest, thus determine the corresponding provider location testing result of the character be the character
To name a character in entity, and the character is in the initial position of name entity.
S104: according to the corresponding provider location testing result of the target text, the name in the target text is determined
Entity.
In specific implementation, the corresponding provider location detection knot of each character in target text is being detected by detection model
After fruit, each name entity in target text can be determined, wherein each name according to the provider location testing result
Entity is made of at least two character.
In one example, target text is " currently, diabetes B and its complication have become the master for endangering public health
One of disease is wanted, control blood glucose is one of the important measures for delaying diabetes development and its complication to occur.", the target text
Corresponding provider location testing result is (4,8, diabetes B), (34,35, blood glucose), (39,41, diabetes), determines mesh
The name entity in text is marked as " diabetes B ", " blood glucose ", " diabetes ", and the position of " diabetes B " in target text
It is set to the 4-8 word of target text, the position of " blood glucose " in target text is the 34th, 35 character of target text, " sugar
Position of the urine disease " in target text is the 39-41 character of target text.
S105: the corresponding contextual information vector of each name entity is input in trained identification model, is determined
The corresponding entity type testing result of the target text.
In specific implementation, it in the provider location testing result exported according to detection model, determines in target text
After each name entity, the corresponding contextual information vector of name entity each in target text only can be separately input into knowledge
It here, in target text include at least one name entity in other model, each name entity is made of at least two character, often
A contextual information vector for naming the corresponding each character of entity can be integrated into a contextual information vector.In the application
Identification model dependent on detection model determine name entity provider location testing result, need according to the provider location
Testing result determines the name entity in target text, and extracts the corresponding context letter of the name entity in target text
Breath vector is input to identification model, it is not necessary that the corresponding contextual information of each character in target text is input to identification mould
Type, in this way, the judgement of entity type can only be carried out to the name entity in target text, without to words all in target text
Symbol carries out entity differentiation and the differentiation it is not necessary that all characters are carried out with entity type, therefore can quickly and efficiently determine
The corresponding entity type testing result of target text.
Specifically, for each name entity, including two kinds of modes of operation:
Mode of operation one: each name entity in target text is sequentially input to identification model, i.e., is named at one
Entity input identification model and after obtaining entity type testing result, then next name entity is inputted to identification model.
Mode of operation two: whole name entities in target text are input to identification model together, obtain target text
In it is each name entity type.
Further, trained identification model includes the second full articulamentum and pond layer;Institute is then determined in step S105
State the corresponding entity type testing result of target text, comprising the following steps:
Step 1051: the corresponding contextual information vector of each name entity being input to the described second full articulamentum, really
It is fixed that corresponding second dimension of entity is accordingly named to convert vector.
In specific implementation, it in the provider location testing result exported according to detection model, determines in target text
After naming entity, only the corresponding contextual information vector of name entity each in target text can be input in identification model
The second full articulamentum, the corresponding contextual information vector of each name entity of input carries out dimensionality reduction by the second full articulamentum,
The second dimension corresponding with each name entity after dimensionality reduction can be exported converts vector.
Specifically, for each name entity, including two kinds of modes of operation:
Mode of operation one: each name entity in target text is sequentially input to the second full articulamentum, i.e., at one
Name entity inputs the second full articulamentum and after obtaining entity type testing result, then inputs next life to the second full articulamentum
Name entity.
Mode of operation two: whole name entities in target text are input to the second full articulamentum together, obtain target
The type of each name entity in text.
Here, the second full articulamentum is identical as the function of the first full articulamentum, is all to drop contextual information vector
Dimension, the dimension variation vector after obtaining dimensionality reduction.
In one example, the corresponding contextual information vector of a name entity is R2l, wherein l is the dimension of unidirectional LSTM
Parameter, by R2lIt is input to the second full articulamentum, corresponding second dimension of the name physical after exporting dimensionality reduction converts vector
Rk2, the dimensional parameter of k2 the second full articulamentum of expression, k2 < 2l.
Step 1052: the corresponding second dimension transformation vector of each name entity being input to the pond layer, determines phase
The corresponding entity type testing result of entity should be named.
In specific implementation, the corresponding second dimension transformation vector of each name entity of the second full articulamentum output is defeated
Enter the probability for showing that each name entity belongs to each entity type to pond layer.For each name entity, the name is determined
Entity belongs to the maximum probability in the probability of each entity type;The corresponding entity type of the maximum probability is determined as the name
The entity type of entity.
Here, pond layer (Pooling) be used for by corresponding second dimension of name entity each in target text convert to
Amount is calculated, and specific calculating process is to calculate each name in fact by normalizing exponential function (Softmax function)
Body belongs to the probability of each entity type, and then determines the testing result of the corresponding entity type of each name entity.
In one example, the corresponding second dimension transformation vector of a name entity is Rk2, wherein k2 indicates the second connection entirely
The dimensional parameter of layer, by Rk2It is input to pond layer, by normalization exponential function to Rk2It is calculated, obtains the name entity
Belong to the probability R of each entity typev, wherein the quantity of V presentation-entity type, V < K2 belong to each according to the name entity
The probability of entity type determines the testing result of the corresponding entity type of name entity.
Step 1053: according to the corresponding entity type testing result of each name entity, determining that the target text is corresponding
Entity type testing result.
In specific implementation, in determining target text after the entity type result of each name entity, by above-mentioned life
Name entity is summarized, and the corresponding entity type testing result of target text is obtained.
Here, name entity testing result includes provider location testing result and entity type testing result, provider location
Entity type, example are named in the position in the middle position of initial position, entity, the end position of entity, non-physical including entity
For example " disease ", " Testing index ", " symptom ", " place " etc..
In one example, target text is that " these are still uncertain with theoretical or expected inconsistent results Producing reason, may
It is related with the factors such as a group difference in crowds, hypoglycemia, weight gain, follow up time length and appraisal procedure are entered.", output
The corresponding name Entity recognition result of the target text is (34,36, symptom), and (38,41, symptom) determine target text
The position of name entity in this and type.
Name entity detection method provided by the embodiments of the present application, by by the character vector of character each in target text
Trained encoding model is inputted, the contextual information vector of each character can be generated, since contextual information vector can be with
Context of co-text of the corresponding character in target text is symbolized, therefore the contextual information vector of each character is inputted and is trained
Good detection model, can be improved the accuracy of the provider location testing result of determining target text, and examine according to provider location
It surveys result and determines the name entity in target text, the contextual information vector of each name entity is inputted into identification model, it can
To determine the entity type testing result of target text, in this way, by being detected respectively to the position and type of naming entity,
Without judging simultaneously the position and type of naming entity, name entity detection efficiency can be improved.
Shown in Figure 2, Fig. 2 is a kind of flow chart of the method for trained detection model provided by the embodiment of the present application,
The method of the trained detection model the following steps are included:
S201: the corresponding sample character vector of each sample character in sample text and the sample text are obtained
Corresponding provider location markup information.
In specific implementation, it is real to obtain each name in the sample text and sample text for training detection model
Each sample character corresponding conversion in sample text is further sample word by the corresponding provider location markup information of body
Accord with vector, specifically, can be found in the character dictionary pre-established the corresponding sample character of each sample character to
Amount.
Here, sample character can be text character, or character string;Sample character vector can represent pair
The feature for answering sample character is the static attribute to sample character;The provider location mark of each name entity in sample text
Information includes the end position information of the start position information of entity, the intermediate position information of entity, entity, provider location mark
Information is the information being labeled in advance to the position of each true name entity in sample text;It is stored in character dictionary
There is the corresponding character vector of each text character.
S202: according to the sample character vector, the corresponding sample contextual information vector of each sample character is generated.
In specific implementation, by being converted to the corresponding sample character vector of each sample character, Ke Yisheng
At sample contextual information vector corresponding with each sample character.
Specifically, sample corresponding with each sample character or more is generated according to the sample character vector in step 202
Literary information vector, comprising:
The sample character vector of each sample character is input in encoding model, on the sample for generating respective sample character
Context information vector.
It in specific implementation, due to generation is sample contextual information vector, it is necessary to by samples all in sample text
The corresponding sample character vector of this character is input to encoding model together, in the sample contextual information for generating each sample character
In vector process, the information of the character of sample context corresponding with the sample character is also taken into account, in this way, the sample generated
This contextual information vector can symbolize the context of co-text of the sample character in sample text, sample contextual information to
Amount is the dynamic characterization to sample character.Wherein, sample character and sample contextual information vector are one-to-one.
It should be noted that encoding model here can be trained encoding model, i.e., directly with trained volume
Code model output sample character vector training detection model to be trained;Here encoding model can also be coding to be trained
Model trains encoding model to be trained and detection model to be trained using sample character vector simultaneously.
S203: the corresponding sample contextual information vector of each sample character is input in detection model to be trained,
Determine the corresponding provider location testing result of the sample text.
In specific implementation, the corresponding sample contextual information vector of character whole in sample text is input to together
In detection model to be trained, it is named the detection of provider location, each name entity can be exported and each name is real
The corresponding provider location testing result of sample text is determined in position of the body in sample text.This link, only to name
The position of entity is detected, and is not identified to the type of name entity, is detected in this way, training can be substantially reduced to training
The difficulty of model.
S204: right according to the corresponding provider location testing result of the sample text and the provider location markup information
Detection model to be trained is trained.
In specific implementation, during treating trained detection model and being trained, by lives multiple in sample text
The actual provider location of name entity in the provider location testing result and sample text of each name entity in name entity
Markup information is compared, and calculates the provider location testing result and provider location mark of all name entities in sample text
Infuse information error and, by the error and as first intersect entropy loss, and using first intersection entropy loss adjust it is to be trained
The parameter of detection model, if encoding model be encoding model to be trained, can also using first intersect entropy loss adjustment to
The parameter of trained encoding model repeats above-mentioned training process after adjusting above-mentioned parameter, until the first intersection entropy loss is small
When the first preset error value, just stop treating the training of trained detection model, it will first to intersect entropy loss corresponding at this time
Parameter of the parameter as trained detection model, obtains trained detection model.
Here, the first preset error value can be configured according to actual needs by user, can also choose detection model
The empirical value of default.
Shown in Figure 3, Fig. 3 is a kind of flow chart of the method for trained identification model provided by the embodiment of the present application,
The method of the trained identification model the following steps are included:
S301: the corresponding sample character vector of each sample character in sample text and the sample text are obtained
Corresponding provider location markup information and entity type markup information.
In specific implementation, obtain the sample text for training identification model, sample text here with for training
The sample text of detection model is the same sample text, and obtains the corresponding provider location of each name entity in sample text
Each sample character corresponding conversion in sample text is further sample by markup information and entity type markup information
Character vector specifically can find the corresponding sample character of each sample character in the character dictionary pre-established
Vector.
Here, sample character can be text character, or character string;Sample character vector can represent pair
The feature for answering sample character is the static attribute to sample character;The entity type mark of each name entity in sample text
Information is the information being labeled in advance to the type of each true name entity in sample text, and entity type is for example
" disease ", " place ", " organization names ";The corresponding character vector of each text character is stored in character dictionary.
S302: according to the sample character vector, the corresponding sample contextual information vector of each sample character is generated.
In specific implementation, by sample character vector corresponding with each sample character in sample text into
Row conversion, can be generated sample contextual information vector corresponding with each sample character.
Specifically, sample corresponding with each sample character or more is generated according to the sample character vector in step 302
Literary information vector, comprising:
The sample character vector of each sample character is input in encoding model, on the sample for generating respective sample character
Context information vector.
In specific implementation, for the corresponding sample character vector of sample character each in sample text, following behaviour is carried out
Make: the character vector of each sample character is input in encoding model, generates sample corresponding with each sample character or more
Literary information vector, wherein sample character is one-to-one with sample contextual information vector.In particular it is required that by sample text
The corresponding sample character vector of all sample characters is input to encoding model together in this, in this way, each sample character generated
Sample contextual information vector, the context of co-text of the sample character in sample text can be symbolized.
It should be noted that encoding model here can be trained encoding model, i.e., directly with trained volume
Code model output sample character vector training identification model to be trained;Here encoding model can also be coding to be trained
Model trains encoding model to be trained and identification model to be trained using sample character vector simultaneously.
S303: it is based on the corresponding provider location markup information of the sample text, determines the name in the sample text
Entity.
In specific implementation, according to the provider location markup information of name entity each in sample text, from sample text
In determine each name entity, and belong to it is each name entity entity character.
S304: the corresponding sample contextual information vector of each name entity is input to identification model to be trained, really
Determine the corresponding entity type testing result of the sample text.
In specific implementation, the corresponding sample contextual information vector of character whole in sample text is input to together
In identification model to be trained, it is named the detection of entity type, each name entity can be exported and each name is real
Type of the body in sample text determines the corresponding entity type testing result of sample text.This link, according to sample
The provider location markup information of each name entity in text, directly carries out entity type to the name entity in sample text
Detection, training identification model to be trained do not depend on the testing result of detection model, i.e. training detection model and instruction to be trained
Practicing identification model to be trained can carry out respectively, not depend on mutually, in this way, training identification model to be trained can be substantially reduced
Difficulty.
S305: right according to the corresponding entity type testing result of the sample text and the entity type markup information
Identification model to be trained is trained.
In specific implementation, during treating trained identification model and being trained, by lives multiple in sample text
The actual entity class of the name entity in the entity type testing result and sample text of each name entity in name entity
Type markup information is compared, and calculates the entity type testing result and entity type of all name entities in sample text
The error of markup information and, by the error and as second intersect entropy loss, and using second intersection entropy loss adjust wait train
Identification model parameter, if encoding model be encoding model to be trained, can also using second intersect entropy loss adjust
The parameter of encoding model to be trained repeats above-mentioned training process after adjusting above-mentioned parameter, until second intersects entropy loss
When less than the second preset error value, just stop the training for treating trained identification model, the second intersection entropy loss will correspond at this time
Parameter of the parameter as trained identification model, obtain trained identification model.
Here, the second preset error value can be configured according to actual needs by user, can also choose identification model
The empirical value of default.
It should be noted that encoding model, detection model, identification model can be named entity as a whole
Provider location and entity type detection, here it is possible to by the entirety be interpreted as one name Entity recognition system.Its
In, training is different with the process of the system of application name Entity recognition, during the system of training name Entity recognition, by
In available provider location markup information and entity type markup information to sample text, thus detection model to be trained and
The training of identification model to be trained can be separated and be carried out, and not depended on mutually, i.e., be trained respectively as two subtasks, this
Sample can reduce the difficulty of trained detection model and training identification model, improve the training of training detection model and identification model
Speed, wherein the training of encoding model and detection model to be trained to be trained can be trained together, detection model
Training depends on the output result of encoding model;The training of encoding model and identification model to be trained to be trained can be together
It is trained, the training of identification model depends on the output result of encoding model;And application name Entity recognition system into
In the identification process of row name entity, the provider location that detection model detects name entity is first passed through, and then according to the entity
Position is determined to name entity in target text, and the detection of entity type, i.e. identification mould are carried out to the name entity detected
It, be dependent on the testing result for the provider location that detection model detects, in this way, can mention when type carries out the detection of entity type
Rise the efficiency for identifying name entity.
In a kind of possible embodiment, the corresponding sample of each sample character or more can also be generated according to the following steps
Literary information vector:
At least one sample character is determined as at random to convert sample character;By the corresponding sample of each transformation sample character
Character vector is converted, and the accordingly corresponding transformation sample character vector of transformation sample character is generated;By each transformation sample word
Corresponding transformation sample character vector is accorded with, and, the corresponding sample character vector of other sample characters is input to volume to be trained
In code model, the corresponding sample contextual information vector of respective sample character is generated.
In specific implementation, at least one sample character is determined as at random converting sample character, and sample word will be converted
It accords with corresponding sample character vector to be converted, generates transformation sample character vector corresponding with each transformation sample character, become
Varying this character vector can be 0 vector, if transformation vector is 0 vector, conversion process is the process for setting 0, convert sample word
According with vector may be other vectors, i.e., conversion process is the process for setting other numerical value, further, then by each transformation sample
The corresponding sample character vector of character and the corresponding sample character vector of other sample characters are input in coding network, raw
It, can be at random to sample text by using aforesaid way at sample contextual information vector corresponding with each sample character
One or more sample characters progress in this is hidden, can strengthen the energy that name encoding model captures more contextual informations
Power, and then training for promotion obtains the accuracy of encoding model.
Here it is possible to which the corresponding sample character vector of each sample character is first input to random masking layer (Time
Random Masking), random masking layer may be implemented at random to convert at least one sample character vector, i.e., random right
At least one sample character vector is sheltered, and can fill 0, by using this mode, can cover in sample text at random
One or more sample characters in this, but can still be made prediction by contextual information to it, training can be improved in this way
The accuracy of encoding model makes coding network that can capture more contextual informations in actual application.
In one example, each sample character respectively " rising ", " beginning ", " position ", " setting " in sample text, wherein " rising " is right
The sample character vector answered is (- 0.75, -0.83,0.16,0.38), " beginning " corresponding sample character vector be (- 0.33,
0.42, -0.94,0.52), " position " corresponding sample character vector is (0.57, -0.62,0.11, -0.33), " setting " corresponding sample
This character vector is (- 0.27,0.63,0.07, -0.84), by " rising ", " beginning ", " position ", " setting " corresponding sample character vector point
Random masking layer is not inputted, and random masking layer can at random shelter above-mentioned sample character, however, it is determined that sample character
" beginning " is sheltered, that is, determines that " beginning " is transformation sample character, then " beginning " corresponding transformation sample character vector after sheltering can
Think (0,0,0,0), and other sample characters " rising ", " position ", " setting " corresponding sample character vector are constant.
Here, sample contextual information vector can represent context language of the corresponding sample character in sample text
Border is the dynamic characterization to sample character.
Wherein, other sample characters are the sample character converted except sample character in sample text.
Conceived based on same application, the embodiment of the present application also provides a kind of names corresponding with name entity detection method
Entity detection device, the name in principle and the above embodiments of the present application solved the problems, such as due to the device in the embodiment of the present application
Entity detection method is similar, therefore the implementation of device may refer to the implementation of method, and overlaps will not be repeated.
It is shown in Figure 4, it is a kind of functional block diagram for naming entity detection device 400 provided by the embodiments of the present application,
Shown in Fig. 4, name entity detection device 400 includes:
Module 410 is obtained, for obtaining the character vector of each character in target text;
Generation module 420, the character vector of each character for obtaining the acquisition module 410, which is input to, to be trained
Encoding model in, generate the corresponding contextual information vector of respective symbols;
First determining module 430, the corresponding contextual information of each character for generating the generation module 420 to
Amount is input in trained detection model, determines the corresponding provider location testing result of the target text;
Second determining module 440, the corresponding reality of the target text for being determined according to first determining module 430
Body position testing result determines the name entity in the target text;
Third determining module 450, the corresponding context letter of each name entity for generating the generation module 420
Breath vector is input in trained identification model, determines the corresponding entity type testing result of the target text.
In a kind of possible embodiment, the trained detection model includes the first full articulamentum and condition random field
Process layer;As shown in figure 4, first determining module 430, for determining the corresponding reality of the target text according to the following steps
Body position testing result:
The corresponding contextual information vector of each character is input to the described first full articulamentum, determines that respective symbols are corresponding
The first dimension convert vector;
The corresponding first dimension transformation vector of each character is input to the condition random field process layer, determines the mesh
Mark the corresponding provider location testing result of text.
In a kind of possible embodiment, the trained identification model includes the second full articulamentum and pond layer;Such as
Shown in Fig. 4, the third determining module 450, for determining the corresponding entity type inspection of the target text according to the following steps
Survey result:
The corresponding contextual information vector of each name entity is input to the described second full articulamentum, determines corresponding name
Corresponding second dimension of entity converts vector;
The corresponding second dimension transformation vector of each name entity is input to the pond layer, determines corresponding name entity
Corresponding entity type testing result;
According to the corresponding entity type testing result of each name entity, the corresponding entity type of the target text is determined
Testing result.
In a kind of possible embodiment, the name entity detection device 400 further includes the first training module;Described
One training module, for training detection model according to the following steps:
The corresponding sample character vector of each sample character and the sample text in acquisition sample text is corresponding
Provider location markup information;
According to the sample character vector, the corresponding sample contextual information vector of each sample character is generated;
The corresponding sample contextual information vector of each sample character is input in detection model to be trained, determines institute
State the corresponding provider location testing result of sample text;
According to the corresponding provider location testing result of the sample text and the provider location markup information, training is treated
Detection model be trained.
In a kind of possible embodiment, as shown in figure 4, the name entity detection device 400 further includes the second training
Module;Second training module, for training identification model according to the following steps:
The corresponding sample character vector of each sample character and the sample text in acquisition sample text is corresponding
Provider location markup information and entity type markup information;
According to the sample character vector, the corresponding sample contextual information vector of each sample character is generated;
Based on the corresponding provider location markup information of the sample text, the name entity in the sample text is determined;
The corresponding sample contextual information vector of each name entity is input to identification model to be trained, determine described in
The corresponding entity type testing result of sample text;
According to the corresponding entity type testing result of the sample text and the entity type markup information, training is treated
Identification model be trained.
In a kind of possible embodiment, as shown in figure 4, the generation module 420, every for generating according to the following steps
The corresponding sample contextual information vector of a sample character:
At least one sample character is determined as at random to convert sample character;
The corresponding sample character vector of each transformation sample character is converted, it is corresponding to generate corresponding transformation sample character
Transformation sample character vector;
By the corresponding transformation sample character vector of each transformation sample character, and, other corresponding samples of sample character
Character vector is input in encoding model to be trained, and generates the corresponding sample contextual information vector of respective sample character;
Wherein, other sample characters are the sample character converted except sample character in sample text.
Name entity detection device 400 provided by the embodiments of the present application, by the target text that will acquire the acquisition of module 410
In the character vector of each character be input in trained encoding model, generation module 420 can be passed through and generated and each word
Accord with corresponding contextual information vector, due to contextual information vector can symbolize corresponding character in target text up and down
Literary context, therefore the corresponding contextual information vector of each character is input in trained detection model, it can be improved really
Set the goal text provider location testing result accuracy, the first determining module 430 can be passed through and determine that target text is corresponding
Provider location testing result, and according to provider location testing result by the second determining module 440 determine target text in
Entity is named, the corresponding contextual information vector of each name entity is input to identification model, mould can be determined by third
Block 450 determines the corresponding entity type testing result of target text.In this way, by respectively to name entity position and type into
Name entity detection efficiency can be improved without judging simultaneously the position and type of naming entity in row detection.
Conceived based on same application, it is shown in Figure 5, it is the knot of a kind of electronic equipment 500 provided by the embodiments of the present application
Structure schematic diagram, comprising: processor 510, memory 520 and bus 530.Wherein, memory 520 is stored with processor 510 and can hold
Capable machine readable instructions are carried out between processor 510 and memory 520 by bus 530 when electronic equipment 500 is run
Communication executes the step of name entity detection method as shown in Figure 1 above when the machine readable instructions are run by processor 510
Suddenly.
Specifically, following processing can be executed when the machine readable instructions are executed by the processor 510:
Obtain the character vector of each character in target text;
The character vector of each character is input in trained encoding model, the corresponding context of respective symbols is generated
Information vector;
The corresponding contextual information vector of each character is input in trained detection model, determines the target text
This corresponding provider location testing result;
According to the corresponding provider location testing result of the target text, the name entity in the target text is determined;
The corresponding contextual information vector of each name entity is input in trained identification model, determines the mesh
Mark the corresponding entity type testing result of text.
The embodiment of the present application, can by the way that the character vector of character each in target text is inputted trained encoding model
To generate the contextual information vector of each character, since contextual information vector can symbolize corresponding character in target text
In context of co-text can be improved really by the way that the contextual information vector of each character is inputted trained detection model
Set the goal text provider location testing result accuracy, and determine according to provider location testing result the life in target text
The contextual information vector of each name entity is inputted identification model, can determine the entity type of target text by name entity
Testing result, in this way, by being detected respectively to the position and type of naming entity, without the position simultaneously to name entity
Judged with type, name entity detection efficiency can be improved.
Conceived based on same application, the embodiment of the present application also provides a kind of computer readable storage medium, the calculating
It is stored with computer program on machine readable storage medium storing program for executing, executes when the computer program is run by processor such as above-mentioned Fig. 1 institute
The step of showing the name entity detection method in embodiment of the method, specific implementation can be found in embodiment of the method, herein no longer
It repeats.
Specifically, the storage medium can be general storage medium, such as mobile disk, hard disk, and the storage is situated between
When computer program in matter is run, it is able to carry out above-mentioned name entity detection method, by first detecting in target text
The position of entity identifies the type of entity further according to provider location testing result, can more quickly, more accurately from target
Position and the type of name entity are identified in text.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description
With the specific work process of device, the corresponding process in embodiment of the method can be referred to, is repeated no more in the application.In the application
In provided several embodiments, it should be understood that disclosed systems, devices and methods, it can be real by another way
It is existing.The apparatus embodiments described above are merely exemplary, for example, the division of the module, only a kind of logic function
It can divide, there may be another division manner in actual implementation, in another example, multiple module or components can combine or can collect
At another system is arrived, or some features can be ignored or not executed.Another point, shown or discussed mutual coupling
Conjunction or direct-coupling or communication connection can be the indirect coupling or communication connection by some communication interfaces, device or module,
It can be electrical property, mechanical or other forms.
The module as illustrated by the separation member may or may not be physically separated, aobvious as module
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product
It is stored in the executable non-volatile computer-readable storage medium of a processor.
Based on this understanding, the technical solution of the application substantially in other words the part that contributes to existing technology or
The part of technical solution described in person can be embodied in the form of software products, and the computer software product is stored in one
In storage medium, including some instructions are used so that a computer equipment (can be personal computer, server or net
Network equipment etc.) execute each embodiment the method for the application all or part of the steps.And storage medium above-mentioned includes: U
Disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access
Memory, RAM), the various media that can store program code such as magnetic or disk.
The above is only the protection scopes of the specific embodiment of the application, but the application to be not limited thereto, any to be familiar with
Those skilled in the art within the technical scope of the present application, can easily think of the change or the replacement, and should all cover
Within the protection scope of the application.Therefore, the protection scope of the application should be subject to the protection scope in claims.
Claims (10)
1. a kind of name entity detection method, which is characterized in that the name entity detection method includes:
Obtain the character vector of each character in target text;
The character vector of each character is input in trained encoding model, the corresponding contextual information of respective symbols is generated
Vector;
The corresponding contextual information vector of each character is input in trained detection model, determines the target text pair
The provider location testing result answered;
According to the corresponding provider location testing result of the target text, the name entity in the target text is determined;
The corresponding contextual information vector of each name entity is input in trained identification model, determines the target text
This corresponding entity type testing result.
2. name entity detection method according to claim 1, which is characterized in that the trained detection model includes
First full articulamentum and condition random field process layer;Then determine the corresponding provider location testing result of the target text, comprising:
The corresponding contextual information vector of each character is input to the described first full articulamentum, determines respective symbols corresponding
Dimension converts vector;
The corresponding first dimension transformation vector of each character is input to the condition random field process layer, determines the target text
This corresponding provider location testing result.
3. name entity detection method according to claim 1, which is characterized in that the trained identification model includes
Second full articulamentum and pond layer;Then determine the corresponding entity type testing result of the target text, comprising:
The corresponding contextual information vector of each name entity is input to the described second full articulamentum, determines corresponding name entity
Corresponding second dimension converts vector;
The corresponding second dimension transformation vector of each name entity is input to the pond layer, determines that corresponding name entity is corresponding
Entity type testing result;
According to the corresponding entity type testing result of each name entity, the corresponding entity type detection of the target text is determined
As a result.
4. name entity detection method according to claim 1, which is characterized in that training detection mould according to the following steps
Type:
Obtain the corresponding sample character vector of each sample character and the corresponding entity of the sample text in sample text
Position markup information;
According to the sample character vector, the corresponding sample contextual information vector of each sample character is generated;
The corresponding sample contextual information vector of each sample character is input in detection model to be trained, determines the sample
The corresponding provider location testing result of this text;
According to the corresponding provider location testing result of the sample text and the provider location markup information, trained inspection is treated
Model is surveyed to be trained.
5. name entity detection method according to claim 1, which is characterized in that training identification mould according to the following steps
Type:
Obtain the corresponding sample character vector of each sample character and the corresponding entity of the sample text in sample text
Position markup information and entity type markup information;
According to the sample character vector, the corresponding sample contextual information vector of each sample character is generated;
Based on the corresponding provider location markup information of the sample text, the name entity in the sample text is determined;
The corresponding sample contextual information vector of each name entity is input to identification model to be trained, determines the sample
The corresponding entity type testing result of text;
According to the corresponding entity type testing result of the sample text and the entity type markup information, trained knowledge is treated
Other model is trained.
6. name entity detection method according to claim 4 or 5, which is characterized in that generate according to the following steps each
The corresponding sample contextual information vector of sample character:
At least one sample character is determined as at random to convert sample character;
The corresponding sample character vector of each transformation sample character is converted, the accordingly corresponding change of transformation sample character is generated
Vary this character vector;
By the corresponding transformation sample character vector of each transformation sample character, and, the corresponding sample character of other sample characters
Vector is input in encoding model to be trained, and generates the corresponding sample contextual information vector of respective sample character;
Wherein, other sample characters are the sample character converted except sample character in sample text.
7. a kind of name entity detection device, which is characterized in that the name entity detection device includes:
Module is obtained, for obtaining the character vector of each character in target text;
The character vector of generation module, each character for obtaining the acquisition module is input to trained encoding model
In, generate the corresponding contextual information vector of respective symbols;
First determining module, the corresponding contextual information vector of each character for generating the generation module are input to instruction
In the detection model perfected, the corresponding provider location testing result of the target text is determined;
Second determining module, the corresponding provider location of the target text for being determined according to first determining module detect
As a result, determining the name entity in the target text;
Third determining module, the corresponding contextual information vector input of each name entity for generating the generation module
To in trained identification model, the corresponding entity type testing result of the target text is determined.
8. name entity detection device according to claim 7, which is characterized in that the trained detection model includes
First full articulamentum and condition random field process layer;First determining module, for determining the target according to the following steps
The corresponding provider location testing result of text:
The corresponding contextual information vector of each character is input to the described first full articulamentum, determines respective symbols corresponding
Dimension converts vector;
The corresponding first dimension transformation vector of each character is input to the condition random field process layer, determines the target text
This corresponding provider location testing result.
9. a kind of electronic equipment characterized by comprising processor, memory and bus, the memory are stored with the place
The executable machine readable instructions of device are managed, when electronic equipment operation, by described between the processor and the memory
Bus is communicated, and the life as described in claim 1 to 6 is any is executed when the machine readable instructions are run by the processor
The step of name entity detection method.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium
Program executes the name entity detection method as described in claim 1 to 6 is any when the computer program is run by processor
The step of.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910704579.2A CN110399616A (en) | 2019-07-31 | 2019-07-31 | Name entity detection method, device, electronic equipment and readable storage medium storing program for executing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910704579.2A CN110399616A (en) | 2019-07-31 | 2019-07-31 | Name entity detection method, device, electronic equipment and readable storage medium storing program for executing |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110399616A true CN110399616A (en) | 2019-11-01 |
Family
ID=68327012
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910704579.2A Pending CN110399616A (en) | 2019-07-31 | 2019-07-31 | Name entity detection method, device, electronic equipment and readable storage medium storing program for executing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110399616A (en) |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111223481A (en) * | 2020-01-09 | 2020-06-02 | 腾讯科技(深圳)有限公司 | Information extraction method and device, computer readable storage medium and electronic equipment |
CN111241832A (en) * | 2020-01-15 | 2020-06-05 | 北京百度网讯科技有限公司 | Core entity labeling method and device and electronic equipment |
CN111274815A (en) * | 2020-01-15 | 2020-06-12 | 北京百度网讯科技有限公司 | Method and device for mining entity attention points in text |
CN111309908A (en) * | 2020-02-12 | 2020-06-19 | 支付宝(杭州)信息技术有限公司 | Text data processing method and device |
CN111627564A (en) * | 2020-05-25 | 2020-09-04 | 日立楼宇技术(广州)有限公司 | User detection model training and detection method, device, equipment and storage medium |
CN111881692A (en) * | 2020-07-28 | 2020-11-03 | 平安科技(深圳)有限公司 | Mechanism entity extraction method, system and device based on multiple training targets |
CN112015792A (en) * | 2019-12-11 | 2020-12-01 | 天津泰凡科技有限公司 | Material duplicate code analysis method and device and computer storage medium |
CN112328709A (en) * | 2020-11-19 | 2021-02-05 | 深圳市图灵机器人有限公司 | Entity marking method and device, server and storage medium |
CN112818701A (en) * | 2021-02-01 | 2021-05-18 | 上海明略人工智能(集团)有限公司 | Method, device and equipment for determining dialogue entity recognition model |
CN112861533A (en) * | 2019-11-26 | 2021-05-28 | 阿里巴巴集团控股有限公司 | Entity word recognition method and device |
CN113408507A (en) * | 2021-08-20 | 2021-09-17 | 北京国电通网络技术有限公司 | Named entity identification method and device based on resume file and electronic equipment |
CN114021571A (en) * | 2021-11-26 | 2022-02-08 | 北京天融信网络安全技术有限公司 | Security entity detection method and device |
CN114444508A (en) * | 2022-01-29 | 2022-05-06 | 北京有竹居网络技术有限公司 | Date identification method and device, readable medium and electronic equipment |
CN114692644A (en) * | 2022-03-11 | 2022-07-01 | 粤港澳大湾区数字经济研究院(福田) | Text entity labeling method, device, equipment and storage medium |
CN115859984A (en) * | 2022-12-22 | 2023-03-28 | 北京壹永科技有限公司 | Medical named entity recognition model training method, device, equipment and medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150154284A1 (en) * | 2013-11-29 | 2015-06-04 | Katja Pfeifer | Aggregating results from named entity recognition services |
CN108921092A (en) * | 2018-07-02 | 2018-11-30 | 浙江工业大学 | A kind of melanoma classification method based on convolutional neural networks model Two-level ensemble |
CN109446521A (en) * | 2018-10-18 | 2019-03-08 | 京东方科技集团股份有限公司 | Name entity recognition method, device, electronic equipment, machine readable storage medium |
CN109791570A (en) * | 2018-12-13 | 2019-05-21 | 香港应用科技研究院有限公司 | Efficiently and accurately name entity recognition method and device |
CN109902307A (en) * | 2019-03-15 | 2019-06-18 | 北京金山数字娱乐科技有限公司 | Name the training method and device of entity recognition method, Named Entity Extraction Model |
-
2019
- 2019-07-31 CN CN201910704579.2A patent/CN110399616A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150154284A1 (en) * | 2013-11-29 | 2015-06-04 | Katja Pfeifer | Aggregating results from named entity recognition services |
CN108921092A (en) * | 2018-07-02 | 2018-11-30 | 浙江工业大学 | A kind of melanoma classification method based on convolutional neural networks model Two-level ensemble |
CN109446521A (en) * | 2018-10-18 | 2019-03-08 | 京东方科技集团股份有限公司 | Name entity recognition method, device, electronic equipment, machine readable storage medium |
CN109791570A (en) * | 2018-12-13 | 2019-05-21 | 香港应用科技研究院有限公司 | Efficiently and accurately name entity recognition method and device |
CN109902307A (en) * | 2019-03-15 | 2019-06-18 | 北京金山数字娱乐科技有限公司 | Name the training method and device of entity recognition method, Named Entity Extraction Model |
Cited By (23)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112861533A (en) * | 2019-11-26 | 2021-05-28 | 阿里巴巴集团控股有限公司 | Entity word recognition method and device |
CN112015792A (en) * | 2019-12-11 | 2020-12-01 | 天津泰凡科技有限公司 | Material duplicate code analysis method and device and computer storage medium |
CN112015792B (en) * | 2019-12-11 | 2023-12-01 | 天津泰凡科技有限公司 | Material repeated code analysis method and device and computer storage medium |
CN111223481A (en) * | 2020-01-09 | 2020-06-02 | 腾讯科技(深圳)有限公司 | Information extraction method and device, computer readable storage medium and electronic equipment |
CN111223481B (en) * | 2020-01-09 | 2023-10-13 | 腾讯科技(深圳)有限公司 | Information extraction method, information extraction device, computer readable storage medium and electronic equipment |
CN111274815A (en) * | 2020-01-15 | 2020-06-12 | 北京百度网讯科技有限公司 | Method and device for mining entity attention points in text |
CN111274815B (en) * | 2020-01-15 | 2024-04-12 | 北京百度网讯科技有限公司 | Method and device for mining entity focus point in text |
CN111241832A (en) * | 2020-01-15 | 2020-06-05 | 北京百度网讯科技有限公司 | Core entity labeling method and device and electronic equipment |
CN111241832B (en) * | 2020-01-15 | 2023-08-15 | 北京百度网讯科技有限公司 | Core entity labeling method and device and electronic equipment |
CN111309908A (en) * | 2020-02-12 | 2020-06-19 | 支付宝(杭州)信息技术有限公司 | Text data processing method and device |
CN111309908B (en) * | 2020-02-12 | 2023-08-25 | 支付宝(杭州)信息技术有限公司 | Text data processing method and device |
CN111627564A (en) * | 2020-05-25 | 2020-09-04 | 日立楼宇技术(广州)有限公司 | User detection model training and detection method, device, equipment and storage medium |
CN111881692A (en) * | 2020-07-28 | 2020-11-03 | 平安科技(深圳)有限公司 | Mechanism entity extraction method, system and device based on multiple training targets |
CN112328709A (en) * | 2020-11-19 | 2021-02-05 | 深圳市图灵机器人有限公司 | Entity marking method and device, server and storage medium |
CN112818701B (en) * | 2021-02-01 | 2023-07-04 | 上海明略人工智能(集团)有限公司 | Method, device and equipment for determining dialogue entity recognition model |
CN112818701A (en) * | 2021-02-01 | 2021-05-18 | 上海明略人工智能(集团)有限公司 | Method, device and equipment for determining dialogue entity recognition model |
CN113408507A (en) * | 2021-08-20 | 2021-09-17 | 北京国电通网络技术有限公司 | Named entity identification method and device based on resume file and electronic equipment |
CN114021571A (en) * | 2021-11-26 | 2022-02-08 | 北京天融信网络安全技术有限公司 | Security entity detection method and device |
CN114444508A (en) * | 2022-01-29 | 2022-05-06 | 北京有竹居网络技术有限公司 | Date identification method and device, readable medium and electronic equipment |
CN114692644A (en) * | 2022-03-11 | 2022-07-01 | 粤港澳大湾区数字经济研究院(福田) | Text entity labeling method, device, equipment and storage medium |
CN114692644B (en) * | 2022-03-11 | 2024-06-11 | 粤港澳大湾区数字经济研究院(福田) | Text entity labeling method, device, equipment and storage medium |
CN115859984A (en) * | 2022-12-22 | 2023-03-28 | 北京壹永科技有限公司 | Medical named entity recognition model training method, device, equipment and medium |
CN115859984B (en) * | 2022-12-22 | 2024-01-23 | 北京壹永科技有限公司 | Medical named entity recognition model training method, device, equipment and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110399616A (en) | Name entity detection method, device, electronic equipment and readable storage medium storing program for executing | |
CN111027487B (en) | Behavior recognition system, method, medium and equipment based on multi-convolution kernel residual error network | |
CN108509411B (en) | Semantic analysis method and device | |
CN108090093B (en) | Method and device for generating recommendation result | |
CN112766172B (en) | Facial continuous expression recognition method based on time sequence attention mechanism | |
CN107169463B (en) | Method for detecting human face, device, computer equipment and storage medium | |
CN104008203B (en) | A kind of Users' Interests Mining method for incorporating body situation | |
CN114332578A (en) | Image anomaly detection model training method, image anomaly detection method and device | |
CN111209215B (en) | Application program testing method and device, computer equipment and storage medium | |
CN111125519B (en) | User behavior prediction method, device, electronic equipment and storage medium | |
CN110222760A (en) | A kind of fast image processing method based on winograd algorithm | |
CN116933046B (en) | Deep learning-based multi-mode health management scheme generation method and system | |
CN115658955B (en) | Cross-media retrieval and model training method, device, equipment and menu retrieval system | |
CN116431004B (en) | Control method and system for interactive behavior of rehabilitation robot | |
CN117158923A (en) | Remote home-care monitoring method based on meta universe | |
CN111507137A (en) | Action understanding method and device, computer equipment and storage medium | |
Zhang et al. | Deep multiphase level set for scene parsing | |
CN116229584A (en) | Text segmentation recognition method, system, equipment and medium in artificial intelligence field | |
CN111626827A (en) | Method, device, equipment and medium for recommending articles based on sequence recommendation model | |
CN116383766A (en) | Auxiliary diagnosis method, device, equipment and storage medium based on multi-mode data | |
WO2020104590A2 (en) | Aligning sequences by generating encoded representations of data items | |
Keisham et al. | Multi-level alignment for few-shot temporal action localization | |
CN112216379A (en) | Disease diagnosis system based on intelligent joint learning | |
CN116189800B (en) | Pattern recognition method, device, equipment and storage medium based on gas detection | |
CN110841143B (en) | Method and system for predicting state of infusion pipeline |
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 | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 100070, No. 101-8, building 1, 31, zone 188, South Fourth Ring Road, Beijing, Fengtai District Applicant after: Guoxin Youyi Data Co.,Ltd. Address before: 100070, No. 188, building 31, headquarters square, South Fourth Ring Road West, Fengtai District, Beijing Applicant before: SIC YOUE DATA Co.,Ltd. |
|
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20191101 |