Method, device and storage medium for predicting writing content using machine

Through the machine-implemented predictive writing content method, natural language processing technology and language models are used to generate predictive content that matches the writing goals, solving the problems of accuracy and speed in foreign writing and improving the writing quality.

CN114911907BActive Publication Date: 2025-08-08WANGYIYOUDAO INFORMATION TECH BEIJING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210605493.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-30
Publication Date
2025-08-08
Estimated Expiration
2042-05-30

AI Technical Summary

Technical Problem

In foreign writing, it is difficult for users to complete the writing process quickly and accurately, especially in professional fields or paper writing, which are prone to spelling errors, collocation errors or grammatical errors, and it is difficult to ensure the diversity of vocabulary and sentence patterns.

Method used

Through the machine-implemented method of predictive writing content, natural language processing technology and language models are used to generate matching predictive content based on the input content and writing goals, including predicted words, phrases and sentences, and reorder and error correction processing are performed.

Benefits of technology

Improve the accuracy and speed of writing, ensure that the generated content meets user expectations, reduces spelling and grammatical errors, and enhances the quality of writing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114911907B_ABST
    Figure CN114911907B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention provide a machine-implemented method, device, and storage medium for predicting writing content. The method comprises: determining a writing goal based on input content, wherein the writing goal includes at least one of a writing type, a subject area, a learning stage, and a writing intention; and generating predicted content that matches the input content based on the input content and the writing goal. This method, according to embodiments of the present invention, can ensure that the predicted content is more consistent with the user's intended text, exhibiting high prediction accuracy and improving the user's writing speed and quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of data processing technology. More specifically, embodiments of the present invention relate to a machine-implemented method for predicting writing content, a device for predicting writing content, and a computer-readable storage medium. Background Art

[0002] This section is intended to provide background or context for embodiments of the present invention as recited in the claims. The description herein may include concepts that could be explored, but not necessarily concepts that have been previously conceived or explored. Therefore, unless otherwise indicated herein, the material described in this section is not prior art with respect to the specification and claims of this application and is not admitted to be prior art by inclusion in this section.

[0003] When many people encounter words in professional fields in foreign language writing, they are often unsure of the spelling details of the words, or forget what sentences or grammar to use to express some special scenarios. This situation is not only encountered by people who are not good at foreign languages. Even native speakers may encounter situations where their thoughts are stuck or they forget words when they pick up the pen. Furthermore, in the scenario of paper writing, a lot of text writing is required, and it is difficult to guarantee that there will be no spelling errors, collocation errors or other grammatical errors. In addition, the scenario of paper writing also needs to ensure the diversity of vocabulary, sentence patterns, etc. When users want to use more ways of expression, they often don’t know how to express themselves. Summary of the Invention

[0004] Therefore, there is a great need for a method that can predict the user's writing content, so as to help users with writing needs complete the writing process quickly and accurately.

[0005] In this context, embodiments of the present invention contemplate providing a machine-implemented method for predicting written content, an apparatus for predicting written content, and a computer-readable storage medium.

[0006] In a first aspect of an embodiment of the present invention, a method for predicting writing content implemented by a machine is provided, comprising: determining a writing goal based on input content, wherein the writing goal includes at least one of a writing type, a subject area, a learning stage category, and a writing intention; and generating predicted content matching the input content based on the input content and the writing goal.

[0007] In one embodiment of the present invention, the input content includes at least one of the following: input information related to the writing goal input before writing; writing content input during writing.

[0008] In another embodiment of the present invention, determining a writing goal based on input content includes: utilizing a classification model based on natural language processing technology to perform real-time analysis on the writing content to determine a writing goal for the writing content.

[0009] In another embodiment of the present invention, generating predicted content based on input content and writing goals includes: using a language model to perform the above analysis on the current writing content to obtain a first prediction list containing multiple predicted contents; and based on the writing goal, reordering the multiple predicted contents in the first prediction list to obtain a second prediction list that matches the current writing content.

[0010] In one embodiment of the present invention, performing the above analysis on the current writing content to obtain the first prediction list further includes at least one of the following: in response to the current writing content including letters, the predicted content includes predicted words containing the letters; in response to the current writing content including words, the predicted content includes predicted phrases containing the words; in response to the current writing content conforming to sentence components in a sentence structure, the predicted content includes predicted sentences containing the current writing content, or includes at least one of predicted words and predicted phrases that conform to other sentence components in the sentence structure.

[0011] In another embodiment of the present invention, re-ordering based on the writing goal includes: placing the predicted content in the first prediction list that meets the writing goal in the front row.

[0012] In another embodiment of the present invention, reordering based on writing objectives includes: determining a corresponding domain model based on the subject area in the writing objective; and using the domain model to re-score multiple predicted contents in the first prediction list so as to reorder them in descending order according to the score of each predicted content.

[0013] In one embodiment of the present invention, before determining the corresponding domain model based on the writing goal, the method further includes: using training data in a specific subject area to train the language model to obtain the corresponding domain model.

