Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Text style migration method based on grammatical constraints and language model

A language model and style technology, applied in biological neural network models, natural language data processing, semantic analysis, etc., can solve problems such as inability to maintain semantic invariance well, and achieve the goal of increasing grammatical constraints and hidden semantic space Constraining, directing learning, effects of invariance

Pending Publication Date: 2020-01-31
SUN YAT SEN UNIV
View PDF3 Cites 14 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] At present, these studies are all stuck in mapping sentences into a hidden semantic space, which is far from enough for natural language, and the style-transferred sentences generated in this way cannot keep the semantics well. transsexual

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Text style migration method based on grammatical constraints and language model
  • Text style migration method based on grammatical constraints and language model
  • Text style migration method based on grammatical constraints and language model

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0040] Such as figure 1 As shown, a text style transfer method based on grammatical constraints and language models includes the following steps:

[0041] S1: Establish a network structure that extracts sentence grammatical information to obtain a grammatical relationship graph;

[0042] S2: Add the original style information and transferred style information to the grammatical relationship diagram obtained in S1 respectively, and obtain the grammatical relationship diagram containing original style information and transferred style information through its own graph-transformer network structure;

[0043] S3: Combining the original style information grammatical relationship diagram obtained in S2 and the transferred style information grammatical relationship diagram with the grammatical relationship diagram in S1 through the cross graph-transformer network structure to obtain a reconstructed sentence with original style information and a reconstructed sentence with transferre...

Embodiment 2

[0065] There are two data sets used in this experiment, one is the Yelp restaurant review set widely used in the text transfer task, and the other is the political review selected from the comments under the Facebook dynamics of members of the US Senate and House of Representatives. tend to the data set. The Yelp restaurant review set mainly contains two types of data, positive reviews and negative reviews, so its style is whether the emotion expressed by the sentence is positive or negative, and the goal of Yelp is to keep the meaning of the sentence unchanged. Transform positive emotions into negative emotions or convert negative emotions into positive emotions. The political orientation data set also mainly contains two types of data, comments from Democratic supporters and Republican supporters, so the style is whether the sentence comes from Democratic supporters or Republican supporters. The basic situation of the data set used in the present invention is shown in the f...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a text style migration method based on grammatical constraints and a language model. The method comprises the following steps: firstly, extracting a grammatical relation graph Gx of an input sentence x by utilizing a Stanford dependency syntax toolkit; then, adding style information Sx of an original input sentence and style information Sy of an expected converted sentence to the grammar relationship graph Gx through a graph-transformer structure to obtain grammar relationship graphs G'x and G'y; and then reconstructing an input sentence x' through a structure of a crossgraph-transformer in combination with the grammatical relationship graph Gx of the original input sentence to obtain a sentence y 'after style migration. In order to better learn a graph-transformerstructure integrated with style information and a cross graph-transformer structure for learning and reconstructing a style migration sentence, the method also utilizes a language model to replace a traditional CNN classifier to guide the learning of the CNN classifier. Experiments on a corresponding data set in the mode show that compared with a previous text style migration method, semantic invariance can be better kept under the condition that sentence styles are changed.

Description

technical field [0001] The present invention relates to the fields of computer application and natural language processing, and more specifically, relates to a text style transfer method based on grammatical constraints and language models. Background technique [0002] In recent years, Internet technology has become more mature, and more and more electronic services have been replaced by machines. For example, online shopping is currently the most popular way of shopping, but there will inevitably be some problems during the shopping process. At this time, people need to consult the merchants, but due to the large number of inquiries, it is impossible for the merchants to explain one by one in person, so Machine-generated responses have become a hot and convenient technology. But the text generated by the machine itself is rigid and boring. In order to make the text automatically generated by the machine more interesting and positive, it is necessary to control the style o...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F40/30G06F40/253G06N3/04
CPCG06N3/045Y02D10/00
Inventor 印鉴周晨星
Owner SUN YAT SEN UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products