CN116562240A - Text generation method, computer device and computer storage medium - Google Patents

Text generation method, computer device and computer storage medium Download PDF

Info

Publication number
CN116562240A
CN116562240A CN202310556668.3A CN202310556668A CN116562240A CN 116562240 A CN116562240 A CN 116562240A CN 202310556668 A CN202310556668 A CN 202310556668A CN 116562240 A CN116562240 A CN 116562240A
Authority
CN
China
Prior art keywords
topic
text
emotion
model
vocabulary
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
CN202310556668.3A
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.)
SHENZHEN SECURITIES INFORMATION CO Ltd
Original Assignee
SHENZHEN SECURITIES INFORMATION 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 SHENZHEN SECURITIES INFORMATION CO Ltd filed Critical SHENZHEN SECURITIES INFORMATION CO Ltd
Priority to CN202310556668.3A priority Critical patent/CN116562240A/en
Publication of CN116562240A publication Critical patent/CN116562240A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • G06F16/355Class or cluster creation or modification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24147Distances to closest patterns, e.g. nearest neighbour classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/216Parsing using statistical methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application discloses a text generation method, computer equipment and a computer storage medium. The embodiment of the application comprises the following steps: the computer equipment determines topic words related to the text topic according to the text topic, determines emotion conveyed by each topic word, generates a text corresponding to each topic word according to the emotion conveyed by each topic word, and corrects sentences in a plurality of sentences of the text, wherein sentence emotion is inconsistent with emotion conveyed by the text topic, so as to obtain a target text. Therefore, the text generation method fuses language expressions of concepts such as language habit, vocabulary, syntax, emotion, theme and the like to generate the text, so that the finally generated text can more convey the intention which the user wants to express and the emotion which the user wants to convey through the text, meanwhile, the context semantic consistency and emotion consistency of the text can be ensured, and the smoothness of text lines is improved, so that the practicability is higher.

Description