[0014] In another embodiment of the present invention, the training data includes at least one of the following: training corpus of multiple writing types in a specific subject area; training corpus of multiple academic stage categories in a specific subject area; word frequency information in a specific subject area.

[0015] In another embodiment of the present invention, generating predicted content based on input content and writing goals includes: in response to the determined writing goal including writing intention, searching for one or more candidate sentence patterns that match the input content in a preset sentence pattern list as the predicted content.

[0016] In one embodiment of the present invention, it also includes: in response to the multiple prediction contents being different prediction categories, outputting the prediction contents in the second prediction list of each prediction category according to the priority order between different prediction categories; and / or in response to the multiple prediction contents being different prediction categories, outputting a corresponding number of prediction contents in the second prediction list of each prediction category according to a preset output quantity of each prediction category.

[0017] In another embodiment of the present invention, the method further includes: in response to a selection operation of the predicted content, performing error correction processing on the written content containing the selected predicted content.

[0018] In a second aspect of an embodiment of the present invention, a device for predicting writing content is provided, comprising a processor configured to execute program instructions; and a memory configured to store the program instructions, wherein when the program instructions are executed by the processor, the device executes the method for predicting writing content according to any one of the first aspect of the embodiment of the present invention.

[0019] In a third aspect of the embodiments of the present invention, a computer-readable storage medium is provided, which stores program instructions. When the program instructions are loaded and executed by a processor, the processor executes the method according to any one of the first aspects of the embodiments of the present invention.

[0020] According to the method for predicting writing content implemented by a machine in accordance with an embodiment of the present invention, the writing goal can be determined, and then the predicted content can be generated based on the input content and the writing goal. This can make the predicted content more consistent with the user's expected text, and has the characteristics of high prediction accuracy, which is conducive to improving the user's writing speed and writing quality.

[0021] In some embodiments of the present invention, a classification model based on natural language processing technology can be used to perform real-time analysis of written content, enabling accurate and real-time determination of writing objectives based on the written content, thereby further improving the accuracy of predicted content. In other embodiments of the present invention, a language model can be used to obtain a first prediction list containing multiple predicted contents. The predicted contents in the first prediction list are then reordered based on the determined writing objectives to obtain a second prediction list that is highly compatible with the written content, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily apparent by reading the following detailed description with reference to the accompanying drawings, in which several embodiments of the present invention are shown by way of example and not limitation, in which:

[0023] Figure 1 Schematically illustrates a block diagram of an exemplary system 100 suitable for implementing embodiments of the present invention;

[0024] Figure 2 The following schematically shows a flow chart of a method for predicting writing content implemented by a machine according to an embodiment of the present invention;

[0025] Figure 3 Schematically showing a flow chart of a method for predicting writing content according to another embodiment of the present invention;

[0026] Figure 4 Schematically illustrating a flow chart of a method for reordering based on writing goals according to an embodiment of the present invention;

[0027] Figure 5 FIG. 4 is a flow chart illustrating a method for predicting writing content according to another embodiment of the present invention.

[0028] In the drawings, the same or corresponding reference numerals denote the same or corresponding parts. DETAILED DESCRIPTION

[0029] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided solely to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. Rather, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.

[0030] Figure 1 1 shows a block diagram of an exemplary system 100 suitable for implementing embodiments of the present invention. Figure 1As shown, a system 100 for predicting written content according to an embodiment of the present invention may include: a central processing unit (CPU) 101, a random access memory (RAM) 102, a read-only memory (ROM) 103, a system bus 104, a hard disk controller 105, a keyboard controller 106, a serial interface controller 107, a parallel interface controller 108, a display controller 109, a hard disk 110, a keyboard 111, a serial external device 112, a parallel external device 113, and a display 114. Among these devices, the CPU 101, RAM 102, ROM 103, hard disk controller 105, keyboard controller 106, serial controller 107, parallel controller 108, and display controller 109 are coupled to the system bus 104. The hard disk 110 is coupled to the hard disk controller 105, the keyboard 111 is coupled to the keyboard controller 106, the serial external device 112 is coupled to the serial interface controller 107, the parallel external device 113 is coupled to the parallel interface controller 108, and the display 114 is coupled to the display controller 109. It should be understood that Figure 1 The structured block diagram is only for the purpose of illustration, rather than for limiting the scope of the present invention. In some cases, some devices may be added or reduced according to specific circumstances.

[0031] Those skilled in the art will appreciate that embodiments of the present invention may be implemented as a system, device, method, or computer program product. Accordingly, the present invention may be implemented in the following forms: entirely in hardware, entirely in software (including firmware, resident software, microcode, etc.), or in a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, the present invention may be implemented in the form of a computer program product embodied in one or more computer-readable media containing computer-readable program code.

[0032] Any combination of one or more computer-readable media can be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples (non-exhaustive examples) of computer-readable storage media can include, for example: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.

