[go: up one dir, main page]

CN111400454A - Abstract generation method and device, electronic equipment and storage medium - Google Patents

Abstract generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111400454A
CN111400454A CN202010188547.4A CN202010188547A CN111400454A CN 111400454 A CN111400454 A CN 111400454A CN 202010188547 A CN202010188547 A CN 202010188547A CN 111400454 A CN111400454 A CN 111400454A
Authority
CN
China
Prior art keywords
text
abstract
target
language
languages
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
CN202010188547.4A
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010188547.4A priority Critical patent/CN111400454A/en
Publication of CN111400454A publication Critical patent/CN111400454A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/3332Query translation
    • G06F16/3337Translation of the query language, e.g. Chinese to English
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • G06F16/355Creation or modification of classes or clusters
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Mathematical Physics (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Machine Translation (AREA)

Abstract

The embodiment of the disclosure discloses a summary generation method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring at least one source text; acquiring at least one target language; inputting at least one source text and indication information matched with each target language into a pre-trained abstract generation model, wherein the abstract generation model is used for simplifying at least one first text into at least one second text, simultaneously translating languages in a first language set corresponding to each first text into at least one language in a second language set respectively and serving as the languages corresponding to each second text respectively, and the first language set comprises a plurality of languages; the second set of languages comprises a plurality of languages; and acquiring abstract texts which are output by the abstract generation model and respectively correspond to the target languages. The method and the device for generating the abstract can improve the efficiency and accuracy of the abstract generation.

Description

Abstract generation method and device, electronic equipment and storage medium
Technical Field
The embodiment of the disclosure relates to the field of text recognition, and in particular, to a method and a device for generating an abstract, an electronic device, and a storage medium.
Background
At present, with the development of networks, people can conveniently acquire and read international documents. However, when the reader reads the international document, the large amount of text data and the non-native language contained in the international document cause the reader to spend a lot of time reading.
At present, key information can be extracted from a document in an original language, an abstract in the original language is generated, and the abstract in the original language is translated to generate an abstract in a target language, so that a reader can quickly know the content of the document and further determine whether to continue to read the document deeply.
The document abstract generation method can only support the translation from one language to another language. At this time, if there are articles in different languages with similar contents, the articles need to be extracted and translated respectively, and key information of a plurality of articles with similar contents cannot be acquired quickly.
Disclosure of Invention
The embodiment of the disclosure provides a method and a device for generating an abstract, an electronic device and a storage medium, which can improve the efficiency and accuracy of the abstract generation.
In a first aspect, an embodiment of the present disclosure provides a digest generation method, including:
acquiring at least one source text;
acquiring at least one target language;
inputting at least one source text and indication information matched with each target language into a pre-trained abstract generation model, wherein the abstract generation model is used for simplifying at least one first text into at least one second text, simultaneously translating languages in a first language set corresponding to each first text into at least one language in a second language set respectively and serving as the languages corresponding to each second text respectively, the first language set comprises a plurality of languages, the first language set comprises the languages to be translated corresponding to each source text respectively, the second language set comprises a plurality of languages, and the second language set comprises each target language;
and acquiring abstract texts which are output by the abstract generation model and respectively correspond to the target languages.
In a second aspect, an embodiment of the present disclosure further provides an apparatus for generating a summary, including:
the source text acquisition module is used for acquiring at least one source text;
the target language specifying module is used for acquiring at least one target language;
the abstract generating module is used for inputting at least one source text and indicating information matched with each target language into an abstract generating model trained in advance, the abstract generating model is used for simplifying at least one first text into at least one second text, simultaneously, languages in a first language set corresponding to each first text are translated into at least one language in a second language set respectively and are used as languages corresponding to each second text respectively, the first language set comprises a plurality of languages, and the first language set comprises languages to be translated corresponding to each source text respectively; the second language set comprises a plurality of languages, the second language set comprising each of the target languages;
and the abstract text acquisition module is used for acquiring the abstract text which is output by the abstract generation model and corresponds to each target language respectively.
In a third aspect, an embodiment of the present disclosure further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the digest generation method according to any one of the embodiments of the present disclosure.
In a fourth aspect, the disclosed embodiments also provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the digest generation method according to any one of the disclosed embodiments.
The method and the device for generating the abstract have the advantages that at least one source text is input into a pre-trained abstract generating model, and at least one target language is designated to obtain the abstract texts which are output by the abstract generating model and respectively correspond to the target languages, so that the problems that in the prior art, the abstract texts from a document in one language to another language can be realized only by multi-step text processing, and only the translation from one language to another language can be supported are solved, the abstract generating and the abstract translating can be realized only by the abstract generating model at the same time, the process of the abstract generating is simplified, the error transmission of intermediate links is reduced, the accuracy of the abstract translating is greatly improved, meanwhile, the simultaneous multi-language conversion can be supported, and the efficiency of the abstract generating is improved.
Drawings
FIG. 1 is a flow chart of a summary generation method in an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a prior art Seq2Seq model;
FIG. 3 is a schematic diagram of an encoder in a Seq2Seq model to which embodiments of the present disclosure are applicable;
FIG. 4 is a schematic diagram of a decoder in a Seq2Seq model to which embodiments of the present disclosure are applicable;
FIG. 5 is a schematic diagram of a Seq2Seq model to which embodiments of the present disclosure are applicable;
fig. 6 is a schematic structural diagram of a summary generation apparatus in an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an electronic device in an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Examples
Fig. 1 is a flowchart of a digest generation method in an embodiment of the present disclosure, which may be applied to simplify and translate at least one source text into a digest text corresponding to at least one arbitrarily specified target language, where the method may be executed by a digest generation apparatus, the apparatus may be implemented in software and/or hardware, the apparatus may be configured in an electronic device, and specifically, the electronic device may be a terminal device, and may include a mobile phone, a vehicle-mounted terminal, a notebook computer, or the like, or may be a server. As shown in fig. 1, the method specifically includes the following steps:
s110, at least one source text is obtained.
The source text is used as text to be converted (including simplification and translation), and may be text extracted from a document file. The source text may include text in at least one language. For example, the source text may include only chinese: i love singing, or may include english and chinese: i love to sing, wherein the source text comprises english text I love to and chinese text sing.
The language to be translated may refer to the language of the source text. If the source text is a single language text, the language to be translated is the single language. If the source text is a text of a mixed language, the language to be translated is the mixed language or one of the mixed languages. For example, the language to be translated may be a language with the most words in a mixed language, for example, the source text is Ilove to sing, english includes 3 words, and chinese includes 1 word, the number of words in english is greater than the number of words in chinese, and the language to be translated is english.
S120, at least one target language is obtained.
The target language is used to determine the language in which the text is translated. The target language is usually specified by a user, and may be randomly specified according to a set rule. Specifically, input information of a user is acquired to determine a target language.
S130, inputting at least one source text and indication information matched with each target language into a pre-trained abstract generating model, where the abstract generating model is used to reduce at least one first text into at least one second text, and translate languages in a first language set corresponding to each first text into at least one language in a second language set respectively as languages corresponding to each second text, where the first language set includes multiple languages, the first language set includes languages to be translated corresponding to each source text, the second language set includes multiple languages, and the second language set includes each target language.
The abstract generation model is used for converting (including simplifying and translating) any text into abstract text of any language, specifically, simplifying at least one first text to form at least one second text with shorter semanteme similarity, and simultaneously, translating the language of the at least one first text into another language or languages, namely the language of the at least one second text. The abstract generation model includes a machine learning model, for example, a neural network model, specifically, a single neural network model (such as a convolutional neural network model) or a converged neural network model (such as a model that merges a convolutional neural network and a cyclic neural network), and the like. The first set of languages includes at least two languages and the second set of languages includes at least two languages. The first language set and the second language set are not identical, and the language set formed by the first language set and the second language set comprises at least three languages. The language of the first text belongs to a first set of languages and the language of the second text belongs to a second set of languages.
The indication information of the target language matching is used for identifying the target language, and the indication information of the target language matching is different. For example, the indication information may be a set character, such as 1-chinese, 2-english, 3-japanese, or a-chinese, b-english, c-japanese, and may also be a symbol, which is not limited in this disclosure.
In practice, the abstract generation model can convert (including simplify and translate) one source text into an abstract text of one target language, can also convert (including simplify and translate) at least two source texts into an abstract text of at least one target language, or can convert (including simplify and translate) at least one source text into an abstract text of at least two target languages, each abstract text corresponding to a different target language. Specifically, the number of source texts and abstract texts associated with one conversion operation of the abstract generation model is at least three.
The method includes inputting at least one source text into the abstract generating model, wherein the source texts are capable of being simultaneously input into the abstract generating model, and languages corresponding to the source texts can be the same, partially different or completely different. And if the number of the source texts is at least two, the semantics of the source texts are similar, and the topics are the same.
Optionally, the obtaining at least one source text includes: acquiring at least two source texts, wherein the languages to be translated corresponding to the source texts are different; inputting at least one source text and indication information matched with each target language into a pre-trained abstract generation model, wherein the method comprises the following steps: and if each source text meets the semantic similarity condition, inputting at least two source texts and indication information matched with each target language into a pre-trained abstract generation model.
The number of the source texts is at least two, the corresponding languages to be translated are different, and at the moment, the abstract generation model is actually used for simultaneously converting the multiple texts. It can be appreciated that if the semantics of multiple source texts differ too much, the multiple source texts cannot be converted into the same abstract text. Thus, a plurality of source texts that can be simultaneously converted need to satisfy a semantic similarity condition. Each source text meets the semantic similarity condition, namely the subjects of the source texts are the same. The semantic similarity condition is used for judging whether the semantic similarity of the source texts is realized, namely whether the subjects are the same. Specifically, the semantic similarity condition may be to determine whether the similarity between two source texts exceeds a set threshold.
It is understood that the subject matter of the source texts is the same, which means that the central contents of the source texts are the same, or the descriptions of the same thing, but the contents are different in part, different in expression, or different in detail. For example, each source text is a report for the same news event, but the specific content of the news text provided by different countries is different, and the text for the news event on the websites of different countries can be obtained as the source text in different languages. In addition, report texts provided by news agencies in different countries for the news event may be acquired as a plurality of source texts.
It should be noted that the source texts meeting the semantic similarity condition may be determined manually, or text features of the source texts may be extracted respectively and compared, so as to classify the source texts, and the source texts belonging to the same category meet the semantic similarity condition. In addition, the determination may be performed in other manners, for example, a plurality of source texts may be respectively input into a pre-trained semantic similarity determination model (such as a machine learning model), and a comparison result output by the semantic similarity determination model is obtained to determine whether semantics of the source texts are similar. The method for judging semantic similar conditions may be selected as needed, and the embodiment of the present disclosure is not particularly limited thereto.
If the source texts do not meet the semantic similarity condition, the topic of each source text is different, the abstract text with the same semantic meaning cannot be generated, at the moment, the source texts are input into the abstract generation model, and the obtained abstract text is usually wrong. Therefore, if the source texts do not meet the semantic similarity condition, the source texts are not input into the abstract generation model.
When at least two source texts meet the semantic similarity condition, the source texts are input into the abstract generation model for conversion, so that the source texts which do not meet the semantic similarity condition are prevented from being input into the abstract generation model for conversion, the number of wrong generated abstract texts is reduced, and the cost for generating the abstract texts is reduced.
And inputting indication information of at least one target language to the abstract generation model, wherein the abstract generation model can output abstract texts of a plurality of target languages. If the number of the abstract texts is at least two, the semantics of the abstract texts are the same, and the language of each abstract text is different.
Optionally, the obtaining at least one target language includes: at least two target languages are obtained, each of the target languages being different.
The abstract generation model can translate the language to be translated of the source text into a plurality of languages, correspondingly, a plurality of abstract texts are generated, and the target languages corresponding to the abstract texts are different. At least two abstract texts can be generated simultaneously through the abstract generation model, the number of language translations is increased, and the efficiency of the abstract text translation is improved.
And S140, acquiring abstract texts which are output by the abstract generation model and respectively correspond to the target languages.
The abstract text is used to summarize the content of the source text, and the abstract text may refer to a text with the same subject as the source text and different languages, and specifically may be a text formed by extracting key information in the source text. It can be understood that the abstract text has the same subject as the source text, which indicates that the abstract text can summarize the key information of the source text and eliminate the redundant information in the source text. For example, source text includes arguments and points of discourse, and abstract text includes causes, passages, and results of events, as well as abstract text including causes and results of events.
The abstract generation model can respectively output a plurality of abstract texts according to a plurality of specified target languages, each abstract text corresponds to one target language, and the target languages corresponding to different abstract texts are different.
The total number of the source texts and the abstract texts is at least three, which indicates that at least two source texts are converted into one abstract text or one source text is converted into two abstract texts, wherein the language corresponding to each source text is different, and the target language corresponding to each abstract text is different.
The method and the device for generating the abstract have the advantages that at least one source text with similar semantics is input into a pre-trained abstract generating model, and at least one target language is designated to obtain the abstract texts which are output by the abstract generating model and respectively correspond to the target languages, so that the problems that in the prior art, the abstract texts from a document in one language to a document in another language can be realized only by multi-step text processing, and the translation from one language to another language can be supported only are solved, the abstract generating and the abstract translating can be realized simultaneously only through the abstract generating model, the process of abstract generating is simplified, the error transmission of intermediate links is reduced, the accuracy of abstract translating is greatly improved, simultaneously, the simultaneous conversion of multiple languages can be supported, and the efficiency of abstract generating is improved.
Optionally, the digest generation model is a Seq2Seq model, and the digest generation model includes an encoder and a decoder; the total number of the encoders and the decoders is at least three, different encoders correspond to different source texts, and different decoders correspond to different target languages.
The abstract generation model is a Seq2Seq model (sequence-to-sequence model). In practice, the Seq2Seq model is a variant of the recurrent neural network, comprising an Encoder (Encoder) and a Decoder (Decoder). Wherein the encoder and decoder comprise a neural network model. In practice, both the encoder and decoder may be constructed based on neural network models. Wherein the neural network module may include at least one of: a convolutional neural network model, a cyclic neural network model, a deep neural network model, a back propagation neural network model, a long-short term memory network model, and a gate repeat unit model.
As shown in fig. 2, the encoder is used for encoding the information of the sequence, and encoding sequence information x of any length into a feature vector c, specifically, segmenting and transcoding the text sequence represented by the source text into feature vectors. The decoder is used for analyzing the feature vector c according to the context information to form a text sequence y, namely a summary text. The feature vectors are actually used to characterize the features of the source text.
Wherein an encoder is used for encoding a source text. If there are multiple source texts, one source text is encoded by one encoder, and different encoders perform the encoding operations for different source texts. I.e. the encoders correspond one-to-one to the source text. When the languages to be translated corresponding to the source texts are different, the encoders correspond to the languages to be translated one by one. The language to be translated refers to the language corresponding to the source text.
A decoder is used for decoding and forming a target abstract text corresponding to a target language. One target language is decoded by one decoder, and different decoders perform decoding operations of the digest texts corresponding to different target languages. I.e. the decoders correspond one-to-one to the target language.
The total number of encoders and decoders is at least three, indicating a transition from at least two source texts to one abstract text, or a transition from one source text to two abstract texts, wherein each source text corresponds to a different language and each abstract text corresponds to a different target language.
By adopting the Seq2Seq model to realize the abstract of the abstract text from the source text to the target language, the source text can be directly converted into the text sequence of the specified language as the abstract text as the text sequence, the process of generating the abstract is simplified, the abstract error amplified in the middle link when the abstract is generated through multiple steps is reduced, the efficiency of generating the abstract is improved, and the accuracy of the abstract is improved.
Specifically, the encoding process of the encoder includes: segmenting a source text to form at least one source text sequence segment, wherein the source text sequence segment comprises at least one of the following words, terms, sentences and paragraphs; and sequentially transforming the initial vectors according to the source text sequence segments to form feature vectors.
In practice, both the encoder and decoder are neural network models, and the network structure may include hidden layers. The hidden layer comprises a plurality of hidden layer vectors.
Wherein the segments of the source text sequence are used to compose the source text. The initial vector is a preset vector and is used for generating a hidden layer vector by combining all the source text sequence segments and finally forming a feature vector. The feature vector is used for characterizing features of the source text, and specifically may include text content in the source text, and fixed collocation information between words, sentences, paragraphs, and the like.
Illustratively, as shown in FIG. 3, h1、h2、h3……hnIs a hidden layer vector, related to the state at the previous time and the current input. h is0Is a predetermined initial hidden layer vector, x1、x2、x3……xnIs a segment of a source text sequence and c is a feature vector. According to h0And at this moment input x1Calculate h1According to h1And at this moment input x2Calculate h2By analogy, according to hnAnd at this moment input xnAnd c is calculated.
In addition, a plurality of encoders may be configured to perform multi-level analysis on the source text, for example, vector representation is performed on the source text at a word level, a sentence level and a paragraph level, respectively, and the final feature vector c is formed by superposition, so as to extract text features and content information in the source text as much as possible. Wherein the plurality of word sequences form a sentence sequence, and the plurality of sentence sequences form a paragraph sequence. The number of encoders and the parsing level of the source text may be set according to needs, and thus, the embodiments of the present disclosure are not limited specifically.
Specifically, the decoding process of the decoder includes: analyzing the feature vector to determine at least one alternative text sequence segment; and determining a target text sequence segment from the at least one candidate text sequence segment, and splicing to form a text sequence of the target language.
In fact, a time instant or a secondary decoding may calculate a hidden layer vector and output a plurality of text sequence segments and a probability of each text sequence segment, where the text sequence segments are candidate text sequence segments, and the probability of a text sequence segment is used to describe a probability that the text sequence segment is the current time instant or the output of the current decoding. According to the probability of each alternative text sequence segment, the segment with the highest probability is selected as the target text sequence segment to be spliced into the abstract text. The target text sequence segments are used to compose a summary text.
Specifically, when the decoder parses the feature vector, the feature vector is usually used as an input, a hidden layer vector corresponding to the current time is obtained through calculation, candidate text sequence segments are determined, the probability (such as confidence) of each candidate text sequence segment is calculated, and the target text sequence segment is determined according to the probability of each candidate text sequence segment. And subsequently, determining and calculating a hidden layer vector corresponding to the current moment according to the hidden layer vector obtained at the previous moment, determining candidate text sequence segments corresponding to the current moment, calculating the probability of each candidate text sequence segment, and further determining a target text sequence segment corresponding to the current moment. Exemplarily, the hidden layer vector corresponding to the current time is calculated according to the hidden layer vector obtained at the previous time, and the target text sequence segment is determined, the hidden layer vector corresponding to the current time may be calculated only according to the hidden layer vector obtained at the previous time, and the hidden layer vector corresponding to the current time and the target text sequence segment corresponding to the current time may also be determined according to the hidden layer vector, the feature vector and the target text sequence segment obtained at the previous time.
According to the probability of each candidate text sequence segment, the target text sequence segment with the highest probability is selected, for example, the probability of the candidate text sequence segment matched with the target language is higher than that of the candidate text sequence segment not matched with the target language, so that the target text sequence segment corresponding to the target language is selected.
Illustratively, as shown in FIG. 4, h1’、h2’、h3’……hn' is a hidden layer vector, related to the state at the previous time and the current input. h is0' is a preset initial hidden layer vector, y1、y2、y3……ynTo output the sequence, c is the feature vector. According to h0' and c calculate h1', again according to h1' and c calculate h2By analogy, according to hn-1' and c calculate hn'. At the same time according to h0、h1', c calculating the probability of a plurality of alternative text sequence segments and determining therefrom the target text sequence segment as y1Output according to h1’、y1And c, calculating the probability of a plurality of candidate text sequence segments and determining the target text sequence segment as y2Output, analogize with the rest, according to hn-1’、yn-1And c output yn. For y1、y2、y3……ynAnd splicing to obtain a text which is the abstract text.
In an exemplary embodiment, optionally, the obtaining of the digest texts output by the digest generation model and respectively corresponding to the target languages includes: respectively extracting corresponding source text sequence segments in the source text through a plurality of encoders in the abstract generating model, and carrying out fusion encoding to form a target characteristic vector of the source text; and mapping the target characteristic vector into a text sequence of a target language as a summary text by a decoder in the summary generation model according to the target characteristic vector and the target language.
The target feature vector is used for describing text features of a plurality of source texts, and may include content information of the plurality of source texts and fixed collocation information of respective words, sentences, paragraphs and the like.
At this time, the number of the source texts is at least two, and the number of the specified target languages is one. Accordingly, the number of encoders operating in the digest generation model is at least two, and the number of decoders is one.
And each encoder respectively segments the corresponding source text, forms a source text sequence segment, and calculates respective hidden layer vectors to obtain the feature vectors. The fusion coding is used for adding the feature vectors obtained by the encoders to obtain a target feature vector. For example, the feature vector obtained by the encoder a for the first source text is a, the feature vector obtained by the encoder B for the second source text is B, and the target feature vector c is a + B.
The decoder decodes the target feature vector, maps the target feature vector into a target text sequence segment, and splices to form a text sequence of the target language, and the decoding process can refer to the foregoing.
The method comprises the steps of configuring a plurality of encoders, encoding the source texts in a one-to-one correspondence mode to obtain target characteristic vectors, decoding the target characteristic vectors through a decoder to obtain abstract texts, and achieving the effect that the abstract texts comprise the contents of the source texts, so that the abstract texts are more accurate.
In an exemplary embodiment, optionally, the obtaining of the digest texts output by the digest generation model and respectively corresponding to the target languages includes: extracting a source text sequence segment in the source text through an encoder in the abstract generation model, and encoding to form a target characteristic vector of the source text; and respectively mapping the target feature vectors into text sequences by a plurality of decoders in the abstract generation model according to the target languages, and determining abstract texts corresponding to the decoders.
At this time, the number of the source texts is one, and the number of the specified target languages is at least two. Accordingly, the number of encoders operating in the digest generation model is one, and the number of decoders is at least two.
And the encoder segments the source text, forms a source text sequence segment, and calculates a hidden layer vector to obtain a target characteristic vector.
And each decoder decodes the target characteristic vector, maps the target characteristic vector into a target text sequence segment, and splices to form a text sequence of the target language, wherein the decoding process of each decoder is independent, and the decoding process can refer to the above.
By configuring a plurality of decoders, the target feature vectors corresponding to the source text are decoded according to different target languages respectively to obtain abstract texts of different languages, so that the abstract texts of a plurality of languages are obtained simultaneously, multi-language abstract text translation is supported, and the generation efficiency of the abstract texts is improved.
In an exemplary embodiment, optionally, the obtaining of the digest texts output by the digest generation model and respectively corresponding to the target languages includes: respectively extracting corresponding source text sequence segments in the source text through a plurality of encoders in the abstract generating model, and carrying out fusion encoding to form a target characteristic vector of the source text; and respectively mapping the target feature vectors into text sequences by a plurality of decoders in the abstract generation model according to the target languages, and determining abstract texts corresponding to the decoders.
At this time, the number of the source texts is at least two, and the number of the specified target languages is at least two. Accordingly, the number of encoders operating in the digest generation model is at least two, and the number of decoders is at least two.
And each encoder respectively segments the corresponding source text, forms a source text sequence segment, and calculates respective hidden layer vectors to obtain the feature vectors. The fusion coding is used for adding the feature vectors obtained by the encoders to obtain a target feature vector.
And each decoder decodes the target characteristic vector, maps the target characteristic vector into a target text sequence segment, and splices to form a text sequence of a target language, wherein the decoding process of each decoder is independent.
Illustratively, as shown in fig. 5, the Seq2Seq model in the embodiment of the present disclosure is configured with at least one encoder and at least one decoder, and each encoder respectively corresponds to a source text xiCoding and overlapping to form a target characteristic vector c, specifically a source text xiAnd the represented text sequence is segmented and coded and converted into a feature vector, and the feature vectors are superposed to form a target feature vector c. Each decoder is used for analyzing the target characteristic vector c according to the context information to form a text sequence yiI.e. summary text.
The method comprises the steps of obtaining target characteristic vectors by configuring a plurality of encoders and encoding source texts in a one-to-one correspondence mode, and simultaneously obtaining abstract texts in different languages by configuring a plurality of decoders and decoding the target characteristic vectors corresponding to the source texts according to different target languages respectively, so that the abstract texts comprise contents of a plurality of source texts, the abstract texts are more accurate, and the generation efficiency of the abstract texts is improved.
Optionally, the abstract generating model further includes: an attention module, configured to calculate hidden layer vector weights in the encoders and historical text sequence segment weights output by the decoder, so that the decoder decodes the feature vector based on the hidden layer vector weights and the historical text sequence segment weights.
The historical text sequence segment refers to a target text sequence segment output by a decoder between current moments. The hidden layer vector is used for determining a hidden layer vector at the next moment and a target text sequence segment at the next moment. The hidden layer vector includes characteristic information of the source text.
When the decoder analyzes the feature vector, the target text sequence segment output at the current moment is not only associated with the feature vector, the hidden layer vector of the decoder at the last moment and the historical text sequence segment corresponding to the last moment, but also associated with the hidden layer vector in the encoder.
The Attention module (Attention) is used for respectively allocating weights to the feature vector, the hidden layer vector of the decoder at the last moment, the historical text sequence segment corresponding to the last moment and the hidden layer vector in the encoder so as to express the influence of each element on the target text sequence segment output at the current moment.
The weights of hidden layer vectors in each encoder, hidden layer vectors of a decoder at the previous moment and historical text sequence segments corresponding to the previous moment are determined through an Attention module (Attention), weighted summation is carried out, hidden layer vectors and target text sequence segments at the next moment are calculated, text characteristic information loss of a source text is reduced, and therefore the target text sequence segments are determined more accurately.
In an exemplary embodiment, optionally, before inputting at least two source texts into the pre-trained abstract generating model, the method further includes: acquiring a sample pair set, wherein each sample pair in the sample pair set comprises at least one target source text and at least one target abstract text, the total number of the target source texts and the target abstract texts is at least three, and each target abstract text is labeled with language information; and training the initial model according to the sample pair set to form a summary generation model.
Wherein, the sample pair refers to the combination of the target source text and the target abstract text. The set of sample pairs includes a plurality of sample pairs. The sample pairs are used to train the initial model as training samples.
It should be noted that the text can be directly captured from the network, and the language of the text is usually determined according to the capture source, for example, the text captured from the american e-magazine, and the language of the text is english.
The method can be used for capturing the full text of the text from the network as a target source text, taking the abstract section of the text as an alternative abstract text, manually translating the alternative abstract text, acquiring texts in other languages with the same semantics as the alternative abstract text as a target source text, and forming a sample pair by using the captured voice as the target abstract text and the target source text.
The language information is used to identify the language of the text. Only the target abstract text in the sample pair can be labeled, and the target source text and the target abstract text in the sample pair can also be labeled.
For example, the language information may be set characters, such as 1-chinese, 2-english, 3-japanese, or a-chinese, b-english, c-japanese, and may also be symbols, and the embodiments of the present disclosure are not limited in particular.
In addition, the source text for the mixed language may be labeled as only one language, for example, the language with the highest labeled word content, or may be labeled separately. For example, the language with the largest number of elements (words, phrases, sentences, and paragraphs, etc.) may be used as the language corresponding to the text, for example, the target source text is I love to sing, and may include 3 words in english, while chinese includes 1 word, and the number of words in english is the largest, and the target source text is labeled as english; i love to can also be marked as English, and the singing is marked as Chinese; or may be labeled as chinese.
The number of texts corresponding to the sample pair set comprises at least three, which indicates that the sample pair set at least has two sample pairs of target source texts and one target abstract text, and/or one sample pair of target source texts and two target abstract texts, so that abstract information can be extracted from a plurality of source texts and translated to form one abstract text, and abstract information can be extracted from one source text and translated to form a plurality of abstract texts based on an abstract generation model formed by training the sample pair set. The number of the corresponding languages in the sample pair set is at least two, the languages to be translated corresponding to the target source texts are different, and the target languages corresponding to the target abstract texts are different. But the language to be translated corresponding to the target source text and the target language corresponding to the target abstract text can be the same.
It is understood that the number of texts corresponding to the sample pair set includes at least three, and correspondingly, the number of languages is at least two. For example, the set of sample pairs includes three texts and the number of languages is two. At the moment, a target source text of a first language, a target source text of a second language and a target abstract text of the first language or the second language exist in the sample pair set; alternatively, there is a target source text in the first language or the second language, a target abstract text in the first language and a target abstract text in the second language in the set of sample pairs. As another example, the set of sample pairs includes three texts and the number of languages is three. Two target source texts and one target abstract text or one target source text and two target abstract texts exist in the sample pair set, and the languages corresponding to the texts are different.
Illustratively, the number of languages corresponding to the sample pair set comprises at least three, so that the abstract generation model formed based on the training of the sample pair set can realize the mutual translation between multiple languages besides the mutual translation between two languages.
The initial model is trained by configuring sample pairs of multiple languages and at least three texts to form an abstract generation model for mutual translation of the multiple languages and the multiple texts, so that the abstract generation model supports the mutual translation of the multiple languages and the multiple texts, and meanwhile, the accuracy of the mutual translation of the multiple languages and the multiple texts is improved.
The sample pairs can be constructed in various ways and added to the sample pair set, and the representativeness of the sample pair set is continuously improved, so that the accuracy of the abstract generation model is improved.
In fact, a large number of monolingual corpora exist in the prior art, parallel corpora can be constructed based on the monolingual corpora and combined to form a large number of sample pairs, and training is performed to make the samples more representative, so that the accuracy of the abstract generation model is improved.
Optionally, the obtaining a sample pair includes: acquiring a target source text; acquiring a target abstract text matched with the target source text, wherein a target language corresponding to the target abstract text is the same as a language to be translated corresponding to the target source text; respectively acquiring at least one target source text matched with the target source text, wherein the languages to be translated corresponding to the target source texts are different; respectively acquiring at least one target abstract text matched with the target abstract text, wherein the target language corresponding to each target abstract text is different; and combining the obtained target source texts and the obtained target abstract texts to form a plurality of sample pairs.
The target source texts are used as texts to be converted in a sample pair, the semantics of the target source texts are the same, and the corresponding languages to be translated are different. The target abstract texts are used as output results of forming sample pairs, wherein the semantics of the target abstract texts are the same, and the corresponding target languages are different.
The free combination can be carried out to form a sample pair, wherein the number of samples in the sample pair is required to be at least three, and the number of languages is at least two. In addition, only sample pairs having at least three samples and at least three languages may be generated. For example, a sample pair is generated according to a first target source text, a second target source text and a second target abstract text, wherein the language to be translated corresponding to the first target source text is a first language, the language to be translated corresponding to the second target source text is a third language, the target language corresponding to the second target abstract text is a second language, and the first language, the second language and the third language are different. In this regard, the setting may be made as needed, and the embodiments of the present disclosure are not particularly limited.
Actually, a matched target abstract text can be determined through a target source text, and the target abstract text or the target source text is used as an intermediate result to correspondingly obtain monolingual corpora with the same semantics and different languages respectively, so as to form a sample library of the same theme, and three samples including at least one target source text and at least one target abstract text can be arbitrarily selected from the sample library to form a sample pair.
Through the conversion from the source text to the abstract text of the same language, corresponding linguistic data of different languages are respectively obtained, and sample pairs are constructed, so that a large number of sample pairs can be quickly generated, the representativeness of a training sample set is improved, and the accuracy of an abstract generation model is improved.
Optionally, the obtaining a sample pair includes: acquiring a target source text corresponding to a first language; inputting the target source text into the initial model and specifying at least one target language in the training process of the initial model; acquiring a plurality of target abstract texts output by the initial model; acquiring at least one target source text matched with the target source text, wherein the languages to be translated corresponding to the target source texts are different; respectively acquiring at least one target abstract text matched with each target abstract text, wherein the target languages corresponding to the target abstract texts are different; and combining the obtained target source texts and the obtained target abstract texts to form a plurality of sample pairs.
In the process of training the initial model, the initial model is indicated to have been trained by the sample pair, but the accuracy of the initial model does not meet the requirement, and the training is still required to be continued. Specifically, the initial model at this time may be an initial model obtained after training according to a pair of samples collected in advance, and a plurality of target languages may be specified, so that a plurality of target abstract texts may be obtained. And then the target source texts can be translated into a plurality of target source texts in different languages to be translated according to the target source texts, and the target abstract texts can be translated into a plurality of abstract texts in different target languages according to the target abstract texts. And respectively combining the target source texts and the abstract texts to form a sample pair.
The method comprises the steps of inputting a target source text into an initial model through a trained initial model to obtain at least one target abstract text output by the initial model, translating the target abstract text and the target language respectively, expanding a language to be translated and the target language, and carrying out free combination construction on a sample pair according to the obtained target source text and the target abstract text, so that a large number of sample pairs can be generated quickly, the representativeness of a training sample set is improved, and the accuracy of an abstract generation model is improved.
Fig. 6 is a schematic structural diagram of a summary generation apparatus provided in an embodiment of the present disclosure, which is applicable to a case where at least one source text is simplified and translated into a summary text corresponding to at least one arbitrarily specified target language. The apparatus may be implemented in software and/or hardware, and may be configured in an electronic device. As shown in fig. 6, the apparatus may include:
a source text obtaining module 310, configured to obtain at least one source text;
a target language specification module 320 for obtaining at least one target language;
a summary generation module 330, configured to input at least one source text and indication information matched with each target language into a pre-trained summary generation model, where the summary generation model is configured to reduce at least one first text into at least one second text, and translate languages in a first language set corresponding to each first text into at least one language in a second language set respectively as languages corresponding to each second text, where the first language set includes multiple languages, the first language set includes languages to be translated corresponding to each source text, the second language set includes multiple languages, and the second language set includes each target language;
and the abstract text obtaining module 340 is configured to obtain the abstract text output by the abstract generating model and corresponding to each target language respectively.
The method and the device for generating the abstract have the advantages that at least one source text with similar semantics is input into a pre-trained abstract generating model, and at least one target language is designated to obtain the abstract texts which are output by the abstract generating model and respectively correspond to the target languages, so that the problems that in the prior art, the abstract texts from a document in one language to a document in another language can be realized only by multi-step text processing, and the translation from one language to another language can be supported only are solved, the abstract generating and the abstract translating can be realized simultaneously only through the abstract generating model, the process of abstract generating is simplified, the error transmission of intermediate links is reduced, the accuracy of abstract translating is greatly improved, simultaneously, the simultaneous conversion of multiple languages can be supported, and the efficiency of abstract generating is improved.
Further, the source text obtaining module 310 includes: the source text acquisition units are used for acquiring at least two source texts, and the languages to be translated corresponding to the source texts are different; the digest generation module 330 includes: and the semantic similarity judging unit is used for inputting at least two source texts and the indicating information matched with each target language into a pre-trained abstract generation model if each source text meets a semantic similarity condition.
Further, the target language specification module 320 includes: the system comprises a plurality of target language specifying units, a plurality of processing units and a plurality of processing units, wherein the target language specifying units are used for acquiring at least two target languages, and each target language is different.
Further, the digest generation model is a Seq2Seq model, and the digest generation model includes an encoder and a decoder; the total number of the encoders and the decoders is at least three, different encoders correspond to different source texts, and different decoders correspond to different target languages.
Further, the abstract text obtaining module 320 includes: the multiple encoder coding units are used for respectively extracting corresponding source text sequence segments in the source text through multiple encoders in the abstract generation model, and performing fusion coding to form a target feature vector of the source text; and mapping the target characteristic vector into a text sequence of a target language as a summary text by a decoder in the summary generation model according to the target characteristic vector and the target language.
Further, the abstract text obtaining module 320 includes: a plurality of decoder decoding units, configured to extract, through an encoder in the abstract generation model, a source text sequence segment in the source text, and encode the source text sequence segment to form a target feature vector of the source text; and respectively mapping the target feature vectors into text sequences by a plurality of decoders in the abstract generation model according to the target languages, and determining abstract texts corresponding to the decoders.
Further, the abstract text obtaining module 320 includes: the multi-language conversion unit is used for respectively extracting the source text sequence segments in the corresponding source texts through a plurality of encoders in the abstract generation model, and performing fusion encoding to form target characteristic vectors of the source texts; and respectively mapping the target feature vectors into text sequences by a plurality of decoders in the abstract generation model according to the target languages, and determining abstract texts corresponding to the decoders.
The summary generation device provided by the embodiment of the disclosure belongs to the same inventive concept as the summary generation method, and the technical details that are not described in detail in the embodiment of the disclosure can be referred to the foregoing, and the embodiment of the disclosure has the same beneficial effects as the foregoing embodiment.
Referring now to fig. 7, a schematic diagram of an electronic device (e.g., the terminal device or the server of fig. 1) 700 suitable for implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 7, electronic device 700 may include a processing means (e.g., central processing unit, graphics processor, etc.) 701 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from storage 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the electronic apparatus 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
In general, input devices 706 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc., output devices 707 including, for example, a liquid crystal display (L CD), speaker, vibrator, etc., storage devices 708 including, for example, magnetic tape, hard disk, etc., and communication devices 709. communication devices 709 may allow electronic device 700 to communicate wirelessly or wiredly with other devices to exchange data.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via the communication means 709, or may be installed from the storage means 708, or may be installed from the ROM 702. The computer program, when executed by the processing device 701, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). examples of communications networks include local area networks ("L AN"), wide area networks ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring at least one source text; acquiring at least one target language; inputting at least one source text and indication information matched with each target language into a pre-trained abstract generation model, wherein the abstract generation model is used for simplifying at least one first text into at least one second text, simultaneously translating languages in a first language set corresponding to each first text into at least one language in a second language set respectively and serving as the languages corresponding to each second text respectively, the first language set comprises a plurality of languages, the first language set comprises the languages to be translated corresponding to each source text respectively, the second language set comprises a plurality of languages, and the second language set comprises each target language; and acquiring abstract texts which are output by the abstract generation model and respectively correspond to the target languages.
Computer program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including but not limited to AN object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a module does not in some cases constitute a limitation of the module itself, for example, a target language designation module may also be described as a "module that obtains at least one target language".
For example, without limitation, exemplary types of hardware logic that may be used include Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CP L D), and so forth.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, there is provided a digest generation method including:
acquiring at least one source text;
acquiring at least one target language;
inputting at least one source text and indication information matched with each target language into a pre-trained abstract generation model, wherein the abstract generation model is used for simplifying at least one first text into at least one second text, simultaneously translating languages in a first language set corresponding to each first text into at least one language in a second language set respectively and serving as the languages corresponding to each second text respectively, the first language set comprises a plurality of languages, the first language set comprises the languages to be translated corresponding to each source text respectively, the second language set comprises a plurality of languages, and the second language set comprises each target language;
and acquiring abstract texts which are output by the abstract generation model and respectively correspond to the target languages.
According to one or more embodiments of the present disclosure, in a summary generation method provided by the present disclosure, the obtaining at least one source text includes: acquiring at least two source texts, wherein the languages to be translated corresponding to the source texts are different; inputting at least one source text and indication information matched with each target language into a pre-trained abstract generation model, wherein the method comprises the following steps: and if each source text meets the semantic similarity condition, inputting at least two source texts and indication information matched with each target language into a pre-trained abstract generation model.
According to one or more embodiments of the present disclosure, in a summary generation method provided by the present disclosure, the obtaining at least one target language includes: at least two target languages are obtained, each of the target languages being different.
According to one or more embodiments of the present disclosure, in the multilingual digest generation method provided by the present disclosure, the digest generation model is a Seq2Seq model, and the digest generation model includes an encoder and a decoder; the total number of the encoders and the decoders is at least three, different encoders correspond to different source texts, and different decoders correspond to different target languages.
According to one or more embodiments of the present disclosure, in the summary generation method provided by the present disclosure, the obtaining of the summary text output by the summary generation model and corresponding to each of the target languages respectively includes: respectively extracting corresponding source text sequence segments in the source text through a plurality of encoders in the abstract generating model, and carrying out fusion encoding to form a target characteristic vector of the source text; and mapping the target characteristic vector into a text sequence of a target language as a summary text by a decoder in the summary generation model according to the target characteristic vector and the target language.
According to one or more embodiments of the present disclosure, in the summary generation method provided by the present disclosure, the obtaining of the summary text output by the summary generation model and corresponding to each of the target languages respectively includes: extracting a source text sequence segment in the source text through an encoder in the abstract generation model, and encoding to form a target characteristic vector of the source text; and respectively mapping the target feature vectors into text sequences by a plurality of decoders in the abstract generation model according to the target languages, and determining abstract texts corresponding to the decoders.
According to one or more embodiments of the present disclosure, in the summary generation method provided by the present disclosure, the obtaining of the summary text output by the summary generation model and corresponding to each of the target languages respectively includes: respectively extracting corresponding source text sequence segments in the source text through a plurality of encoders in the abstract generating model, and carrying out fusion encoding to form a target characteristic vector of the source text; and respectively mapping the target feature vectors into text sequences by a plurality of decoders in the abstract generation model according to the target languages, and determining abstract texts corresponding to the decoders.
According to one or more embodiments of the present disclosure, there is provided a digest generation apparatus including:
the source text acquisition module is used for acquiring at least one source text;
the target language specifying module is used for acquiring at least one target language;
the abstract generating module is used for inputting at least one source text and indicating information matched with each target language into an abstract generating model trained in advance, the abstract generating model is used for simplifying at least one first text into at least one second text, simultaneously, languages in a first language set corresponding to each first text are translated into at least one language in a second language set respectively and are used as languages corresponding to each second text respectively, the first language set comprises a plurality of languages, and the first language set comprises languages to be translated corresponding to each source text respectively; the second language set comprises a plurality of languages, the second language set comprising each of the target languages;
and the abstract text acquisition module is used for acquiring the abstract text which is output by the abstract generation model and corresponds to each target language respectively.
Further, the source text obtaining module includes: the source text acquisition units are used for acquiring at least two source texts, and the languages to be translated corresponding to the source texts are different; the abstract generation module comprises: and the semantic similarity judging unit is used for inputting at least two source texts and the indicating information matched with each target language into a pre-trained abstract generation model if each source text meets a semantic similarity condition.
Further, the target language specification module includes: the system comprises a plurality of target language specifying units, a plurality of processing units and a plurality of processing units, wherein the target language specifying units are used for acquiring at least two target languages, and each target language is different.
According to one or more embodiments of the present disclosure, the present disclosure provides a digest generation apparatus, where the digest generation model is a Seq2Seq model, and the digest generation model includes an encoder and a decoder; the total number of the encoders and the decoders is at least three, different encoders correspond to different source texts, and different decoders correspond to different target languages.
According to one or more embodiments of the present disclosure, in the summary generation apparatus provided by the present disclosure, the summary text acquisition module includes: the multiple encoder coding units are used for respectively extracting corresponding source text sequence segments in the source text through multiple encoders in the abstract generation model, and performing fusion coding to form a target feature vector of the source text; and mapping the target characteristic vector into a text sequence of a target language as a summary text by a decoder in the summary generation model according to the target characteristic vector and the target language.
According to one or more embodiments of the present disclosure, in the summary generation apparatus provided by the present disclosure, the summary text acquisition module includes: a plurality of decoder decoding units, configured to extract, through an encoder in the abstract generation model, a source text sequence segment in the source text, and encode the source text sequence segment to form a target feature vector of the source text; and respectively mapping the target feature vectors into text sequences by a plurality of decoders in the abstract generation model according to the target languages, and determining abstract texts corresponding to the decoders.
According to one or more embodiments of the present disclosure, in the summary generation apparatus provided by the present disclosure, the summary text acquisition module includes: the multi-language conversion unit is used for respectively extracting the source text sequence segments in the corresponding source texts through a plurality of encoders in the abstract generation model, and performing fusion encoding to form target characteristic vectors of the source texts; and respectively mapping the target feature vectors into text sequences by a plurality of decoders in the abstract generation model according to the target languages, and determining abstract texts corresponding to the decoders.
In accordance with one or more embodiments of the present disclosure, there is provided an electronic device including: the computer program product comprises a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the summary generation method according to any one of the embodiments of the present disclosure when executing the program.
According to one or more embodiments of the present disclosure, there is provided a computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing the digest generation method according to any one of the embodiments of the present disclosure.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. A method for generating a summary, comprising:
acquiring at least one source text;
acquiring at least one target language;
inputting at least one source text and indication information matched with each target language into a pre-trained abstract generation model, wherein the abstract generation model is used for simplifying at least one first text into at least one second text, simultaneously translating languages in a first language set corresponding to each first text into at least one language in a second language set respectively and serving as the languages corresponding to each second text respectively, the first language set comprises a plurality of languages, the first language set comprises the languages to be translated corresponding to each source text respectively, the second language set comprises a plurality of languages, and the second language set comprises each target language;
and acquiring abstract texts which are output by the abstract generation model and respectively correspond to the target languages.
2. The method of claim 1, wherein obtaining at least one source text comprises:
acquiring at least two source texts, wherein the languages to be translated corresponding to the source texts are different;
inputting at least one source text and indication information matched with each target language into a pre-trained abstract generation model, wherein the method comprises the following steps:
and if each source text meets the semantic similarity condition, inputting at least two source texts and indication information matched with each target language into a pre-trained abstract generation model.
3. The method of claim 1, wherein the obtaining at least one target language comprises:
at least two target languages are obtained, each of the target languages being different.
4. The method of claim 1, wherein the digest generation model is a Seq2Seq model, the digest generation model comprising an encoder and a decoder; the total number of the encoders and the decoders is at least three, different encoders correspond to different source texts, and different decoders correspond to different target languages.
5. The method according to claim 4, wherein said obtaining the abstract text output by the abstract generating model and corresponding to each target language respectively comprises:
respectively extracting corresponding source text sequence segments in the source text through a plurality of encoders in the abstract generating model, and carrying out fusion encoding to form a target characteristic vector of the source text;
and mapping the target characteristic vector into a text sequence of a target language as a summary text by a decoder in the summary generation model according to the target characteristic vector and the target language.
6. The method according to claim 4, wherein said obtaining the abstract text output by the abstract generating model and corresponding to each target language respectively comprises:
extracting a source text sequence segment in the source text through an encoder in the abstract generation model, and encoding to form a target characteristic vector of the source text;
and respectively mapping the target feature vectors into text sequences by a plurality of decoders in the abstract generation model according to the target languages, and determining abstract texts corresponding to the decoders.
7. The method according to claim 4, wherein said obtaining the abstract text output by the abstract generating model and corresponding to each target language respectively comprises:
respectively extracting corresponding source text sequence segments in the source text through a plurality of encoders in the abstract generating model, and carrying out fusion encoding to form a target characteristic vector of the source text;
and respectively mapping the target feature vectors into text sequences by a plurality of decoders in the abstract generation model according to the target languages, and determining abstract texts corresponding to the decoders.
8. An apparatus for generating a summary, comprising:
the source text acquisition module is used for acquiring at least one source text;
the target language specifying module is used for acquiring at least one target language;
the abstract generating module is used for inputting at least one source text and indicating information matched with each target language into an abstract generating model trained in advance, the abstract generating model is used for simplifying at least one first text into at least one second text, simultaneously, languages in a first language set corresponding to each first text are translated into at least one language in a second language set respectively and are used as languages corresponding to each second text respectively, the first language set comprises a plurality of languages, and the first language set comprises languages to be translated corresponding to each source text respectively; the second language set comprises a plurality of languages, the second language set comprising each of the target languages;
and the abstract text acquisition module is used for acquiring the abstract text which is output by the abstract generation model and corresponds to each target language respectively.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the summary generation method of any of claims 1-7 when executing the program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the digest generation method according to any one of claims 1 to 7.
CN202010188547.4A 2020-03-17 2020-03-17 Abstract generation method and device, electronic equipment and storage medium Pending CN111400454A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010188547.4A CN111400454A (en) 2020-03-17 2020-03-17 Abstract generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010188547.4A CN111400454A (en) 2020-03-17 2020-03-17 Abstract generation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111400454A true CN111400454A (en) 2020-07-10

Family

ID=71430900

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010188547.4A Pending CN111400454A (en) 2020-03-17 2020-03-17 Abstract generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111400454A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112364158A (en) * 2020-10-30 2021-02-12 北京中科凡语科技有限公司 Cross-language automatic abstract generation model establishing method and abstract generation method
CN112732902A (en) * 2021-01-31 2021-04-30 云知声智能科技股份有限公司 Cross-language abstract generation method and device, electronic equipment and computer readable medium
CN112836040A (en) * 2021-01-31 2021-05-25 云知声智能科技股份有限公司 Multi-language abstract generation method and device, electronic equipment and computer readable medium
CN113158695A (en) * 2021-05-06 2021-07-23 上海极链网络科技有限公司 Semantic auditing method and system for multi-language mixed text
CN114461795A (en) * 2021-12-31 2022-05-10 北京金山数字娱乐科技有限公司 Document abstract processing method, device, equipment and medium
CN115269768A (en) * 2021-04-29 2022-11-01 京东科技控股股份有限公司 Element text processing method, device, electronic device and storage medium
CN116610942A (en) * 2022-02-07 2023-08-18 北京沃东天骏信息技术有限公司 Text processing method, device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040102201A1 (en) * 2002-11-22 2004-05-27 Levin Robert E. System and method for language translation via remote devices
CN106874362A (en) * 2016-12-30 2017-06-20 中国科学院自动化研究所 Multilingual automaticabstracting
US20180329877A1 (en) * 2017-05-09 2018-11-15 International Business Machines Corporation Multilingual content management
CN109344413A (en) * 2018-10-16 2019-02-15 北京百度网讯科技有限公司 Translation processing method and apparatus
CN109829161A (en) * 2019-01-30 2019-05-31 延边大学 A kind of method of multilingual autoabstract

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040102201A1 (en) * 2002-11-22 2004-05-27 Levin Robert E. System and method for language translation via remote devices
CN106874362A (en) * 2016-12-30 2017-06-20 中国科学院自动化研究所 Multilingual automaticabstracting
US20180329877A1 (en) * 2017-05-09 2018-11-15 International Business Machines Corporation Multilingual content management
CN109344413A (en) * 2018-10-16 2019-02-15 北京百度网讯科技有限公司 Translation processing method and apparatus
CN109829161A (en) * 2019-01-30 2019-05-31 延边大学 A kind of method of multilingual autoabstract

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
易志伟: "基于深度学习的多语种自动摘要系统的研究与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
马国泉等: "《新时期新名词大辞典》", 31 October 1992 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112364158A (en) * 2020-10-30 2021-02-12 北京中科凡语科技有限公司 Cross-language automatic abstract generation model establishing method and abstract generation method
CN112732902A (en) * 2021-01-31 2021-04-30 云知声智能科技股份有限公司 Cross-language abstract generation method and device, electronic equipment and computer readable medium
CN112836040A (en) * 2021-01-31 2021-05-25 云知声智能科技股份有限公司 Multi-language abstract generation method and device, electronic equipment and computer readable medium
CN112836040B (en) * 2021-01-31 2022-09-23 云知声智能科技股份有限公司 Method and device for generating multilingual abstract, electronic equipment and computer readable medium
CN115269768A (en) * 2021-04-29 2022-11-01 京东科技控股股份有限公司 Element text processing method, device, electronic device and storage medium
CN115269768B (en) * 2021-04-29 2025-12-19 京东科技控股股份有限公司 Element text processing methods, apparatuses, electronic devices and storage media
CN113158695A (en) * 2021-05-06 2021-07-23 上海极链网络科技有限公司 Semantic auditing method and system for multi-language mixed text
CN114461795A (en) * 2021-12-31 2022-05-10 北京金山数字娱乐科技有限公司 Document abstract processing method, device, equipment and medium
CN116610942A (en) * 2022-02-07 2023-08-18 北京沃东天骏信息技术有限公司 Text processing method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111382261B (en) Abstract generation method and device, electronic equipment and storage medium
CN111027331B (en) Method and apparatus for evaluating translation quality
CN112633947B (en) Text generation model generation method, text generation method, device and equipment
JP7112536B2 (en) Method and apparatus for mining entity attention points in text, electronic device, computer-readable storage medium and computer program
CN111400454A (en) Abstract generation method and device, electronic equipment and storage medium
CN110287278B (en) Comment generation method, comment generation device, server and storage medium
CN111368559A (en) Voice translation method and device, electronic equipment and storage medium
CN111368560A (en) Text translation method and device, electronic equipment and storage medium
CN111563390B (en) Text generation method and device and electronic equipment
CN110263340B (en) Comment generation method, device, server and storage medium
CN113421551B (en) Speech recognition method, speech recognition device, computer readable medium and electronic equipment
CN113139391A (en) Translation model training method, device, equipment and storage medium
CN116913278B (en) Voice processing method, device, equipment and storage medium
CN115967833A (en) Video generation method, device and equipment meter storage medium
CN114970470B (en) Method and device for processing file information, electronic equipment and computer readable medium
CN111339789A (en) Translation model training method and device, electronic equipment and storage medium
CN113591493A (en) Translation model training method and translation model device
CN114461795A (en) Document abstract processing method, device, equipment and medium
CN116610781A (en) Task model training method and device
CN111815274A (en) Information processing method, device and electronic device
CN115620726A (en) Voice-to-text generation method, training method and device for voice-to-text generation model
CN117151648B (en) Approval process processing method, device, equipment and storage medium
CN110516125A (en) Method, device and equipment for identifying abnormal character string and readable storage medium
CN112906372A (en) Text simplification method, device, equipment and storage medium
CN113268984A (en) Text processing method and device, storage medium and electronic equipment

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