Text generation method, computer device and computer storage medium
Technical Field
The embodiment of the application relates to the field of data processing, in particular to a text generation method, computer equipment and a computer storage medium.
Background
At present, text style judgment and text generation are realized in three modes, namely, a classification model is adopted, for example, intelligent classification and clustering algorithm are adopted, so that deep learning of each writing style is facilitated; training the BERT general model through a document to obtain a personalized BERT author model, and obtaining an author writing style discriminator by using a linear classifier; secondly, extracting text feature tag combinations according to the syntactic templates based on the syntactic, and determining the target writing style of the target style text; thirdly, based on a quantitative feature method, the method is constructed according to readability, logic, credibility, writing degree, interactivity, interestingness, humanity and structural integrity. These features are quantified by the number of characters, the number of words, the number of sentences, the number of clauses, the average word length, the average number of clauses, the number of long words in news, etc.
However, the above-mentioned methods cannot truly express text styles, for example, classification methods can only judge preset styles, and cannot judge or generate styles which are not within a set range, and cannot completely express styles based on classification, syntax, sentence/word and other features, and meanwhile, the cost of the supervised methods is high, all styles are difficult to cover, and the practicability is not high.
Disclosure of Invention
The embodiment of the application provides a text generation method, computer equipment and a computer storage medium, which are used for generating text by fusing language expressions of concepts such as language habit, vocabulary, syntax, emotion, theme and the like.
A first aspect of an embodiment of the present application provides a text generation method, where the method is applied to a computer device, and the method includes:
acquiring a text topic, and determining a topic word related to the text topic according to the text topic;
determining emotion conveyed by each topic word, and generating a text corresponding to each topic word according to the emotion conveyed by each topic word;
correcting sentences with inconsistent sentence emotion conveyed by the text theme in the sentences of the text to obtain a target text.
A second aspect of embodiments of the present application provides a computer device, the computer device comprising:
the first determining unit is used for acquiring a text theme and determining theme vocabularies related to the text theme according to the text theme;
a second determining unit configured to determine emotion conveyed by each of the subject words;
the generation unit is used for generating texts corresponding to each topic vocabulary according to the emotion conveyed by each topic vocabulary;
and the correction unit is used for correcting sentences with inconsistent sentence emotion conveyed by the text theme in the sentences of the text to obtain a target text.
A third aspect of the embodiments of the present application provides a computer device comprising a memory storing a computer program and a processor implementing the method of the first aspect when the processor executes the computer program.
A fourth aspect of the embodiments provides a computer storage medium having stored therein instructions which, when executed on a computer, cause the computer to perform the method of the first aspect described above.
From the above technical solutions, the embodiments of the present application have the following advantages:
the computer equipment determines topic words related to the text topic according to the text topic, determines emotion conveyed by each topic word, generates a text corresponding to each topic word according to the emotion conveyed by each topic word, and corrects sentences in a plurality of sentences of the text, wherein sentence emotion is inconsistent with emotion conveyed by the text topic, so as to obtain a target text. Therefore, the text generation method fuses language expressions of concepts such as language habit, vocabulary, syntax, emotion, theme and the like to generate the text, so that the finally generated text can more convey the intention which the user wants to express and the emotion which the user wants to convey through the text, meanwhile, the context semantic consistency and emotion consistency of the text can be ensured, and the smoothness of text lines is improved, so that the practicability is higher.
Drawings
FIG. 1 is a schematic flow chart of a text generation method in an embodiment of the present application;
FIG. 2 is another flow chart of a text generation method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a computer device according to an embodiment of the present application;
fig. 4 is a schematic diagram of another structure of a computer device in an embodiment of the present application.
Detailed Description
The embodiment of the application provides a text generation method, computer equipment and a computer storage medium, which are used for generating text by fusing language expressions of concepts such as language habit, vocabulary, syntax, emotion, theme and the like.
The text generation method in the embodiment of the present application is described below:
referring to fig. 1, an embodiment of a text generating method in an embodiment of the present application includes:
101. acquiring a text topic, and determining a topic word related to the text topic according to the text topic;
the method of the present embodiment may be applied to a computer device, which may be a device having data processing capability, such as a server or a terminal. The computer device may obtain a text theme input by the user, where the text theme is used to instruct the computer device to generate a text corresponding to the theme, and the text theme refers to a central meaning expressed by various materials in the text, and penetrates and extends through the whole content of the text, and represents a main intention of writing by the user, and includes basic knowledge, understanding and evaluation of all objective things reflected by the text by the user. Thus, to facilitate generating text, the computer device may determine a topic vocabulary associated with the text topic based on the text topic.
For example, the subject may be an object that the user would like to like, an object that he/she is to song, an object that he/she is to like, a subject vocabulary may be a vocabulary related to "like" a word, or a vocabulary related to "opposite" a word, or a vocabulary related to "song" a word, or a vocabulary related to "whipst" a word, and so on.
102. Determining emotion conveyed by each topic word, and generating a text corresponding to each topic word according to the emotion conveyed by each topic word;
the computer device may determine the emotion conveyed by each topic word and generate text corresponding to each topic word based on the emotion conveyed by each topic word.
For example, if the text subject is an object of approval and the word related to the "approval" word is determined, the text may be generated according to the emotion conveyed by the words, and the generated text content includes the word related to the "approval" word and expresses the emotion corresponding to the words.
Thus, the style of the text can be determined by the topic given by the user and the emotion conveyed by the topic vocabulary corresponding to the topic.
103. Correcting sentences with inconsistent sentence emotion conveyed by the text theme in a plurality of sentences of the text to obtain a target text;
after obtaining the text output by the computer device, the computer device may further correct a plurality of sentences in the text, that is, determine whether the sentence emotion of each sentence is consistent with the emotion conveyed by the text topic given by the user, and if there is a sentence whose sentence emotion is inconsistent with the emotion conveyed by the text topic given by the user, correct such sentence until the sentence emotion of the sentence is consistent with the emotion conveyed by the text topic given by the user. Therefore, through the correction operation of the text sentence, the emotion expressed by the text can be more attached to the emotion conveyed by the theme given by the user, meanwhile, the context semantic consistency and emotion consistency of the text are ensured, and the smoothness of the text line text is improved.
In this embodiment, the computer device determines, according to a text topic, a topic word related to the text topic, determines an emotion conveyed by each topic word, generates, according to the emotion conveyed by each topic word, a text corresponding to each topic word, and corrects a sentence in a plurality of sentences of the text, where the sentence emotion is inconsistent with the emotion conveyed by the text topic, so as to obtain a target text. Therefore, the text generation method fuses language expressions of concepts such as language habit, vocabulary, syntax, emotion, theme and the like to generate the text, so that the finally generated text can more convey the intention which the user wants to express and the emotion which the user wants to convey through the text, meanwhile, the context semantic consistency and emotion consistency of the text can be ensured, and the smoothness of text lines is improved, so that the practicability is higher.
Embodiments of the present application will be described in further detail below on the basis of the foregoing embodiment shown in fig. 1. Referring to fig. 2, another embodiment of a text generating method in an embodiment of the present application includes:
201. acquiring a text topic, and determining a topic word related to the text topic according to the text topic;
in this embodiment, a topic model may be used to determine a plurality of topic terms corresponding to a text topic. Specifically, the computer device may obtain a pre-trained topic model, where the topic model is obtained by training multiple sets of training samples by a machine learning algorithm, and each set of training samples includes a text paragraph and tag information for representing a topic of the text paragraph; and inputting the text topic given by the user into the topic model to obtain topic words related to the text topic output by the topic model.
The machine learning algorithm may be a K Nearest Neighbor (KNN) classification algorithm, among others. During training, the distance between topics can be calculated according to a K nearest neighbor classification algorithm, a plurality of groups are divided according to the distance between topics, each group comprises K topics, iterative training is conducted through the K nearest neighbor classification algorithm until the distance between topics is kept stable, and documents and topic words (n is more than or equal to 1) related to the nth topic are extracted.
202. Determining emotion conveyed by each topic word, and generating a text corresponding to each topic word according to the emotion conveyed by each topic word;
in this embodiment, emotion models may be used to determine the emotion conveyed by each topic word. Specifically, the computer device may obtain a pre-trained emotion model, where the emotion model is obtained by training multiple sets of training samples by a machine learning algorithm, and each set of training samples includes a topic vocabulary and tag information for representing emotion of the topic vocabulary; for each topic word, inputting the topic word into the emotion model to obtain emotion conveyed by the topic word output by the emotion model.
The machine learning algorithm can be a deep learning algorithm, an emotion model is built based on the deep learning method, the emotion of a large-scale corpus is considered to be complex, the emotion value can be set to k discrete values, the value of k topic emotions is respectively judged based on the emotion model, emotion words are extracted from documents contained in the topics, and the judgment of the positive and negative emotion (including positive emotion, negative emotion and neutral emotion) is not performed any more, so that words which are more attached to the emotion can be accurately generated, the emotion expressed by the text is finer, the type of text emotion can be subdivided, and the definition of text emotion classification is finer.
In another preferred implementation of this embodiment, a language model may be used to generate text corresponding to a subject given by a user. Specifically, the computer device may obtain a pre-trained language model, where the language model is obtained by training multiple sets of training samples by a machine learning algorithm, and each set of training samples includes corpus data; and inputting emotion conveyed by each topic vocabulary corresponding to the topic given by the user into the language model to obtain a text output by the language model.
By constructing a large-scale corpus, a distributed language model can be trained, the language model can calculate the probability of occurrence of the next vocabulary of a given context, and the higher the probability that a certain alternative vocabulary is taken as the next vocabulary of the given context, the higher the probability that the alternative vocabulary is taken as the next vocabulary of the given context, so that the alternative vocabulary can be taken as the next vocabulary of the given context. If a candidate vocabulary is the highest probability of being the next vocabulary for a given context, the candidate vocabulary may be directly the next vocabulary for the given context. Thus, some basic language habits, vocabulary and syntactic structures in authoring can be captured using the language model.
203. Correcting sentences with inconsistent sentence emotion conveyed by the text theme in a plurality of sentences of the text to obtain a target text;
in this embodiment, if there is a sentence whose emotion is inconsistent with the emotion conveyed by the text topic given by the user, the sentence is revised, that is, the topic vocabulary and the term are reselected by using the language model, and the emotion of the reselected topic vocabulary is determined using the emotion model, and if the emotion of the reselected topic vocabulary is consistent with the emotion conveyed by the text topic given by the user, the topic vocabulary in the sentence is replaced using the reselected topic vocabulary, so that the emotion expressed after the sentence replaces the topic vocabulary is consistent with the emotion conveyed by the topic given by the user.
According to the operation, the sentence emotion of each sentence is corrected according to the sentence emotion inconsistent with the emotion conveyed by the text theme given by the user, so that the finally obtained target text can be more attached to the theme given by the user, and the emotion to be expressed by the user can be conveyed.
204. If the text topic does not match the topic of each text paragraph used for training the topic model, training the topic model by taking the text topic as a new topic;
205. obtaining the topic vocabulary of the text topic, and training the emotion model by taking the topic vocabulary of the text topic as a new training sample;
in this embodiment, when a text topic that cannot be classified by the topic model occurs, that is, when a new text topic occurs, the topic model and the emotion model may be updated incrementally according to the new text topic. Specifically, if the user-given text topic does not match the topic of each text paragraph used to train the topic model, the computer device may train the topic model with the user-given text topic as a new topic. And obtaining the topic vocabulary of the text topic given by the user, and training the emotion model by taking the topic vocabulary of the text topic given by the user as a new training sample, thereby realizing incremental updating of the topic model and the emotion model.
In this embodiment, a method for implementing text generation by combining a language model, a topic model and an emotion model is provided, which has better realizability than the conventional text generation method. In addition, for the situation that the topic or style which is not in the corpus range leads to the fact that the topic and style of the text cannot be determined and the text is generated, the incremental updating method of the text topic is provided, and the text generation can be accurately realized. Meanwhile, an unsupervised text topic judgment and text generation method is provided, so that the workload of corpus labeling and the model training cost can be effectively reduced.
The text generation method in the embodiment of the present application is described above, and the computer device in the embodiment of the present application is described below, referring to fig. 3, an embodiment of the computer device in the embodiment of the present application includes:
a first determining unit 301, configured to obtain a text topic, and determine a topic vocabulary related to the text topic according to the text topic;
a second determining unit 302, configured to determine emotion conveyed by each of the topic words;
a generating unit 303, configured to generate a text corresponding to each topic word according to the emotion conveyed by each topic word;
and the correcting unit 304 is configured to correct a sentence in which emotion of a sentence in the plurality of sentences of the text is inconsistent with emotion conveyed by the text subject, so as to obtain a target text.
In a preferred implementation manner of this embodiment, the first determining unit 301 is specifically configured to obtain a pre-trained topic model, where the topic model is obtained by training a plurality of sets of training samples by a machine learning algorithm, and each set of training samples includes a text paragraph and tag information for representing a topic of the text paragraph; and inputting the text topic into the topic model to obtain topic words related to the text topic output by the topic model.
In a preferred implementation manner of this embodiment, the second determining unit 302 is specifically configured to obtain a pre-trained emotion model, where the emotion model is obtained by training multiple sets of training samples by a machine learning algorithm, and each set of training samples includes a topic vocabulary and tag information for representing emotion of the topic vocabulary; and inputting the topic vocabulary into the emotion model aiming at each topic vocabulary to obtain emotion conveyed by the topic vocabulary output by the emotion model.
In a preferred implementation of this embodiment, the computer device further includes:
an incremental updating unit 305, configured to train the topic model as a new topic when the text topic does not match the topic of each text paragraph used to train the topic model; and obtaining the topic vocabulary of the text topic, and training the emotion model by taking the topic vocabulary of the text topic as a new training sample.
In a preferred implementation manner of this embodiment, the generating unit 303 is specifically configured to obtain a pre-trained language model, where the language model is obtained by training multiple sets of training samples by a machine learning algorithm, and each set of training samples includes corpus data; and inputting emotion conveyed by each topic vocabulary into the language model to obtain text output by the language model.
In this embodiment, the operations performed by the units in the computer device are similar to those described in the embodiments shown in fig. 1 to 2, and are not repeated here.
In this embodiment, the computer device determines, according to a text topic, a topic word related to the text topic, determines an emotion conveyed by each topic word, generates, according to the emotion conveyed by each topic word, a text corresponding to each topic word, and corrects a sentence in a plurality of sentences of the text, where the sentence emotion is inconsistent with the emotion conveyed by the text topic, so as to obtain a target text. Therefore, the text generation method fuses language expressions of concepts such as language habit, vocabulary, syntax, emotion, theme and the like to generate the text, so that the finally generated text can more convey the intention which the user wants to express and the emotion which the user wants to convey through the text, meanwhile, the context semantic consistency and emotion consistency of the text can be ensured, and the smoothness of text lines is improved, so that the practicability is higher.
With reference to fig. 4, an embodiment of a computer device in the embodiment of the present application includes:
the computer device 400 may include one or more central processing units (central processingunits, CPU) 401 and a memory 405, with one or more application programs or data stored in the memory 405.
Wherein the memory 405 may be volatile storage or persistent storage. The program stored in memory 405 may include one or more modules, each of which may include a series of instruction operations in a computer device. Still further, the central processor 401 may be arranged to communicate with the memory 405, executing a series of instruction operations in the memory 405 on the computer device 400.
The computer device 400 may also include one or more power supplies 402, one or more wired or wireless network interfaces 403, one or more input/output interfaces 404, and/or one or more operating systems, such as WindowsServerTM, macOSXTM, unixTM, linuxTM, freeBSDTM, etc.
The cpu 401 may perform the operations performed by the computer device in the embodiments shown in fig. 1 to 2, and will not be described herein.
Embodiments of the present application also provide a computer storage medium, where one embodiment includes: the computer storage medium has stored therein instructions which, when executed on a computer, cause the computer to perform the operations performed by the computer device in the embodiments of fig. 1-2 described above.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.