[0033] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0034] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0035] The computer program code for performing the operations of the present invention can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0036] The following will describe the embodiments of the present invention with reference to the flowcharts of the methods and block diagrams of the devices (or systems) according to the embodiments of the present invention. It should be understood that each block in the flowcharts and / or block diagrams, as well as the combination of blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine, and these computer program instructions are executed by the computer or other programmable data processing device to produce a device that implements the functions / operations specified in the blocks in the flowcharts and / or block diagrams.

[0037] These computer program instructions can also be stored in a computer-readable medium that enables a computer or other programmable data processing device to operate in a specific manner. In this way, the instructions stored in the computer-readable medium produce a product that includes an instruction device that implements the functions / operations specified in the blocks in the flowchart and / or block diagram.

[0038] Computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, such that the instructions executed on the computer or other programmable apparatus provide a process that implements the functions / operations specified in the blocks in the flowchart and / or block diagram.

[0039] According to an embodiment of the present invention, a machine-implemented method for predicting writing content, a device for predicting writing content, and a computer-readable storage medium are proposed.

[0040] In this article, it is to be understood that the terms involved include the following:

[0041] NLP: Natural language processing, natural language processing technology, which studies various theories and methods that can achieve effective communication between humans and computers using natural language, and is mainly used in machine translation, public opinion monitoring, automatic summarization, opinion extraction, text classification, question answering, text semantic comparison, speech recognition, text recognition (OCR), etc.

[0042] Word frequency: It is a commonly used weighting technique used in intelligence retrieval and text mining to evaluate the degree of repetition of a word in a document or a set of documents in a field in a corpus.

[0043] LM: language model, which plays an important role in natural language processing. Its task is to predict the probability of a sentence appearing in a language.

[0044] In addition, any number of elements in the drawings is for illustration and not limitation, and any naming is for distinction only and does not have any limiting meaning.

[0045] The principles and spirit of the present invention are explained in detail below with reference to several representative embodiments of the present invention. SUMMARY OF THE INVENTION

[0047] The inventors have discovered that input methods provide a quick way of inputting. If a user types the first letter of certain words or phrases, all words containing this first letter will be displayed for the user to choose from, which greatly improves the efficiency of the user's text input. Some input methods can also dynamically update the order of candidate words according to the user's usage habits, such as words or phrases that the user frequently inputs will appear first in the candidate list, etc. However, current input methods are limited to vocabulary scenarios, that is, they can only provide candidate words for vocabulary, and the order of candidate words cannot be accurately matched according to the user's scenario goals, so that the user may need to spend more time searching and screening in the candidate words, or may have to wait until the user has almost finished inputting the letters in the word before relatively accurate candidate words are displayed. The goal of the present invention is to provide a faster and more efficient method for accurately matching the content that the user expects to write in scenarios such as writing essays, novels, and papers, which can not only predict words, but also realize the prediction of phrases, sentence patterns, and other content.

[0048] After introducing the basic principles of the present invention, various non-limiting embodiments of the present invention are described in detail below.

[0049] Application Scenario Overview

[0050] The method for predicting writing content of the embodiment of the present invention can be implemented by an application running on a machine. Such an application may be, for example, a writing prediction APP, a quick input APP, etc. The language of the writing content may be various existing languages, including but not limited to English, French, German, Spanish, Korean, Japanese, Chinese, etc. The user group may be adults, teenagers, etc. Usually, in such a writing prediction APP, predicted content can be generated based on the user's input content, and one or more predicted contents can be presented to the user to help the user complete the writing content. Furthermore, the machine implementing the writing prediction APP may also be provided with, for example, a speaker to play the predicted content, or may be provided with, for example, a microphone to receive the user's voice input content, so that the writing prediction APP predicts the writing content based on the voice input content.

[0051] In some application scenarios, when a user wants to describe a research method or conclusion but doesn't know what sentence is the standard English expression, for example, they can directly enter native language expressions such as "The graph shows an upward trend" or "This method is an important area of concern in a certain field." In this case, the writing prediction app can output the English sentence structure of "The graph shows an upward trend" or "This method is an important area of concern in a certain field." In other application scenarios, the user may forget the words when writing, such as wanting to write a certain word but only remembering the first letter of the word, or for some long and difficult professional terms in a specific academic field, it is difficult for the user to guarantee that there will be no spelling errors. The writing prediction app can predict the corresponding vocabulary based on the letters the user has already entered. In other application scenarios, for example, when the user has a general impression of a sentence structure but is unsure of the details of the sentence structure, or when the user wants to use more diverse forms of expression, the writing prediction app can predict one or more related sentence structures based on the sentence structure components the user has already entered for the user to choose from.

[0052] Exemplary Methods

[0053] In combination with the above application scenarios, Figure 2 The following describes a machine-implemented method for predicting written content according to an exemplary embodiment of the present invention. It should be noted that the aforementioned application scenarios are merely provided to facilitate understanding of the spirit and principles of the present invention, and the embodiments of the present invention are not limited in this respect. Rather, the embodiments of the present invention can be applied to any applicable scenario.

[0054] Figure 2 The flowchart of the method for predicting writing content implemented by a machine according to an embodiment of the present invention is schematically shown. Figure 2 As shown in , method 200 may include: in step 210, a writing goal may be determined based on the input content, wherein the writing goal may include at least one of a writing type, a subject area, a learning stage category, and a writing intention.

