CN117094307A - Statement processing method and related device - Google Patents

Statement processing method and related device Download PDF

Info

Publication number
CN117094307A
CN117094307A CN202210499322.XA CN202210499322A CN117094307A CN 117094307 A CN117094307 A CN 117094307A CN 202210499322 A CN202210499322 A CN 202210499322A CN 117094307 A CN117094307 A CN 117094307A
Authority
CN
China
Prior art keywords
sentence
sentences
candidate
target
word
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
CN202210499322.XA
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.)
Tenpay Payment Technology Co Ltd
Original Assignee
Tenpay Payment Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tenpay Payment Technology Co Ltd filed Critical Tenpay Payment Technology Co Ltd
Priority to CN202210499322.XA priority Critical patent/CN117094307A/en
Publication of CN117094307A publication Critical patent/CN117094307A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/211Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
    • 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/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/216Parsing using statistical methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Databases & Information Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Human Computer Interaction (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses a sentence processing method and a related device, which are applied to an artificial intelligent scene or a vehicle-mounted scene, and calculate the sentence similarity of each first candidate sentence and a target sentence aiming at the target sentence and a plurality of first candidate sentences; when determining that none of the plurality of first candidate sentences is matched with the target sentence based on the sentence similarity, segmenting the plurality of first candidate sentences to obtain a plurality of second candidate sentences; determining a plurality of first sentences to be fused from the plurality of second candidate sentences through the importance parameter value of each second candidate sentence to the target sentence; and fusing the plurality of first sentences to be fused according to the dependency relationship among the words in the plurality of first sentences to be fused to obtain fused sentences matched with the target sentences. According to the method, even if a plurality of first candidate sentences are not matched with the target sentences, the actual requirements of the matched sentences of the target sentences can be met, so that the processing effects of application scenes such as a question-answering system and a search system are improved.

Description

Statement processing method and related device
Technical Field
The present application relates to the field of data processing, and in particular, to a method and related apparatus for processing sentences.
Background
With the rapid development of natural language processing technology, sentence similarity calculation is widely applied to application scenes such as a question-answering system, a search system and the like. In general, by calculating the sentence similarity of two sentences, it is determined whether the two sentences are matched based on the sentence similarity, and the matched sentences are used as the processing results of scenes such as a question-answering system, a search system and the like.
In the related art, for a target sentence and a plurality of candidate sentences, firstly calculating the sentence similarity between each candidate sentence and the target sentence through the word characteristics of each candidate sentence and the word characteristics of the target sentence; and determining candidate sentences matched with the target sentence from the plurality of candidate sentences based on the sentence similarity.
However, in practical application, there are cases where the multiple candidate sentences and the target sentence are not matched, and in this case, by adopting the above method, the candidate sentence matched with the target sentence cannot be determined from the multiple candidate sentences, so that the practical requirement of the matched sentence of the target sentence cannot be met, and the processing effect of application scenarios such as a question-answering system and a search system is poor.
Disclosure of Invention
In order to solve the technical problems, the application provides a sentence processing method and a related device, which can meet the actual requirements of the matched sentences of the target sentences even if a plurality of first candidate sentences are not matched with the target sentences, thereby improving the processing effects of application scenes such as a question-answering system, a search system and the like.
The embodiment of the application discloses the following technical scheme:
in one aspect, the present application provides a method for sentence processing, the method comprising:
acquiring sentence similarity between a plurality of first candidate sentences and target sentences respectively;
if the first candidate sentences are not matched with the target sentences based on the sentence similarity, carrying out segmentation processing on the first candidate sentences to obtain second candidate sentences;
determining a plurality of first sentences to be fused from the plurality of second candidate sentences based on importance parameter values of the second candidate sentences for the target sentences;
and based on the dependency relationship among the words in the plurality of first sentences to be fused, carrying out fusion processing on the plurality of first sentences to be fused to obtain the fusion sentence matched with the target sentence.
In another aspect, the present application provides an apparatus for sentence processing, the apparatus comprising: the device comprises an acquisition unit, a segmentation unit, a determination unit and a fusion unit;
the acquisition unit is used for acquiring sentence similarity between a plurality of first candidate sentences and target sentences respectively;
the segmentation unit is used for carrying out segmentation processing on the plurality of first candidate sentences to obtain a plurality of second candidate sentences if the plurality of first candidate sentences are determined to be not matched with the target sentences based on the sentence similarity;
The determining unit is used for determining a plurality of first sentences to be fused from the plurality of second candidate sentences based on importance parameter values of the second candidate sentences for the target sentences;
the fusion unit is used for carrying out fusion processing on the plurality of first sentences to be fused based on the dependency relationship among the words in the plurality of first sentences to be fused to obtain fusion sentences matched with the target sentences.
In another aspect, the present application provides an apparatus for sentence processing, the apparatus comprising a processor and a memory:
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to execute the method of sentence processing according to the above aspect according to the instruction in the program code.
In another aspect, an embodiment of the present application provides a computer readable storage medium storing a computer program, where the computer program is executed by a processor to perform the method for processing a sentence in the above aspect.
In another aspect, embodiments of the present application provide a computer program product comprising a computer program or instructions; the method of sentence processing as described in the above aspects is performed when the computer program or instructions are executed by a processor.
According to the technical scheme, for the target sentence and the plurality of first candidate sentences, the sentence similarity between each first candidate sentence and the target sentence is calculated; when determining that none of the plurality of first candidate sentences is matched with the target sentence based on the sentence similarity, segmenting the plurality of first candidate sentences to obtain a plurality of second candidate sentences; determining a plurality of first sentences to be fused from the plurality of second candidate sentences through the importance parameter value of each second candidate sentence to the target sentence; and fusing the plurality of first sentences to be fused according to the dependency relationship among the words in the plurality of first sentences to be fused to obtain fused sentences matched with the target sentences.
Under the condition that the first candidate sentences are not matched with the target sentences based on sentence similarity, obtaining a plurality of first sentences to be fused which have importance for the target sentences through segmentation processing and importance determination aiming at the first candidate sentences; and fusing a plurality of first sentences to be fused into fusion sentences matched with the target sentences according to the dependency relationship among the words. Based on the method, even if a plurality of first candidate sentences are not matched with the target sentences, the actual requirements of the matched sentences of the target sentences can be met, and therefore the processing effect of application scenes such as a question-answering system and a search system is improved.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is an application scenario schematic diagram of a sentence processing method according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for sentence processing according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a syntax structure of a first candidate sentence according to an embodiment of the present application;
fig. 4 is a flow chart of a method for obtaining sentence similarity according to an embodiment of the present application;
FIG. 5 is a flowchart of another method for obtaining sentence similarity according to an embodiment of the present application;
fig. 6 is an input-output schematic diagram of a model architecture of a convolutional neural network according to an embodiment of the present application;
FIG. 7 is a schematic diagram of an apparatus for sentence processing according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a server according to an embodiment of the present application;
Fig. 9 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described below with reference to the accompanying drawings.
At present, in application scenes such as a question-answering system, a search system and the like, aiming at a target sentence and a plurality of candidate sentences, calculating the sentence similarity of each candidate sentence and the target sentence through the word characteristics of each candidate sentence and the word characteristics of the target sentence; and determining candidate sentences matched with the target sentences from the plurality of candidate sentences based on the sentence similarity, and taking the candidate sentences as processing results of scenes such as a question-answering system, a search system and the like.
For example, taking a question-answering system as an example, aiming at a question sentence and a plurality of first answer sentences, calculating the sentence similarity between each first answer sentence and the question sentence through the word characteristics of each first answer sentence and the word characteristics of the question sentence; and determining a first answer sentence matched with the question sentence from the plurality of first answer sentences based on the sentence similarity, and taking the first answer sentence as a question-answer result of a question-answer system.
However, in practical application, there are cases where the multiple candidate sentences and the target sentence are not matched, and in this case, by adopting the above method, the candidate sentence matched with the target sentence cannot be determined from the multiple candidate sentences, so that the practical requirement of the matched sentence of the target sentence cannot be met, and the processing effect of application scenarios such as a question-answering system and a search system is poor.
Based on the above example, there are situations that the plurality of first answer sentences and the question sentences are not matched in the practical application, and in this case, by adopting the above method, the first answer sentences matched with the question sentences cannot be determined from the plurality of first answer sentences, so that the practical requirement of the answer sentences matched with the target sentences cannot be met, and thus the question-answering effect of the question-answering system is poor.
In view of the above, the present application provides a method and related apparatus for processing sentences, where, when determining that a plurality of first candidate sentences are not matched with a target sentence based on sentence similarity, a plurality of first to-be-fused sentences having importance for the target sentence are obtained by means of segmentation processing and importance determination for the plurality of first candidate sentences; and fusing a plurality of first sentences to be fused into fusion sentences matched with the target sentences according to the dependency relationship among the words. Based on the method, even if a plurality of first candidate sentences are not matched with the target sentences, the actual requirements of the matched sentences of the target sentences can be met, and therefore the processing effect of application scenes such as a question-answering system and a search system is improved.
Namely, under the condition that the first answer sentences are not matched with the question sentences based on sentence similarity, obtaining a plurality of first sentences to be fused which have importance for the question sentences through segmentation processing and an importance determination mode aiming at the first answer sentences; and fusing a plurality of first sentences to be fused into answer sentences matched with the question sentences according to the dependency relationship among the words. Based on the method, even if a plurality of first answer sentences are not matched with the question sentences, the actual requirement of the answer sentences matched with the question sentences can be met, so that the question-answering effect of the question-answering system is improved.
In order to facilitate understanding of the technical scheme of the present application, the method for processing sentences provided by the embodiment of the present application is described below in conjunction with an actual application scenario.
Referring to fig. 1, fig. 1 is an application scenario schematic diagram of a sentence processing method according to an embodiment of the present application. In the application scenario shown in fig. 1, the terminal device 101 is a device for inputting a target sentence, and the server 102 is a device for processing a sentence, and the server 102 stores a plurality of first candidate sentences.
In response to an input operation of the target sentence, the terminal device 101 acquires the target sentence and transmits to the server 102; the server 102 obtains sentence similarities of the plurality of first candidate sentences with the target sentence, respectively. As an example, the method of sentence processing is applied to a question-answer system, the target sentence is a question sentence, the plurality of first candidate sentences are a plurality of first answer sentences, and in response to an input operation of the question sentence, the terminal device 101 acquires the question sentence and sends it to the server 102; for the question sentence and the plurality of first answer sentences, the server 102 may first acquire a sentence similarity between each first answer sentence and the question sentence.
If the server 102 determines that none of the plurality of first candidate sentences matches the target sentence based on the sentence similarity, the plurality of first candidate sentences are subjected to a segmentation process to obtain a plurality of second candidate sentences. On the basis of the above example, when the server 102 determines that the plurality of first answer sentences and the question sentences are not matched according to the sentence similarity, the plurality of first answer sentences may be split to obtain a plurality of second answer sentences, where the number of the plurality of second answer sentences is greater than the number of the plurality of first answer sentences.
The server 102 determines a plurality of first sentences to be fused from the plurality of second candidate sentences based on the importance parameter values of the second candidate sentences for the target sentence. Based on the above example, the server 102 may filter the plurality of second candidate sentences to obtain a plurality of first sentences to be fused through importance parameter values of the plurality of second answer sentences for the question sentences.
The server 102 performs fusion processing on the multiple first sentences to be fused based on the dependency relationship among the words in the multiple first sentences to be fused to obtain fusion sentences matched with the target sentences; the server 102 sends the fusion sentence to the terminal device 101, and the terminal device displays the fusion sentence corresponding to the target sentence. Based on the above example, the server 102 may fuse the plurality of first to-be-fused sentences to obtain answer sentences matched with the question sentences through the dependency relationships among the words in the plurality of first to-be-fused sentences; the server 102 transmits the answer sentence to the terminal device 101, and the terminal device 101 presents the answer sentence corresponding to the question sentence.
Therefore, under the condition that the first candidate sentences are not matched with the target sentences based on the sentence similarity, the method obtains a plurality of first sentences to be fused which have importance to the target sentences through segmentation processing and importance determination aiming at the first candidate sentences; and fusing a plurality of first sentences to be fused into fusion sentences matched with the target sentences according to the dependency relationship among the words. Based on the method, even if a plurality of first candidate sentences are not matched with the target sentences, the actual requirements of the matched sentences of the target sentences can be met, and therefore the processing effect of application scenes such as a question-answering system and a search system is improved.
Namely, under the condition that the first answer sentences are not matched with the question sentences based on sentence similarity, obtaining a plurality of first sentences to be fused which have importance for the question sentences through segmentation processing and an importance determination mode aiming at the first answer sentences; and fusing a plurality of first sentences to be fused into answer sentences matched with the question sentences according to the dependency relationship among the words. Based on the method, even if a plurality of first answer sentences are not matched with the question sentences, the actual requirement of the answer sentences matched with the question sentences can be met, so that the question-answering effect of the question-answering system is improved.
The sentence processing method provided by the application can be applied to the sentence processing equipment with data processing capability, such as a server and a terminal device. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, a cloud server for providing cloud computing service, or the like, but is not limited thereto; terminal devices include, but are not limited to, cell phones, tablets, computers, smart cameras, smart voice interaction devices, smart appliances, vehicle terminals, aircraft, and the like. The terminal device and the server may be directly or indirectly connected through wired or wireless communication, and the present application is not limited herein.
The sentence processing method provided by the application can be applied to various scenes, including but not limited to cloud technology, artificial intelligence, vehicle-mounted scenes, intelligent traffic, auxiliary driving and the like.
The following specifically describes a method for processing a sentence provided by the embodiment of the present application by using a server as a device for processing a sentence.
Referring to fig. 2, the flowchart of a method for processing sentences according to an embodiment of the present application is shown. As shown in fig. 2, the sentence processing method includes the steps of:
S201: and acquiring sentence similarity between the plurality of first candidate sentences and the target sentences respectively.
In the embodiment of the application, after the target sentence is acquired, for the target sentence and the plurality of first candidate sentences, firstly, the sentence similarity between each first candidate sentence and the target sentence needs to be acquired, so that whether each first candidate sentence is matched with the target sentence or not is judged through the sentence similarity in the subsequent step, and whether the first candidate sentence matched with the target sentence exists in the plurality of first candidate sentences is determined.
When S201 is implemented, since the word feature of the first candidate sentence and the word feature of the target sentence are used to obtain the sentence similarity between the first candidate sentence and the target sentence, the sentence similarity between the first candidate sentence and the target sentence is calculated only from the word dimension, and there is a problem that the dimension is single, resulting in that the obtained sentence similarity between the first candidate sentence and the target sentence is not accurate enough. Therefore, on the basis of the word characteristics of the first candidate sentence and the word characteristics of the target sentence, combining the first sentence characteristics of the first candidate sentence and the second sentence characteristics of the target sentence to obtain the sentence similarity of the first candidate sentence and the target sentence; according to the method, the sentence similarity of the first candidate sentence and the target sentence is calculated from the word dimension and the sentence dimension, so that the obtained sentence similarity of the first candidate sentence and the target sentence is more accurate.
That is, the present application provides a possible implementation manner, S201 may be, for example: and carrying out similarity operation on each first candidate sentence based on the first word characteristics of the first candidate sentence, the first sentence characteristics of the first candidate sentence, the second word characteristics of the target sentence and the second sentence characteristics of the target sentence, and obtaining the sentence similarity of the first candidate sentence and the target sentence.
As an example, in the question-answering system, the target sentence is a question sentence, the first candidate sentence is a first answer sentence, and S201 may be, for example: and carrying out similarity operation on each first answer sentence based on the first word characteristics of the first answer sentence, the first sentence characteristics of the first answer sentence, the second word characteristics of the question sentence and the second sentence characteristics of the question sentence, and obtaining the sentence similarity of the first answer sentence and the question sentence.
For a detailed description of a specific implementation of S201, reference may be made to the following embodiments of the method for obtaining the similarity of sentences, which are not described in detail herein.
S202: and if the first candidate sentences are not matched with the target sentences based on the sentence similarity, performing segmentation processing on the first candidate sentences to obtain second candidate sentences.
Since after the sentence similarity between each first candidate sentence and the target sentence is obtained in S201, whether each first candidate sentence is matched with the target sentence or not may be determined by the sentence similarity, and it is found through research that there are cases where a plurality of first candidate sentences are not matched with the target sentence in the actual application of the application scenarios such as the question-answering system, the search system, etc., in this case, the implementation manner in the related art is adopted, and the first candidate sentence matched with the target sentence cannot be determined from the plurality of first candidate sentences, which results in failing to satisfy the actual requirement of the matched sentence for obtaining the target sentence, thereby resulting in poor processing effect of the application scenarios such as the question-answering system, the search system, etc.
Therefore, in the embodiment of the application, when it is determined that none of the plurality of first candidate sentences and the target sentence is matched based on the sentence similarity, it is considered that the plurality of first candidate sentences are integrated to obtain a matching sentence of which one new sentence is the target sentence. Based on this, for the plurality of first candidate sentences, since there are more complex first candidate sentences in the plurality of first candidate sentences, the plurality of first candidate sentences first need to be decomposed into a plurality of simpler second candidate sentences by a segmentation method.
In the specific implementation of S202, the segmentation of the first candidate sentence needs to be implemented in consideration of the syntax structure according to the first candidate sentence; the syntax structure of the first candidate sentence may be obtained by performing a syntax structure analysis process on the first candidate sentence. Thus, the present application provides one possible implementation, S202 may include, for example, the following S2021-S2022:
s2021: and carrying out syntactic structure analysis processing on the plurality of first candidate sentences to obtain syntactic structures of the plurality of first candidate sentences.
Here, S2021 may be, for example: and carrying out syntactic structure analysis processing on the plurality of first candidate sentences through a language technology platform (Language Technology Platform, LTP) to obtain syntactic structures of the plurality of first candidate sentences.
As an example, the first candidate sentence is "i am an algorithm engineer and i am from company a", and the first candidate sentence "i am an algorithm engineer and i am from company a" is subjected to a syntax structure analysis process by LTP, resulting in a syntax structure of the first candidate sentence "i am an algorithm engineer and i am from company a", see a schematic diagram of a syntax structure of one of the first candidate sentences shown in fig. 3. Wherein, the dependency relationship between "me" and "yes" is a main-verb (SBV), the dependency relationship between "yes" and "engineer" is a moving object relationship (VOB), the dependency relationship between "algorithm" and "engineer" is a centering relationship (VOB), the dependency relationship between "me" and "from" is an SBV, the dependency relationship between "from" and "company a" is a VOB, and the dependency relationship between "from" and "engineer" is an in-state relationship (ADV), the dependency relationship between "yes" and "from" is a parallel relationship (COO), and "yes" represents a core relationship (head, HED).
S2022: and based on the syntactic structures of the plurality of first candidate sentences, performing segmentation processing on the plurality of first candidate sentences to obtain a plurality of second candidate sentences.
As one example, on the basis of the above example, the first candidate sentence "i am an algorithm engineer" and i am from company a "whose syntactic structure indicates that the link of the SBV-VOB is recursively 2 times, the first candidate sentence" i am an algorithm engineer "and i am from company a" is cut into 2 second candidate sentences, i.e., the second candidate sentence "i am an algorithm engineer" and the second candidate sentence "from company a".
For S2021-S2022, as an example, in the question-answering system, the first candidate sentence is a first answer sentence, and the syntactic structure analysis processing is performed on the plurality of first answer sentences to obtain syntactic structures of the plurality of first answer sentences; and based on the syntactic structures of the plurality of first answer sentences, performing segmentation processing on the plurality of first answer sentences to obtain a plurality of second answer sentences.
S203: a plurality of first statements to be fused are determined from the plurality of second candidate statements based on the importance parameter values of the second candidate statements for the target statement.
In the embodiment of the present application, after a plurality of first candidate sentences are segmented in S202 to obtain a plurality of second candidate sentences, the importance degree of each second candidate sentence on the target sentence needs to be measured, and the second candidate sentences with higher importance degree on the target sentence are screened from the plurality of second candidate sentences to be used as a plurality of first sentences to be fused. Wherein the importance degree of the second candidate sentence to the target sentence is represented by the importance parameter value of the second candidate sentence to the target sentence.
In the specific implementation of S203, the importance parameter value of the second candidate sentence for the target sentence may be obtained by summing the importance parameter values of the respective terms in the second candidate sentence for the target sentence, and the importance parameter value of the respective terms in the second candidate sentence for the target sentence may be obtained by outputting an importance detection model obtained by inputting and training the second candidate sentence; the importance detection model is obtained by iteratively training and learning importance label data of each word in the second training statement on the basis of the first training statement and the second training statement through a preset neural network. Based on the above, a lower limit value representing importance is preset for the importance parameter value, and the importance parameter value and the preset threshold value of the second candidate sentences for the target sentences are used as preset threshold values, so that the second candidate sentences with higher importance degree for the target sentences can be screened from the plurality of second candidate sentences to serve as a plurality of first sentences to be fused. Thus, the present application provides one possible implementation, S203 may include, for example, the following S2031-S2033:
s2031: acquiring importance parameter values of each word in the second candidate sentence for the target sentence through an importance detection model; the importance detection model is obtained by training a preset neural network according to the importance label data of each word in the first training sentence, the second training sentence and the second training sentence for the first training sentence.
The training process of the importance detection model refers to the following steps: firstly, acquiring a training sample for training a preset neural network, namely, importance label data of each word in a first training sentence, a second training sentence and a second training sentence on the first training sentence; secondly, inputting a first training sentence and a second training sentence into a preset neural network, predicting the importance degree of each word in the second training sentence to the first training sentence, and outputting the predicted label data of each word in the second training sentence to the first training sentence; then judging whether the predicted tag data is matched with the importance tag data, if not, indicating that the predicted tag data does not reach a training target, and iteratively training network parameters of a preset neural network through a loss function of the preset neural network until the preset iteration times or the convergence of the preset neural network are reached; and finally, determining the trained preset neural network as an importance detection model. Thus, the present application provides a possible implementation manner, and the training method of the importance detection model includes the following steps S1-S4:
s1: and acquiring importance label data of each word in the first training sentence, the second training sentence and the second training sentence for the first training sentence.
S2: inputting the first training sentences and the second training sentences into a preset neural network for prediction processing, and outputting the prediction label data of each word in the second training sentences for the first training sentences;
s3: if the predicted tag data are not matched with the importance tag data, iteratively training network parameters of the preset neural network by using a loss function of the preset neural network;
s4: and determining the trained preset neural network as an importance detection model.
S2032: and summing the importance parameter values of the words in the second candidate sentences for the target sentences to determine the importance parameter values of the second candidate sentences for the target sentences.
As an example, the operation formula of the importance parameter value of the second candidate sentence for the target sentence is shown in:
in the above formula, I (w k Q) represents w k For the importance parameter value of Q, w k Represents the ith word in the second candidate sentence C, and Q represents the target sentence.
S2033: and determining a plurality of first sentences to be fused from the plurality of second candidate sentences based on the importance parameter values of the second candidate sentences for the target sentences and a preset threshold value.
Wherein S2033 may be, for example: and screening the second candidate sentences with the importance parameter value larger than or equal to a preset threshold value from the plurality of second candidate sentences as a plurality of first sentences to be fused according to the importance parameter value of the second candidate sentences for the target sentences.
For S2031-S2033, based on the above example, in the question-answer system, the target sentence is a question sentence, and the second candidate sentence is a second answer sentence. Firstly, acquiring importance parameter values of each word in the second answer sentence to the question sentence through an importance detection model; the importance detection model is obtained by training a preset neural network according to the importance label data of each word in the question training sentences, the answer training sentences and the answer training sentences. And then, summing the importance parameter values of the words in the second answer sentence for the question sentence, and determining the importance parameter values of the second answer sentence for the question sentence. And finally, screening the second answer sentences with the importance parameter value larger than or equal to a preset threshold value from the second answer sentences based on the importance parameter value of the second answer sentences for the question sentences, and taking the second answer sentences as a plurality of first sentences to be fused.
S204: and based on the dependency relationship among the words in the plurality of first sentences to be fused, carrying out fusion processing on the plurality of first sentences to be fused to obtain fusion sentences matched with the target sentences.
In the embodiment of the present application, after determining a plurality of first to-be-fused sentences from a plurality of second candidate sentences in S202, the plurality of first to-be-fused sentences are fused through the dependency relationships between the terms in the plurality of first to-be-fused sentences to obtain the fusion sentences matched with the target sentences.
When S204 is specifically implemented, first, the multiple first to-be-fused sentences have certain redundancy information, and in order to reduce the redundancy information, the multiple first to-be-fused sentences need to be processed in a word alignment mode to obtain multiple second to-be-fused sentences; and fusing the plurality of second sentences to be fused through the dependency relationship among the words in the plurality of second sentences to be fused to obtain the fusion sentences matched with the target sentences. Thus, the present application provides one possible implementation, S204 may include, for example, the following S2041-S2042:
s2041: and carrying out word alignment processing on the plurality of first sentences to be fused to obtain a plurality of second sentences to be fused.
Wherein, word alignment means that the syntax structures corresponding to two words must be the same, and the two words must be the same or similar; the word alignment process in S2041 may change sentences of different lengths into sentences of equal lengths in a sense.
As an example, the first to-be-fused sentences include a first to-be-fused sentence 1 of "UserA bought books" and a first to-be-fused sentence 2 of "UserA purchase books", and the word alignment processing is performed on the first to-be-fused sentence 1"UserA bought books" and the first to-be-fused sentence 2"UserA purchase books", and since "bought" and "purchase" are equivalent in terms of grammar and word sense, word alignment of the first to-be-fused sentence 1"UserA bought books" and the first to-be-fused sentence 2"UserA purchase books" can be achieved, and the obtained second to-be-fused sentences include the first to-be-fused sentence 1"UserA bought books" or the first to-be-fused sentence 2"UserA purchase books".
S2042: and based on the dependency relationship among the words in the plurality of second sentences to be fused, carrying out fusion processing on the plurality of second sentences to be fused to obtain fusion sentences matched with the target sentences.
In the specific implementation of S2042, the fusion order of each word in the multiple second to-be-fused sentences affects the readability and fluency of the fused sentences, and the idea of integer linear programming can be applied, so that the multiple second to-be-fused sentences are fused as the target problem of combining the sentence fusion problem with the optimization problem. Based on the above, firstly, determining the fusion sequence of each word in the second to-be-fused sentences as the design variable; secondly, on the basis of design variables, taking the dependency relationship among the words in a plurality of second sentences to be fused into consideration, constructing an objective function for expressing the maximized problem so as to furthest improve the readability and fluency of the fused sentences; then, solving an objective function to obtain an optimal solution of the design variable, namely, a target fusion sequence of each word in the multiple second sentences to be fused; and finally, fusing each word in the second sentences to be fused according to the target fusion sequence, and obtaining the fusion sentences matched with the target sentences. Thus, the present application provides one possible implementation, S2042 may include, for example, the following S5-S8:
S5: and determining the fusion sequence of each word in the plurality of second sentences to be fused as a design variable.
S6: and constructing an objective function representing the maximized problem based on the design variable and the dependency relationship between each word in the second to-be-fused sentences.
When the S6 is specifically implemented, when an objective function is constructed, importance parameter values of each word in the multiple second sentences to be fused on the objective sentence are further considered, so that words with higher importance degree on the objective sentence in the multiple second sentences to be fused are ensured, and important positions are occupied in the fused sentences, so that the importance of the fused sentences is improved to the greatest extent. Thus, the present application provides one possible implementation, S6 may for example comprise: and constructing an objective function based on the design variable, the dependency relationship among the words in the plurality of second sentences to be fused and the importance parameter value of the words in the plurality of second sentences to be fused for the objective sentence.
As one example, the formula for the objective function is as follows:
in the above formula, n represents the number of words in the second plurality of sentences to be fused, I (w i Q) represents w i For the importance parameter value of Q, w i Represents the i-th word, Q represents the target sentence, P (d i |h i ) Represents h i Under condition d i Probability of h i Representing w i Parent node d of (d) i Represents h i And w i Dependency relationship between P (w j |w i ) Representing w i W under the condition j Probability, w of j Represents the j=i+1 th word, I (w j Q) represents w j Importance parameter value for Q.
S7: and solving the design variables based on the objective function to obtain the objective fusion sequence of each word in the plurality of second sentences to be fused.
S8: and carrying out fusion processing on each word in the second sentences to be fused according to the target fusion sequence to obtain fusion sentences.
For S5-S8, in the question-answer system, the target sentence is a question sentence, word alignment processing is carried out on the first sentences to be fused based on the first sentences to be fused determined by the example, and after a plurality of second sentences to be fused are obtained, the fusion sequence of each word in the second sentences to be fused is determined as a design variable; secondly, constructing an objective function representing a maximized problem based on the design variable, the dependency relationship among the words in the plurality of second to-be-fused sentences and the importance parameter value of the words in the plurality of second to-be-fused sentences for the problem sentence; then, solving design variables based on an objective function to obtain an objective fusion sequence of each word in the plurality of second sentences to be fused; and finally, carrying out fusion processing on each word in the second sentences to be fused according to the target fusion sequence to obtain answer sentences matched with the question sentences.
In the sentence processing method provided in the above embodiment, for a target sentence and a plurality of first candidate sentences, the sentence similarity between each first candidate sentence and the target sentence is calculated; when determining that none of the plurality of first candidate sentences is matched with the target sentence based on the sentence similarity, segmenting the plurality of first candidate sentences to obtain a plurality of second candidate sentences; determining a plurality of first sentences to be fused from the plurality of second candidate sentences through the importance parameter value of each second candidate sentence to the target sentence; and fusing the plurality of first sentences to be fused according to the dependency relationship among the words in the plurality of first sentences to be fused to obtain fused sentences matched with the target sentences.
Under the condition that the first candidate sentences are not matched with the target sentences based on sentence similarity, obtaining a plurality of first sentences to be fused which have importance for the target sentences through segmentation processing and importance determination aiming at the first candidate sentences; and fusing a plurality of first sentences to be fused into fusion sentences matched with the target sentences according to the dependency relationship among the words. Based on the method, even if a plurality of first candidate sentences are not matched with the target sentences, the actual requirements of the matched sentences of the target sentences can be met, and therefore the processing effect of application scenes such as a question-answering system and a search system is improved.
For the first specific implementation manner of S201 in the foregoing embodiment, similarity operations based on the first word feature of the first candidate sentence, the first sentence feature of the first candidate sentence, the second word feature of the target sentence, and the second sentence feature of the target sentence may be divided into two parts according to the distinction between the word dimension and the sentence dimension. One part is that the word literal similarity of the first candidate sentence and the target sentence is obtained through the similarity operation of the first word characteristic of the first candidate sentence and the second word characteristic of the target sentence; since the core words in the sentence are considered to play a decisive role in the sentence, the first word characteristics of the first candidate sentence are determined by the core words in the first candidate sentence, and correspondingly, the second word characteristics of the target sentence are also determined by the core words in the target sentence.
The other part is the sentence semantic similarity of the first candidate sentence and the target sentence obtained through similarity operation through the first sentence characteristics of the first candidate sentence and the second sentence characteristics of the target sentence; since the words corresponding to the syntactic structure of the sentence have a large influence on the semantics of the sentence, the first semantic features of the first candidate sentence are determined by the words corresponding to the syntactic structure of the first candidate sentence, and correspondingly, the second word features of the target sentence are also determined by the words corresponding to the syntactic structure of the target sentence.
Based on the word literal similarity of the first candidate sentence and the target sentence and the sentence semantic similarity of the first candidate sentence and the target sentence are fused, so that the sentence similarity of the first candidate sentence and the target sentence can be obtained. The method for obtaining the similarity of the sentences is described below with reference to the accompanying drawings.
Referring to fig. 4, fig. 4 is a flowchart illustrating a method for obtaining similarity of sentences according to an embodiment of the present application. As shown in fig. 4, the method for obtaining the sentence similarity includes the following steps:
s401: determining a first word feature of the first candidate sentence based on the core word in the first candidate sentence; and determining second word characteristics of the target sentence based on the core words in the target sentence.
The core word in the first candidate sentence may be obtained by, for example, performing a trunk extraction process on the first candidate sentence through a natural language processing knowledge base (HowNet); the first word characteristic of the first candidate sentence includes a core word in the first candidate sentence. The core words in the target sentence can be obtained by, for example, performing trunk extraction processing on the target sentence through HowNet; the second word characteristic of the target sentence includes a core word in the target sentence.
S402: and carrying out similarity operation on the first word characteristics and the second word characteristics to obtain word literal similarity of the first candidate sentence and the target sentence.
The similarity operation in S402 may be, for example, a jaccard similarity operation, where the jaccard similarity operation refers to two sets A, B, and a ratio of the size of the intersection of a and B to the size of the union of a and B is calculated. When the first word feature of the first candidate sentence includes the core word in the first candidate sentence and the first word feature of the target sentence includes the core word in the target sentence, S402 may include, for example: determining the size of an intersection between the core word in the first candidate sentence and the core word in the target sentence; determining the size of a union between the core words in the first candidate sentence and the core words in the target sentence; and carrying out ratio operation according to the size of the intersection and the size of the union to obtain the word literal similarity of the first candidate sentence and the target sentence.
As an example, the operational formula of the word literal similarity of the first candidate sentence and the target sentence is as follows:
in the above formula, S represents the first candidate sentence, S 'represents the core word in the first candidate sentence S, Q represents the target sentence, and Q' represents the core word in the target sentence Q.
S403: determining first sentence characteristics of the first candidate sentences based on words corresponding to the legal structure of the first candidate sentences; and determining the second sentence characteristics of the target sentence based on the words corresponding to the syntactic structure of the target sentence.
The first sentence characteristic of the first candidate sentence is obtained by performing coding processing and splicing processing on a word corresponding to the syntax structure of the first candidate sentence, namely, the first sentence characteristic of the first candidate sentence comprises a first sentence vector of the first candidate sentence; the second sentence characteristic of the target sentence is obtained by carrying out coding processing and splicing processing on words corresponding to the syntax structure of the target sentence, and the second sentence characteristic of the target sentence comprises a second sentence vector of the target sentence.
Further, because the influence of different words on the semantics of the sentence is different in the words corresponding to the syntax structure of the sentence, the different influence is characterized by different weights during the splicing process; determining a first sentence characteristic of the first candidate sentence by combining the words corresponding to the syntactic structure of the first candidate sentence with the first weight, and determining a second sentence characteristic of the target sentence by combining the words corresponding to the syntactic structure of the target sentence with the second weight. Thus, the present application provides one possible implementation, S403 may include, for example: determining a first sentence characteristic based on the word and the first weight corresponding to the syntax structure of the first candidate sentence; and determining a second sentence characteristic based on the word and the second weight corresponding to the syntactic structure of the target sentence.
S404: and carrying out similarity operation on the first sentence features and the second sentence features to obtain the sentence semantic similarity of the first candidate sentence and the target sentence.
The similarity operation in S404 may be, for example, a cosine similarity operation, and when the first sentence feature of the first candidate sentence includes the first sentence vector of the first candidate sentence and the second sentence feature of the target sentence includes the second sentence vector of the target sentence, the specific implementation in S404 may include, for example: and performing cosine similarity operation on the first sentence vector of the first candidate sentence and the second sentence vector of the target sentence to obtain the sentence semantic similarity of the first candidate sentence and the target sentence.
As an example, on the basis of the above example, the operation formula of the sentence semantic similarity of the first candidate sentence and the target sentence is as follows:
in the above formula, V S A first sentence characteristic representing a first candidate sentence S, V Q A second sentence characteristic, w, representing the target sentence Q a Representing the a-th word, tf_idf (w a ) Representing w in respect of the first candidate sentence S a Document-inverse document frequency, w b Represents the b-th word corresponding to the syntactic structure of the target sentence Q, |Q| represents the number of words corresponding to the syntactic structure in the target sentence Q, V wa Representing w a Word vector of V wb Representing w b Is a term vector of (a).
In addition, N (w) a ) Representing w a At a plurality of first candidatesThe number of occurrences in the sentence S, TN (W) represents the total number of words in the plurality of first candidate sentences S, TN (S) represents the total number of the plurality of first candidate sentences S, S (W) a ) Representing that w is included in the plurality of first candidate sentences S a The number of sentences of the first candidate sentence S.
S405: and carrying out fusion processing on the word literal similarity and the sentence semantic similarity to obtain the sentence similarity of the first candidate sentence and the target sentence.
As an example, on the basis of the above example, the operation formula of the sentence similarity of the first candidate sentence and the target sentence is as follows:
SC(S,Q)=αJ(S,Q)+βT(S,Q)
in the above formula, α represents a weight corresponding to the word similarity J (S, Q) of the first candidate sentence S and the target sentence Q, and β represents a weight corresponding to the sentence semantic similarity T (S, Q) of the first candidate sentence S and the target sentence Q.
The fusion process may be, for example, a weighting process, and when S405 is specifically implemented, for example, it may include: and carrying out weighting processing on the word literal similarity of the first candidate sentence and the target sentence and the sentence semantic similarity of the first candidate sentence and the target sentence to obtain the sentence similarity of the first candidate sentence and the target sentence.
According to the method for acquiring the sentence similarity, when the sentence similarity between the first candidate sentence and the target sentence is acquired, the word literal similarity based on the word dimension, particularly the word literal similarity of the core word in the sentence, is considered, and the sentence semantic similarity based on the sentence dimension, particularly the sentence semantic similarity of the syntax structure of the sentence, is considered, so that the acquired sentence similarity between the first candidate sentence and the target sentence is more accurate.
For the above-mentioned S401-S405, in the question-answer system, the target sentence is a question sentence, and the first candidate sentence is a first answer sentence. First, a first answer sentence is subjected to trunk extraction processing, so that first word characteristics of the first answer sentence are core words in the first answer sentence, and a question sentence is subjected to trunk extraction processing, so that second word characteristics of the question sentence are core words in the question sentence.
Secondly, determining the size of an intersection between the core words in the first answer sentence and the core words in the question sentence; determining the size of a union between core words in the first answer sentence and core words in the question sentence; and carrying out ratio operation according to the size of the intersection and the size of the union to obtain the word literal similarity of the first answer sentence and the question sentence.
Then, carrying out coding processing and splicing processing on words corresponding to the syntactic structure of the first candidate sentence to obtain a first sentence vector of the first answer sentence, wherein the first sentence feature of the first answer sentence is the first sentence vector of the first answer sentence; and carrying out coding processing and splicing processing on words corresponding to the syntactic structure of the problem sentence to obtain a second sentence vector of which the second sentence characteristic is the problem sentence.
And then, carrying out cosine similarity operation on the first sentence vector of the first answer sentence and the second sentence vector of the question sentence to obtain the sentence semantic similarity of the first answer sentence and the question sentence.
And finally, carrying out weighting processing on the word literal similarity of the first answer sentence and the question sentence and the sentence semantic similarity of the first answer sentence and the question sentence to obtain the sentence similarity of the first answer sentence and the question sentence.
For the second specific implementation manner of S201 in the foregoing embodiment, considering that the sentence similarity between the first candidate sentence and the target sentence needs to be calculated from the word dimension and the sentence dimension, and the convolutional neural network has a strong feature extraction capability, before the convolutional processing, the pooling processing and the similarity-based prediction processing are performed on the first word feature of the first candidate sentence and the second word feature of the target sentence through the convolutional neural network, the feature matrix is further obtained by fusing the first word feature of the first candidate sentence and the second word feature of the target sentence to the first word feature of the first candidate sentence and the second word feature of the target sentence, and the feature matrix fuses the sentence word information and the sentence semantic information.
The first word characteristics of the first candidate sentence and the second word characteristics of the target sentence are obtained by encoding each word in the first candidate sentence and each word in the target sentence; the first sentence characteristic of the first candidate sentence and the second sentence characteristic of the target sentence are obtained by encoding the first candidate sentence and the target sentence.
Based on the above, the feature matrix is subjected to convolution processing to obtain convolution features, pooling processing is performed on the convolution features to obtain pooling features, similarity-based prediction processing is performed on the pooling features, and then the statement similarity of the first candidate statement and the target statement can be obtained. The method for obtaining the similarity of the sentences is described below with reference to the accompanying drawings.
Referring to fig. 5, fig. 5 is a flowchart illustrating another method for obtaining similarity of sentences according to an embodiment of the present application. As shown in fig. 5, the method for obtaining the sentence similarity includes the following steps:
s501: and carrying out coding processing on each word in the first candidate sentence and each word in the target sentence to obtain the first word characteristics of the first candidate sentence and the second word characteristics of the target sentence.
The encoding process in S501 may be, for example, an encoding process based on a word vector model, where the word vector model may be, for example, word2vec, and the first word feature of the first candidate sentence and the second word feature of the target sentence may be, for example, word vector matrices of the first candidate sentence and the target sentence. Based on this, in the specific implementation of S501, the encoding process based on the word vector model is performed on each word in the first candidate sentence and each word in the target sentence, so as to obtain the word vector matrix of the first candidate sentence and the target sentence, where the first word feature of the first candidate sentence and the second word feature of the target sentence are the first candidate sentence and the target sentence.
S502: and carrying out coding processing on the first candidate sentence and the target sentence to obtain a first sentence characteristic of the first candidate sentence and a second sentence characteristic of the second target sentence.
The encoding process in S502 may be, for example, an encoding process based on a sentence vector model, for example, fastatex, and the first sentence feature of the first candidate sentence and the second sentence feature of the target sentence may be, for example, sentence vectors of the first candidate sentence and the target sentence. Based on this, in the specific implementation of S502, the first candidate sentence and the target sentence are subjected to the encoding process based on the sentence vector model, and the sentence vectors of the first candidate sentence and the target sentence are obtained as the first sentence feature of the first candidate sentence and the second sentence feature of the target sentence.
S503: and carrying out fusion processing on the first word features, the second word features, the first sentence features and the second sentence features to obtain feature matrixes of the first candidate sentences and the target sentences.
In S503, for example, the fusion process may be a stitching process, and when the first word feature of the first candidate sentence and the second word feature of the target sentence are the word vector matrices of the first candidate sentence and the target sentence, and the first sentence feature of the first candidate sentence and the second sentence feature of the target sentence are the sentence vectors of the first candidate sentence and the target sentence, the specific implementation in S503 may be, for example: and performing splicing processing on the word vector matrixes of the first candidate sentences and the target sentences and the sentence vectors of the first candidate sentences and the target sentences to obtain feature matrixes of the first candidate sentences and the target sentences.
As one example, the word vector matrix of the first candidate sentence and the target sentence is in n×k form, the sentence vector of the first candidate sentence and the target sentence is in 1×k form, and the feature matrix of the first candidate sentence and the target sentence is in (n+1) ×k form.
S504: and carrying out convolution processing on the feature matrix to obtain a plurality of convolution features.
S505: and carrying out pooling treatment on the plurality of convolution features to obtain target features.
S506: and carrying out similarity-based prediction processing on the target features to obtain the statement similarity of the first candidate statement and the target statement.
According to the method for acquiring the sentence similarity, when the sentence similarity between the first candidate sentence and the target sentence is acquired, the word features based on the word dimensions are fused with the sentence features based on the sentence dimensions to obtain the feature matrix, the feature matrix not only has the sentence word information but also has the sentence semantic information, and the feature matrix is subjected to convolution processing, pooling processing and similarity-based prediction processing to calculate the sentence semantic similarity, so that the acquired sentence similarity between the first candidate sentence and the target sentence is more accurate.
For the above S501-S506, in the question-answer system, the target sentence is a question sentence, and the first candidate sentence is a first answer sentence. Referring to fig. 6, an input-output schematic diagram of a model architecture of a convolutional neural network is shown, the model comprising an input layer, a convolutional layer, a pooling layer, and a fully-connected layer. Firstly, inputting a first answer sentence and a target sentence into the input layer, performing word vector model-based coding processing on each word in the first answer sentence and each word in the question sentence, and outputting a word vector matrix of the first answer sentence and the question sentence; and carrying out coding processing based on a sentence vector model on the first answer sentence and the question sentence, and outputting sentence vectors of the first answer sentence and the question sentence.
And then, carrying out splicing processing on the word vector matrixes of the first answer sentences and the question sentences and the sentence vectors of the first answer sentences and the question sentences to obtain the feature matrixes of the first answer sentences and the question sentences.
Finally, inputting the feature matrix of the first answer sentence and the question sentence into a convolution layer for convolution processing to output a plurality of convolution features; inputting the multiple convolution features into a pooling layer for pooling treatment to output target features; and inputting the target features into a full-connection layer to perform similarity-based prediction processing, and outputting the statement similarity of the first answer statement and the question statement.
Aiming at the statement processing method provided by the embodiment, the embodiment of the application also provides a statement processing device.
Referring to fig. 7, fig. 7 is a schematic diagram of an apparatus for processing sentences according to an embodiment of the present application. As shown in fig. 7, the sentence processing apparatus 700 includes: an acquisition unit 701, a segmentation unit 702, a determination unit 703, and a fusion unit 704;
an obtaining unit 701, configured to obtain sentence similarities of the plurality of first candidate sentences and the target sentence, respectively;
a segmentation unit 702, configured to, if it is determined that none of the plurality of first candidate sentences is matched with the target sentence based on the sentence similarity, perform a segmentation process on the plurality of first candidate sentences to obtain a plurality of second candidate sentences;
A determining unit 703, configured to determine a plurality of first sentences to be fused from the plurality of second candidate sentences based on the importance parameter values of the second candidate sentences for the target sentences;
and a fusion unit 704, configured to perform fusion processing on the multiple first to-be-fused sentences based on the dependency relationships between the terms in the multiple first to-be-fused sentences to obtain a fusion sentence matched with the target sentence.
As a possible implementation manner, the determining unit 703 includes: a first acquisition subunit, a summation subunit, and a first determination subunit;
the first acquisition subunit is used for acquiring importance parameter values of each word in the second candidate sentence to the target sentence through an importance detection model; the importance detection model is obtained by training a preset neural network according to the importance label data of each word in the first training statement, the second training statement and the second training statement for the first training statement;
the summing subunit is used for carrying out summation processing on the importance parameter values of the words in the second candidate sentences for the target sentences and determining the importance parameter values of the second candidate sentences for the target sentences;
the first determining subunit is configured to determine a plurality of first statements to be fused from a plurality of second candidate statements based on the importance parameter value of the second candidate statements for the target statement and a preset threshold.
As a possible implementation manner, the apparatus further includes a training unit, where the training unit is configured to:
acquiring importance label data of each word in the first training sentence, the second training sentence and the second training sentence for the first training sentence;
inputting the first training sentences and the second training sentences into a preset neural network for prediction processing, and outputting the prediction label data of each word in the second training sentences for the first training sentences;
if the predicted tag data are not matched with the importance tag data, iteratively training network parameters of the preset neural network by using a loss function of the preset neural network;
and determining the trained preset neural network as an importance detection model.
As a possible implementation, the fusing unit 704 includes: a word alignment subunit and a first fusion subunit;
the word alignment subunit is used for carrying out word alignment processing on the plurality of first sentences to be fused to obtain a plurality of second sentences to be fused;
the first fusion subunit is used for carrying out fusion processing on the plurality of second sentences to be fused based on the dependency relationship among the words in the plurality of second sentences to be fused to obtain fusion sentences matched with the target sentences.
As one possible implementation, the first fusion subunit includes: the system comprises a determining module, a constructing module, a solving module and a fusion module;
the determining module is used for determining the fusion sequence of each word in the plurality of second sentences to be fused as a design variable;
the construction module is used for constructing an objective function representing the maximized problem based on the design variable and the dependency relationship among the words in the second to-be-fused sentences;
the solving module is used for solving the design variables based on the objective function and obtaining the objective fusion sequence of each word in the plurality of second sentences to be fused;
and the fusion module is used for carrying out fusion processing on each word in the second sentences to be fused according to the target fusion sequence to obtain fusion sentences.
As a possible implementation manner, a module is constructed for:
and constructing an objective function based on the design variable, the dependency relationship among the words in the plurality of second sentences to be fused and the importance parameter value of the words in the plurality of second sentences to be fused for the objective sentence.
As a possible implementation manner, the slicing unit 702 includes: an analysis subunit and a segmentation subunit;
an analysis subunit, configured to perform a syntactic structure analysis processing on the plurality of first candidate sentences to obtain syntactic structures of the plurality of first candidate sentences;
And the segmentation subunit is used for carrying out segmentation processing on the plurality of first candidate sentences based on the syntax structures of the plurality of first candidate sentences to obtain a plurality of second candidate sentences.
As a possible implementation manner, the obtaining unit 701 is configured to:
and carrying out similarity operation on each first candidate sentence based on the first word characteristics of the first candidate sentence, the first sentence characteristics of the first candidate sentence, the second word characteristics of the target sentence and the second sentence characteristics of the target sentence, and obtaining the sentence similarity of the first candidate sentence and the target sentence.
As one possible implementation manner, the acquiring unit 701 includes: the second determining subunit, the first operating subunit, the third determining subunit, the second operating subunit and the second fusing subunit;
a second determining subunit, configured to determine a first word feature based on the core word in the first candidate sentence; determining a second word feature based on the core word in the target sentence;
the first operation subunit is used for carrying out similarity operation on the first word characteristics and the second word characteristics to obtain word literal similarity of the first candidate sentence and the target sentence;
a third determining subunit, configured to determine a first sentence feature based on a word corresponding to a syntax structure of the first candidate sentence; determining a second sentence characteristic based on the words corresponding to the syntactic structure of the target sentence;
The second operation subunit is used for carrying out similarity operation on the first sentence characteristics and the second sentence characteristics to obtain sentence semantic similarity of the first candidate sentence and the target sentence;
and the second fusion subunit is used for carrying out fusion processing on the word literal similarity and the sentence semantic similarity to obtain the sentence similarity.
As a possible implementation manner, the third determining subunit is configured to:
determining a first sentence characteristic based on the word and the first weight corresponding to the syntax structure of the first candidate sentence; and determining a second sentence characteristic based on the word and the second weight corresponding to the syntactic structure of the target sentence.
As one possible implementation manner, the acquiring unit 701 includes: a first coding subunit, a second coding subunit, a third fusion subunit, a convolution subunit, a pooling subunit, and a prediction subunit;
the first coding subunit is used for carrying out coding processing on each word in the first candidate sentence and each word in the target sentence to obtain a first word characteristic and a second word characteristic;
the second coding subunit is used for carrying out coding processing on the first candidate sentence and the target sentence to obtain a first sentence characteristic and a second sentence characteristic;
The third fusion subunit is used for carrying out fusion processing on the first word characteristics, the second word characteristics, the first sentence characteristics and the second sentence characteristics to obtain a characteristic matrix;
the convolution subunit is used for carrying out convolution processing on the feature matrix to obtain a plurality of convolution features;
chi Huazi unit for pooling the multiple convolution features to obtain target features;
and the prediction subunit is used for carrying out similarity-based prediction processing on the target features to obtain sentence similarity.
The sentence processing apparatus provided in the above embodiment calculates, for a target sentence and a plurality of first candidate sentences, a sentence similarity between each first candidate sentence and the target sentence; when determining that none of the plurality of first candidate sentences is matched with the target sentence based on the sentence similarity, segmenting the plurality of first candidate sentences to obtain a plurality of second candidate sentences; determining a plurality of first sentences to be fused from the plurality of second candidate sentences through the importance parameter value of each second candidate sentence to the target sentence; and fusing the plurality of first sentences to be fused according to the dependency relationship among the words in the plurality of first sentences to be fused to obtain fused sentences matched with the target sentences.
Under the condition that the first candidate sentences are not matched with the target sentences based on sentence similarity, obtaining a plurality of first sentences to be fused which have importance for the target sentences through segmentation processing and importance determination aiming at the first candidate sentences; and fusing a plurality of first sentences to be fused into fusion sentences matched with the target sentences according to the dependency relationship among the words. Based on the method, even if a plurality of first candidate sentences are not matched with the target sentences, the actual requirements of the matched sentences of the target sentences can be met, and therefore the processing effect of application scenes such as a question-answering system and a search system is improved.
For the method of sentence processing described above, the embodiment of the present application further provides an apparatus for sentence processing, so that the method of sentence processing described above is actually implemented and applied, and the computer apparatus provided by the embodiment of the present application will be described from the perspective of hardware materialization.
Referring to fig. 8, fig. 8 is a schematic diagram of a server structure according to an embodiment of the present application, where the server 800 may have a relatively large difference between configurations or performances, and may include one or more central processing units (Central Processing Units, CPU) 822 (e.g., one or more processors) and a memory 832, and one or more storage mediums 830 (e.g., one or more mass storage devices) storing application programs 842 or data 844. Wherein the memory 832 and the storage medium 830 may be transitory or persistent. The program stored in the storage medium 830 may include one or more modules (not shown), each of which may include a series of instruction operations on a server. Still further, the central processor 822 may be configured to communicate with the storage medium 830 to execute a series of instruction operations in the storage medium 830 on the server 800.
Server 800 may also include one or more power supplies 826, one or more wired or wireless network interfaces 850, one or moreUpper input/output interface 858, and/or one or more operating systems 841, e.g., windows Server TM ,Mac OS X TM ,Unix TM ,Linux TM , FreeBSD TM Etc.
The steps performed by the server in the above embodiments may be based on the server structure shown in fig. 8.
CPU 822, among other things, is configured to perform the following steps:
acquiring sentence similarity between a plurality of first candidate sentences and target sentences respectively;
if the first candidate sentences are not matched with the target sentences based on the sentence similarity, carrying out segmentation processing on the first candidate sentences to obtain second candidate sentences;
determining a plurality of first sentences to be fused from the plurality of second candidate sentences based on the importance parameter values of the second candidate sentences for the target sentences;
and based on the dependency relationship among the words in the plurality of first sentences to be fused, carrying out fusion processing on the plurality of first sentences to be fused to obtain fusion sentences matched with the target sentences.
Optionally, CPU 822 may also perform the method steps of any particular implementation of the method of statement processing in embodiments of the present application.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a terminal device according to an embodiment of the present application. For convenience of explanation, only those portions of the embodiments of the present application that are relevant to the embodiments of the present application are shown, and specific technical details are not disclosed, please refer to the method portions of the embodiments of the present application. The terminal equipment can be any terminal equipment including a mobile phone, a tablet personal computer, a PDA and the like, and takes the terminal equipment as the mobile phone as an example:
fig. 9 is a block diagram showing a part of the structure of a mobile phone related to a terminal device provided by an embodiment of the present application. Referring to fig. 9, the mobile phone includes: radio Frequency (RF) circuitry 910, memory 920, input unit 930, display unit 940, sensor 950, audio circuitry 960, wireless fidelity (WiFi) module 970, processor 980, and power source 990. It will be appreciated by those skilled in the art that the handset construction shown in fig. 9 is not limiting of the handset and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The following describes the components of the mobile phone in detail with reference to fig. 9:
the RF circuit 910 may be used for receiving and transmitting signals during a message or a call, and particularly, after receiving downlink information of a base station, the signal is processed by the processor 980; in addition, the data of the design uplink is sent to the base station. Generally, the RF circuitry 910 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA for short), a duplexer, and the like. In addition, the RF circuitry 910 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to global system for mobile communications (Global System of Mobile communication, GSM for short), general packet radio service (General Packet Radio Service, GPRS for short), code division multiple access (Code Division Multiple Access, CDMA for short), wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA for short), long term evolution (Long Term Evolution, LTE for short), email, short message service (Short Messaging Service, SMS for short), and the like.
The memory 920 may be used to store software programs and modules, and the processor 980 implements various functional applications and data processing for the handset by running the software programs and modules stored in the memory 920. The memory 920 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 920 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The input unit 930 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the handset. In particular, the input unit 930 may include a touch panel 931 and other input devices 932. The touch panel 931, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (such as operations of the user on the touch panel 931 or thereabout using any suitable object or accessory such as a finger, a stylus, or the like) and drive the corresponding connection device according to a predetermined program. Alternatively, the touch panel 931 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 980, and can receive commands from the processor 980 and execute them. In addition, the touch panel 931 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The input unit 930 may include other input devices 932 in addition to the touch panel 931. In particular, other input devices 932 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
The display unit 940 may be used to display information input by a user or information provided to the user and various menus of the mobile phone. The display unit 940 may include a display panel 941, and optionally, the display panel 941 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 931 may overlay the display panel 941, and when the touch panel 931 detects a touch operation thereon or thereabout, the touch operation is transferred to the processor 980 to determine a type of touch event, and then the processor 980 provides a corresponding visual output on the display panel 941 according to the type of touch event. Although in fig. 9, the touch panel 931 and the display panel 941 are implemented as two separate components for the input and output functions of the mobile phone, in some embodiments, the touch panel 931 may be integrated with the display panel 941 to implement the input and output functions of the mobile phone.
The handset may also include at least one sensor 950, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 941 according to the brightness of ambient light, and the proximity sensor may turn off the display panel 941 and/or the backlight when the mobile phone moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for applications of recognizing the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured with the handset are not described in detail herein.
Audio circuitry 960, speaker 961, microphone 962 may provide an audio interface between a user and a cell phone. Audio circuit 960 may transmit the received electrical signal converted from audio data to speaker 961, where it is converted to a sound signal by speaker 961 for output; on the other hand, microphone 962 converts the collected sound signals into electrical signals, which are received by audio circuit 960 and converted into audio data, which are processed by audio data output processor 980 for transmission to, for example, another cell phone via RF circuit 910 or for output to memory 920 for further processing.
WiFi belongs to a short-distance wireless transmission technology, and a mobile phone can help a user to send and receive emails, browse webpages, access streaming media and the like through a WiFi module 970, so that wireless broadband Internet access is provided for the user. Although fig. 9 shows a WiFi module 970, it is understood that it does not belong to the necessary constitution of the handset, and can be omitted entirely as needed within the scope of not changing the essence of the invention.
The processor 980 is a control center of the handset, connecting various parts of the entire handset using various interfaces and lines, performing various functions and processing data of the handset by running or executing software programs and/or modules stored in the memory 920, and invoking data stored in the memory 920, thereby performing overall control of the handset. Optionally, processor 980 may include one or more processing units; preferably, the processor 980 may integrate an application processor with a modem processor, wherein the application processor primarily handles operating systems, user interfaces, applications programs, etc., and the modem processor primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 980.
The handset further includes a power supply 990 (e.g., a battery) for powering the various components, which may be logically connected to the processor 980 by a power management system, such as for performing charge, discharge, and power management functions via the power management system.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which will not be described herein.
In an embodiment of the present application, the memory 920 included in the mobile phone may store program codes and transmit the program codes to the processor.
The processor 980 included in the handset may perform the method of sentence processing provided by the above-described embodiments according to instructions in the program code.
The embodiment of the application also provides a computer readable storage medium for storing a computer program for executing the sentence processing method provided in the above embodiment.
Embodiments of the present application also provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions so that the computer device performs the method of sentence processing provided in various alternative implementations of the above aspects.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware related to program instructions, where the above program may be stored in a computer readable storage medium, and when the program is executed, the program performs steps including the above method embodiments; and the aforementioned storage medium may be at least one of the following media: read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic or optical disk, and other various media capable of storing program codes.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment is mainly described in a different point from other embodiments. In particular, for the apparatus and system embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, with reference to the description of the method embodiments in part. The apparatus and system embodiments described above are merely illustrative, in which elements illustrated as separate elements may or may not be physically separate, and elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The foregoing is only one specific embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions easily contemplated by those skilled in the art within the technical scope of the present application should be included in the scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (15)

