CN111597321A - Question answer prediction method and device, storage medium and electronic equipment - Google Patents

Question answer prediction method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN111597321A
CN111597321A CN202010651616.0A CN202010651616A CN111597321A CN 111597321 A CN111597321 A CN 111597321A CN 202010651616 A CN202010651616 A CN 202010651616A CN 111597321 A CN111597321 A CN 111597321A
Authority
CN
China
Prior art keywords
question
cluster sequence
target question
target
answer
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
Application number
CN202010651616.0A
Other languages
Chinese (zh)
Inventor
刘志煌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010651616.0A priority Critical patent/CN111597321A/en
Publication of CN111597321A publication Critical patent/CN111597321A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2465Query processing support for facilitating data mining operations in structured databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • G06F16/355Class or cluster creation or modification

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Human Computer Interaction (AREA)
  • Artificial Intelligence (AREA)
  • Fuzzy Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a method, a device, a storage medium and an electronic device for predicting question answers, wherein in the method, target question sentences are obtained; identifying entity words in target question sentences, respectively matching the target question sentences with each question cluster sequence pattern in the question cluster sequence pattern set to obtain target question cluster sequence patterns, and then determining answer type labels corresponding to the target question cluster sequence patterns; and inputting the entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns as characteristic information into a Bayesian model, and predicting to obtain the answer entity words corresponding to the target question sentences. The entity words in the target question sentences and the answer types corresponding to the target question cluster sequence patterns are mutually independent feature information, so that the feature independence requirement of the Bayes model can be met, and the accuracy of the answer entity words corresponding to the target question sentences predicted by the Bayes model in the application is higher.

Description

Question answer prediction method and device, storage medium and electronic equipment
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a method and an apparatus for predicting answers to questions, a storage medium, and an electronic device.
Background
With the rapid development of the artificial intelligence technology, the functions of the question-answering system based on the artificial intelligence technology are increasingly improved, and the question-answering system is applied to a plurality of application scenes such as intelligent customer service of a power business platform, automatic question-answering service of a search engine and the like. The existing question-answering system is mainly constructed based on a Bayesian model. Specifically, in the existing question-answering system, a plurality of word features in a question input by a user are input into a trained bayesian model, and the trained bayesian model outputs a predicted answer corresponding to the question.
However, bayesian models are constructed based on the assumption of independence of the input model features. In the existing question-answering system, a context relationship exists among a plurality of word features contained in a question, and the question-answering system is not independent features which are completely irrelevant, so that the existing question-answering system constructed based on a Bayesian model cannot well meet the assumption of feature independence, and the accuracy of answers predicted by the question-answering system is not high.
Disclosure of Invention
Based on the above shortcomings in the prior art, the present application provides a method, an apparatus, a storage medium and an electronic device for predicting a question answer, so as to improve the accuracy of an answer entity word corresponding to a target question sentence predicted by a bayesian model.
A first aspect of the present application provides a method for predicting answers to questions, including:
obtaining a target question sentence; wherein the target question sentence is composed of at least one text unit; each text unit comprises at least one continuous word;
identifying entity words in the target question sentences, respectively matching the target question sentences with each question cluster sequence pattern in the question cluster sequence pattern set to obtain target question cluster sequence patterns, and then determining answer type labels corresponding to the target question cluster sequence patterns; wherein the problem cluster sequence pattern set comprises: performing sequence pattern mining on question statement samples in the training corpus set to obtain a question cluster sequence pattern; the problem cluster sequence patterns in the problem cluster sequence pattern set are formed by sequencing text units with the support degree greater than or equal to a support degree threshold value in the problem statement samples according to the text units in the problem statement samples; the target question cluster sequence pattern is matched with the target question statement;
and inputting the entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns into a Bayesian model as characteristic information, processing the entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns by the Bayesian model, and predicting to obtain the answer entity words corresponding to the target question sentences.
Optionally, in the above method for predicting answers to questions, the method for constructing the question cluster sequence pattern set includes:
acquiring a training corpus set; wherein the corpus comprises a plurality of question and sentence samples;
deleting each text unit with the support degree smaller than the support degree threshold value from the training corpus set to obtain a filtered training corpus set;
determining each text unit with the support degree larger than or equal to the support degree threshold value in the filtered corpus set as a level 1 problem cluster sequence mode, and setting a sequence level N to be 2;
obtaining a projection corpus corresponding to each N-1-level problem cluster sequence mode; wherein, the projection corpus corresponding to the N-1 level problem cluster sequence mode comprises a suffix of the N-1 level problem cluster sequence mode intercepted from each problem statement of the filtered training corpus;
combining each text unit with the support degree greater than or equal to the support degree threshold value in the corresponding projection corpus set and the N-1-level problem cluster sequence mode corresponding to the projection corpus set into an N-level problem cluster sequence mode, increasing N by 1, and returning to execute the projection corpus set corresponding to each N-1-level problem cluster sequence mode until no text unit with the support degree greater than or equal to the support degree threshold value exists in the corresponding projection corpus set;
for every two obtained problem cluster sequence patterns, detecting whether a condition that one problem cluster sequence pattern contains the other problem cluster sequence pattern is met;
and if the condition that one problem cluster sequence pattern comprises another problem cluster sequence pattern is detected, deleting the included problem cluster sequence pattern to obtain a problem cluster sequence pattern set.
Optionally, in the method for predicting answers to questions, after the step of matching the target question statement with each question cluster sequence pattern in the question cluster sequence pattern set, the method further includes:
and if the target question sentence is not matched with each question cluster sequence pattern in the question cluster sequence pattern set, adding the target question sentence as a question sentence sample in the corpus set to the corpus set, constructing a question cluster sequence pattern set by a training prediction set added with the target question sentence sample, and returning to execute the step of respectively matching the target question sentence with each question cluster sequence pattern in the question cluster sequence pattern set.
Optionally, in the method for predicting answers to questions, before obtaining a plurality of target question sentences, and matching the target question sentences with each question cluster sequence pattern in the question cluster sequence pattern set, the method further includes:
calculating the similarity of a plurality of target question sentences, and classifying the plurality of target question sentences according to the similarity to obtain target question sentences under each class;
wherein: the matching the target question statement with each question cluster sequence pattern in the question cluster sequence pattern set to obtain a target question cluster sequence pattern includes:
and selecting one target question sentence in the target question sentences in each class to be respectively matched with each question cluster sequence pattern in the question cluster sequence pattern set to obtain the target question cluster sequence pattern corresponding to the target question sentences in each class.
Optionally, in the method for predicting answers to questions, the matching the target question statement with each question cluster sequence pattern in the question cluster sequence pattern set to obtain a target question cluster sequence pattern includes:
and respectively matching the target question sentence with each text unit in each question cluster sequence mode to obtain a question cluster sequence mode which is contained in the target question sentence and has the same text unit sequence with the target question sentence, and taking the longest question cluster sequence mode in the obtained question cluster sequence modes as the target question cluster sequence mode.
Optionally, in the method for predicting answers to questions, the step of inputting the entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns as feature information into a bayesian model, and the bayesian model processing the entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns to predict the answer entity words corresponding to the target question sentences includes:
respectively calculating mutual information of the candidate answer entity words and entity words in the target question sentences and mutual information of answer type labels corresponding to the candidate answer entity words and the target question cluster sequence mode aiming at each candidate answer entity word in the candidate answer entity word set;
for each candidate answer entity word in the candidate answer entity word set, summing the mutual information between the candidate answer entity word and the entity word in the target question sentence and the mutual information between the candidate answer entity word and the answer type label corresponding to the target question cluster sequence mode to obtain the mutual information between the candidate answer entity word and the target question sentence; wherein, the mutual information of the candidate answer entity words and the target question sentences is used for explaining the correlation between the candidate answer entity words and the target question sentences;
and selecting the maximum mutual information from the mutual information of each candidate answer entity word and the target question sentence, and taking the candidate answer entity word corresponding to the maximum mutual information as the answer entity word corresponding to the target question sentence.
Optionally, in the above method for predicting a question answer, the calculating mutual information between the candidate answer entity word and the entity word in the target question sentence includes:
substituting the candidate answer entity words and the entity words in the target question sentences into a first formula in the Bayesian model, and calculating to obtain mutual information of the candidate answer entity words and the entity words in the target question sentences;
wherein the first formula is
Figure BDA0002575170140000041
a refers to the candidate answer entity word; q1Refer to a set of entity words in the target question sentence; i (a, Q)1) The mutual information of the candidate answer entity words and the entity words in the target question sentences is obtained; q. q.siReferring to the ith entity word in the entity word set of the target question statement; n is the number of entity words in the target question sentence; p (q)iA) is the probability that the ith entity word of the target question sentence and the candidate answer entity word appear in the same question-answer pair sample together; p (q)i) The probability that the ith entity word of the target question statement appears in the feature information of all question statement samples is taken as the probability; p (a) is the probability that the candidate answer entity word appears in the answer entity words corresponding to all question sentence samples; the question-answer pair sample consists of the question statement sample and answer entity words corresponding to the question statement sample; p (q)i,a)、P(qi) And P (a) are obtained by carrying out statistical calculation on a plurality of question-answer pair samples;
the calculating the mutual information of the candidate answer entity words and the answer type labels corresponding to the target question cluster sequence mode comprises:
substituting the candidate answer entity word and the answer type label corresponding to the target question cluster sequence pattern into a second formula in the Bayesian model, and calculating to obtain mutual information of the candidate answer entity word and the answer type label corresponding to the target question cluster sequence pattern;
wherein the second formula is
Figure BDA0002575170140000051
a refers to the candidate answer entity word; q. q.s2Referring to an answer type label corresponding to the target question cluster sequence pattern; i (a, q)2) The mutual information of the candidate answer entity words and answer type labels corresponding to the target question cluster sequence mode is obtained; p (q)2A) is the probability that the answer type label corresponding to the target question cluster sequence mode and the candidate answer entity word appear in the same question-answer pair sample together; p (q)2) The probability that answer type labels corresponding to the target question cluster sequence mode appear in the feature information of all question statement samples is obtained; p (a) is the probability that the candidate answer entity word appears in the answer entity words corresponding to all question sentence samples; the question-answer pair sample consists of the question statement sample and answer entity words corresponding to the question statement sample; p (q)2,a)、P(q2) And P (a) are obtained by carrying out statistical calculation on a plurality of question-answer pair samples.
A second aspect of the present application discloses a device for predicting answers to questions, comprising:
a first acquisition unit configured to acquire a target question sentence; wherein the target question sentence is composed of at least one text unit; each text unit comprises at least one continuous word;
the recognition unit is used for recognizing entity words in the target question sentences, matching the target question sentences with each question cluster sequence pattern in the question cluster sequence pattern set to obtain target question cluster sequence patterns, and then determining answer type labels corresponding to the target question cluster sequence patterns; wherein the problem cluster sequence pattern set comprises: performing sequence pattern mining on question statement samples in the training corpus set to obtain a question cluster sequence pattern; the problem cluster sequence patterns in the problem cluster sequence pattern set are formed by sequencing text units with the support degree greater than or equal to a support degree threshold value in the problem statement samples according to the text units in the problem statement samples; the target question cluster sequence pattern is matched with the target question statement;
and the predicting unit is used for inputting the entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns into a Bayesian model as characteristic information, processing the entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns by the Bayesian model, and predicting to obtain the answer entity words corresponding to the target question sentences.
Optionally, in the apparatus for predicting answers to questions, the apparatus further includes:
the second acquisition unit is used for acquiring the training corpus set; wherein the corpus comprises a plurality of question and sentence samples;
the filtering unit is used for deleting each text unit with the support degree smaller than the support degree threshold value from the training corpus set to obtain a filtered training corpus set;
a determining unit, configured to determine each text unit in the filtered corpus with a support degree greater than or equal to the support degree threshold as a level 1 problem cluster sequence mode, and set a sequence level N to 2;
the third acquisition unit is used for acquiring a projection corpus corresponding to each N-1-level problem cluster sequence mode; wherein, the projection corpus corresponding to the N-1 level problem cluster sequence mode comprises a suffix of the N-1 level problem cluster sequence mode intercepted from each problem statement of the filtered training corpus;
a combining unit, configured to combine each text unit whose support degree in the corresponding projection corpus is greater than or equal to the support degree threshold value and the N-1-level problem cluster sequence mode corresponding to the projection corpus into an N-level problem cluster sequence mode, and increment N by 1, and then return to the third obtaining unit to execute the obtaining of the projection corpus corresponding to each N-1-level problem cluster sequence mode until there is no text unit whose support degree in the corresponding projection corpus is greater than or equal to the support degree threshold value;
a detecting unit, configured to detect, for every two obtained problem cluster sequence patterns, whether a condition that one problem cluster sequence pattern includes another problem cluster sequence pattern is satisfied;
and deleting the included problem cluster sequence patterns to obtain a problem cluster sequence pattern set if the condition that one problem cluster sequence pattern includes another problem cluster sequence pattern is detected to be met.
Optionally, in the apparatus for predicting answers to questions, the apparatus further includes:
and the adding unit is used for taking the target question sentence as a question sentence sample in the corpus and adding the target question sentence as the question sentence sample in the corpus if the target question sentence is not matched with each question cluster sequence pattern in the question cluster sequence pattern set, constructing a question cluster sequence pattern set by a training expectation set added with the target question sentence sample, and returning the question cluster sequence pattern set to the identifying unit to execute the matching of the target question sentence with each question cluster sequence pattern in the question cluster sequence pattern set.
Optionally, in the apparatus for predicting answers to questions, the apparatus further includes:
the first calculation unit is used for calculating the similarity of a plurality of target question sentences and classifying the plurality of target question sentences according to the similarity to obtain target question sentences under each class;
wherein, the identification unit is configured to perform matching on the target question statement and each question cluster sequence pattern in the question cluster sequence pattern set, to obtain a target question cluster sequence pattern, and is configured to:
and selecting one target question sentence in the target question sentences in each class to be respectively matched with each question cluster sequence pattern in the question cluster sequence pattern set to obtain the target question cluster sequence pattern corresponding to the target question sentences in each class.
Optionally, in the apparatus for predicting answers to questions, the identifying unit is configured to, when the target question sentence is matched with each question cluster sequence pattern in the question cluster sequence pattern set to obtain a target question cluster sequence pattern,:
and respectively matching the target question sentence with each text unit in each question cluster sequence mode to obtain a question cluster sequence mode which is contained in the target question sentence and has the same text unit sequence with the target question sentence, and taking the longest question cluster sequence mode in the obtained question cluster sequence modes as the target question cluster sequence mode.
Optionally, in the above apparatus for predicting answers to questions, the prediction unit includes:
the first calculating subunit is configured to calculate, for each candidate answer entity word in the candidate answer entity word set, mutual information between the candidate answer entity word and an entity word in the target question sentence, and mutual information between the candidate answer entity word and an answer type tag corresponding to the target question cluster sequence pattern;
a second calculating subunit, configured to sum, for each candidate answer entity word in the candidate answer entity word set, mutual information between the candidate answer entity word and an entity word in the target question sentence and mutual information between the candidate answer entity word and an answer type tag corresponding to the target question cluster sequence pattern, so as to obtain mutual information between the candidate answer entity word and the target question sentence; wherein, the mutual information of the candidate answer entity words and the target question sentences is used for explaining the correlation between the candidate answer entity words and the target question sentences;
and the selecting subunit is used for selecting the maximum mutual information from the mutual information of each candidate answer entity word and the target question sentence, and taking the candidate answer entity word corresponding to the maximum mutual information as the answer entity word corresponding to the target question sentence.
Optionally, in the apparatus for predicting answers to questions, the first calculating subunit, when performing the calculation of mutual information between the candidate answer entity word and the entity word in the target question sentence, is configured to:
substituting the candidate answer entity words and the entity words in the target question sentences into a first formula in the Bayesian model, and calculating to obtain mutual information of the candidate answer entity words and the entity words in the target question sentences;
wherein the first formula is
Figure BDA0002575170140000081
a refers to the candidate answer entity word; q1Refer to a set of entity words in the target question sentence; i (a, Q)1) The mutual information of the candidate answer entity words and the entity words in the target question sentences is obtained; q. q.siReferring to the ith entity word in the entity word set of the target question statement; n is the number of entity words in the target question sentence; p (q)iA) is the probability that the ith entity word of the target question sentence and the candidate answer entity word appear in the same question-answer pair sample together; p (q)i) The probability that the ith entity word of the target question statement appears in the feature information of all question statement samples is taken as the probability; p (a) is the probability that the candidate answer entity word appears in the answer entity words corresponding to all question sentence samples; the question-answer pair sample consists of the question statement sample and answer entity words corresponding to the question statement sample; p (q)i,a)、P(qi) And P (a) are obtained by carrying out statistical calculation on a plurality of question-answer pair samples;
the first calculating subunit, when performing the calculation of the mutual information between the candidate answer entity word and the answer type label corresponding to the target question cluster sequence pattern, is configured to:
substituting the candidate answer entity word and the answer type label corresponding to the target question cluster sequence pattern into a second formula in the Bayesian model, and calculating to obtain mutual information of the candidate answer entity word and the answer type label corresponding to the target question cluster sequence pattern;
wherein the second formula is
Figure BDA0002575170140000082
a refers to the candidate answer entity word; q. q.s2Referring to an answer type label corresponding to the target question cluster sequence pattern; i (a, q)2) The mutual information of the candidate answer entity words and answer type labels corresponding to the target question cluster sequence mode is obtained; p (q)2A) is the probability that the answer type label corresponding to the target question cluster sequence mode and the candidate answer entity word appear in the same question-answer pair sample together; p (q)2) The probability that answer type labels corresponding to the target question cluster sequence mode appear in the feature information of all question statement samples is obtained; p (a) is the probability that the candidate answer entity word appears in the answer entity words corresponding to all question sentence samples; the question-answer pair sample consists of the question statement sample and answer entity words corresponding to the question statement sample; p (q)2,a)、P(q2) And P (a) are obtained by carrying out statistical calculation on a plurality of question-answer pair samples.
A third aspect of the present application discloses a computer storage medium storing a program for implementing the method for predicting answers to questions as set forth in any one of the first aspects above when the program is executed.
A fourth aspect of the present application discloses an electronic device comprising a memory and a processor;
wherein the memory is used for storing programs;
the processor is configured to execute the program, and when the program is executed, the program is specifically configured to implement the method for predicting answers to questions according to any one of the first aspect.
According to the technical scheme, in the method for predicting the answer to the question provided by the embodiment of the application, the entity words in the target question sentences can be identified, and the corresponding answer type labels are determined through the target question cluster sequence mode. In the embodiment of the application, the entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns are used as characteristic information and input into the Bayes model, and the Bayes model processes the entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns to predict and obtain the answer entity words corresponding to the target question sentences. The entity words in the target question sentences and the answer types corresponding to the target question cluster sequence patterns are mutually independent feature information, and the feature independence requirements of the Bayesian model can be met, so that the accuracy of the answer entity words corresponding to the target question sentences predicted by the Bayesian model in the embodiment of the application is higher.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flowchart illustrating a method for predicting answers to questions according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a method for constructing a problem cluster sequence pattern set according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a method for constructing an entity tagging model according to an embodiment of the present application;
fig. 4 is a schematic flowchart illustrating a method for predicting answer entity words corresponding to answers to a target question according to an embodiment of the present disclosure;
fig. 5 is a flowchart illustrating another method for predicting answer entity words corresponding to answers to a target question according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an apparatus for predicting answers to questions provided in the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In this application, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Natural language processing is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that enable efficient communication between humans and computers using natural language. Natural language processing is a science integrating linguistics, computer science and mathematics. Therefore, the research in this field will involve natural language, i.e. the language that people use everyday, so it is closely related to the research of linguistics. Natural language processing techniques typically include text processing, semantic understanding, machine translation, robotic question and answer, knowledge mapping, and the like.
The intelligent question-answering system belongs to an important application in the field of natural language processing, and is widely applied to a plurality of application scenes such as intelligent customer service of a e-commerce platform, automatic question-answering service of a search engine and the like. The existing question-answering system is mainly constructed based on a Bayesian model. Specifically, in the existing question-answering system, a plurality of word features in a question input by a user are input into a trained bayesian model, and the trained bayesian model outputs a predicted answer corresponding to the question.
However, bayesian models are constructed based on the assumption of independence of the input model features. In the existing question-answering system, a context relationship exists among a plurality of word features contained in a question, and the question-answering system is not independent features which are completely irrelevant, so that the existing question-answering system constructed based on a Bayesian model cannot well meet the assumption of feature independence, and the accuracy of answers predicted by the question-answering system is not high.
In view of the above problems, embodiments of the present application provide a method and an apparatus for predicting answers to questions, a storage medium, and an electronic device, so as to improve accuracy of predicting answer entity words.
Referring to fig. 1, an embodiment of the present application provides a method for predicting answers to questions, which specifically includes the following steps:
s101, obtaining a target question statement.
The target question sentence is composed of at least one text unit, and each text unit comprises at least one continuous word. The text units may be words or phrases. There may be 1 or a plurality of target question sentences acquired in step S101. The target question sentence refers to a question sentence that needs to be answered. For example, if the embodiment of the present application is applied to an automatic question and answer customer service of an e-commerce platform, the obtained target question statement refers to a question statement that a client of the e-commerce platform proposes to the automatic question and answer customer service, and if the embodiment of the present application is applied to an automatic response service in a search engine, the target question statement is a question statement that a user using the search engine inputs.
S102, identifying entity words in the target question sentences, respectively matching the target question sentences with each question cluster sequence pattern in the question cluster sequence pattern set to obtain target question cluster sequence patterns, and then determining answer type labels corresponding to the target question cluster sequence patterns.
Wherein, the problem cluster sequence pattern set comprises: and (4) carrying out sequence pattern mining on the question statement samples in the training corpus set to obtain a question cluster sequence pattern. The problem cluster sequence patterns in the problem cluster sequence pattern set are composed of text units with the support degree larger than or equal to a support degree threshold value in the problem statement samples according to the sequence of the text units in the problem statement samples, and the target problem cluster sequence patterns are matched with the target problem statements.
The corpus set contains a plurality of question sentence samples, the more the number of question sentence samples in the corpus set is, the more the number of question cluster sequence patterns mined by the corpus set is, and the easier the target question sentences are matched from the question cluster sequence patterns set to obtain the target question cluster sequence patterns. The support of a text unit refers to the number of samples of the text unit appearing in question sentence samples in the corpus. The support threshold may be set according to the number of problem statement samples in the corpus. For example, the support threshold may be set to be the product of the number of problem statement samples in the corpus and the support threshold, and the support threshold may be set manually.
Because the question cluster sequence pattern is composed of text units with the support degree greater than or equal to the support degree threshold value in the question statement sample and is sequenced according to the text units in the question statement sample, one question cluster sequence pattern mined from the training corpus can represent all answer type labels which are commonly corresponding to the question statements matched with the question cluster sequence pattern. Therefore, the target question statement is respectively matched with each question cluster sequence pattern in the question cluster sequence pattern set, and if the target question statement can be matched with the question cluster sequence patterns from the question cluster sequence pattern set, the matched question cluster sequence patterns are used as the target question cluster sequence patterns. And then, determining an answer type label corresponding to the target question cluster sequence mode, wherein the answer type label corresponding to the target question cluster sequence mode refers to the answer type label corresponding to the target question statement. The answer type label is used for reflecting the type of the answer entity word corresponding to the target question sentence.
The entities are names of people, organizations, places, and other entities identified by names in sentences, and the broader entities include numbers, dates, currencies, addresses, and the like. For example, the target question sentence is whose song the celadon is, and the solid word in the target question sentence is "the celadon". There are many ways to identify the entity words in the target problem statement, and the difference in the ways to identify the entity words in the target problem statement does not affect the implementation of the embodiment of the present application.
Optionally, referring to fig. 2, in an embodiment of the present application, a method for constructing a problem cluster sequence pattern set includes:
s201, obtaining a training corpus set.
The corpus comprises a plurality of question and sentence samples. The problem statement sample with the concentrated training corpus can be collected from problem statements provided by customers of the e-commerce platform, can also be collected from problem statements searched by a user in a search engine, can also be directly collected by a web crawler, and the like. The larger the number of question sentence samples included in the corpus set is, the higher the probability that a target question cluster sequence pattern matched with a target question sentence exists in the finally obtained question cluster sequence pattern set is.
S202, deleting each text unit with the support degree smaller than the support degree threshold value from the training corpus set to obtain the filtered training corpus set.
Text units with a support degree less than the support degree threshold belong to less frequent text units appearing in the corpus, so that the text units can be filtered out.
For example, the corpus may be as shown in table one below:
watch 1
Question sentence sample 1 Product of which company A live broadcasts are
Question sentence sample 2 Which company B is software
Question sentence sample 3 Which year the video was released
Question sentence sample 4 D is the product released in the year
Question sentence sample 5 Whose work the blue and white porcelain is
Question sentence sample 6 Whose song the blue and white porcelain is
If a word is used as a text unit and the support threshold is set to 2, the text unit with the support greater than or equal to 2 in all the text units in the corpus set shown in table one is shown in table two:
watch two
Figure BDA0002575170140000131
The text units shown in the second form in the corpus shown in the first form are retained, and the text units with the support degree smaller than 2 are deleted, so that the obtained filtered corpus is shown in the third form.
Watch III
Is the product of which company
Which company is
Is released in which year
Which year the product was released
Whose blue and white porcelain is
Whose blue and white porcelain is
S203, determining each text unit with the support degree larger than or equal to the support degree threshold value in the filtered corpus set as a 1-level problem cluster sequence mode, and setting the sequence level N as 2.
If the filtered corpus is shown in table three, then each text unit in the filtered corpus with a support degree greater than or equal to the support degree threshold is shown in table two, and the text units shown in table two are all 1-level problem cluster sequence patterns.
S204, obtaining a projection corpus corresponding to each N-1-level problem cluster sequence mode.
The projection corpus corresponding to the N-1 level problem cluster sequence mode comprises suffixes of the N-1 level problem cluster sequence mode obtained by intercepting each problem statement of the filtered training corpus.
For example, when N is 2, the suffix of the level 1 problem cluster sequence pattern truncated from the filtered corpus set shown in table three is shown in table four below:
watch four
Figure BDA0002575170140000141
Figure BDA0002575170140000151
S205, combining each text unit with the support degree larger than or equal to the support degree threshold value in the corresponding projection corpus set and the N-1-level problem cluster sequence mode corresponding to the projection corpus set into an N-level problem cluster sequence mode, increasing N by 1, and returning to execute the operation of obtaining the projection corpus set corresponding to each N-1-level problem cluster sequence mode until no text unit with the support degree larger than or equal to the support degree threshold value in the corresponding projection corpus set exists.
Assuming that N is 2, taking "yes" as an example of the level 1 problem cluster sequence pattern shown in table four, yes "is a combined level 2 problem cluster sequence pattern of the text unit with the support degree greater than or equal to the support degree threshold in the corresponding projection corpus and the level 1 problem cluster sequence pattern corresponding to the projection corpus, as shown in table five below: watch five
Level 2 problem cluster sequence pattern
Which is which one
Is where
Is a company
Is
Who is
Is to issue
Is a product
Is year
Combining the problem cluster sequence patterns into N-level problem cluster sequence patterns, increasing N by 1, and returning to the step S204 for obtaining the projection corpus corresponding to each N-1-level problem cluster sequence pattern until no text unit with the support degree larger than or equal to the support degree threshold exists in the corresponding projection corpus. When the corresponding projection corpus does not have a text unit with the support degree larger than or equal to the support degree threshold value in the corresponding projection corpus, a problem cluster sequence mode of multiple levels is obtained through mining.
S206, aiming at every two obtained problem cluster sequence patterns, whether a condition that one problem cluster sequence pattern contains the other problem cluster sequence pattern is met or not is detected.
Wherein, one question cluster sequence pattern includes another question cluster sequence pattern, which means that each text unit in one question cluster sequence pattern can be found in another question cluster sequence pattern, and the text units in the two question cluster sequence patterns are in consistent ordering. For example, if there are two problem cluster sequence patterns, namely "which issue is" and "which issue is", the problem cluster sequence pattern for which issue is detected to include the problem cluster sequence pattern for "which issue".
S207, if the condition that one problem cluster sequence pattern contains another problem cluster sequence pattern is detected, deleting the contained problem cluster sequence pattern to obtain a problem cluster sequence pattern set.
If it is detected that the condition that one problem cluster sequence pattern includes another problem cluster sequence pattern is satisfied, it is considered that the included problem cluster sequence pattern includes less information and can be deleted. The problem cluster sequence pattern set is obtained after deleting the included problem cluster sequence patterns from the problem cluster sequence patterns obtained in step S205.
Optionally, in a specific embodiment of the present application, after the step S207 is executed, the method further includes:
and deleting the entity words in the problem cluster sequence pattern set to obtain the filtered problem cluster sequence pattern set.
The question cluster sequence patterns in the filtered question cluster sequence pattern set can represent answer type labels (such as time, people, places and the like) which are commonly possessed by a plurality of corresponding questions. When step S102 is executed, the target question sentence is respectively matched with each question cluster sequence pattern in the filtered question cluster sequence pattern set to obtain a target question cluster sequence pattern, and then an answer type tag corresponding to the target question cluster sequence pattern is determined.
Optionally, in a specific embodiment of the present application, the entity tagging model may be used to tag entity words in the target question sentence, and then combine text units tagged by the entity tagging model in sequence to obtain the entity words in the target question sentence. The entity labeling model can be obtained by training a Bi-directional Long Short-Term Memory network (Bi-directional Long Short-Term Memory) -Conditional Random Field (CRF) model through a plurality of statement samples containing entity words in a training sample set.
Optionally, in a specific embodiment of the present application, inputting the target question statement into the entity tagging model, and identifying the entity word in the target question statement by the entity tagging model may include:
and inputting the vector corresponding to each text unit in the target question sentence into the entity marking model, and marking the label corresponding to each text unit by the entity marking model. And then selecting the text units of which the labels belong to the entity words according to the labels corresponding to the text units, and combining the selected text units according to the positions of the entity words explained in the labels corresponding to the selected text units to obtain the entity words in the target question sentence.
The label corresponding to the text unit is used for explaining whether the text unit belongs to the entity word or not and the position of the text unit in the entity word. For example, the entity tagging may be performed using a five-digit tagging method. That is, if a text unit refers to a word, a text unit that does not belong to a physical word may be marked with a first label, a text unit that belongs to a physical word and is located at a front position in the physical word may be marked with a second label, a text unit that belongs to a physical word and is located at a middle position in the physical word may be marked with a third label, a text unit that belongs to a physical word and is located at a rear position in the physical word may be marked with a fourth label, and a text unit that belongs to a physical word and is a single word may be marked with a fifth label.
For example, a sentence is "Tom is a small and clear friend", a vector corresponding to each text unit in the sentence is input into an entity tagging model, that is, x1, x2, x3, x4, x5, x6, and x7 vectors corresponding to 7 text units in the sentence are input into the entity tagging model in order of the text units, the entity tagging model uses a second tag for x1, uses a fourth tag for x2, uses a first tag for x3, x4, x5, and x6, and uses a fifth tag for x 7. Selecting text units of which the labels belong to the entity words, namely selecting x1, x2 and x7, and then combining according to the position of the entity words stated in the labels, namely combining x1 and x2 into one entity word, namely Xiaoming, and x7 is one entity word, namely Tom, so that the entity words in the sentence are Xiaoming and Tom.
It should be noted that there are many methods for marking the target question statement by the entity marking model, such as a three-bit marking method, a four-bit marking method, and the like, and the implementation of the embodiment of the present application is not affected by the difference of the methods for marking the target question statement by the entity marking model.
Optionally, referring to fig. 3, in an embodiment of the present application, a method for constructing an entity tagging model includes:
s301, constructing a training sample set.
The training sample set comprises a plurality of sentence samples containing entity words. The sentence samples in the training sample set may be question sentences or non-question sentences, or may include both question sentence samples and non-question sentence samples. The more sentence samples in the training sample set, the higher the marking accuracy of the entity marking model obtained by final training.
S302, for each statement sample in the training sample set, pre-marking a label corresponding to each text unit in the statement sample.
The label corresponding to the text unit is used for explaining whether the text unit belongs to the entity word or not and the position of the text unit in the entity word. The specific method for pre-marking the statement sample can be a five-bit marking method, a four-bit marking method, a three-bit marking method and the like.
S303, inputting the sentence sample into the BLSTM-CRF model aiming at each sentence sample in the training sample set, and marking a label corresponding to each text unit in the sentence sample by the BLSTM-CRF model.
Specifically, a vector corresponding to each text unit in the sample sentence is input into the BLSTM-CRF, and a label corresponding to each text unit in the sentence sample is marked by the BLSTM-CRF model.
S304, continuously adjusting parameters in the BLSTM-CRF model according to the error between the label corresponding to each text unit marked by the BLSTM-CRF model and the label corresponding to each text unit marked in advance until the error between the label corresponding to each text unit marked by the adjusted BLSTM-CRF model and the label corresponding to each text unit marked in advance meets a preset convergence condition, and determining the adjusted BLSTM-CRF model as an entity marking model.
That is, the label corresponding to each text unit output in step S303 is compared with the label corresponding to the pre-marked text unit output in step S302, so as to obtain an error. And then continuously adjusting parameters in the BLSTM-CRF model by using errors, so that the error between the label corresponding to each text unit marked by the BLSTM-CRF model and the label corresponding to each corresponding pre-marked text unit is gradually reduced until the error between the label corresponding to each text unit marked by the adjusted BLSTM-CRF model and the label corresponding to each pre-marked text unit meets a preset convergence condition, and determining the adjusted BLSTM-CRF model as an entity marking model.
Optionally, in a specific embodiment of the present application, after the step of performing matching between the target question statement and each question cluster sequence pattern in the question cluster sequence pattern set in step S102 is executed, the method further includes:
and if the target question sentence is not matched with each question cluster sequence pattern in the question cluster sequence pattern set, adding the target question sentence as a question sentence sample in the corpus set to the corpus set, constructing a question cluster sequence pattern set by a training expectation set added with the target question sentence sample, and returning to execute the step S102 to match the target question sentence with each question cluster sequence pattern in the question cluster sequence pattern set.
Specifically, if the target question sentence is not matched with each question cluster sequence pattern in the question cluster sequence pattern set, it is proved that the question cluster sequence pattern which can be matched with the target question sentence is not found out from the question sentence samples in the corpus, so that the target question sentence is required to be added to the corpus as the question sentence sample in the corpus, the embodiment shown in fig. 2 is executed on the corpus to which the target question sentence is added again, and the question cluster sequence pattern set is constructed. Since the reconstructed problem cluster sequence pattern set is obtained by mining the corpus to which the target problem statement is added, a problem cluster sequence pattern matched with the target problem statement exists in the problem cluster sequence pattern set, and therefore, the step of matching the target problem statement with each problem cluster sequence pattern in the problem cluster sequence pattern set in step S102 may be performed in return.
Optionally, in an embodiment of the present application, if multiple target question sentences are obtained in step S101, before the step S102 of matching the target question sentences with each question cluster sequence pattern in the question cluster sequence pattern set is performed to obtain the target question cluster sequence pattern, the method further includes:
and calculating the similarity of the target question sentences, and classifying the target question sentences according to the similarity to obtain the target question sentences of each class.
Specifically, for every two target question sentences, the similarity between the two target question sentences is calculated, and the two target question sentences with the similarity higher than the threshold are classified into one category. The similarity between two target question sentences is used to explain the degree of similarity between the two target question sentences. If the similarity between two target question sentences is higher than the threshold, it indicates that the answer type labels reflected by the two target question sentences should also be the same, so that they can be classified into one category.
The step of executing the step S102 of matching the target question statement with each question cluster sequence pattern in the question cluster sequence pattern set to obtain the target question cluster sequence pattern includes:
and selecting one target question sentence in the target question sentences in each class to be respectively matched with each question cluster sequence pattern in the question cluster sequence pattern set to obtain the target question cluster sequence pattern corresponding to the target question sentences in each class.
Because the target question sentences in the same class have the same answer type, and the matching of the target question sentences with the question cluster sequence patterns is to determine the answer type labels, for the classified target question sentences, only one target question sentence in the target question sentences in each class needs to be selected to be matched with each question cluster sequence pattern in the question cluster sequence pattern set, and all the target question sentences do not need to be matched with the question cluster sequence pattern set. The target problem cluster sequence pattern that matches one of the target problem statements under a category matches each of the target problem statements under the category.
Optionally, in a specific embodiment of the present application, the step of performing matching between the target question statement and each question cluster sequence pattern in the question cluster sequence pattern set in step S102 to obtain a target question cluster sequence pattern includes:
and respectively matching the target question sentences with each text unit in each question cluster sequence pattern to obtain the question cluster sequence patterns of which each text unit is contained in the target question sentences and the text unit sequence is consistent with the target question sentences, and taking the longest question cluster sequence pattern in the obtained question cluster sequence patterns as the target question cluster sequence pattern.
And respectively matching the target question sentence with each text unit in each question cluster sequence mode to obtain a question cluster sequence mode, wherein each text unit is contained in the target question sentence, and the sequence of the text unit is consistent with that of the target question sentence, namely the target question sentence contains the question cluster sequence mode. If there are a plurality of problem cluster sequence patterns included in the target problem statement, the longest problem cluster sequence pattern among the plurality of problem cluster sequence patterns is set as the target problem cluster sequence pattern. For example, the target question sentence "a is a product of which company" is matched with each text unit in each question cluster sequence pattern, and finally, the matching results that each text unit is included in the target question sentence, and the question cluster sequence pattern with the text unit ordering consistent with the target question sentence has "which company" and "which company product". Then the "which company's product" is the longest problem cluster sequence pattern among them is selected as the target problem cluster sequence pattern. The longest problem cluster sequence pattern reflects the most problem information, and is therefore more suitable as the target problem cluster sequence pattern.
Optionally, one embodiment of determining the answer type label corresponding to the target question cluster sequence pattern is as follows: and marking each question cluster sequence pattern in the question cluster sequence pattern set with a corresponding answer type label in advance. For example, the question cluster sequence pattern of "which company is the product" is reflected with an answer type label of "company", that is, the answer asked by the question cluster sequence pattern belongs to the company type, and the answer asked by the question cluster sequence pattern of "which year is issued" belongs to the time type, so the corresponding answer type label is "time". After each question cluster sequence pattern in the question cluster sequence pattern set is labeled with a corresponding answer type label in advance, the answer type label labeled by the target question cluster sequence pattern can be determined, and then the answer type corresponding to the target question statement is determined.
Optionally, another embodiment of determining an answer type label corresponding to the target question cluster sequence pattern includes:
and inputting the question cluster sequence mode corresponding to the target question sentence into the answer type classification model to obtain an answer type label corresponding to the target question sentence.
The answer type classification model is obtained by training a plurality of question sentence samples which are marked with answer type labels in advance. Specifically, the answer type classification model for classification can be constructed by using algorithms such as decision trees, logistic regression, naive bayes, neural networks and the like.
In the prior art, the answer type tag corresponding to the target question statement is determined mainly by identifying the corresponding answer type tag through a grammatical relationship in the target question statement. In the method, the grammatical relation of each target question sentence needs to be identified, and then the corresponding answer type label can be obtained, so that the efficiency of determining the answer type label is low.
In the embodiment of the application, the answer type labels are determined through the target question cluster sequence mode, and the corresponding answer type labels of the question sentences matched with the same question cluster sequence mode are the same, so that each question sentence does not need to be identified, and the efficiency of determining the answer type labels is improved.
S103, inputting the entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns into a Bayes model as characteristic information, processing the entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns by the Bayes model, and predicting to obtain the answer entity words corresponding to the target question sentences.
The entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns are two types of completely independent feature information which can reflect the relevant features of the answer entity words corresponding to the target question sentences, but the entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns are not relevant. Therefore, the entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns are used as the feature information, so that the feature independence assumption of the Bayesian model can be met, and the accuracy of the answer entity words corresponding to the predicted target question sentences is higher.
Optionally, referring to fig. 4, in an embodiment of the present application, an implementation manner of executing step S103 includes:
s401, aiming at each candidate answer entity word in the candidate answer entity word set, mutual information of the candidate answer entity word and an entity word in the target question sentence and mutual information of an answer type label corresponding to the candidate answer entity word and the target question cluster sequence mode are calculated respectively.
And the mutual information of the candidate answer entity words and the entity words in the target question sentence is used for explaining the correlation between the candidate answer entity words and the entity words in the target question sentence. The mutual information of the candidate answer entity words and the answer type labels corresponding to the target question cluster sequence mode is used for explaining the correlation between the candidate answer entity words and the answer type labels corresponding to the target question cluster sequence mode. The candidate answer entity word set comprises a plurality of candidate answer entity words. If the candidate answer entity word is the entity word corresponding to the target question sentence, the correlation between the candidate answer entity word and the entity word in the target question sentence is relatively high, and the correlation between the candidate answer entity word and the answer type label corresponding to the target question cluster sequence pattern is also relatively high.
Optionally, in an embodiment of the present application, the calculating mutual information between the candidate answer entity words and the entity words in the target question sentences includes:
and substituting the candidate answer entity words and the entity words in the target question sentences into a first formula in a Bayesian model, and calculating to obtain mutual information of the candidate answer entity words and the entity words in the target question sentences.
Wherein the first formulaIs composed of
Figure BDA0002575170140000221
a denotes a candidate answer entity word, Q1Refers to a set of entity words, I (a, Q), in a target question sentence1) For mutual information of the candidate answer entity words and the entity words in the target question sentence, qiThe ith entity word in the entity word set referring to the target question sentence, n is the number of entity words in the target question sentence, P (q)iA) is the probability that the ith entity word of the target question sentence and the candidate answer entity word appear in the same question-answer pair sample together, P (q)i) The probability that the ith entity word of the target question statement appears in the feature information of all question statement samples, and p (a) is the probability that the candidate answer entity word appears in the answer entity words corresponding to all question statement samples. The question-answer pair sample consists of a question statement sample and answer entity words corresponding to the question statement sample. P (q)i,a)、P(qi) And P (a) are obtained by carrying out statistical calculation on a plurality of question and answer pair samples.
Optionally, in an embodiment of the present application, the calculating mutual information between the candidate answer entity word and the answer type tag corresponding to the target question cluster sequence pattern includes:
and substituting the candidate answer entity word and the answer type label corresponding to the target question cluster sequence pattern into a second formula in the Bayesian model, and calculating to obtain the mutual information of the candidate answer entity word and the answer type label corresponding to the target question cluster sequence pattern.
Wherein the second formula is
Figure BDA0002575170140000222
a denotes a candidate answer entity word, q2An answer type label, I (a, q), corresponding to the target question cluster sequence pattern2) For mutual information of answer type labels corresponding to candidate answer entity words and target question cluster sequence patterns, P (q)2A) answer type labels corresponding to target question cluster sequence patterns andprobability that entity words of candidate answers appear together in the same question-answer pair sample, P (q)2) The probability that the answer type label corresponding to the target question cluster sequence mode appears in the feature information of all question statement samples, and p (a) is the probability that the candidate answer entity word appears in the answer entity words corresponding to all question statement samples. The question-answer pair sample consists of question sentence sample and answer entity word corresponding to the question sentence sample, P (q)2,a)、P(q2) And P (a) are obtained by carrying out statistical calculation on a plurality of question-answer pair samples.
S402, aiming at each candidate answer entity word in the candidate answer entity word set, summing the mutual information of the candidate answer entity word and the entity word in the target question sentence and the mutual information of the candidate answer entity word and the answer type label corresponding to the target question cluster sequence mode to obtain the mutual information of the candidate answer entity word and the target question sentence.
And the mutual information of the candidate answer entity words and the target question sentences is used for explaining the correlation between the candidate answer entity words and the target question sentences. Since the entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns are two kinds of feature information which are mutually irrelevant, the mutual information between the candidate answer entity words and the target question sentences can be directly obtained by summing the mutual information between the candidate answer entity words and the entity words in the target question sentences and the mutual information between the candidate answer entity words and the answer type labels corresponding to the target question cluster sequence patterns. If the feature information of the target question sentence used is feature information with correlation, for example, words in the target question sentence used in the prior art, the sum of the mutual information of the candidate answer entity words and the feature information in the target question sentence is not completely equal to the mutual information of the candidate answer entity words and the target question sentence, and thus the accuracy of the predicted answer entity words is not high.
S403, selecting the maximum mutual information from the mutual information of each candidate answer entity word and the target question sentence, and taking the candidate answer entity word corresponding to the maximum mutual information as the answer entity word corresponding to the target question sentence.
The larger the mutual information between the candidate answer entity word and the target question sentence is, the stronger the correlation between the candidate answer entity word and the target question sentence is, and the higher the probability that the candidate answer entity word is the answer entity word corresponding to the target question sentence is, so that the candidate answer entity word corresponding to the maximum mutual information is taken as the answer entity word corresponding to the target question sentence.
Optionally, referring to fig. 5, in a specific embodiment of the present application, another implementation manner of executing step S103 includes:
s501, aiming at each candidate answer entity word in the candidate answer entity word set, substituting entity words in the target question sentence and answer type labels corresponding to the target question cluster sequence mode into a third formula of a Bayesian model as characteristic information, and calculating to obtain the probability that the corresponding answer entity word is the candidate answer entity word under the condition of the target question sentence.
Wherein the third formula is:
Figure BDA0002575170140000241
a denotes a candidate answer entity word, q denotes a target question sentence, qiI-th feature information of the target question sentence, n is the total number of feature information of the target question sentence, P (a | q) is the probability that the corresponding answer entity word is the candidate answer entity word under the condition of the target question sentence, P (q)iIf the answer entity word is the candidate answer entity word, | a) is that the corresponding question sentence has qiProbability of characteristic information, P (q)i) The probability that the ith feature information of the target question statement appears in the feature information of all question statement samples, and p (a) is the probability that the candidate answer entity word appears in the answer entity words corresponding to all question statement samples. The question-answer pair sample consists of question sentence sample and answer entity word corresponding to the question sentence sample, P (q)i|a)、P(qi) And P (a) are obtained by carrying out statistical calculation on a plurality of question-answer pair samples.
S502, under the condition of the target question sentence, selecting the candidate answer entity word corresponding to the maximum probability as the answer entity word corresponding to the target question sentence from the probabilities that the corresponding answer entity word is each candidate answer entity word in the candidate answer entity word set.
If the probability that the candidate answer entity word is the answer entity word corresponding to the target question sentence is higher, the probability value that the corresponding answer entity word is the candidate answer entity word is higher under the condition of the target question sentence, so that the candidate answer entity word corresponding to the maximum value in P (a | q) calculated by each candidate answer entity word in step S501 is selected as the answer entity word corresponding to the target question sentence.
In the method for predicting answers to questions provided by the embodiment of the application, the entity words in the target question sentences can be identified, and the corresponding answer type labels are determined through the target question cluster sequence mode. In the embodiment of the application, the entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns are used as characteristic information and input into the Bayes model, and the Bayes model processes the entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns to predict and obtain the answer entity words corresponding to the target question sentences. The entity words in the target question sentences and the answer types corresponding to the target question cluster sequence patterns are mutually independent feature information, and the feature independence requirements of the Bayesian model can be met, so that the accuracy of the answer entity words corresponding to the target question sentences predicted by the Bayesian model in the embodiment of the application is higher.
Referring to fig. 6, based on the method for predicting answers to questions provided in the embodiment of the present application, the embodiment of the present application correspondingly discloses a device for predicting answers to questions, which includes: a first acquisition unit 601, a recognition unit 602, and a prediction unit 603.
A first obtaining unit 601, configured to obtain a target question statement. The target question sentence is composed of at least one text unit, and each text unit comprises at least one continuous word.
The identifying unit 602 is configured to identify an entity word in a target question statement, match the target question statement with each question cluster sequence pattern in the question cluster sequence pattern set to obtain a target question cluster sequence pattern, and determine an answer type tag corresponding to the target question cluster sequence pattern. Wherein, the problem cluster sequence pattern set comprises: performing sequence pattern mining on question statement samples in the training corpus set to obtain a question cluster sequence pattern; and the problem cluster sequence patterns in the problem cluster sequence pattern set are formed by sequencing text units with the support degree greater than or equal to a support degree threshold value in the problem statement samples according to the text units in the problem statement samples, and the target problem cluster sequence patterns are matched with the target problem statements.
Optionally, in an embodiment of the present application, when the identifying unit 602 performs matching between the target question statement and each question cluster sequence pattern in the question cluster sequence pattern set, to obtain a target question cluster sequence pattern, the identifying unit is configured to:
and respectively matching the target question sentences with each text unit in each question cluster sequence pattern to obtain the question cluster sequence patterns of which each text unit is contained in the target question sentences and the text unit sequence is consistent with the target question sentences, and taking the longest question cluster sequence pattern in the obtained question cluster sequence patterns as the target question cluster sequence pattern.
The predicting unit 603 is configured to input the entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns as feature information into the bayesian model, and the bayesian model processes the entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns to predict and obtain the answer entity words corresponding to the target question sentences.
Optionally, in an embodiment of the present application, the prediction unit 603 includes: the device comprises a first calculating subunit, a second calculating subunit and a selecting subunit.
And the first calculating subunit is used for respectively calculating mutual information of the candidate answer entity words and the entity words in the target question sentences and mutual information of answer type labels corresponding to the candidate answer entity words and the target question cluster sequence mode aiming at each candidate answer entity word in the candidate answer entity word set.
Optionally, in an embodiment of the present application, when the first calculating subunit performs calculating mutual information between the candidate answer entity word and the entity word in the target question sentence, the first calculating subunit is configured to:
and substituting the candidate answer entity words and the entity words in the target question sentences into a first formula in a Bayesian model, and calculating to obtain mutual information of the candidate answer entity words and the entity words in the target question sentences.
Wherein the first formula is
Figure BDA0002575170140000261
a denotes a candidate answer entity word, Q1Refers to a set of entity words, I (a, Q), in a target question sentence1) For mutual information of the candidate answer entity words and the entity words in the target question sentence, qiThe ith entity word in the entity word set referring to the target question sentence, n is the number of entity words in the target question sentence, P (q)iA) is the probability that the ith entity word of the target question sentence and the candidate answer entity word appear in the same question-answer pair sample together, P (q)i) The probability that the ith entity word of the target question sentence appears in the feature information of all question sentence samples, P (a) the probability that the candidate answer entity word appears in the answer entity words corresponding to all question sentence samples, the question-answer pair sample is composed of the question sentence sample and the answer entity words corresponding to the question sentence sample, and P (q) the probability that the ith entity word of the target question sentence appears in the feature information of all question sentence samplesi,a)、P(qi) And P (a) are obtained by carrying out statistical calculation on a plurality of question and answer pair samples.
When the first calculating subunit performs the calculation of the mutual information between the candidate answer entity word and the answer type label corresponding to the target question cluster sequence mode, the first calculating subunit is configured to:
and substituting the candidate answer entity word and the answer type label corresponding to the target question cluster sequence pattern into a second formula in the Bayesian model, and calculating to obtain the mutual information of the candidate answer entity word and the answer type label corresponding to the target question cluster sequence pattern.
Wherein the second formula is
Figure BDA0002575170140000262
a denotes a candidate answer entity word, q2An answer type label, I (a, q), corresponding to the target question cluster sequence pattern2) For mutual information of answer type labels corresponding to candidate answer entity words and target question cluster sequence patterns, P (q)2A) is the probability that answer type labels corresponding to the target question cluster sequence patterns and candidate answer entity words appear in the same question-answer pair sample together, P (q)2) Probability of answer type labels corresponding to the target question cluster sequence mode appearing in the feature information of all question statement samples, P (a) probability of candidate answer entity words appearing in the answer entity words corresponding to all question statement samples, question-answer pair samples consisting of question statement samples and answer entity words corresponding to question statement samples, and P (q) answer entity words corresponding to question statement samples2,a)、P(q2) And P (a) are obtained by carrying out statistical calculation on a plurality of question and answer pair samples.
And the second calculating subunit is used for summing the mutual information of the candidate answer entity words and the entity words in the target question sentences and the mutual information of the answer type labels corresponding to the candidate answer entity words and the target question cluster sequence mode aiming at each selected answer entity word in the candidate answer entity word set to obtain the mutual information of the candidate answer entity words and the target question sentences. And the mutual information of the candidate answer entity words and the target question sentences is used for explaining the correlation between the candidate answer entity words and the target question sentences.
And the selecting subunit is used for selecting the maximum mutual information from the mutual information of each candidate answer entity word and the target question sentence, and taking the candidate answer entity word corresponding to the maximum mutual information as the answer entity word corresponding to the target question sentence.
Optionally, in an embodiment of the present application, the apparatus for predicting answers to questions further includes: the device comprises a second acquisition unit, a filtering unit, a determining unit, a third acquisition unit, a combining unit, a detecting unit and a deleting unit.
And the second acquisition unit is used for acquiring the training corpus set. The corpus comprises a plurality of question and sentence samples.
And the filtering unit is used for deleting each text unit with the support degree smaller than the support degree threshold value from the training corpus set to obtain the filtered training corpus set.
And the determining unit is used for determining each text unit with the support degree larger than or equal to the support degree threshold value in the filtered corpus set as a 1-level problem cluster sequence mode, and setting the sequence level N as 2.
And the third acquisition unit is used for acquiring the projection corpus corresponding to each N-1-level problem cluster sequence mode. The projection corpus corresponding to the N-1 level problem cluster sequence mode comprises suffixes of the N-1 level problem cluster sequence mode obtained by intercepting each problem statement of the filtered training corpus.
And the combining unit is used for combining each text unit with the support degree greater than or equal to the support degree threshold value in the corresponding projection corpus set and the N-1-level problem cluster sequence mode corresponding to the projection corpus set into an N-level problem cluster sequence mode, and returning to the third acquisition unit to acquire the projection corpus set corresponding to each N-1-level problem cluster sequence mode after increasing N by 1 until no text unit with the support degree greater than or equal to the support degree threshold value in the corresponding projection corpus set exists.
And the detection unit is used for detecting whether the condition that one problem cluster sequence pattern contains the other problem cluster sequence pattern is met or not aiming at every two obtained problem cluster sequence patterns.
And deleting the included problem cluster sequence pattern to obtain a problem cluster sequence pattern set if the condition that one problem cluster sequence pattern includes another problem cluster sequence pattern is detected to be satisfied.
Optionally, in an embodiment of the present application, the apparatus for predicting answers to questions further includes:
and the adding unit is used for taking the target question sentence as a question sentence sample in the corpus, adding the question sentence sample to the corpus, constructing a question cluster sequence pattern set by a training prediction set added with the target question sentence sample, and returning to execute the matching of the target question sentence with each question cluster sequence pattern in the question cluster sequence pattern set.
Optionally, in an embodiment of the present application, the apparatus for predicting answers to questions further includes:
and the first calculation unit is used for calculating the similarity of the target question sentences and classifying the target question sentences according to the similarity to obtain the target question sentences under each category.
The identification unit is used for matching the target question sentence with each question cluster sequence pattern in the question cluster sequence pattern set respectively to obtain a target question cluster sequence pattern, and is used for:
and selecting one target question sentence in the target question sentences in each class to be respectively matched with each question cluster sequence pattern in the question cluster sequence pattern set to obtain the target question cluster sequence pattern corresponding to the target question sentences in each class.
The specific working principle of the device for predicting answers to questions provided in the embodiments of the present application may refer to the relevant steps in the method for predicting answers to questions provided in any embodiments of the present application, and details are not repeated herein.
In the device for predicting answers to questions provided in the embodiment of the present application, the identifying unit 602 may identify an entity word in a sentence of a target question, and determine a corresponding answer type tag according to a target question cluster sequence pattern. In the embodiment of the present application, the predicting unit 603 uses the entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns as feature information, and inputs the feature information into the bayesian model, and the bayesian model processes the entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns, so as to predict and obtain the answer entity words corresponding to the target question sentences. The entity words in the target question sentences and the answer types corresponding to the target question cluster sequence patterns are mutually independent feature information, and can meet the feature independence requirement of the bayesian model, so that the accuracy of the answer entity words corresponding to the target question sentences predicted by the prediction unit 603 in the embodiment of the application is higher.
The embodiment of the present application further provides a computer storage medium, which is used for storing a program, and when the program is executed, the computer storage medium is specifically used for implementing the method for predicting answers to questions described in any embodiment of the present application.
An embodiment of the present application further provides an electronic device, as shown in fig. 7, which includes a memory 701 and a processor 702.
Wherein, the memory 701 is used for storing computer programs;
the processor 702 is configured to execute the computer program, and is specifically configured to implement the method for predicting answers to questions provided in any embodiment of the present application.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above description is only for the purpose of illustrating the preferred embodiments of the present application and the technical principles applied, and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. The scope of the invention according to the present application is not limited to the specific combinations of the above-described features, and may also cover other embodiments in which the above-described features or their equivalents are arbitrarily combined without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (10)