[0055] The input content described above may include at least one of text content, voice content, image content, etc. input by the user. In some application scenarios, the user can directly input voice content that expresses the writing goal, or can input the writing content by voice. The voice content input by the user can be converted into a machine-recognizable language through voice recognition technology to determine the user's writing goal, and the voice content can also be converted into text content for presentation. In other application scenarios, the user can input a picture containing the writing goal and / or writing content, and use text recognition OCR technology to recognize the text content in the picture to facilitate determining the writing goal. In some other application scenarios, the user can directly input text content to express the writing goal or input writing content in text form.

[0056] In one embodiment of the present invention, the input content may include at least one of the following: input information related to the writing goal entered before writing; or writing content entered during writing. In some embodiments, the writing goal can be directly determined based on the input information before writing; and the writing content entered during writing can be analyzed to extract and determine a writing goal that matches the writing content.

[0057] In some embodiments, the input information may include a writing goal for the current writing process directly entered by the user before formally writing. For example, if the user enters "I want to write a paper," the method according to this embodiment can directly determine the writing goal by identifying the information entered by the user before writing. In other embodiments, the input information may include user selection information, such as by setting options related to the writing goal so that the user can select before writing. For example, the set options may include papers, emails, essays, etc., and / or may include computer fields, medical fields, chemistry fields, etc. In still other embodiments, the input information may include information used to express a specific writing intention, such as if the user enters "I want to express in English "This chart shows an upward trend" before writing."

[0058] In some embodiments, the writing content input when writing can be the content input by the user when formally writing, for example, it can include the currently input letters, words, phrases, sentences, etc. and the content that has been input before the current input (that is, the previous context of the current input). The writing content can be input in real time and change in real time. According to the method of this embodiment, the writing content input in real time can be identified by real-time, for example, by using keyword extraction technology and semantic analysis technology based on natural language processing, to analyze the writing content input in real time to determine the writing goal of the writing content.

[0059] In other embodiments, the writing type may include, for example, at least one of essay writing, email writing, novel story writing, and exam composition writing. In still other embodiments, the subject area may include, for example, at least one of computer science, finance and economics, medicine, chemistry, artificial intelligence, mechanics, mathematics, and physics. In some embodiments, the academic stage category may include, for example, at least one of College English Test Band 4, College English Test Band 6, IELTS, TOEFL, sixth grade of elementary school, first grade of junior high school, third grade of junior high school, and third grade of high school, etc., which are not listed here.

[0060] In other application scenarios, when the user is unclear about the specific foreign language sentence structure and vocabulary they want to express and prefers a complete text template, they can enter a general description of the desired content. This general description can be expressed in their native language or a foreign language. By analyzing this general description, the user's writing intent can be determined. The writing intent can include the specific content the user wants to write. For example, if the user enters "I want to express in English "The chart shows an upward trend," the writing intent can be determined to be the English sentence structure "The chart shows an upward trend."

[0061] Then, in step 220, based on the input content and the writing goal, predicted content that matches the input content can be generated. After the writing goal is determined, the generated predicted content can be combined with the writing goal to make it more accurate and more in line with the user's expected text. Matching with the input content can be understood as being related to the input content that has been entered, rather than just being related to the currently input letters as in the input method. For example, when it is determined that the writing goal is to write a paper in the field of finance and economics, the predicted content is all content related to papers in the field of finance and economics. Specifically, when the user enters the first letter of a word, the method according to an embodiment of the present invention will give priority to recommending predicted words in the field of finance and economics that contain the first letter, while the input method usually only matches the first letter with the candidate words in the dictionary, and sorts and recommends them in alphabetical order or word frequency order of the second letter, and cannot guarantee that the predicted candidate words meet the user's current writing needs.

[0062] In some embodiments, the predicted content may include at least one of a predicted word, a predicted phrase, and a predicted sentence. Generating predicted content matching the input content may include generating one or more predicted content matching the input content. In one embodiment of the present invention, method 200 may further include: in response to the plurality of predicted contents being in different prediction categories, outputting predicted content for each prediction category according to a priority order between the different prediction categories; and / or in response to the plurality of predicted contents being in different prediction categories, outputting a corresponding number of predicted contents in each prediction category according to a preset output quantity for each prediction category.

[0063] For example, in step 220, multiple predicted contents including predicted words and predicted phrases are generated. For example, if the priority of predicted words is set higher than that of predicted phrases, the predicted words are output first, followed by the predicted phrases. For another example, if the preset output quantity for predicted words is 5 and the preset output quantity for predicted phrases is 4, then 5 predicted words and 4 predicted phrases can be output. The corresponding quantity is the same as the preset output quantity. It is understood that the preset output quantity for different categories of predicted contents can be different or the same, for example, 5 for both.

[0064] In another embodiment of the present invention, method 200 may further include: in response to a selection operation on the predicted content, performing error correction processing on the written content containing the selected predicted content. After generating the predicted content that matches the input content in step 220, the generated one or more predicted contents may be presented to the user so that the user can select as needed; when the user selects one of the predicted contents, the predicted content will appear in the current written content. According to the method of this embodiment, sentence analysis and grammatical analysis and other operations can be performed on the written content containing the selected predicted content, so as to perform error correction processing on errors that may appear in the written content after the selected predicted content is added, so as to ensure the correctness of the user's final written content. In some embodiments, the error correction processing may include, for example, grammatical correction, semantic correction, etc. In other embodiments, the error correction process can be set as needed to allow the user to confirm whether to accept the error correction result, or it can be set to automatically perform the error correction process.

[0065] Combination of the above Figure 2 The method for predicting writing content implemented by a machine according to an embodiment of the present invention is described in an exemplary manner. It will be understood by those skilled in the art that the above description is exemplary and not restrictive. For example, determining writing goals based on input content can be achieved not only by using semantic analysis technology, but also by using a classification model based on natural language processing technology. Figure 3 Provide a detailed description.

[0066] Figure 3 The following is a flow chart of a method for predicting writing content according to another embodiment of the present invention. Figure 2 A specific embodiment of the method 200 described above, so the above Figure 2 The description of method 200 is also applicable to the following description of method 300 .

[0067] like Figure 3As shown in , method 300 may include: in step 310, a writing goal may be determined based on the input content. In some embodiments, step 310 may include: in step 311 (shown in a dotted box), a classification model based on natural language processing technology may be used to perform real-time analysis on the writing content to determine the writing goal of the writing content. In some application scenarios, as the writing content input by the user during the writing process changes in real time (such as adding content, reducing content, modifying content, etc.), the classification model may be used to perform real-time detection and classification of the writing content to determine or update the writing goal in real time. According to such a setting, it is beneficial to further improve the accuracy of determining the writing goal and the matching degree between the writing goal and the writing content, and using the real-time updated writing goal to predict the writing content can help further narrow the range of candidate prediction content to improve the prediction accuracy.

[0068] In some embodiments, the classification model based on natural language processing technology may include, for example, a CNN model, an RNN model, etc. In other embodiments, before using the classification model for real-time analysis, the classification model may be trained to improve its accuracy in classifying the writing content. In yet other embodiments, before using the classification model for real-time analysis, at least one of the writing type, subject area, academic stage category, and writing intention may first be classified with data labels, and then a large amount of writing scene text may be used to annotate the data type as training data so that it can correspond to the data label of at least one of the writing type, subject area, academic stage category, and writing intention, and the annotated training data may be used to train the classification model so that the trained classification model can map the writing content to the corresponding data label to achieve the classification of the writing objectives of the writing content.

[0069] The process then proceeds to step 320, where predicted content matching the input content is generated based on the input content and the writing goal. As further illustrated in the figure, step 320 may include: in step 321 (shown in a dashed box), the language model may be used to perform the above-mentioned context analysis on the current writing content to obtain a first prediction list containing multiple predicted content.

[0070] In one embodiment of the present invention, step 321 may further include at least one of the following: in response to the current writing content including a letter, the predicted content may include a predicted word containing the letter; in response to the current writing content including a word, the predicted content may include a predicted phrase containing the word; in response to the current writing content conforming to a sentence component in a sentence structure, the predicted content may include a predicted sentence containing the current writing content, or include at least one of predicted words and predicted phrases that conform to other sentence components in the sentence structure.

[0071] For example, in response to the current writing content including the letter "a", the predicted content may include predicted words containing "a", such as abandon, ability, apple, etc. For another example, in response to the current writing content including the word "boost", the predicted content may include predicted phrases containing "boost", such as boost productivity, boost their performance, boost efficiency, etc. For another example, in response to the current writing content including a noun and a verb, which conform to the subject component and predicate component in the sentence structure, the predicted content may include a predicted sentence containing the noun and verb, or the predicted content may include at least one of predicted words and predicted phrases containing an object component (i.e., conforming to the sentence structure other than the subject component and the predicate component). For example, in response to the current writing content including the predicate verb "show", the predicted content may be predicted phrases such as an upward trend, an downward trend, etc.

[0072] In some embodiments, the language model may use a commonly used language model structure, such as an N-GRAM model, etc. Based on the current writing content and its context, a plurality of predicted contents may be obtained using the language model, and the plurality of predicted contents may be sorted based on a default order to obtain a first prediction list. For example, when the writing content input by the user is "...hasthe", and then a letter "a" is input, the language model is used to analyze "...has the a", and a first prediction list such as "abandon, ability, ..., ..." may be obtained. The predicted contents included in the first prediction list predicted by the language model all contain the current writing content, such as predicted words that all contain "a", but the default order is usually, for example, alphabetical order, word frequency order, etc., and it cannot guarantee that the predicted content that best meets the user's goals will be ranked first.