1. A method of sentence processing, the method comprising:
acquiring sentence similarity between a plurality of first candidate sentences and target sentences respectively;
if the first candidate sentences are not matched with the target sentences based on the sentence similarity, carrying out segmentation processing on the first candidate sentences to obtain second candidate sentences;
determining a plurality of first sentences to be fused from the plurality of second candidate sentences based on importance parameter values of the second candidate sentences for the target sentences;
and based on the dependency relationship among the words in the plurality of first sentences to be fused, carrying out fusion processing on the plurality of first sentences to be fused to obtain the fusion sentence matched with the target sentence.
2. The method of claim 1, wherein the determining a plurality of first statements to be fused from the plurality of second candidate statements based on the importance parameter value of the second candidate statements for the target statement comprises:
Acquiring importance parameter values of each word in the second candidate sentence for the target sentence through an importance detection model; the importance detection model is obtained by training a preset neural network according to the importance label data of each word in the first training statement, the second training statement and the second training statement;
summing the importance parameter values of the target sentences of the words in the second candidate sentences to determine the importance parameter values of the target sentences of the second candidate sentences;
and determining the first to-be-fused sentences from the second candidate sentences based on the importance parameter values of the second candidate sentences for the target sentences and a preset threshold value.
3. The method of claim 2, wherein the training step of the importance detection model comprises:
acquiring importance label data of each word in the first training sentence, the second training sentence and the second training sentence for the first training sentence;
inputting the first training sentence and the second training sentence into the preset neural network for prediction processing, and outputting the prediction label data of each word in the second training sentence for the first training sentence;
If the predicted tag data are not matched with the importance tag data, iteratively training network parameters of the preset neural network by using a loss function of the preset neural network;
and determining the trained preset neural network as the importance detection model.
4. The method of claim 1, wherein the fusing the plurality of first to-be-fused sentences to obtain the fusion sentence matched with the target sentence based on the dependency relationship between the words in the plurality of first to-be-fused sentences comprises:
word alignment processing is carried out on the plurality of first sentences to be fused, so that a plurality of second sentences to be fused are obtained;
and based on the dependency relationship among the words in the plurality of second sentences to be fused, carrying out fusion processing on the plurality of second sentences to be fused to obtain the fusion sentence matched with the target sentence.
5. The method of claim 4, wherein the fusing the plurality of second to-be-fused sentences to obtain the fusion sentence matched with the target sentence based on the dependency relationship between the words in the plurality of second to-be-fused sentences comprises:
Determining the fusion sequence of each word in the plurality of second sentences to be fused as a design variable;
constructing an objective function representing a maximized problem based on the dependency relationship between the design variable and each word in the plurality of second to-be-fused sentences;
solving the design variables based on the objective function to obtain a target fusion sequence of each word in the plurality of second sentences to be fused;
and carrying out fusion processing on each word in the second sentences to be fused according to the target fusion sequence to obtain the fusion sentence.
6. The method of claim 5, wherein constructing an objective function representing a maximized question based on the design variable and the dependency relationship between each word in the plurality of second to-be-fused sentences, comprises:
and constructing the objective function based on the design variable, the dependency relationship among the words in the plurality of second to-be-fused sentences and the importance parameter value of the words in the plurality of second to-be-fused sentences for the objective sentence.
7. The method of claim 1, wherein the performing a segmentation process on the plurality of first candidate sentences to obtain a plurality of second candidate sentences comprises:
Performing syntactic structure analysis processing on the plurality of first candidate sentences to obtain syntactic structures of the plurality of first candidate sentences;
and based on the syntactic structures of the plurality of first candidate sentences, performing segmentation processing on the plurality of first candidate sentences to obtain the plurality of second candidate sentences.
8. The method of claim 1, wherein the obtaining sentence similarities of the plurality of first candidate sentences to the target sentence, respectively, comprises:
and carrying out similarity operation on each first candidate sentence based on the first word characteristics of the first candidate sentence, the first sentence characteristics of the first candidate sentence, the second word characteristics of the target sentence and the second sentence characteristics of the target sentence, and obtaining the sentence similarity of the first candidate sentence and the target sentence.
9. The method of claim 8, wherein the performing a similarity operation based on the first word feature of the first candidate sentence, the first sentence feature of the first candidate sentence, the second word feature of the target sentence, and the second sentence feature of the target sentence, obtaining the sentence similarity of the first candidate sentence and the target sentence comprises:
Determining the first word characteristics based on core words in the first candidate sentence; determining the second word characteristics based on the core words in the target sentence;
performing similarity operation on the first word characteristics and the second word characteristics to obtain word literal similarity of the first candidate sentence and the target sentence;
determining the first sentence characteristics based on words corresponding to the syntactic structures of the first candidate sentences; determining the second sentence characteristics based on words corresponding to the syntactic structure of the target sentence;
performing similarity operation on the first sentence characteristics and the second sentence characteristics to obtain sentence semantic similarity of the first candidate sentence and the target sentence;
and carrying out fusion processing on the word literal similarity and the sentence semantic similarity to obtain the sentence similarity.
10. The method of claim 9, wherein the determining the first sentence feature based on the word corresponding to the syntactic structure of the first candidate sentence comprises:
determining the first sentence characteristics based on the words and the first weights corresponding to the syntactic structures of the first candidate sentences;
The determining the second sentence feature based on the word corresponding to the syntax structure of the target sentence includes:
and determining the second sentence characteristics based on the words and the second weights corresponding to the syntactic structures of the target sentences.
11. The method of claim 8, wherein the performing a similarity operation based on the first word feature of the first candidate sentence, the first sentence feature of the first candidate sentence, the second word feature of the target sentence, and the second sentence feature of the target sentence, obtaining the sentence similarity of the first candidate sentence and the target sentence comprises:
encoding each word in the first candidate sentence and each word in the target sentence to obtain the first word characteristic and the second word characteristic;
encoding the first candidate sentence and the target sentence to obtain the first sentence characteristic and the second sentence characteristic;
performing fusion processing on the first word features, the second word features, the first sentence features and the second sentence features to obtain a feature matrix;
performing convolution processing on the feature matrix to obtain a plurality of convolution features;
Pooling the plurality of convolution features to obtain target features;
and carrying out similarity-based prediction processing on the target features to obtain the sentence similarity.
12. An apparatus for sentence processing, the apparatus comprising: the device comprises an acquisition unit, a segmentation unit, a determination unit and a fusion unit;
the acquisition unit is used for acquiring sentence similarity between a plurality of first candidate sentences and target sentences respectively;
the segmentation unit is used for carrying out segmentation processing on the plurality of first candidate sentences to obtain a plurality of second candidate sentences if the plurality of first candidate sentences are determined to be not matched with the target sentences based on the sentence similarity;
the determining unit is used for determining a plurality of first sentences to be fused from the plurality of second candidate sentences based on importance parameter values of the second candidate sentences for the target sentences;
the fusion unit is used for carrying out fusion processing on the plurality of first sentences to be fused based on the dependency relationship among the words in the plurality of first sentences to be fused to obtain fusion sentences matched with the target sentences.
13. A computer device, the device comprising a processor and a memory:
The memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to perform the method of sentence processing according to any of claims 1-11 according to instructions in the program code.
14. A computer readable storage medium for storing a computer program which, when executed by a processor, performs the method of sentence processing according to any one of claims 1-11.
15. A computer program product comprising a computer program or instructions; a method of performing the sentence processing of any of claims 1-11 when said computer program or instructions are executed by a processor.
CN202210499322.XA 2022-05-09 2022-05-09 Statement processing method and related device Pending CN117094307A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210499322.XA CN117094307A (en) 2022-05-09 2022-05-09 Statement processing method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210499322.XA CN117094307A (en) 2022-05-09 2022-05-09 Statement processing method and related device

Publications (1)

Publication Number Publication Date
CN117094307A true CN117094307A (en) 2023-11-21

Family

ID=88773940

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210499322.XA Pending CN117094307A (en) 2022-05-09 2022-05-09 Statement processing method and related device

Country Status (1)

Country Link
CN (1) CN117094307A (en)

Similar Documents

Publication Publication Date Title
CN109145303B (en) Named entity recognition method, device, medium and equipment
US10956771B2 (en) Image recognition method, terminal, and storage medium
KR102360659B1 (en) Machine translation method, apparatus, computer device and storage medium
US11416681B2 (en) Method and apparatus for determining a reply statement to a statement based on a sum of a probability of the reply statement being output in response to the statement and a second probability in which the statement is output in response to the statement and further based on a terminator
CN110515626B (en) Code compiling method of deep learning calculation framework and related product
CN111046227B (en) Video duplicate checking method and device
CN110704661B (en) Image classification method and device
CN111816159B (en) Language identification method and related device
CN108984535B (en) Statement translation method, translation model training method, device and storage medium
CN110570840B (en) Intelligent device awakening method and device based on artificial intelligence
CN110110045B (en) Method, device and storage medium for retrieving similar texts
CN110162603B (en) Intelligent dialogue method, dynamic storage method and device
CN110555337B (en) Method and device for detecting indication object and related equipment
CN115859220B (en) Data processing method, related device and storage medium
CN112749252A (en) Text matching method based on artificial intelligence and related device
CN111611369B (en) Interaction method and related device based on artificial intelligence
CN112328783A (en) Abstract determining method and related device
CN111723783B (en) Content identification method and related device
CN117094307A (en) Statement processing method and related device
CN116933149A (en) Object intention prediction method and device, electronic equipment and storage medium
CN113569043A (en) Text category determination method and related device
CN116450808B (en) Data processing method and device and storage medium
CN117057345B (en) Role relation acquisition method and related products
CN113535926B (en) Active dialogue method and device and voice terminal
CN117541834A (en) Video clustering method and related device

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