Claims (10)

1. A method of text generation, the method being applied to a computer device, the method comprising:
acquiring a text topic, and determining a topic word related to the text topic according to the text topic;
determining emotion conveyed by each topic word, and generating a text corresponding to each topic word according to the emotion conveyed by each topic word;
correcting sentences with inconsistent sentence emotion conveyed by the text theme in the sentences of the text to obtain a target text.
2. The method of claim 1, wherein said determining the topic vocabulary associated with the text topic from the text topic comprises:
obtaining a pre-trained topic model, wherein the topic model is obtained by training a plurality of groups of training samples through a machine learning algorithm, and each group of training samples comprises a text paragraph and label information used for representing the topic of the text paragraph;
and inputting the text topic into the topic model to obtain topic words related to the text topic output by the topic model.
3. The method of claim 2, wherein said determining the emotion conveyed by each of said subject words comprises:
acquiring a pre-trained emotion model, wherein the emotion model is obtained by training a plurality of groups of training samples through a machine learning algorithm, and each group of training samples comprises a topic vocabulary and label information for representing emotion of the topic vocabulary;
and inputting the topic vocabulary into the emotion model aiming at each topic vocabulary to obtain emotion conveyed by the topic vocabulary output by the emotion model.
4. A method according to claim 3, characterized in that the method further comprises:
if the text topic does not match the topic of each text paragraph used for training the topic model, training the topic model by taking the text topic as a new topic;
and obtaining the topic vocabulary of the text topic, and training the emotion model by taking the topic vocabulary of the text topic as a new training sample.
5. The method of any one of claims 1 to 4, wherein said generating text corresponding to each of said subject words from emotion conveyed by said subject word comprises:
obtaining a pre-trained language model, wherein the language model is obtained by training a plurality of groups of training samples through a machine learning algorithm, and each group of training samples comprises corpus data;
and inputting emotion conveyed by each topic vocabulary into the language model to obtain text output by the language model.
6. A computer device, the computer device comprising:
the first determining unit is used for acquiring a text theme and determining theme vocabularies related to the text theme according to the text theme;
a second determining unit configured to determine emotion conveyed by each of the subject words;
the generation unit is used for generating texts corresponding to each topic vocabulary according to the emotion conveyed by each topic vocabulary;
and the correction unit is used for correcting sentences with inconsistent sentence emotion conveyed by the text theme in the sentences of the text to obtain a target text.
7. The computer device according to claim 6, wherein the first determining unit is specifically configured to obtain a pre-trained topic model, the topic model is obtained by training a plurality of sets of training samples by a machine learning algorithm, and each set of training samples includes a text paragraph and tag information for representing a topic of the text paragraph; and inputting the text topic into the topic model to obtain topic words related to the text topic output by the topic model.
8. The computer device according to claim 7, wherein the second determining unit is specifically configured to obtain a pre-trained emotion model, where the emotion model is obtained by training a plurality of sets of training samples by a machine learning algorithm, and each set of training samples includes a topic vocabulary and tag information for representing emotion of the topic vocabulary; and inputting the topic vocabulary into the emotion model aiming at each topic vocabulary to obtain emotion conveyed by the topic vocabulary output by the emotion model.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the method of any of claims 1 to 5 when executing the computer program.
10. A computer storage medium having instructions stored therein, which when executed on a computer, cause the computer to perform the method of any of claims 1 to 5.
CN202310556668.3A 2023-05-17 2023-05-17 Text generation method, computer device and computer storage medium Pending CN116562240A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310556668.3A CN116562240A (en) 2023-05-17 2023-05-17 Text generation method, computer device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310556668.3A CN116562240A (en) 2023-05-17 2023-05-17 Text generation method, computer device and computer storage medium