1. A method for predicting answers to questions, comprising:
obtaining a target question sentence; wherein the target question sentence is composed of at least one text unit; each text unit comprises at least one continuous word;
identifying entity words in the target question sentences, respectively matching the target question sentences with each question cluster sequence pattern in the question cluster sequence pattern set to obtain target question cluster sequence patterns, and then determining answer type labels corresponding to the target question cluster sequence patterns; wherein the problem cluster sequence pattern set comprises: performing sequence pattern mining on question statement samples in the training corpus set to obtain a question cluster sequence pattern; the problem cluster sequence patterns in the problem cluster sequence pattern set are formed by sequencing text units with the support degree greater than or equal to a support degree threshold value in the problem statement samples according to the text units in the problem statement samples; the target question cluster sequence pattern is matched with the target question statement;
and inputting the entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns into a Bayesian model as characteristic information, processing the entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns by the Bayesian model, and predicting to obtain the answer entity words corresponding to the target question sentences.
2. The method of claim 1, wherein the problem cluster sequence pattern set is constructed by a method comprising:
acquiring a training corpus set; wherein the corpus comprises a plurality of question and sentence samples;
deleting each text unit with the support degree smaller than the support degree threshold value from the training corpus set to obtain a filtered training corpus set;
determining each text unit with the support degree larger than or equal to the support degree threshold value in the filtered corpus set as a level 1 problem cluster sequence mode, and setting a sequence level N to be 2;
obtaining a projection corpus corresponding to each N-1-level problem cluster sequence mode; wherein, the projection corpus corresponding to the N-1 level problem cluster sequence mode comprises a suffix of the N-1 level problem cluster sequence mode intercepted from each problem statement of the filtered training corpus;
combining each text unit with the support degree greater than or equal to the support degree threshold value in the corresponding projection corpus set and the N-1-level problem cluster sequence mode corresponding to the projection corpus set into an N-level problem cluster sequence mode, increasing N by 1, and returning to execute the projection corpus set corresponding to each N-1-level problem cluster sequence mode until no text unit with the support degree greater than or equal to the support degree threshold value exists in the corresponding projection corpus set;
for every two obtained problem cluster sequence patterns, detecting whether a condition that one problem cluster sequence pattern contains the other problem cluster sequence pattern is met;
and if the condition that one problem cluster sequence pattern comprises another problem cluster sequence pattern is detected, deleting the included problem cluster sequence pattern to obtain a problem cluster sequence pattern set.
3. The method of claim 2, wherein after matching the target question statement to each question cluster sequence pattern in the set of question cluster sequence patterns, further comprising:
and if the target question sentence is not matched with each question cluster sequence pattern in the question cluster sequence pattern set, adding the target question sentence as a question sentence sample in the corpus set to the corpus set, constructing a question cluster sequence pattern set by a training prediction set added with the target question sentence sample, and returning to execute the step of respectively matching the target question sentence with each question cluster sequence pattern in the question cluster sequence pattern set.
4. The method of claim 1, wherein obtaining a plurality of the target question sentences, before the matching the target question sentences with each question cluster sequence pattern in the question cluster sequence pattern set to obtain the target question cluster sequence pattern, further comprises:
calculating the similarity of a plurality of target question sentences, and classifying the plurality of target question sentences according to the similarity to obtain target question sentences under each class;
wherein: the matching the target question statement with each question cluster sequence pattern in the question cluster sequence pattern set to obtain a target question cluster sequence pattern includes:
and selecting one target question sentence in the target question sentences in each class to be respectively matched with each question cluster sequence pattern in the question cluster sequence pattern set to obtain the target question cluster sequence pattern corresponding to the target question sentences in each class.
5. The method of claim 1, wherein the matching the target question statement with each question cluster sequence pattern in a question cluster sequence pattern set to obtain a target question cluster sequence pattern comprises:
and respectively matching the target question sentence with each text unit in each question cluster sequence mode to obtain a question cluster sequence mode which is contained in the target question sentence and has the same text unit sequence with the target question sentence, and taking the longest question cluster sequence mode in the obtained question cluster sequence modes as the target question cluster sequence mode.
6. The method according to claim 1, wherein the step of inputting the entity words in the target question sentence and the answer type labels corresponding to the target question cluster sequence pattern as feature information into a bayesian model, and the step of processing the entity words in the target question sentence and the answer type labels corresponding to the target question cluster sequence pattern by the bayesian model to predict the answer entity words corresponding to the target question sentence comprises:
respectively calculating mutual information of the candidate answer entity words and entity words in the target question sentences and mutual information of answer type labels corresponding to the candidate answer entity words and the target question cluster sequence mode aiming at each candidate answer entity word in the candidate answer entity word set;
for each candidate answer entity word in the candidate answer entity word set, summing the mutual information between the candidate answer entity word and the entity word in the target question sentence and the mutual information between the candidate answer entity word and the answer type label corresponding to the target question cluster sequence mode to obtain the mutual information between the candidate answer entity word and the target question sentence; wherein, the mutual information of the candidate answer entity words and the target question sentences is used for explaining the correlation between the candidate answer entity words and the target question sentences;
and selecting the maximum mutual information from the mutual information of each candidate answer entity word and the target question sentence, and taking the candidate answer entity word corresponding to the maximum mutual information as the answer entity word corresponding to the target question sentence.
7. The method of claim 6, wherein the calculating mutual information between the candidate answer entity words and the entity words in the target question sentence comprises:
substituting the candidate answer entity words and the entity words in the target question sentences into a first formula in the Bayesian model, and calculating to obtain mutual information of the candidate answer entity words and the entity words in the target question sentences;
wherein the first formula is
Figure FDA0002575170130000031
a refers to the candidate answer entity word; q1Refer to a set of entity words in the target question sentence; i (a, Q)1) The mutual information of the candidate answer entity words and the entity words in the target question sentences is obtained; q. q.siReferring to the ith entity word in the entity word set of the target question statement; n is the number of entity words in the target question sentence; p (q)iA) is the probability that the ith entity word of the target question sentence and the candidate answer entity word appear in the same question-answer pair sample together; p (q)i) The probability that the ith entity word of the target question statement appears in the feature information of all question statement samples is taken as the probability; p (a) is the probability that the candidate answer entity word appears in the answer entity words corresponding to all question sentence samples; the question-answer pair sample consists of the question statement sample and answer entity words corresponding to the question statement sample; p (q)i,a)、P(qi) And P (a) are obtained by carrying out statistical calculation on a plurality of question-answer pair samples;
the calculating the mutual information of the candidate answer entity words and the answer type labels corresponding to the target question cluster sequence mode comprises:
substituting the candidate answer entity word and the answer type label corresponding to the target question cluster sequence pattern into a second formula in the Bayesian model, and calculating to obtain mutual information of the candidate answer entity word and the answer type label corresponding to the target question cluster sequence pattern;
wherein the second formula is
Figure FDA0002575170130000041
a refers to the candidate answer entity word; q. q.s2Referring to an answer type label corresponding to the target question cluster sequence pattern; i (a, q)2) The mutual information of the candidate answer entity words and answer type labels corresponding to the target question cluster sequence mode is obtained; p (q)2A) is the probability that the answer type label corresponding to the target question cluster sequence mode and the candidate answer entity word appear in the same question-answer pair sample together; p (q)2) The probability that answer type labels corresponding to the target question cluster sequence mode appear in the feature information of all question statement samples is obtained; p (a) is the probability that the candidate answer entity word appears in the answer entity words corresponding to all question sentence samples; the question-answer pair sample consists of the question statement sample and answer entity words corresponding to the question statement sample; p (q)2,a)、P(q2) And P (a) are obtained by carrying out statistical calculation on a plurality of question-answer pair samples.
8. An apparatus for predicting answers to questions, comprising:
a first acquisition unit configured to acquire a target question sentence; wherein the target question sentence is composed of at least one text unit; each text unit comprises at least one continuous word;
the recognition unit is used for recognizing entity words in the target question sentences, matching the target question sentences with each question cluster sequence pattern in the question cluster sequence pattern set to obtain target question cluster sequence patterns, and then determining answer type labels corresponding to the target question cluster sequence patterns; wherein the problem cluster sequence pattern set comprises: performing sequence pattern mining on question statement samples in the training corpus set to obtain a question cluster sequence pattern; the problem cluster sequence patterns in the problem cluster sequence pattern set are formed by sequencing text units with the support degree greater than or equal to a support degree threshold value in the problem statement samples according to the text units in the problem statement samples; the target question cluster sequence pattern is matched with the target question statement;
and the predicting unit is used for inputting the entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns into a Bayesian model as characteristic information, processing the entity words in the target question sentences and the answer type labels corresponding to the target question cluster sequence patterns by the Bayesian model, and predicting to obtain the answer entity words corresponding to the target question sentences.
9. A computer storage medium storing a program which, when executed, implements a method of predicting answers to questions as set forth in any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor;
wherein the memory is used for storing programs;
the processor is configured to execute the program, and when the program is executed, the program is specifically configured to implement the method for predicting answers to questions according to any one of claims 1 to 7.
CN202010651616.0A 2020-07-08 2020-07-08 Question answer prediction method and device, storage medium and electronic equipment Pending CN111597321A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010651616.0A CN111597321A (en) 2020-07-08 2020-07-08 Question answer prediction method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010651616.0A CN111597321A (en) 2020-07-08 2020-07-08 Question answer prediction method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN111597321A true CN111597321A (en) 2020-08-28

Family

ID=72188262

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010651616.0A Pending CN111597321A (en) 2020-07-08 2020-07-08 Question answer prediction method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111597321A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328762A (en) * 2020-11-04 2021-02-05 平安科技(深圳)有限公司 Question and answer corpus generation method and device based on text generation model
CN112347767A (en) * 2021-01-07 2021-02-09 腾讯科技(深圳)有限公司 Text processing method, device and equipment
CN117574286A (en) * 2024-01-11 2024-02-20 阿里健康科技(杭州)有限公司 Method, device, equipment and storage medium for determining tag value
CN117574286B (en) * 2024-01-11 2024-05-24 阿里健康科技(杭州)有限公司 Method, device, equipment and storage medium for determining tag value

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328762A (en) * 2020-11-04 2021-02-05 平安科技(深圳)有限公司 Question and answer corpus generation method and device based on text generation model
CN112328762B (en) * 2020-11-04 2023-12-19 平安科技(深圳)有限公司 Question-answer corpus generation method and device based on text generation model
CN112347767A (en) * 2021-01-07 2021-02-09 腾讯科技(深圳)有限公司 Text processing method, device and equipment
CN112347767B (en) * 2021-01-07 2021-04-06 腾讯科技(深圳)有限公司 Text processing method, device and equipment
CN117574286A (en) * 2024-01-11 2024-02-20 阿里健康科技(杭州)有限公司 Method, device, equipment and storage medium for determining tag value
CN117574286B (en) * 2024-01-11 2024-05-24 阿里健康科技(杭州)有限公司 Method, device, equipment and storage medium for determining tag value

