CN109598000A - Semantic relation recognition methods, device, computer equipment and storage medium - Google Patents

Semantic relation recognition methods, device, computer equipment and storage medium Download PDF

Info

Publication number
CN109598000A
CN109598000A CN201811624158.0A CN201811624158A CN109598000A CN 109598000 A CN109598000 A CN 109598000A CN 201811624158 A CN201811624158 A CN 201811624158A CN 109598000 A CN109598000 A CN 109598000A
Authority
CN
China
Prior art keywords
semantic relation
semantic
identification model
bsr
vector
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.)
Granted
Application number
CN201811624158.0A
Other languages
Chinese (zh)
Other versions
CN109598000B (en
Inventor
高参
肖欣延
吕雅娟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201811624158.0A priority Critical patent/CN109598000B/en
Publication of CN109598000A publication Critical patent/CN109598000A/en
Application granted granted Critical
Publication of CN109598000B publication Critical patent/CN109598000B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Machine Translation (AREA)

Abstract

The invention discloses a kind of semantic relation recognition methods, device, computer equipment and storage mediums.Wherein method includes: to obtain BSR semantic unit sentence pair to be identified;By the BSR semantic unit sentence to be identified to the input as semantic relation identification model, the semantic relation of the BSR semantic unit sentence pair to be identified is obtained.This method had not only been able to achieve the identification of explicit semantic relation but also had been able to achieve the identification of implicit semantic relation, while can also ensure that semantic relation recognition effect.

Description

Semantic relation recognition methods, device, computer equipment and storage medium
Technical field
The present invention relates to natural language processing field more particularly to a kind of semantic relation recognition methods, device, computers to set Standby and computer readable storage medium.
Background technique
Discourse semantics relation recognition task is a basic task of natural language processing, it typically refers to identification nature language Say the semantic relation between BSR semantic unit, such as " although real estate merchants risk the life in resistance, room rate has dropped eventually " table Bright is that a kind of concession relationship, " police assert that he has spread lie, they have found the wallet of owner of lost property's loss in his residence " show Be a kind of causality.It is called association in the event of the word or phrase that can show that semantic relation in this generic task Word, such as " because ... ... ", " although ... ".There is the recognition effect of conjunctive word than there is not the identification of conjunctive word effect Fruit obviously increases.
In the related technology, semantic relation identification mission is to be split as explicit semantic relation identification mission and implicit language Adopted relation recognition task.For explicit semantic relation identification mission, first passes through conjunctive word identification model and identify basic semantic list Conjunctive word between member, then modeling identification semantic relation is carried out to BSR semantic unit using conjunctive word as important feature.For hidden Formula semantic relation identification mission, directly encodes BSR semantic unit and identifies semantic relation again.
But presently, there are the problem of be: explicit semantic relation identification conjunctive word identification model is relied on it is serious, if There is error in the identification of conjunctive word model, will lead to error conduction, so that explicit semantic relation recognition effect decline;For implicit language Adopted relation recognition fails to promote recognition effect by conjunctive word.Therefore, identification but also the energy of explicit semantic relation how to be not only able to achieve It realizes the identification of implicit semantic relation, while can also ensure that semantic relation recognition effect, have become urgent problem to be solved.
Summary of the invention
The purpose of the present invention is intended to solve above-mentioned one of technical problem at least to a certain extent.
For this purpose, the first purpose of this invention is to propose a kind of semantic relation recognition methods.This method had both been able to achieve aobvious The identification of formula semantic relation is able to achieve the identification of implicit semantic relation again, while can also ensure that semantic relation recognition effect.
Second object of the present invention is to propose a kind of semantic relation identification device.
Third object of the present invention is to propose a kind of computer equipment.
Fourth object of the present invention is to propose a kind of computer readable storage medium.
In order to achieve the above objectives, first aspect present invention embodiment propose semantic relation recognition methods, comprising: obtain to The BSR semantic unit sentence pair of identification;By the BSR semantic unit sentence to be identified to as semantic relation identification model Input, obtain the semantic relation of the BSR semantic unit sentence pair to be identified.
The semantic relation recognition methods of the embodiment of the present invention can obtain BSR semantic unit sentence pair to be identified, and will It is to be identified to obtain this to the input as semantic relation identification model trained in advance for the BSR semantic unit sentence to be identified BSR semantic unit sentence pair semantic relation.Learn conjunctive word identification mission and language simultaneously i.e. by way of combination learning Adopted relation recognition task to train semantic relation identification model in advance, so that the semantic relation identification model can be realized simultaneously Explicit semantic relation identification mission and implicit semantic relation identification mission are handled, while can also ensure that semantic relation identification effect Fruit.
In order to achieve the above objectives, the semantic relation identification device that second aspect of the present invention embodiment proposes, comprising: sentence obtains Modulus block, for obtaining BSR semantic unit sentence pair to be identified;Identification model is used for the basic semantic to be identified Unit sentence obtains the semanteme of the BSR semantic unit sentence pair to be identified to the input as semantic relation identification model Relationship.
The semantic relation identification device of the embodiment of the present invention can obtain basic semantic to be identified by sentence sub-acquisition module The BSR semantic unit sentence to be identified is identified mould to as semantic relation trained in advance by unit sentence pair, identification model The input of type obtains the semantic relation of the BSR semantic unit sentence pair to be identified.I.e. by way of combination learning simultaneously Learn conjunctive word identification mission and semantic relation identification mission to train semantic relation identification model in advance, so that the semanteme closes It is that identification model can be realized while handle explicit semantic relation identification mission and implicit semantic relation identification mission, while can also Enough guarantee semantic relation recognition effect.
In order to achieve the above objectives, the computer equipment that third aspect present invention embodiment proposes, comprising: memory, processing Device and it is stored in the computer program that can be run on the memory and on the processor, the processor executes the meter When calculation machine program, semantic relation recognition methods described in first aspect present invention embodiment is realized.
In order to achieve the above objectives, the computer readable storage medium that fourth aspect present invention embodiment proposes, stores thereon There is computer program, realizes that semanteme described in first aspect present invention embodiment closes when the computer program is executed by processor It is recognition methods.
The additional aspect of the present invention and advantage will be set forth in part in the description, and will partially become from the following description Obviously, or practice through the invention is recognized.
Detailed description of the invention
Above-mentioned and/or additional aspect and advantage of the invention will become from the following description of the accompanying drawings of embodiments Obviously and it is readily appreciated that, in which:
Fig. 1 is the flow chart of semantic relation recognition methods according to an embodiment of the invention;
Fig. 2 is the flow chart of semantic relation recognition methods accord to a specific embodiment of that present invention;
The configuration diagram of the semantic relation identification model of Fig. 3 embodiment of the present invention;
Fig. 4 is the network architecture schematic diagram of the generator of the embodiment of the present invention;
Fig. 5 is the network architecture schematic diagram of the calibrator of the embodiment of the present invention;
Fig. 6 is the structural schematic diagram of semantic relation identification device according to an embodiment of the invention;
Fig. 7 is the structural schematic diagram of semantic relation identification device in accordance with another embodiment of the present invention;
Fig. 8 is the structural schematic diagram of computer equipment according to an embodiment of the invention.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, it is intended to is used to explain the present invention, and is not considered as limiting the invention.
Below with reference to the accompanying drawings semantic relation recognition methods, device, computer equipment and the calculating of the embodiment of the present invention are described Machine storage medium.
Fig. 1 is the flow chart of semantic relation recognition methods according to an embodiment of the invention.It should be noted that this hair The semantic relation recognition methods of bright embodiment can be applied to the semantic relation identification device of the embodiment of the present invention, which knows Other device can be configured in computer equipment.For example, the computer equipment can be the clothes with natural language processing function Business device equipment.
As shown in Figure 1, the semantic relation recognition methods may include:
S110 obtains BSR semantic unit sentence pair to be identified.
For example, can be obtained each in this article when needing to carry out semantic relation identification to the sentence in certain article A BSR semantic unit sentence pair, for example, can using this symbol of fullstop as identifier, using the text between two fullstops as One BSR semantic unit sentence pair, in this way, all BSR semantic unit sentences pair in this article can be obtained, so as to incite somebody to action These BSR semantic unit sentences are to as BSR semantic unit sentence pair to be identified, so as to these BSR semantic unit sentences Son is to progress semantic relation identification.
For another example, it is assumed that the semantic relation recognition methods of the embodiment of the present invention is applied in search engine, and search engine can be User provides input interface, and user can input text by the input interface, and the text is appreciated that with semantic relation.It is monitoring When to user's confirmation input, the text of user input can be obtained, and using the text as BSR semantic unit sentence to be identified Son is right, so as to the BSR semantic unit sentence to carrying out semantic relation identification, so that searchable engine is according to recognizing Semantic relation more accurately recognizes that user is intended to, to provide more accurate search result for user.
Wherein, in an embodiment of the present invention, the BSR semantic unit sentence is to being appreciated that it is to show a kind of semantic close One unit sentence pair of system, the BSR semantic unit sentence is to including the first sentence and the second sentence, first sentence and the Two molecular sentences are to can show that a kind of semantic relation, for example, " although real estate merchants risk the life in resistance, room rate is gone back eventually It is to have dropped " it is a BSR semantic unit sentence pair, wherein first of the sentence centering can be distinguished according to comma Son and the second sentence, if the text (i.e. " although real estate merchants risk the life in resistance ") before comma is the first sentence, after comma Text (i.e. " room rate still has dropped eventually ") is the second sentence.
S120 is obtained by BSR semantic unit sentence to be identified to the input as semantic relation identification model wait know The semantic relation of other BSR semantic unit sentence pair.
It should be noted that in an embodiment of the present invention, training obtains the semantic relation identification model in advance Semantic relation identification model.Wherein, in an embodiment of the present invention, which, which can be, passes through combination learning Mode learn the model that conjunctive word identification mission and semantic relation identification mission are obtained with preparatory training simultaneously.The training semanteme The implementation of relation recognition model can be found in the description of subsequent embodiment.
Semantic relation identification model is obtained that is, can train in advance, is needing to carry out semantic relation identification to text When, BSR semantic unit sentence pair to be identified can be obtained, and the semantic relation identification model trained in advance using this waits for this The BSR semantic unit sentence of identification is to semantic relation identification is carried out, so as to obtain the language of the BSR semantic unit sentence pair Adopted relationship.
The semantic relation recognition methods of the embodiment of the present invention can obtain BSR semantic unit sentence pair to be identified, and will It is to be identified to obtain this to the input as semantic relation identification model trained in advance for the BSR semantic unit sentence to be identified BSR semantic unit sentence pair semantic relation.Learn conjunctive word identification mission and language simultaneously i.e. by way of combination learning Adopted relation recognition task to train semantic relation identification model in advance, so that the semantic relation identification model can be realized simultaneously Explicit semantic relation identification mission and implicit semantic relation identification mission are handled, while can also ensure that semantic relation identification effect Fruit.
Fig. 2 is the flow chart of semantic relation recognition methods accord to a specific embodiment of that present invention.
As shown in Fig. 2, the semantic relation recognition methods may include:
S210 constructs semantic relation identification model.
Semantic relation identification model in the present embodiment may include generator, classifier and arbiter.Wherein, in the present invention Embodiment in, generator is used for special to corresponding first semantic relation is generated according to the first BSR semantic unit sentence of input Sign;The first semantic relation feature that classifier is used to be generated according to generator carries out semantic relation identification, obtains corresponding semanteme Relation recognition result;Arbiter is used in the training stage of semantic relation identification model, the semantic relation of identification and classification device output The true and false of recognition result.
In one embodiment of the invention, generator can be specifically used for: to the first BSR semantic unit sentence of input Obtain multiple participles to word segmentation processing is carried out respectively, and multiple participles be subjected to vector conversion, it is corresponding obtain it is multiple segment to Amount is associated word to multiple participles according to multiple participle vectors and classifies later, obtain the conjunctive word classifiers of multiple participles to Amount, and corresponding first semantic relation feature is generated according to the conjunctive word classification term vector of multiple participle multiple participles of vector sum.
As an example, generator is according to multiple conjunctive word classification term vectors generations pair for segmenting the multiple participles of vector sum The specific implementation process for the first semantic relation feature answered can be as follows: in conjunction with the conjunctive word classification term vector of multiple participles, passing through Normal distribution stochastical sampling, generates a conjunctive word term vector, and by multiple participle vectors, the conjunctive word classifiers of multiple participles Vector sum conjunctive word term vector is spliced, and later, is determined in the vector obtained after splicing between word by attention mechanism The relationship that influences each other, obtain the first semantic relation feature.
Wherein, in an embodiment of the present invention, the first BSR semantic unit sentence is to being appreciated that it is to show a kind of semantic close One unit sentence pair of system, the BSR semantic unit sentence is to including the first sentence and the second sentence, first sentence and the Two molecular sentences are to can show that a kind of semantic relation, for example, " although real estate merchants risk the life in resistance, room rate is gone back eventually It is to have dropped " it is a BSR semantic unit sentence pair, wherein first of the sentence centering can be distinguished according to comma Son and the second sentence, if the text (i.e. " although real estate merchants risk the life in resistance ") before comma is the first sentence, after comma Text (i.e. " room rate still has dropped eventually ") is the second sentence.
For example, Fig. 3 is the configuration diagram of the semantic relation identification model of the embodiment of the present invention, as shown in figure 3, Arg1 and arg2 is mode input part, is a BSR semantic unit sentence pair.Generator segments sentence respectively, and Vector conversion is carried out to multiple participles respectively, corresponding participle vector is obtained, later, according to multiple participle vectors to multiple participles It is associated word classification, obtains the conjunctive word classification term vector of multiple participles, and according to multiple participle multiple participles of vector sum Conjunctive word classification term vector generates corresponding first semantic relation feature.As shown in figure 4, be the generator of the embodiment of the present invention Network architecture schematic diagram, wherein generator includes: two term vector layers (i.e. embedding1 and embedding2), two pairs To Recognition with Recurrent Neural Network (i.e. bilstm1 and bilstm2) layer, conjunctive word classification layer (i.e. connectiveclassifier), close Join word generation layer (i.e. connectivegenerator), two coding layers (i.e. encoderblock1 and encoderblock2), Alternation of bed (i.e. interaction block) and Pair expression layer (i.e. pair presentation).Wherein, term vector layer point The participle in the sentence arg1 and arg2 of sentence centering is not subjected to vector conversion, obtains corresponding term vector.Bidirectional circulating mind After network layer encodes each term vector that term vector layer inputs, it is passed to conjunctive word classification layer.Conjunctive word classification layer is used Each word is conjunctive word in judgement input arg1/arg2.Wherein conjunctive word is mainly divided into two kinds, and one is adjacent passes Connection word is indicated with group, such as " specifically ";Another kind is non-conterminous conjunctive word word, is indicated with intra, such as " a side Face ... another aspect ... ".Classifier classification is that 8 classification S-group indicate that single word is indicated as conjunctive word, B-group First word of non-single word, I-group indicate that the medium term of non-single word in group type, E-group indicate in group type The last one word of non-single word, B-intra indicate that first word of intra type conjunctive word, I-intra indicate in group type Medium term, the E-intra of intra type conjunctive word indicate that the last one word of intra type conjunctive word, O indicate dereferenced word.Association The classification of word classifier output is passed to conjunctive word generation layer and encoderblock1/ with classification term vector encoderblock2。
Two parts input that conjunctive word generation layer (i.e. connectivegenerator) combines conjunctive word classification layer to give, leads to Normal distribution stochastical sampling is crossed, a conjunctive word term vector is generated.The purpose of conjunctive word term vector is that implicit association word is known Other task is used to indicate its conjunctive word feature, enhances model robust by disturbance of data for explicit associations word identification mission Property.The conjunctive word term vector of generation is output to encoderblock1/encoderblock2 by conjunctive word generation layer.Namely It says, the two parts given respectively in connection with conjunctive word classification layer input, by normal distribution stochastical sampling, from the vector of this part A conjunctive word term vector is generated, and corresponding is output to encoderblock1 layers and encoderblock2 layers.
Output and conjunctive word of encoderblock1 layers of the input from bilstm1 layers generate term vector in coding layer Splice with conjunctive word classification term vector, output and conjunctive word of the encoderblock2 layers of input from bilstm layers generate word The splicing of vector sum conjunctive word classification term vector.Coding layer respectively encodes spliced vector.Alternation of bed is The encoderblock1 layers and encoderblock2 layers vector layer obtained by the interaction of attention mechanism.Pair expression layer be by The vector layer that multiple alternations of bed comprehensively consider, expression layer output is the basic unit sentence of input to corresponding language This vector layer is finally output to classifier and arbiter by adopted relationship characteristic.
The semantic relation feature that classifier can be exported according to generator carries out semantic relation identification, obtains corresponding semantic pass It is recognition result.Arbiter can be used for the training stage in semantic relation identification model, the semantic relation of identification and classification device output The true and false of recognition result.
S220 carries out consistency training to semantic relation identification model, the semantic relation identification model after being trained, and Semantic relation identification model after using training is as new semantic relation identification model.
In one embodiment of the invention, the semantic relation identification model further include: calibrator;Wherein, the school Quasi- device is used for the second BSR semantic unit sentence according to input to the corresponding second semantic relation feature of generation;Second base It include explicit associations word in this semantic primitive sentence pair.Wherein, in an embodiment of the present invention, described that semantic relation is identified Model carries out consistency training, and the specific implementation process of the semantic relation identification model after being trained can be as follows: described in calculating The similarity of first semantic relation feature and the second semantic relation feature;When the similarity is less than preset threshold, root The parameter of the generator is adjusted according to the parameter of the calibrator, until the similarity is greater than or equal to described preset Threshold value;The adjustment to the parameter of the generator is saved as a result, obtaining the semantic relation identification model after the training.
It should be noted that in an embodiment of the present invention, it is for instructing generator to learn which, which is appreciated that, Model.Wherein, the process of internal component of process and generator of the internal component of the calibrator is similar.For example, such as Fig. 5 institute Show, the calibrator can include: two term vector layers (i.e. embedding1 and embedding2), two bidirectional circulating neural networks (i.e. bilstm1 and bilstm2) layer, conjunctive word classification layer (i.e. connectiveclassifier), two coding layers are (i.e. Encoderblock1 and encoderblock2), alternation of bed (i.e. interaction block) and Pair expression layer (i.e. pair presentation).Wherein, each network layer included in the function of each network layer and generator included in calibrator Function is consistent, can refer to the description of the aforementioned function for each network layer included in generator, details are not described herein.Its In, the difference is that there is no conjunctive word generation layer in calibrator, this is because BSR semantic unit sentence pair used in calibrator Include display conjunctive word, i.e., there is apparent conjunctive word in the material, is classified by conjunctive word classification layer to it Corresponding conjunctive word term vector can be obtained.In this way, can will have implicit pass when being trained to semantic relation identification model The material of connection word is input in generator, obtains corresponding semantic relation feature, and will input with the material of explicit associations word Into calibrator, corresponding semantic relation feature is obtained.Later, the semantic relation feature and calibrator of generator generation can be calculated Similarity between the semantic relation feature of output, and when the similarity is less than preset threshold, according to the parameter pair of calibrator The parameter of generator is adjusted, until the similarity is greater than or equal to preset threshold, finally, saving the parameter to generator Adjustment as a result, to the semantic relation identification model after being trained.It should be noted that calibrator is to have already passed through training Model, in this way, can be adjusted to the parameter of generator by using the parameter of the calibrator as standard.
S230 obtains BSR semantic unit sentence pair to be identified.
S240 is obtained by BSR semantic unit sentence to be identified to the input as semantic relation identification model wait know The semantic relation of other BSR semantic unit sentence pair.
The semantic relation recognition methods of the embodiment of the present invention, can construct semantic relation identification model, and semantic relation identifies mould Type includes generator, classifier and arbiter, wherein generator is used for the first BSR semantic unit sentence according to input to life At corresponding first semantic relation feature;The first semantic relation feature that classifier is used to be generated according to generator carries out semantic pass System's identification, obtains corresponding semantic relation recognition result;Arbiter is used to differentiate in the training stage of semantic relation identification model The true and false of the semantic relation recognition result of classifier output;Later, consistency training is carried out to semantic relation identification model, obtained Semantic relation identification model after training.Learn conjunctive word identification mission and semantic relation simultaneously i.e. by way of combination learning Identification mission reduces the error propagation that two tasks individually learn to train semantic relation identification model in advance, and by pair Antibiosis at mode, enable the semantic relation identification model to generate association term vector to implicit relationship identification mission, can It realizes while handling explicit semantic relation identification mission and implicit semantic relation identification mission, while can also ensure that semantic relation Recognition effect.
Corresponding with the information popularization method that above-mentioned several embodiments provide, a kind of embodiment of the invention also provides one kind Information popularization device, due to the information popularization of information popularization device provided in an embodiment of the present invention and above-mentioned several embodiment offers Method is corresponding, therefore is also applied for information popularization dress provided in this embodiment in the embodiment of aforementioned information promotion method It sets, is not described in detail in the present embodiment.Fig. 6 is the structure of semantic relation identification device according to an embodiment of the invention Schematic diagram.As shown in fig. 6, the semantic relation identification device 600 may include: a sub-acquisition module 610 and identification model 620.
Specifically, sentence sub-acquisition module 610 is for obtaining BSR semantic unit sentence pair to be identified.
Identification model 620 is used for BSR semantic unit sentence to be identified to as the defeated of semantic relation identification model Enter, obtains the semantic relation of BSR semantic unit sentence pair to be identified.
It should be noted that in an embodiment of the present invention, the semantic relation identification model can include: generator divides Class device and arbiter;Wherein, generator is used for the first BSR semantic unit sentence according to input to corresponding first language of generation Adopted relationship characteristic;The first semantic relation feature progress semantic relation identification that classifier is used to be generated according to generator, obtains pair The semantic relation recognition result answered;Arbiter was used in the training stage of semantic relation identification model, the output of identification and classification device The true and false of semantic relation recognition result.
In an embodiment of the present invention, the generator is specifically used for: to the first BSR semantic unit sentence pair of input Word segmentation processing is carried out respectively obtains multiple participles;By the multiple participle carry out vector conversion, it is corresponding obtain it is multiple segment to Amount;Word classification is associated to the multiple participle according to the multiple participle vector, obtains the conjunctive word of the multiple participle Classification term vector;Corresponding first is generated according to the conjunctive word classification term vector of the multiple participle the multiple participle of vector sum Semantic relation feature.
As an example, generator is specifically used for: in conjunction with the conjunctive word classification term vector of the multiple participle, by just State is distributed stochastical sampling, generates a conjunctive word term vector;By the multiple participle vector, the association part of speech of the multiple participle Other term vector and the conjunctive word term vector are spliced;By attention mechanism determine after splicing in obtained vector word it Between the relationship that influences each other, obtain the first semantic relation feature.
Optionally, in one embodiment of the invention, as shown in fig. 7, the semantic relation identification device 600 can also wrap It includes: model training module 630.Wherein, model training module 630 is used to carry out consistency instruction to the semantic relation identification model Practice, the semantic relation identification model after being trained, and uses the semantic relation identification model after training as new semantic pass It is identification model.
Optionally, in one embodiment of the invention, semantic relation identification model further include: calibrator;Wherein, it calibrates Device is used for the second BSR semantic unit sentence according to input to the corresponding second semantic relation feature of generation;Second basic semantic It include explicit associations word in unit sentence pair.Wherein, in an embodiment of the present invention, model training module 630 is specifically used for: Calculate the similarity of the first semantic relation feature Yu the second semantic relation feature;When similarity is less than preset threshold, according to school The parameter of quasi- device is adjusted the parameter of generator, until similarity is greater than or equal to preset threshold;It saves to generator Parameter adjusts the semantic relation identification model as a result, after being trained.
The semantic relation identification device of the embodiment of the present invention can obtain basic semantic to be identified by sentence sub-acquisition module The BSR semantic unit sentence to be identified is identified mould to as semantic relation trained in advance by unit sentence pair, identification model The input of type obtains the semantic relation of the BSR semantic unit sentence pair to be identified.I.e. by way of combination learning simultaneously Learn conjunctive word identification mission and semantic relation identification mission to train semantic relation identification model in advance, so that the semanteme closes It is that identification model can be realized while handle explicit semantic relation identification mission and implicit semantic relation identification mission, while can also Enough guarantee semantic relation recognition effect.
In order to realize above-described embodiment, the invention also provides a kind of computer equipments.
Fig. 8 is the structural schematic diagram of computer equipment according to an embodiment of the invention.As shown in figure 8, the computer Equipment 800 may include: memory 810, processor 820 and be stored on memory 810 and can run on processor 820 Computer program 830 when processor 820 executes computer program 830, realizes language described in any of the above-described a embodiment of the present invention Adopted relation recognition method.
In order to realize above-described embodiment, the invention also provides a kind of computer readable storage mediums, are stored thereon with meter Calculation machine program realizes semantic relation described in any of the above-described a embodiment of the present invention when computer program is executed by processor Recognition methods.
In the description of the present invention, it is to be understood that, term " first ", " second " are used for description purposes only, and cannot It is interpreted as indication or suggestion relative importance or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the One ", the feature of " second " can explicitly or implicitly include at least one of the features.In the description of the present invention, " multiple " It is meant that at least two, such as two, three etc., unless otherwise specifically defined.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not It must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be in office It can be combined in any suitable manner in one or more embodiment or examples.In addition, without conflicting with each other, the skill of this field Art personnel can tie the feature of different embodiments or examples described in this specification and different embodiments or examples It closes and combines.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes It is one or more for realizing specific logical function or process the step of executable instruction code module, segment or portion Point, and the range of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discussed suitable Sequence, including according to related function by it is basic simultaneously in the way of or in the opposite order, Lai Zhihang function, this should be of the invention Embodiment person of ordinary skill in the field understood.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for Instruction execution system, device or equipment (such as computer based system, including the system of processor or other can be held from instruction The instruction fetch of row system, device or equipment and the system executed instruction) it uses, or combine these instruction execution systems, device or set It is standby and use.For the purpose of this specification, " computer-readable medium ", which can be, any may include, stores, communicates, propagates or pass Defeated program is for instruction execution system, device or equipment or the dress used in conjunction with these instruction execution systems, device or equipment It sets.The more specific example (non-exhaustive list) of computer-readable medium include the following: there is the electricity of one or more wirings Interconnecting piece (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory (ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable optic disk is read-only deposits Reservoir (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other are suitable Medium, because can then be edited, be interpreted or when necessary with it for example by carrying out optical scanner to paper or other media His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each section of the invention can be realized with hardware, software, firmware or their combination.Above-mentioned In embodiment, software that multiple steps or method can be executed in memory and by suitable instruction execution system with storage Or firmware is realized.It, and in another embodiment, can be under well known in the art for example, if realized with hardware Any one of column technology or their combination are realized: having a logic gates for realizing logic function to data-signal Discrete logic, with suitable combinational logic gate circuit specific integrated circuit, programmable gate array (PGA), scene Programmable gate array (FPGA) etc..
Those skilled in the art are understood that realize all or part of step that above-described embodiment method carries It suddenly is that relevant hardware can be instructed to complete by program, the program can store in a kind of computer-readable storage medium In matter, which when being executed, includes the steps that one or a combination set of embodiment of the method.
It, can also be in addition, each functional unit in each embodiment of the present invention can integrate in a processing module It is that each unit physically exists alone, can also be integrated in two or more units in a module.Above-mentioned integrated mould Block both can take the form of hardware realization, can also be realized in the form of software function module.The integrated module is such as Fruit is realized and when sold or used as an independent product in the form of software function module, also can store in a computer In read/write memory medium.
Storage medium mentioned above can be read-only memory, disk or CD etc..Although having been shown and retouching above The embodiment of the present invention is stated, it is to be understood that above-described embodiment is exemplary, and should not be understood as to limit of the invention System, those skilled in the art can be changed above-described embodiment, modify, replace and become within the scope of the invention Type.

Claims (14)

1. a kind of semantic relation recognition methods characterized by comprising
Obtain BSR semantic unit sentence pair to be identified;
By the BSR semantic unit sentence to be identified to the input as semantic relation identification model, obtain described to be identified BSR semantic unit sentence pair semantic relation.
2. semantic relation recognition methods according to claim 1, which is characterized in that the semantic relation identification model includes Generator, classifier and arbiter;Wherein,
The generator is used for the first BSR semantic unit sentence according to input to the corresponding first semantic relation feature of generation;
The first semantic relation feature progress semantic relation identification that the classifier is used to be generated according to the generator, obtains pair The semantic relation recognition result answered;
The arbiter is used to differentiate that the semantic of classifier output closes in the training stage of the semantic relation identification model It is the true and false of recognition result.
3. semantic relation recognition methods according to claim 2, which is characterized in that the method also includes:
Consistency training is carried out to the semantic relation identification model, the semantic relation identification model after being trained, and use Semantic relation identification model after training is as new semantic relation identification model.
4. semantic relation recognition methods according to claim 2, which is characterized in that the generator is specifically used for:
Multiple participles are obtained to progress word segmentation processing respectively to the first BSR semantic unit sentence of input;
The multiple participle is subjected to vector conversion, it is corresponding to obtain multiple participle vectors;
Word classification is associated to the multiple participle according to the multiple participle vector, obtains the conjunctive word of the multiple participle Classification term vector;
The corresponding first semantic pass is generated according to the conjunctive word classification term vector of the multiple participle the multiple participle of vector sum It is feature.
5. semantic relation recognition methods according to claim 4, which is characterized in that according to the multiple participle vector sum institute The conjunctive word classification term vector for stating multiple participles generates corresponding first semantic relation feature, comprising:
One conjunctive word word is generated by normal distribution stochastical sampling in conjunction with the conjunctive word classification term vector of the multiple participle Vector;
Conjunctive word term vector described in the multiple conjunctive word classifier vector sum for segmenting vector, the multiple participle is spelled It connects;
The relationship that influences each other in the vector obtained after splicing between word is determined by attention mechanism, obtains first language Adopted relationship characteristic.
6. semantic relation recognition methods according to any one of claim 3 to 5, which is characterized in that the semantic relation Identification model further include: calibrator;The calibrator is used to correspond to generation according to the second BSR semantic unit sentence of input The second semantic relation feature;It include explicit associations word in the second BSR semantic unit sentence pair;
Consistency training then is carried out to the semantic relation identification model, the semantic relation identification model after being trained, comprising:
Calculate the similarity of the first semantic relation feature Yu the second semantic relation feature;
When the similarity is less than preset threshold, adjusted according to parameter of the parameter of the calibrator to the generator It is whole, until the similarity is greater than or equal to the preset threshold;
The adjustment to the parameter of the generator is saved as a result, obtaining the semantic relation identification model after the training.
7. a kind of semantic relation identification device characterized by comprising
Sentence sub-acquisition module, for obtaining BSR semantic unit sentence pair to be identified;
Identification model, for by the BSR semantic unit sentence to be identified to the input as semantic relation identification model, Obtain the semantic relation of the BSR semantic unit sentence pair to be identified.
8. semantic relation identification device according to claim 7, which is characterized in that the semantic relation identification model includes Generator, classifier and arbiter;Wherein,
The generator is used for the first BSR semantic unit sentence according to input to the corresponding first semantic relation feature of generation;
The first semantic relation feature progress semantic relation identification that the classifier is used to be generated according to the generator, obtains pair The semantic relation recognition result answered;
The arbiter is used to differentiate that the semantic of classifier output closes in the training stage of the semantic relation identification model It is the true and false of recognition result.
9. semantic relation identification device according to claim 8, which is characterized in that described device further include:
Model training module, the semantic pass for carrying out consistency training to the semantic relation identification model, after being trained It is identification model, and uses the semantic relation identification model after training as new semantic relation identification model.
10. semantic relation identification device according to claim 8, which is characterized in that the generator is specifically used for:
Multiple participles are obtained to progress word segmentation processing respectively to the first BSR semantic unit sentence of input;
The multiple participle is subjected to vector conversion, it is corresponding to obtain multiple participle vectors;
Word classification is associated to the multiple participle according to the multiple participle vector, obtains the conjunctive word of the multiple participle Classification term vector;
The corresponding first semantic pass is generated according to the conjunctive word classification term vector of the multiple participle the multiple participle of vector sum It is feature.
11. semantic relation identification device according to claim 10, which is characterized in that the generator is specifically used for:
One conjunctive word word is generated by normal distribution stochastical sampling in conjunction with the conjunctive word classification term vector of the multiple participle Vector;
Conjunctive word term vector described in the multiple conjunctive word classifier vector sum for segmenting vector, the multiple participle is spelled It connects;
The relationship that influences each other in the vector obtained after splicing between word is determined by attention mechanism, obtains first language Adopted relationship characteristic.
12. the semantic relation identification device according to any one of claim 9 to 11, which is characterized in that the semantic pass It is identification model further include: calibrator;
The calibrator is used for the second BSR semantic unit sentence according to input to the corresponding second semantic relation feature of generation; It include explicit associations word in the second BSR semantic unit sentence pair;
Then the model training module is specifically used for:
Calculate the similarity of the first semantic relation feature Yu the second semantic relation feature;
When the similarity is less than preset threshold, adjusted according to parameter of the parameter of the calibrator to the generator It is whole, until the similarity is greater than or equal to the preset threshold;
The adjustment to the parameter of the generator is saved as a result, obtaining the semantic relation identification model after the training.
13. a kind of computer equipment characterized by comprising memory, processor and be stored on the memory and can be The computer program run on the processor, when the processor executes the computer program, realize as claim 1 to Semantic relation recognition methods described in any one of 6.
14. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program Such as semantic relation recognition methods described in any one of claims 1 to 6 is realized when being executed by processor.
CN201811624158.0A 2018-12-28 2018-12-28 Semantic relation recognition method, semantic relation recognition device, computer equipment and storage medium Active CN109598000B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811624158.0A CN109598000B (en) 2018-12-28 2018-12-28 Semantic relation recognition method, semantic relation recognition device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811624158.0A CN109598000B (en) 2018-12-28 2018-12-28 Semantic relation recognition method, semantic relation recognition device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109598000A true CN109598000A (en) 2019-04-09
CN109598000B CN109598000B (en) 2023-06-16

Family

ID=65962817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811624158.0A Active CN109598000B (en) 2018-12-28 2018-12-28 Semantic relation recognition method, semantic relation recognition device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109598000B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110188202A (en) * 2019-06-06 2019-08-30 北京百度网讯科技有限公司 Training method, device and the terminal of semantic relation identification model
CN111428525A (en) * 2020-06-15 2020-07-17 华东交通大学 Implicit discourse relation identification method and system and readable storage medium
CN111709244A (en) * 2019-11-20 2020-09-25 中共南通市委政法委员会 Deep learning method for identifying causal relationship of contradictory dispute events
CN111897929A (en) * 2020-08-04 2020-11-06 腾讯科技(深圳)有限公司 Method and device for processing multiple rounds of questions, storage medium and electronic equipment
CN113255371A (en) * 2021-07-14 2021-08-13 华东交通大学 Semi-supervised Chinese-English implicit discourse relation recognition method and system
CN113392648A (en) * 2021-06-02 2021-09-14 北京三快在线科技有限公司 Entity relationship acquisition method and device

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101916294A (en) * 2010-08-27 2010-12-15 黄斌 Method for realizing exact search by utilizing semantic analysis
CN102087669A (en) * 2011-03-11 2011-06-08 北京汇智卓成科技有限公司 Intelligent search engine system based on semantic association
CN102945230A (en) * 2012-10-17 2013-02-27 刘运通 Natural language knowledge acquisition method based on semantic matching driving
CN104462066A (en) * 2014-12-24 2015-03-25 北京百度网讯科技有限公司 Method and device for labeling semantic role
CN106777050A (en) * 2016-12-09 2017-05-31 大连海事大学 It is a kind of based on bag of words and to take into account the footwear stamp line expression and system of semantic dependency
CN107273358A (en) * 2017-06-18 2017-10-20 北京理工大学 A kind of end-to-end English structure of an article automatic analysis method based on pipe modes
CN107315737A (en) * 2017-07-04 2017-11-03 北京奇艺世纪科技有限公司 A kind of semantic logic processing method and system
CN107491534A (en) * 2017-08-22 2017-12-19 北京百度网讯科技有限公司 Information processing method and device
CN107526967A (en) * 2017-07-05 2017-12-29 阿里巴巴集团控股有限公司 A kind of risk Address Recognition method, apparatus and electronic equipment
CN107562752A (en) * 2016-06-30 2018-01-09 富士通株式会社 The method, apparatus and electronic equipment classified to the semantic relation of entity word
CN107832290A (en) * 2017-10-19 2018-03-23 中国科学院自动化研究所 The recognition methods of Chinese semantic relation and device
CN107943784A (en) * 2017-11-02 2018-04-20 南华大学 Relation extraction method based on generation confrontation network
CN108009182A (en) * 2016-10-28 2018-05-08 京东方科技集团股份有限公司 A kind of information extracting method and device
CN108520298A (en) * 2018-04-09 2018-09-11 中国民航大学 A kind of land sky call semantic consistency method of calibration based on improvement LSTM-RNN
CN108875000A (en) * 2018-06-14 2018-11-23 广东工业大学 A kind of semantic relation classification method merging more syntactic structures
CN109033073A (en) * 2018-06-28 2018-12-18 中国科学院自动化研究所 Text contains recognition methods and device
CN109086269A (en) * 2018-07-19 2018-12-25 大连理工大学 A kind of equivocacy language recognition methods indicated based on semantic resources word with Matching Relation

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101916294A (en) * 2010-08-27 2010-12-15 黄斌 Method for realizing exact search by utilizing semantic analysis
CN102087669A (en) * 2011-03-11 2011-06-08 北京汇智卓成科技有限公司 Intelligent search engine system based on semantic association
CN102945230A (en) * 2012-10-17 2013-02-27 刘运通 Natural language knowledge acquisition method based on semantic matching driving
CN104462066A (en) * 2014-12-24 2015-03-25 北京百度网讯科技有限公司 Method and device for labeling semantic role
CN107562752A (en) * 2016-06-30 2018-01-09 富士通株式会社 The method, apparatus and electronic equipment classified to the semantic relation of entity word
CN108009182A (en) * 2016-10-28 2018-05-08 京东方科技集团股份有限公司 A kind of information extracting method and device
CN106777050A (en) * 2016-12-09 2017-05-31 大连海事大学 It is a kind of based on bag of words and to take into account the footwear stamp line expression and system of semantic dependency
CN107273358A (en) * 2017-06-18 2017-10-20 北京理工大学 A kind of end-to-end English structure of an article automatic analysis method based on pipe modes
CN107315737A (en) * 2017-07-04 2017-11-03 北京奇艺世纪科技有限公司 A kind of semantic logic processing method and system
CN107526967A (en) * 2017-07-05 2017-12-29 阿里巴巴集团控股有限公司 A kind of risk Address Recognition method, apparatus and electronic equipment
CN107491534A (en) * 2017-08-22 2017-12-19 北京百度网讯科技有限公司 Information processing method and device
CN107832290A (en) * 2017-10-19 2018-03-23 中国科学院自动化研究所 The recognition methods of Chinese semantic relation and device
CN107943784A (en) * 2017-11-02 2018-04-20 南华大学 Relation extraction method based on generation confrontation network
CN108520298A (en) * 2018-04-09 2018-09-11 中国民航大学 A kind of land sky call semantic consistency method of calibration based on improvement LSTM-RNN
CN108875000A (en) * 2018-06-14 2018-11-23 广东工业大学 A kind of semantic relation classification method merging more syntactic structures
CN109033073A (en) * 2018-06-28 2018-12-18 中国科学院自动化研究所 Text contains recognition methods and device
CN109086269A (en) * 2018-07-19 2018-12-25 大连理工大学 A kind of equivocacy language recognition methods indicated based on semantic resources word with Matching Relation

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110188202A (en) * 2019-06-06 2019-08-30 北京百度网讯科技有限公司 Training method, device and the terminal of semantic relation identification model
CN111709244A (en) * 2019-11-20 2020-09-25 中共南通市委政法委员会 Deep learning method for identifying causal relationship of contradictory dispute events
CN111709244B (en) * 2019-11-20 2023-09-26 中共南通市委政法委员会 Deep learning method for identifying cause and effect relationship of contradictory dispute
CN111428525A (en) * 2020-06-15 2020-07-17 华东交通大学 Implicit discourse relation identification method and system and readable storage medium
CN111428525B (en) * 2020-06-15 2020-09-15 华东交通大学 Implicit discourse relation identification method and system and readable storage medium
CN111897929A (en) * 2020-08-04 2020-11-06 腾讯科技(深圳)有限公司 Method and device for processing multiple rounds of questions, storage medium and electronic equipment
CN113392648A (en) * 2021-06-02 2021-09-14 北京三快在线科技有限公司 Entity relationship acquisition method and device
CN113255371A (en) * 2021-07-14 2021-08-13 华东交通大学 Semi-supervised Chinese-English implicit discourse relation recognition method and system
CN113255371B (en) * 2021-07-14 2021-09-24 华东交通大学 Semi-supervised Chinese-English implicit discourse relation recognition method and system

Also Published As

Publication number Publication date
CN109598000B (en) 2023-06-16

Similar Documents

Publication Publication Date Title
CN109598000A (en) Semantic relation recognition methods, device, computer equipment and storage medium
Zadeh et al. Memory fusion network for multi-view sequential learning
CN110188202B (en) Training method and device of semantic relation recognition model and terminal
Joshi et al. COGMEN: COntextualized GNN based multimodal emotion recognitioN
CN109657230B (en) Named entity recognition method and device integrating word vector and part-of-speech vector
CN107315772B (en) The problem of based on deep learning matching process and device
CN110021308A (en) Voice mood recognition methods, device, computer equipment and storage medium
US20170286397A1 (en) Predictive Embeddings
CN107436922A (en) Text label generation method and device
US20200134398A1 (en) Determining intent from multimodal content embedded in a common geometric space
CN108985358A (en) Emotion identification method, apparatus, equipment and storage medium
US20190121842A1 (en) Content adjustment and display augmentation for communication
Chen et al. A large scale speech sentiment corpus
CN112364664B (en) Training of intention recognition model, intention recognition method, device and storage medium
CN109616101A (en) Acoustic training model method, apparatus, computer equipment and readable storage medium storing program for executing
CN110399488A (en) File classification method and device
CN117501283A (en) Text-to-question model system
CN115956242A (en) Automatic knowledge graph construction
US11250299B2 (en) Learning representations of generalized cross-modal entailment tasks
US10929453B2 (en) Verifying textual claims with a document corpus
US10616532B1 (en) Behavioral influence system in socially collaborative tools
CN110232117A (en) Sentence fluency detection method, device and terminal
CN114398902A (en) Chinese semantic extraction method based on artificial intelligence and related equipment
Siddiqi An improved Gaussian mixture hidden conditional random fields model for audio-based emotions classification
US20220043848A1 (en) Generating entity relation suggestions within a corpus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant