Style Vector Separation for Accurate Text Generation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Intelligent dialogue systems face challenges in accurately generating styled sentences with a target language style when the corresponding natural sentence is not available in the parallel corpus, leading to poor style conversion and mismatched language styles.
Innovation Solution
A method involving a first encoding model to classify natural sentences into content and style vectors, and a first decoding model to generate styled sentences based on pre-trained style vectors, allowing for the addition of target language styles and improving style conversion intelligence.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If a parallel corpus is used to generate styled sentences by searching for existing natural sentences with the target language style, then the system can generate styled sentences when the style is available in the corpus, but the system cannot generate styled sentences with the desired language style when the target style is not directly available in the corpus
Solution Approach 1:
The patent segments a natural sentence into two independent vectors: a content vector that preserves the semantic meaning and a style vector that captures the language style characteristics. This segmentation allows the system to independently manipulate the style component while maintaining the original content, enabling style transfer even when the target style is not present in the parallel corpus.
Solution Approach 2:
The patent introduces style vectors as intermediary representations that bridge the gap between the input natural sentence and the desired styled sentence. These style vectors serve as mediators that can be combined with content vectors to generate styled sentences for any target style, not just those present in the training corpus.
2Productivity
If the system selects another natural sentence with a different language style when the target style is not available, then the system can still generate a styled sentence, but the generated sentence does not meet user expectation and the style conversion effect is poor
Solution Approach 1:
The patent extracts the style information from natural sentences in the parallel corpus and stores it in the form of style vectors. By taking out the style component separately from the content, the system can later combine any content vector with any target style vector to generate styled sentences with precise style control, regardless of whether the target style exists in the original corpus.
3Extent of automation
If the system uses an encoding function to convert a natural sentence into a sentence vector and then uses a decoding function to generate a styled sentence, then the system can perform style conversion, but the system lacks the capability to add new target language styles that were not present in the training data
Solution Approach 1:
The patent transitions from a direct sentence-to-sentence mapping approach to a vector-space representation approach, adding a new dimension to the problem. By representing sentences as combinations of content vectors and style vectors in a high-dimensional space, the system can interpolate and extrapolate to generate styled sentences for any target style, not just those explicitly present in the training data.
Data Source
AI summary
The present disclosure discloses a method for generating a styled sentence by a computer device. The method includes: obtaining a to-be-converted natural sentence, classifying, by inputting the natural sentence into a first encoding model, having a classification capability of classifying the natural sentence into a target content vector and a style vector of the natural sentence, the target content vector indicating a meaning of the natural sentence, and the style vector of the natural sentence indicating a language style of the natural sentence. The method also include determining, from at least one style vector according to a set target language style, a target style vector corresponding to the target language style; and inputting the target content vector and the target style vector into a first decoding model, and generating a styled sentence corresponding to the natural sentence.