[0073] Furthermore, in step 322 (shown by the dashed box), the plurality of predicted contents in the first prediction list may be reordered based on the writing goal to obtain a second prediction list that matches the current writing content. In another embodiment of the present invention, reordering based on the writing goal may include placing predicted contents in the first prediction list that meet the writing goal at the top. Based on this arrangement, reordering can prioritize predicted contents that better meet the user's expectations, thereby improving prediction accuracy.

[0074] For example, in some application scenarios, when the determined writing target is the computer field, for the first prediction list such as "abandon, ability, ..., ...", the predicted contents such as abandon, ability, etc. are matched with the computer field, so as to re-sort the predicted contents that conform to the computer field so that they can be ranked at the front, so as to obtain a second prediction list such as "ability, abandon, ..., ..." that is more in line with the current writing content.

[0075] For example, in other application scenarios, when the determined writing target is the economic and financial field, for a first prediction list such as "boost productivity, boost their performance, boost efficiency, boost the sales of products, ..., ...", the prediction contents such as boost productivity, boost their performance, boost efficiency, boost the sales of products are matched with the economic and financial field, so as to reorder the prediction contents that are in line with the economic and financial field so that they can be ranked at the front, so as to obtain a second prediction list such as "boost efficiency, boost productivity, boost the sales of products, ..., boost their performance, ..." that is more in line with the current writing content.

[0076] In another application scenario, when the determined writing goal is paper writing, and through, for example, a real-time analysis of the current writing content by a classification model, it can be known that the current writing content is a description of the paper background information, then the scope of candidate predicted content can be further narrowed based on the real-time updated writing goal, that is, multiple predicted contents (such as predicted sentences) in the first prediction list can be matched with the paper background writing goal, so as to prioritize the predicted contents that meet the paper background writing goal and obtain a second prediction list that matches the current writing content in real time.

[0077] In one embodiment of the present invention, method 300 may further include: in response to multiple prediction contents being different prediction categories, outputting the prediction contents in the second prediction list of each prediction category according to the priority order between different prediction categories; and / or in response to multiple prediction contents being different prediction categories, outputting a corresponding number of prediction contents in the second prediction list of each prediction category according to a preset output quantity of each prediction category.

[0078] The prediction categories described above may include word categories (e.g., predicted words), phrase categories (e.g., predicted phrases), and sentence categories (e.g., predicted sentences). In some embodiments, the predicted content may be output in the order of, for example, word categories, phrase categories, and sentence categories. In other embodiments, the predicted content may be output in the order of, for example, sentence categories, phrase categories, and word categories. In some application scenarios, when the predicted categories of the predicted content do not include all categories, for example, only phrase categories and sentence categories, the output may be performed in the order of priority between phrase categories and sentence categories, without outputting the unpredicted predicted categories.

[0079] When outputting the predicted content of the corresponding prediction category, it is output in the order in the second prediction list. For example, when outputting predicted words, it is output in the order of the predicted words in the second prediction list. When outputting predicted sentences, it is output in the order of the predicted sentences in the second prediction list. This ensures that the predicted content that best meets the user's expectations is presented first. In one embodiment, the second prediction list can include predicted content of multiple prediction categories at the same time, or each prediction category can correspond to a second prediction list containing corresponding predicted content, that is, outputting the predicted content in the second prediction list of each prediction category can be outputting the predicted content of each prediction category in one second prediction list, or it can be outputting the predicted content in the second prediction list corresponding to the prediction category. Outputting a corresponding number of predicted contents in the second prediction list of each prediction category can be outputting a corresponding number of predicted contents in sequence according to the order in the second prediction list.

[0080] Combination of the above Figure 3 An exemplary description of a method for predicting writing content according to another embodiment of the present invention is provided. It is understandable that the above description is exemplary and not restrictive. For example, obtaining the first prediction list in step 321 may not be limited to being implemented using a language model. In some embodiments, step 321 may further include: using a language model to perform the above analysis on the current writing content; in response to the sentence components of the current writing content conforming to the sentence structure, one or more candidate sentences matching the current writing content may be searched in a preset sentence list as predicted content. For example, the first prediction list in step 321 may not require a default sort for multiple predicted contents, and may only be a collection containing multiple predicted contents. Furthermore, the reordering based on the writing goal in step 322 may not be limited to the above-mentioned implementation. The following will be combined with Figure 4 Provide explanation.

[0081] Figure 4 The flowchart of the method for reordering based on writing goals according to an embodiment of the present invention is schematically shown. Figure 3A specific embodiment of step 322 described above, so the above Figure 3 The description of step 322 may also be applied to the following description of method 400 .

[0082] like Figure 4 As shown in , method 400 may include steps 420 and 430, wherein step 420 may include: determining a corresponding domain model based on the subject field in the writing goal. The corresponding domain model is a domain model in the same field as or related to the subject field in the writing goal. For example, in some application scenarios, if the subject field in the writing goal is determined to be the computer field, then the domain model of the computer field may be determined to be selected. In some embodiments, the domain model can be obtained by training a neural network model with corresponding domain data, so that the domain model obtained after training has the function of predicting the text content in the corresponding field.