Publications (1)

Publication Number Publication Date
CN116562240A true CN116562240A (en) 2023-08-08

Family

ID=87499809

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310556668.3A Pending CN116562240A (en) 2023-05-17 2023-05-17 Text generation method, computer device and computer storage medium

Country Status (1)

Country Link
CN (1) CN116562240A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20240054282A1 (en) * 2022-08-15 2024-02-15 International Business Machines Corporation Elucidated natural language artifact recombination with contextual awareness

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20240054282A1 (en) * 2022-08-15 2024-02-15 International Business Machines Corporation Elucidated natural language artifact recombination with contextual awareness

Similar Documents

Publication Publication Date Title
Arora et al. Character level embedding with deep convolutional neural network for text normalization of unstructured data for Twitter sentiment analysis
US11210468B2 (en) System and method for comparing plurality of documents
CN108052499B (en) Text error correction method and device based on artificial intelligence and computer readable medium
Eskander et al. Foreign words and the automatic processing of Arabic social media text written in Roman script
Gómez-Adorno et al. Improving feature representation based on a neural network for author profiling in social media texts
CN106610990B (en) Method and device for analyzing emotional tendency
Satapathy et al. A review of shorthand systems: From brachygraphy to microtext and beyond
US20190362713A1 (en) Dynamic extraction of contextually-coherent text blocks
CN112287100A (en) Text recognition method, spelling error correction method and voice recognition method
KR20230061001A (en) Apparatus and method for correcting text
Alvarez et al. Improving the automatic segmentation of subtitles through conditional random field
CN116562240A (en) Text generation method, computer device and computer storage medium
Duşçu et al. Polarity classification of twitter messages using audio processing
Fischbach et al. Fine-grained causality extraction from natural language requirements using recursive neural tensor networks
Mekki et al. Sentence boundary detection of various forms of Tunisian Arabic
US20230350929A1 (en) Method and system for generating intent responses through virtual agents
CN113486143A (en) User portrait generation method based on multi-level text representation and model fusion
Ansari et al. Language lexicons for Hindi-English multilingual text processing
CN115577109A (en) Text classification method and device, electronic equipment and storage medium
Mekki et al. COTA 2.0: An automatic corrector of tunisian Arabic social media texts
Doitch et al. Perturbation based learning for structured NLP tasks with application to dependency parsing
CN113312910A (en) Ontology learning method, system, device and medium based on topic model
Üveges Comprehensibility and Automation: Plain Language in the Era of Digitalization
Ariwibowo et al. Hate Speech Text Classification Using Long Short-Term Memory (LSTM)
Kaur et al. Roman to gurmukhi social media text normalization

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