Similar Documents

Publication Publication Date Title
CN110598206B (en) Text semantic recognition method and device, computer equipment and storage medium
US20190354583A1 (en) Techniques for determining categorized text
CN108536800B (en) Text classification method, system, computer device and storage medium
CN109658033B (en) Method, system, device and storage medium for calculating similarity of goods source route
CN103870528B (en) Depth problem answers the method and system of intersystem problem classification and Feature Mapping
CN113515629A (en) Document classification method and device, computer equipment and storage medium
CN111597321A (en) Question answer prediction method and device, storage medium and electronic equipment
CN112015909A (en) Knowledge graph construction method and device, electronic equipment and storage medium
CN110968776A (en) Policy knowledge recommendation method, device storage medium and processor
CN116821372A (en) Knowledge graph-based data processing method and device, electronic equipment and medium
CN113076758B (en) Task-oriented dialog-oriented multi-domain request type intention identification method
CN114358014A (en) Work order intelligent diagnosis method, device, equipment and medium based on natural language
Ferreira et al. A new evolutionary method for time series forecasting
CN112330442A (en) Modeling method and device based on ultra-long behavior sequence, terminal and storage medium
CN113785317A (en) Feedback mining using domain-specific modeling
Ozan Case studies on using natural language processing techniques in customer relationship management software
CN114595389A (en) Address book query method, device, equipment, storage medium and program product
CN115358817A (en) Intelligent product recommendation method, device, equipment and medium based on social data
CN114398482A (en) Dictionary construction method and device, electronic equipment and storage medium
CN111382247B (en) Content pushing optimization method, content pushing optimization device and electronic equipment
CN110019815B (en) Natural language processing using KNN
Wang et al. Preprocessing and feature extraction methods for microfinance overdue data
CN111695922A (en) Potential user determination method and device, storage medium and electronic equipment
Simsek et al. A classification application for using learning methods in bank costumer's portfolio churn
CN116932487B (en) Quantized data analysis method and system based on data paragraph division

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