[0083] Next, step 430 may include: using the domain model to re-score the multiple predicted contents in the first prediction list so as to re-sort them in descending order according to the scores of each predicted content. Since the domain model has the function of predicting the probability of text content appearing in the corresponding field, using the domain model for re-scoring can quickly match the predicted content in the corresponding subject field to improve the predicted probability (i.e., score) of the predicted content. According to such a setting, the predicted content at the top of the second prediction list can be made more consistent with the writing goals required by the user, which can save the user time in selecting candidate content, thereby helping to improve writing efficiency and accuracy.

[0084] like Figure 4 As further shown in FIG4 , in some embodiments, before executing step 420, method 400 may further include, in step 410 (shown in a dotted box), using training data in a specific subject area to train the language model to obtain a corresponding domain model. In some embodiments, the specific subject area may be a subject area or multiple similar subject areas. For example, in other embodiments, the specific subject area may include, for example, the field of chemistry. In yet other embodiments, the specific subject area may include, for example, the field of chemistry and the field of chemical engineering.

[0085] In another embodiment of the present invention, the training data may include at least one of the following: training corpora of various writing types in a specific subject area; training corpora of various academic stages in a specific subject area; word frequency information in a specific subject area. For example, in some application scenarios, when the specific subject area is the computer field, the training corpora of various writing types in the specific subject area may include, for example, computer field papers, computer field emails, computer field popular science articles, computer field technical specifications and other training corpora; the training corpora of various academic stages in the specific subject area may include, for example, elementary school computer level, middle school computer level, university computer level, national computer technology level and other training corpora; the word frequency information in the specific subject area may include, for example, word frequency information of vocabulary in the computer field.

[0086] In some embodiments, multiple language models may be trained using training data from multiple specific subject areas to obtain multiple domain models. In other embodiments, multiple domain models may be labeled to facilitate matching with the subject areas of the writing goal.

[0087] In some embodiments, domain models have high prediction accuracy. Using domain models can improve the accuracy of predicted content while quickly obtaining multiple predictions. Furthermore, because the domain model corresponds to the subject area of the writing objective, and the language model has already quickly determined the scope of the predicted content, when using the domain model, reordering can be performed only within the scope of the first prediction list to accurately and quickly determine the second prediction list without affecting the overall prediction speed.

[0088] Combination of the above Figure 4 A specific implementation method of reordering based on writing goals according to an embodiment of the present invention is described in detail. It can be understood that the method according to an embodiment of the present invention is not limited to generating predicted content by combining the use of language models and domain models, but can also use the corresponding domain model alone to directly predict the writing content, and still obtain predicted content with a high accuracy.

[0089] Figure 5 This is a flow chart showing a method for predicting writing content according to another embodiment of the present invention. Figure 2 A specific embodiment of the method 200 described above, so the above Figure 2 The description of method 200 is also applicable to the following description of method 500 .

[0090] like Figure 5As shown in , method 500 may include: in step 510, a writing goal may be determined based on the input content. Step 510 has been previously described in conjunction with Figure 2 Step 210 is described in detail in FIG.

[0091] Next, in step 520, based on the input content and the writing goal, predicted content matching the input content may be generated. Figure 5 As further shown in , step 520 may include: in step 521 (shown in a dotted box), in response to the determined writing goal including a writing intention, one or more candidate sentences matching the input content may be searched in a preset sentence list as predicted content. In some application scenarios, when the user input content includes a writing intention, the writing intention may be used to search for sentence templates in a preset sentence list, and the candidate sentences may be displayed for the user to select. For example, when the user inputs "chart upward trend", the method according to this embodiment may obtain candidate sentences such as "X show an upward trend, X grow from...to...between...to..., X risefrom...to...between...to...,...,...", where X may be used to represent a text position that the user further completes as needed. In some embodiments, the preset sentence list may be a pre-set list for classifying sentences by intent. In other embodiments, each candidate sentence may include a single sentence or a paragraph sentence.

[0092] In some other embodiments, method 500 may further include: in response to a selection operation on a candidate sentence, performing error correction processing on the written content containing the selected candidate sentence. In some application scenarios, the candidate sentence may be a template for a single sentence or a paragraph sentence, that is, the user is required to further fill in the text, for example, at the "X" in "X show an upward trend", the user is required to replace the "X" with specific text content. Therefore, after the user selects a candidate sentence and fills in the required text, the sentence structure, grammatical structure, or logical relationship with the context may be affected. In this case, sentence analysis and grammatical analysis can be performed on the written content containing the selected candidate sentence to correct new errors that may be generated by the current selection and filling operation, which is conducive to ensuring the correctness of the final written content and improving the user's writing quality and writing efficiency.

[0093] Through the above description of the technical solution and multiple embodiments of the present invention in combination with the accompanying drawings, those skilled in the art can understand that by determining the writing goal, and generating predicted content that matches the input content in combination with the writing goal, it is possible to preferentially obtain predicted content that is more in line with the user's expected writing text, thereby facilitating the improvement of the accuracy of the prediction of the writing content, and improving the user's writing efficiency and writing quality. According to such a setting, it can help users with writing needs to quickly complete the writing process, and can help people with difficulties to automatically input long and difficult sentences and long and difficult words. For people with weak language skills, they can also quickly use a variety of complex or advanced sentence patterns. It can also help users to quickly complete the entire writing process only through vague memories or clear intentions, which is conducive to reducing manpower and time costs, and is conducive to improving output, and can solve problems such as errors and writing quality caused by long-term work of human resources.

[0094] In some embodiments, the method of an embodiment of the present invention can achieve the effect of updating the writing goal in real time by performing real-time analysis on the writing content, thereby further narrowing the range of candidate predicted content and further improving the accuracy of the real-time prediction of the current writing content. In other embodiments, by reordering the multiple predicted contents in the first prediction list based on the writing goal, the purpose of placing predicted content that better meets the user's needs at the top can be achieved. Moreover, by first using a language model to obtain the first prediction list, the method according to this embodiment can achieve the advantages of both high prediction accuracy and fast prediction speed.

[0095] Furthermore, although the operations of the present method are described in a particular order in the accompanying drawings, this does not require or imply that the operations must be performed in that particular order, or that all of the operations shown must be performed to achieve the desired results. Rather, the steps depicted in the flowcharts may be performed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into a single step, and / or a single step may be broken down into multiple steps.

[0096] The use of the verbs "comprise", "include" and their conjugations in the application documents does not exclude the presence of elements or steps other than those stated in the application documents. The article "a" or "an" preceding an element does not exclude the presence of a plurality of such elements.

[0097] Although the spirit and principles of the present invention have been described with reference to several specific embodiments, it should be understood that the present invention is not limited to the specific embodiments disclosed, and the division into various aspects does not mean that the features of these aspects cannot be combined to benefit. Such division is merely for the convenience of expression. The present invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims. The scope of the appended claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.

Claims

1. A method for predicting written content using a machine, comprising: determining a writing goal based on the input content, wherein the writing goal includes at least one of a writing type, a subject area, a learning stage category, and a writing intention; as well as generating, based on the input content and the writing goal, predicted content matching the input content; The predictions generated based on the input content and writing goals include: Performing the above context analysis on the current writing content using the language model to obtain a first prediction list including multiple predicted contents; as well as Based on the writing goal, the plurality of predicted contents in the first prediction list are reordered to obtain a second prediction list matching the current writing content.

2. The method according to claim 1, wherein the input content comprises at least one of the following: Input information related to the writing goal input before writing; The writing content entered when writing.

3. The method according to claim 2, wherein determining a writing goal based on input content comprises: The writing content is analyzed in real time using a classification model based on natural language processing technology to determine the writing goal of the writing content.

4. The method according to claim 1, wherein performing the above analysis on the current written content to obtain the first prediction list further comprises at least one of the following: In response to the current written content including letters, the predicted content includes predicted words containing the letters; In response to the current written content including a word, the predicted content includes a predicted phrase including the word; In response to the current writing content conforming to a sentence component of a sentence structure, the predicted content includes a predicted sentence containing the current writing content, or includes at least one of a predicted word and a predicted phrase conforming to other sentence components in the sentence structure.

5. The method according to claim 1 or 4, wherein reordering based on writing goals comprises: Arrange the predicted contents in the first prediction list that meet the writing goal to the front.

6. The method of claim 5, wherein reordering based on writing goals comprises: Determine the corresponding domain model based on the subject area of the writing goal; The domain model is used to re-score the multiple prediction contents in the first prediction list so as to re-sort them in descending order according to the scores of the prediction contents.

7. The method according to claim 6, before determining the corresponding domain model based on the writing goal, the method further comprises: The language model is trained using training data in a specific subject area to obtain the corresponding domain model.

8. The method of claim 7, wherein the training data comprises at least one of the following: Training corpus of various writing types in a specific subject area; Training materials of various grades in a specific subject area; Word frequency information in a specific subject area.

9. The method according to claim 1, wherein generating predicted content based on input content and a writing goal comprises: In response to the determined writing goal including the writing intention, one or more candidate sentence patterns matching the input content are searched in a preset sentence pattern list to serve as the predicted content.

10. The method according to claim 1 or 4, further comprising: In response to the plurality of prediction contents being of different prediction categories, outputting the prediction contents in the second prediction list of each prediction category according to a priority order between the different prediction categories; and / or In response to the plurality of prediction contents belonging to different prediction categories, a corresponding number of prediction contents in the second prediction list of each prediction category are output according to a preset output quantity of each prediction category.

11. The method according to claim 2, further comprising: In response to the selection operation of the predicted content, error correction processing is performed on the written content containing the selected predicted content.

12. A device for predicting written content, comprising: a processor configured to execute program instructions; A memory configured to store the program instructions, which, when executed by the processor, causes the device to perform the method for predicting writing content according to any one of claims 1 to 11.

13. A computer-readable storage medium storing program instructions, which, when loaded and executed by a processor, causes the processor to execute the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Real-time sentence-assisted writing method and system

    CN101101594A

  • Method and device for guiding user composition

    CN112307176A