Text conciseness and clarity evaluation method and related equipment
Through the comprehensive scoring of text content and visual features by the machine learning algorithm model, the problem of subjective factors affecting the evaluation of text conciseness and clarity is solved, and standardized and objective evaluation results are achieved.
Patent Information
- Application Number
- CN202110824976.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-21
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-07-21
AI Technical Summary
In the prior art, the evaluation of text simplicity and clarity is greatly affected by subjective factors, resulting in inconsistent evaluation standards and difficulty in objective evaluation.
A pre-trained machine learning algorithm model is used to score the text content and visual features, and the conciseness and clarity of the text are comprehensively evaluated through the content scoring model and the visual scoring model to reduce the influence of subjective factors.
It achieves quantitative evaluation of the conciseness and clarity of the text, standardizes the evaluation process, and improves the objectivity and consistency of the evaluation.
Smart Images

Figure CN113536769B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data processing, and specifically to a method for evaluating the conciseness and clarity of a text and related equipment. Background Art
[0002] In the field of financial securities, information disclosure is the basis for making trading decisions. Whether the information disclosure text is concise and clear is one of the important indicators of readability. In the domestic capital market, many scholars believe that the quality of information disclosure affects various aspects such as stock issuance, trading, and listed company operations. At the same time, the Securities Law also requires that the information disclosed should be true, accurate, complete, concise, clear, and easy to understand. The determination of whether the text is concise and clear can be applied to the commercial field, providing a basis for judgment for investment transactions, listing review, and company operations, and has good social benefits and commercial uses.
[0003] However, the judgment of whether a text is concise and clear is currently performed by humans, and the judgment process is inevitably affected by subjective factors of the humans, such as their knowledge level, subjective views, reading habits, etc. This may lead to different people having different evaluations on the conciseness and clarity of the same text, and the evaluation conclusions may be different. The evaluation criteria for the conciseness and clarity of the text will also vary from person to person and cannot be unified, making it difficult to objectively evaluate the conciseness and clarity of the text. Summary of the invention
[0004] The embodiment of the present application provides a method and related device for evaluating the conciseness and clarity of a text, which are used to evaluate the conciseness and clarity of a text.
[0005] The first aspect of the present application embodiment provides a method for evaluating the degree of conciseness and clarity of a text, the method comprising:
[0006] Obtaining a pre-trained target text content scoring model, wherein the target text content scoring model is obtained by training multiple groups of first training samples using a machine learning algorithm, and each group of the first training samples includes a first training text and a standard content score of the first training text;
[0007] Obtaining a pre-trained target text visual scoring model, wherein the target text visual scoring model is obtained by training multiple groups of second training samples using a machine learning algorithm, and each group of the second training samples includes a training text image and a standard visual score of the training text image;
[0008] Inputting the text to be evaluated into the target text content scoring model to obtain a content score of the text to be evaluated output by the target text content scoring model;
[0009] Inputting the text image of the text to be evaluated into the target text visual scoring model to obtain the visual score of the text to be evaluated output by the target text visual scoring model;
[0010] The degree of conciseness and clarity of the text to be evaluated is determined according to the content score and the visual score of the text to be evaluated.
[0011] A second aspect of an embodiment of the present application provides a computer device, the computer device comprising:
[0012] An acquisition unit is used to obtain a pre-trained target text content scoring model, wherein the target text content scoring model is obtained by training multiple groups of first training samples using a machine learning algorithm, and each group of the first training samples includes a first training text and a standard content score of the first training text;
[0013] The acquisition unit is also used to obtain a pre-trained target text visual scoring model, where the target text visual scoring model is obtained by training multiple groups of second training samples using a machine learning algorithm, and each group of the second training samples includes a training text image and a standard visual score of the training text image;
[0014] A content scoring unit, used for inputting the text to be evaluated into the target text content scoring model to obtain the content score of the text to be evaluated output by the target text content scoring model;
[0015] A visual scoring unit, configured to input the text image of the text to be evaluated into the target text visual scoring model to obtain a visual score of the text to be evaluated output by the target text visual scoring model;
[0016] An evaluation unit is used to determine the degree of simplicity and clarity of the text to be evaluated based on the content score and visual score of the text to be evaluated.
[0017] A third aspect of an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the method of the first aspect when executing the computer program.
[0018] A fourth aspect of an embodiment of the present application provides a computer storage medium, in which instructions are stored. When the instructions are executed on a computer, the computer executes the method of the first aspect.
[0019] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0020] In the embodiment of the present application, the computer device inputs the text to be evaluated into a pre-trained target text content scoring model and a target text visual scoring model, respectively, so that the target text content scoring model identifies and calculates the text content of the text to be evaluated to obtain a content score of the text to be evaluated, and the target text visual scoring model identifies and calculates the text image of the text to be evaluated to obtain a visual score of the text to be evaluated. The conciseness and clarity of the text to be evaluated are determined by comprehensively evaluating the content score and the visual score, thereby achieving a comprehensive evaluation of the conciseness and clarity of the text based on the content dimension and the visual dimension, achieving quantification of the conciseness and clarity of the text, and using the pre-trained scoring model to calculate and identify the conciseness and clarity of the text, so that the evaluation of the conciseness and clarity of the text will not be mixed with subjective factors of the personnel, and will not be affected by subjective factors such as the knowledge level and reading habits of the personnel, so that the evaluation standards for the conciseness and clarity of the text are unified and the evaluation results are more objective. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 A flowchart of a method for evaluating the degree of simplicity and clarity of text in an embodiment of the present application;
[0022] Figure 2 This is another flow chart of the method for evaluating the degree of simplicity and clarity of text in the embodiment of the present application;
[0023] Figure 3 A schematic diagram of a flow chart of training a target text content scoring model in an embodiment of the present application;
[0024] Figure 4 A schematic diagram of a flow chart of training a target text visual scoring model in an embodiment of the present application;
[0025] Figure 5 This is a schematic diagram of the structure of a computer device in an embodiment of the present application;
[0026] Figure 6 This is another structural diagram of a computer device in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The embodiment of the present application provides a method and related device for evaluating the conciseness and clarity of a text, which are used to evaluate the conciseness and clarity of a text.
[0028] See also Figure 1 In the embodiments of the present application, one embodiment of the method for evaluating the degree of simplicity and clarity of text includes:
[0029] 101. Obtain a pre-trained target text content scoring model;
[0030] The method of this embodiment can be applied to any computer device with data processing capabilities. The computer device can deploy a pre-trained target text content scoring model, which is obtained by training multiple groups of first training samples using a machine learning algorithm, and each group of first training samples includes a first training text and a standard content score for the first training text. The standard content score represents the score of the text content in terms of simplicity and clarity, which can be manually annotated or automatically calculated by an algorithm. The text content can include any information that can be recorded on a carrier, such as text, tables, and pictures.
[0031] 102. Obtain a pre-trained target text visual scoring model;
[0032] The computer device deploys a pre-trained target text visual scoring model, which is obtained by training multiple groups of second training samples using a machine learning algorithm, and each group of second training samples includes a training text image and a standard visual score of the training text image. The training text image can be a text image of a second training text, and the second training text can be the same text as the first training text, or a text different from the first training text. The text image of the second training text can be obtained by screenshotting, scanning, or taking a photo of the second training text, as long as it is any method of generating a corresponding text image from text.
[0033] The standard visual score indicates the visual simplicity and clarity of the text, which can be manually annotated or automatically calculated by an algorithm.
[0034] 103. Input the text to be evaluated into the target text content scoring model to obtain a content score of the text to be evaluated output by the target text content scoring model;
[0035] In order to evaluate the conciseness and clarity of a text, a computer device may input the text to be evaluated into a target text content scoring model, which recognizes and calculates the text content of the text to be evaluated and outputs the recognition and calculation results, i.e., the content score of the text to be evaluated. The content score of the text to be evaluated indicates the score of the conciseness and clarity of the text content of the text to be evaluated.
[0036] 104. Inputting the text image of the text to be evaluated into the target text visual scoring model to obtain the visual score of the text to be evaluated output by the target text visual scoring model;
[0037] Similarly, the visual simplicity and clarity of the text to be evaluated can also be scored. The computer device inputs the text image of the text to be evaluated into the target text visual scoring model, and the target text visual scoring model recognizes and calculates the text image of the text to be evaluated, and outputs a score for the visual simplicity and clarity of the text to be evaluated.
[0038] 105. Determine the degree of simplicity and clarity of the text to be evaluated based on the content score and visual score of the text to be evaluated;
[0039] After calculating the content score and visual score of the text to be evaluated, the computer device combines the scores of these two dimensions to determine the simplicity and clarity of the text to be evaluated.
[0040] In this embodiment, the computer device inputs the text to be evaluated into a pre-trained target text content scoring model and a target text visual scoring model respectively, so that the target text content scoring model identifies and calculates the text content of the text to be evaluated to obtain a content score of the text to be evaluated, and the target text visual scoring model identifies and calculates the text image of the text to be evaluated to obtain a visual score of the text to be evaluated. The conciseness and clarity of the text to be evaluated are determined by comprehensively evaluating the content score and the visual score, thereby achieving a comprehensive evaluation of the conciseness and clarity of the text based on the content dimension and the visual dimension, and achieving quantification of the conciseness and clarity of the text. The pre-trained scoring model is used to calculate and identify the conciseness and clarity of the text, so that the evaluation of the conciseness and clarity of the text will not be mixed with subjective factors of the personnel, and will not be affected by subjective factors such as the knowledge level and reading habits of the personnel, so that the evaluation standards of the conciseness and clarity of the text are unified and the evaluation results are more objective.
[0041] In the following, Figure 1 Based on the embodiment shown, the embodiment of the present application is further described in detail. Figure 2 Another embodiment of the method for evaluating the degree of simplicity and clarity of text in the embodiments of the present application includes:
[0042] 201. Execute a training step of a target text content scoring model;
[0043] In this embodiment, the computer device may pre-execute the training steps of the target text content scoring model, see Figure 3 , the training steps include:
[0044] 2011. Obtaining an initial text content scoring model, and inputting a plurality of groups of first training samples into the initial text content scoring model;
[0045] The initial text content scoring model can be any natural language processing model with the ability to extract text features, such as a recurrent neural network model (RNN), a bag-of-words model, a term frequency-inverse document frequency model (TF-IDF), an N-gram model, a long-short term memory network (LSTM), and other language models. The initial model parameters of the initial text content scoring model can be parameters that come with the model, or can be pre-defined by a person based on experience, and are not specifically limited here.
[0046] 2012. Determine a first batch of first training texts from the plurality of groups of first training samples, and extract text content features of the first batch of first training texts;
[0047] The first training text of the first batch can be any group of the above-mentioned multiple groups of first training samples or the first training text in multiple groups of first training samples. The initial text content scoring model extracts text content features of the first training text of the first batch based on its model structure. For example, the convolutional neural network language model can extract text content features of the text based on its convolutional layer structure.
[0048] During people's reading process, too many commas in a text means many short sentences, which are easy to cause ambiguity and difficult to understand. If the proportion of periods is high, it means that the sentences are concise and clear. Therefore, the proportion of periods in the total number of punctuation marks in the text can be used as an important indicator to evaluate the conciseness and clarity of the text.
[0049] In a text, quantitative description can express the essence of the world more effectively than qualitative description. Therefore, the proportion of the number of numerical characters in the total number of words in the text can also be used as an important evaluation indicator to evaluate the conciseness and clarity of the text.
[0050] The text uses a multi-layer table of contents, which can clearly show the content hierarchy and the theme of the paragraph. The appropriate number of table of contents titles can enable readers to clearly understand the content scope of the chapter. Therefore, the table of contents hierarchy and table of contents title count can be used to evaluate the simplicity and clarity of the text.
[0051] Tables are a kind of accounting language that can clearly display the value of each item and the relationship between items, and can convey information more efficiently. Therefore, the number of tables can also be used as an evaluation indicator of the conciseness and clarity of the text.
[0052] In a text, the more adjectives there are, the more subjective expressions there are, and the more difficult it is for readers to understand the essence of things. Therefore, the proportion of adjectives to the total number of content words in the text can be used to evaluate the conciseness and clarity of the text. The higher the proportion, the lower the conciseness and clarity of the text.
[0053] The more attributive clauses there are in a text, the more likely it is to cause ambiguity and the more difficult it is to understand. Therefore, the number of attributive clauses can also be used as an evaluation indicator. The higher the proportion of attributive clauses, the lower the simplicity and clarity of the text.
[0054] Subject omission means that the sentence does not have an explicit subject. The current sentence inherits the subject or object of the previous sentence but omits the subject. Therefore, when reading the text, readers need to judge the subject of the sentence by themselves, which brings trouble to readers. The number of omitted subjects in the text can be used as an evaluation indicator. The higher the proportion of omitted subjects, the lower the simplicity and clarity of the text.
[0055] A simple sentence is an independent sentence or clause that contains only one subject-predicate structure and each component of the sentence is composed of only words or phrases. Simple sentences are easy for readers to understand. Therefore, the number of simple sentences can evaluate whether the text is concise and clear. The higher the proportion of simple sentences, the higher the degree of conciseness and clarity of the text. Specifically, the simple sentences in the text can be determined according to the syntactic dependency analysis algorithm.
[0056] Therefore, based on the multiple indicators listed above, when extracting text content features, one or more text content features can be extracted from the first training text, such as the proportion of periods in the total number of punctuation marks in the text, the proportion of numeric characters in the total number of words in the text, the count of directory levels and directory titles, the number of tables, the proportion of adjectives in the total number of content words in the text, the number of attributive clauses, the number of omitted subjects, the number of simple sentences, etc. This makes it easier to determine the relationship between the above text content features and the content score in the subsequent model training step, so that the conciseness and clarity of the text can be evaluated based on the above text content features.
[0057] 2013. Outputting a predicted content score according to the text content features of the first training text, and adjusting model parameters of the initial text content scoring model according to the difference between the predicted content score and the standard content score;
[0058] If the text content features are related to the content score of the text, the initial text content scoring model can calculate the predicted content score corresponding to the text content features of the first training text based on pre-set initial model parameters, that is, predictively output the content score, and adjust the model parameters of the initial text content scoring model according to the difference between the predicted content score and the standard content score.
[0059] The goal of adjusting the model parameters is to make the predicted content score calculated next time closer to the standard content score, and finally optimize the model parameters. The method of adjusting the model parameters according to the difference between the predicted content score and the standard content score can be a model parameter optimization method such as cross validation, grid search, genetic algorithm, particle swarm optimization, simulated annealing algorithm, gradient descent method, least squares method, etc.
[0060] 2014. If the difference between the predicted content score and the standard content score does not meet the convergence condition, return to extract the text content features of the first training text of the next batch until the difference meets the convergence condition, stop training, and obtain the target text content score model;
[0061] After the training process based on the first training text of the first batch is completed, the training process of the first training text of the next batch can be entered to verify whether the model parameters adjusted in the previous training process meet the convergence conditions and further optimize the model parameters. Therefore, if the difference between the predicted content score and the standard content score does not meet the convergence conditions, the process returns to extract the text content features of the first training text of the next batch, and continues to perform the operations of predicting the content score and adjusting the model parameters in step 2013. The operation is repeated in this way, and the training process of multiple batches of first training texts is performed until the difference between the predicted content score and the standard content score meets the convergence conditions, and the training is stopped, and the target text content scoring model can be obtained.
[0062] Among them, the difference between the predicted content score and the standard content score satisfies the convergence condition, which can be that the difference is within a preset numerical range, or that the variation range of the difference is within a preset range. For example, the difference remains unchanged or changes very little after multiple trainings. The specific convergence condition is not limited.
[0063] 202. Obtain a pre-trained target text content scoring model;
[0064] In this embodiment, the computer device obtains the target text content scoring model. This may be that the computer device executes the training steps of the target text content scoring model to obtain the model, or the training steps of the target text content scoring model are executed by other devices other than the computer device, and the target text content scoring model is deployed to the computer device after the training of the target text content scoring model is completed. This embodiment does not limit the way in which the computer device obtains the target text content scoring model.
[0065] 203. Execute a training step of a target text visual scoring model;
[0066] In this embodiment, the computer device may pre-execute the training steps of the target text visual scoring model, see Figure 4, the training steps include:
[0067] 2031. Obtain an initial text visual scoring model, and input multiple groups of second training samples into the initial text visual scoring model;
[0068] The initial text visual scoring model can be any visual processing model with image feature extraction capabilities, such as a convolutional neural network model, a long short-term memory network (LSTM) and other visual processing models. The initial model parameters of the initial text visual scoring model can be parameters that come with the model, or can be pre-defined by a person based on experience, and are not specifically limited here.
[0069] 2032. Determine a first batch of training text images from the plurality of groups of second training samples, and extract text visual features of the first batch of training text images;
[0070] The first batch of training text images can be any one of the multiple groups of second training samples or training text images in multiple groups of second training samples. The initial text visual scoring model extracts text visual features of the first batch of training text images based on its model structure. For example, the convolutional neural network model can extract text visual features of text images based on its convolutional layer structure.
[0071] In this embodiment, the text visual features may include one or more of the paragraph length, whether an item number is set, the proportion of bold characters in the total number of characters in the text, line spacing and font size, the number of scanned files, and the text reading direction. If the paragraph length is too long, it will visually give readers a sense of lengthy text. Generally, the paragraph length is between 6 and 10 lines, and the text is easier to read and understand. Therefore, the paragraph length can be used as a criterion for judging whether the text is visually concise and clear.
[0072] Setting item numbers for text can make the text content more logical and organized, and visually appear more clearly structured and prioritized, compared to not setting item numbers for the entire text or the entire text only consisting of paragraphs. Therefore, whether or not to set item numbers can be used to evaluate whether the text is visually concise and clear.
[0073] Bold words can remind readers of the key points in the text. Appropriate use can improve the simplicity and clarity of the text. Therefore, a standard for the proportion of bold words in the total number of words in the text can be set. If the proportion of bold words in a text does not meet the standard, the visual simplicity and clarity of the text will be weakened. The standard can be a numerical range.
[0074] Appropriate line spacing and font size can make reading easier. Appropriate line spacing can improve the simplicity and clarity of the text. Therefore, you can set line spacing standards and font size standards, and based on these standards, judge whether the line spacing of the text meets the line spacing standards and whether the font size meets the font size standards. If they do, the simplicity and clarity of the text will be enhanced.
[0075] Scanned documents will affect the reader's reading experience due to factors such as unclear fonts. Therefore, if the text contains scanned documents, it will reduce the simplicity and clarity of the text. People are generally accustomed to reading horizontally from left to right. If the text is read vertically or horizontally from right to left, it is obviously not easy to read, which will greatly reduce the simplicity and clarity of the text.
[0076] Therefore, multiple text visual features can be extracted from the training text image to facilitate determining the relationship between the above text visual features and the visual score in the subsequent model training step, so that the conciseness and clarity of the text can be evaluated based on the above text visual features.
[0077] 2033. Output a predicted visual score according to the text visual features of the training text image, and adjust a model parameter of the initial text visual score model according to a difference between the predicted visual score and the standard visual score;
[0078] The text visual features are related to the visual score of the text. The initial text visual scoring model can calculate the predicted visual score corresponding to the text visual features of the training text image based on pre-set initial model parameters, that is, predictively output the visual score, and adjust the model parameters of the initial text visual scoring model according to the difference between the predicted visual score and the standard visual score.
[0079] The goal of adjusting the model parameters is to make the predicted visual score calculated next time closer to the standard visual score, and finally optimize the model parameters. The method of adjusting the model parameters according to the difference between the predicted visual score and the standard visual score can be a model parameter optimization method such as cross validation, grid search, genetic algorithm, particle swarm optimization, simulated annealing algorithm, gradient descent method, least squares method, etc.
[0080] 2034. If the difference between the predicted visual score and the standard visual score does not meet the convergence condition, return to extract the text visual features of the next batch of training text images until the difference meets the convergence condition, stop training, and obtain the target text visual score model;
[0081] After the training process based on the first batch of training text images is completed, the training process of the next batch of training text images can be entered to verify whether the model parameters adjusted in the previous training process meet the convergence conditions and further optimize the model parameters. Therefore, if the difference between the predicted visual score and the standard visual score does not meet the convergence conditions, the process returns to extract the text visual features of the next batch of training text images, and continues to perform the operations of predicting the visual score and adjusting the model parameters in step 2033. The operation is repeated in this way, and the training process of multiple batches of training text images is performed until the difference between the predicted visual score and the standard visual score meets the convergence conditions, and the training is stopped, and the target text visual score model can be obtained.
[0082] Among them, the difference between the predicted visual score and the standard visual score satisfies the convergence condition, which can be that the difference is within a preset numerical range, or that the variation range of the difference is within a preset range, for example, the difference remains unchanged or changes very little after multiple trainings, and the specific convergence condition is not limited.
[0083] 204. Obtain a pre-trained target text visual scoring model;
[0084] In this embodiment, the computer device obtains the target text visual scoring model. The computer device may execute the training steps of the target text visual scoring model to obtain the model, or the training steps of the target text visual scoring model may be executed by other devices other than the computer device, and the target text visual scoring model is deployed to the computer device after the training of the target text visual scoring model is completed. This embodiment does not limit the way in which the computer device obtains the target text visual scoring model.
[0085] 205. Input the text to be evaluated into the target text content scoring model to obtain a content score of the text to be evaluated output by the target text content scoring model;
[0086] During the training process of the target text content scoring model, the target text content scoring model will continuously fit the functional relationship between the text content features and the content score. After the model training is completed, the functional relationship can accurately represent the relationship between the text content features and the content score, and the content score calculated according to the functional relationship can be closer to or equal to the standard content score. Therefore, the text to be evaluated can be input into the target text content scoring model, so that the target text content scoring model extracts the text content features of the text to be evaluated from the text to be evaluated, and calculates the content score corresponding to the text content features of the text to be evaluated according to the functional relationship between the text content features and the content score obtained by the model training step, and then outputs the content score of the text to be evaluated.
[0087] 206. Inputting the text image of the text to be evaluated into the target text visual scoring model to obtain the visual score of the text to be evaluated output by the target text visual scoring model;
[0088] Similarly, the functional relationship between the text visual features and the visual score obtained by the model training step can accurately represent the relationship between the text visual features and the visual score, and the visual score calculated according to the functional relationship can be closer to or equal to the standard visual score. Therefore, the text image of the text to be evaluated can be input into the target text visual scoring model, so that the target text visual scoring model extracts the text visual features of the text to be evaluated from the text image of the text to be evaluated, and calculates the visual score corresponding to the text visual features of the text to be evaluated according to the functional relationship, and then outputs the visual score of the text to be evaluated.
[0089] If the text has multiple pages, each page can be scored separately, and the scores of all pages can be added together to obtain the score of the text. The score addition of all pages can be weighted or unweighted.
[0090] 207. Determine the degree of simplicity and clarity of the text to be evaluated based on the content score and visual score of the text to be evaluated;
[0091] In this embodiment, the method for determining the conciseness and clarity of the text based on the content score and the visual score can be to calculate the sum of the content score and the visual score, and determine the conciseness and clarity of the text based on the sum; or the weighted sum of the content score and the visual score can be calculated, and the conciseness and clarity of the text can be determined based on the weighted sum. This embodiment does not limit this method.
[0092] In addition, a threshold of the score can be set. When the sum or weighted sum of the content score and the visual score exceeds the threshold, it can be determined that the text to be evaluated meets the requirements of simplicity and clarity; if it does not exceed the threshold, it is determined that the text to be evaluated does not meet the requirements of simplicity and clarity. It is also possible not to set a threshold, but only to determine that the higher the content score and / or visual score, the higher the degree of simplicity and clarity of the text, which is not limited here.
[0093] In this embodiment, a variety of text content features for calculating the content score of the text and text visual features for calculating the visual score are provided, so that the conciseness and clarity of the text can be evaluated based on the objectively existing characteristics of the text. The evaluation result is more objective and will not be affected by subjective factors of personnel.
[0094] The text mentioned in this embodiment can be a text in any field. In a specific application scenario, it can be an information disclosure text in the field of securities trading. This embodiment integrates natural language processing and visual processing technology to evaluate the conciseness and clarity of the information disclosure text, which can measure whether the information disclosure text can meet the requirements of investment decision-making, promote information symmetry in the securities market, and reduce financial risks.
[0095] The above describes the text conciseness and clarity evaluation method in the embodiment of the present application. The following describes the computer device in the embodiment of the present application. Figure 5 In the embodiment of the present application, one embodiment of the computer device includes:
[0096] An acquisition unit 501 is used to obtain a pre-trained target text content scoring model, where the target text content scoring model is obtained by training multiple groups of first training samples using a machine learning algorithm, and each group of first training samples includes a first training text and a standard content score of the first training text;
[0097] The acquisition unit 501 is also used to obtain a pre-trained target text visual scoring model, where the target text visual scoring model is obtained by training multiple groups of second training samples using a machine learning algorithm, and each group of second training samples includes a training text image and a standard visual score of the training text image;
[0098] The content scoring unit 502 is used to input the text to be evaluated into the target text content scoring model to obtain the content score of the text to be evaluated output by the target text content scoring model;
[0099] A visual scoring unit 503 is used to input a text image of the text to be evaluated into a target text visual scoring model to obtain a visual score of the text to be evaluated output by the target text visual scoring model;
[0100] The evaluation unit 504 is used to determine the degree of simplicity and clarity of the text to be evaluated according to the content score and visual score of the text to be evaluated.
[0101] In a preferred implementation of this embodiment, the computer device further includes:
[0102] The first training unit 505 is used to perform a training step of a target text content scoring model, and the training step includes:
[0103] Obtain an initial text content scoring model;
[0104] Input multiple groups of first training samples into the initial text content scoring model, so that the initial text content scoring model extracts text content features of the first training text of the first batch, outputs a predicted content score according to the text content features of the first training text, and adjusts the model parameters of the initial text content scoring model according to the difference between the predicted content score and the standard content score. If the difference does not meet the convergence condition, return to execute the extraction of text content features of the first training text of the next batch, and stop training when the difference meets the convergence condition to obtain the target text content scoring model.
[0105] In a preferred implementation of this embodiment, the content scoring unit 502 is specifically used to input the text to be evaluated into the target text content scoring model, so that the target text content scoring model performs the following classification steps:
[0106] Extracting text content features of the text to be evaluated from the text to be evaluated;
[0107] The content score corresponding to the text content feature of the text to be evaluated is calculated according to the functional relationship between the text content feature and the content score obtained in the training step, and the content score of the text to be evaluated is output.
[0108] In a preferred implementation of the present embodiment, the text content features include one or more of the proportion of the number of periods in the total number of punctuation marks in the text, the proportion of the number of numeric characters in the total number of words in the text, the count of directory levels and directory titles, the number of tables, the proportion of the number of adjectives in the total number of content words in the text, the number of attributive clauses, the number of omitted subjects, and the number of simple sentences, where a simple sentence is an independent sentence or clause containing only one subject-predicate structure and the components of the sentence are composed only of words or phrases.
[0109] In a preferred implementation of this embodiment, the computer device further includes:
[0110] The second training unit 506 is used to perform a training step of the target text visual scoring model, and the training step includes:
[0111] Obtain an initial text visual scoring model;
[0112] Input multiple groups of second training samples into the initial text visual scoring model, so that the initial text visual scoring model extracts the text visual features of the first batch of training text images, outputs predicted visual scores based on the text visual features of the training text images, and adjusts the model parameters of the initial text visual scoring model based on the difference between the predicted visual scores and the standard visual scores. If the difference does not meet the convergence condition, return to execute the extraction of text visual features of the next batch of training text images, and stop training when the difference meets the convergence condition to obtain the target text visual scoring model.
[0113] In a preferred implementation of this embodiment, the visual scoring unit 503 is specifically used to input the text image of the text to be evaluated into the target text visual scoring model, so that the target text visual scoring model performs the following classification steps:
[0114] Extracting text visual features of the text to be evaluated from the text image of the text to be evaluated;
[0115] The visual score corresponding to the text visual feature of the text to be evaluated is calculated according to the functional relationship between the text visual feature and the visual score obtained in the training step, and the visual score of the text to be evaluated is output.
[0116] In a preferred implementation of this embodiment, the text visual features include one or more of the paragraph length, whether the item number is set, the proportion of bold words in the total number of words in the text, line spacing and font size, the number of scanned files, and the text reading direction.
[0117] In this embodiment, the operations performed by each unit in the computer device are the same as those described above. Figures 1 to 4 The description in the illustrated embodiment is similar and will not be repeated here.
[0118] In this embodiment, the text to be evaluated is input into a pre-trained target text content scoring model and a target text visual scoring model respectively, so that the target text content scoring model identifies and calculates the text content of the text to be evaluated to obtain a content score of the text to be evaluated, and the target text visual scoring model identifies and calculates the text image of the text to be evaluated to obtain a visual score of the text to be evaluated. The evaluation unit 504 determines the conciseness and clarity of the text to be evaluated by comprehensively considering the content score and the visual score, thereby achieving a comprehensive evaluation of the conciseness and clarity of the text based on the content dimension and the visual dimension, and achieving quantification of the conciseness and clarity of the text. The pre-trained scoring model is used to calculate and identify the conciseness and clarity of the text, so that the evaluation of the conciseness and clarity of the text will not be mixed with subjective factors of the personnel, and will not be affected by subjective factors such as the knowledge level and reading habits of the personnel, so that the evaluation standards of the conciseness and clarity of the text are unified and the evaluation results are more objective.
[0119] The computer device in the embodiment of the present application is described below. Figure 6 In the embodiment of the present application, one embodiment of the computer device includes:
[0120] The computer device 600 may include one or more central processing units (CPU) 601 and a memory 605 , wherein the memory 605 stores one or more application programs or data.
[0121] The memory 605 may be a volatile storage or a persistent storage. The program stored in the memory 605 may include one or more modules, each of which may include a series of instruction operations in the computer device. Furthermore, the central processing unit 601 may be configured to communicate with the memory 605 and execute a series of instruction operations in the memory 605 on the computer device 600.
[0122] The computer device 600 may also include one or more power supplies 602, one or more wired or wireless network interfaces 603, one or more input and output interfaces 604, and / or one or more operating systems, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0123] The CPU 601 can execute the aforementioned Figures 1 to 4 The operations performed by the computer device in the illustrated embodiment will not be described in detail here.
[0124] The present application also provides a computer storage medium, wherein one embodiment includes: the computer storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the aforementioned Figures 1 to 4 The operations performed by the computer device in the illustrated embodiment.
[0125] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0126] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0127] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple 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.
[0128] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0129] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims
1. A method for evaluating the degree of simplicity and clarity of text, characterized in that: The method comprises: Obtaining a pre-trained target text content scoring model, wherein the target text content scoring model is obtained by training multiple groups of first training samples using a machine learning algorithm, and each group of the first training samples includes a first training text and a standard content score of the first training text; the standard content score is used to indicate a score of the text content in terms of conciseness and clarity; Obtaining a pre-trained target text visual scoring model, wherein the target text visual scoring model is obtained by training multiple groups of second training samples using a machine learning algorithm, and each group of the second training samples includes a training text image and a standard visual score of the training text image; the standard visual score is used to indicate a score of the visual simplicity and clarity of the text; Inputting the text to be evaluated into the target text content scoring model to obtain the content score of the text to be evaluated output by the target text content scoring model; the content score of the text to be evaluated is used to indicate the score of the degree of conciseness and clarity of the text content of the text to be evaluated; Inputting the text image of the text to be evaluated into the target text visual scoring model to obtain the visual score of the text to be evaluated output by the target text visual scoring model; the visual score of the text to be evaluated is used to indicate the score of the visual simplicity and clarity of the text to be evaluated; Determining the degree of conciseness and clarity of the text to be evaluated according to the content score and visual score of the text to be evaluated; The content score of the text to be evaluated is calculated based on the text content features of the text to be evaluated, and the text content features include one or more of the proportion of the number of periods in the total number of punctuation marks in the text, the proportion of the number of numerical characters in the total number of words in the text, the count of directory levels and directory titles, the number of tables, the proportion of the number of adjectives in the total number of content words in the text, the number of attributive clauses, the number of omitted subjects, and the number of simple sentences, wherein the simple sentence is an independent sentence or clause containing only one subject-predicate structure and each component of the sentence is composed of only words or phrases; The visual score of the text to be evaluated is calculated based on the text visual features of the text to be evaluated, and the text visual features include one or more of the paragraph length, whether the item number is set, the proportion of bold words in the total number of words in the text, line spacing and font size, the number of scanned files, and the text reading direction.
2. The method according to claim 1, characterized in that: The training steps of the target text content scoring model include: Obtain an initial text content scoring model; Input multiple groups of the first training samples into the initial text content scoring model, so that the initial text content scoring model extracts text content features of a first batch of first training texts, outputs a predicted content score according to the text content features of the first training texts, adjusts model parameters of the initial text content scoring model according to the difference between the predicted content score and the standard content score, and if the difference does not meet the convergence condition, returns to execute the extraction of text content features of the next batch of first training texts, and stops training when the difference meets the convergence condition, thereby obtaining the target text content scoring model.
3. The method according to claim 2, characterized in that The step of inputting the text to be evaluated into the target text content scoring model to obtain a content score of the text to be evaluated output by the target text content scoring model includes: The text to be evaluated is input into the target text content scoring model, so that the target text content scoring model performs the following classification steps: Extracting text content features of the text to be evaluated from the text to be evaluated; The content score corresponding to the text content feature of the text to be evaluated is calculated according to the functional relationship between the text content feature and the content score obtained in the training step, and the content score of the text to be evaluated is output.
4. The method according to claim 1, characterized in that: The training steps of the target text visual scoring model include: Obtain an initial text visual scoring model; Input multiple groups of the second training samples into the initial text visual scoring model, so that the initial text visual scoring model extracts text visual features of the first batch of training text images, outputs predicted visual scores based on the text visual features of the training text images, and adjusts model parameters of the initial text visual scoring model based on the difference between the predicted visual score and the standard visual score. If the difference does not meet the convergence condition, return to execute the extraction of text visual features of the next batch of training text images, and stop training when the difference meets the convergence condition to obtain the target text visual scoring model.
5. The method according to claim 4, characterized in that The step of inputting the text image of the text to be evaluated into the target text visual scoring model to obtain the visual score of the text to be evaluated output by the target text visual scoring model comprises: The text image of the text to be evaluated is input into the target text visual scoring model, so that the target text visual scoring model performs the following classification steps: Extracting text visual features of the text to be evaluated from the text image of the text to be evaluated; The visual score corresponding to the text visual feature of the text to be evaluated is calculated according to the functional relationship between the text visual feature and the visual score obtained in the training step, and the visual score of the text to be evaluated is output.
6. A computer device, characterized in that: The computer device comprises: An acquisition unit is used to obtain a pre-trained target text content scoring model, wherein the target text content scoring model is obtained by training multiple groups of first training samples using a machine learning algorithm, and each group of the first training samples includes a first training text and a standard content score of the first training text; the standard content score is used to indicate a score of the text content in terms of conciseness and clarity; The acquisition unit is also used to obtain a pre-trained target text visual scoring model, wherein the target text visual scoring model is obtained by training multiple groups of second training samples using a machine learning algorithm, and each group of the second training samples includes a training text image and a standard visual score of the training text image; the standard visual score is used to represent a score of the visual simplicity and clarity of the text; A content scoring unit, used for inputting the text to be evaluated into the target text content scoring model to obtain a content score of the text to be evaluated output by the target text content scoring model; the content score of the text to be evaluated is used to indicate the score of the degree of simplicity and clarity of the text content of the text to be evaluated; A visual scoring unit, used for inputting the text image of the text to be evaluated into the target text visual scoring model to obtain a visual score of the text to be evaluated output by the target text visual scoring model; the visual score of the text to be evaluated is used to indicate the score of the visual simplicity and clarity of the text to be evaluated; An evaluation unit, configured to determine the degree of simplicity and clarity of the text to be evaluated according to the content score and the visual score of the text to be evaluated; The content score of the text to be evaluated is calculated based on the text content features of the text to be evaluated, and the text content features include one or more of the proportion of the number of periods in the total number of punctuation marks in the text, the proportion of the number of numerical characters in the total number of words in the text, the count of directory levels and directory titles, the number of tables, the proportion of the number of adjectives in the total number of content words in the text, the number of attributive clauses, the number of omitted subjects, and the number of simple sentences, wherein the simple sentence is an independent sentence or clause containing only one subject-predicate structure and each component of the sentence is composed of only words or phrases; The visual score of the text to be evaluated is calculated based on the text visual features of the text to be evaluated, and the text visual features include one or more of the paragraph length, whether the item number is set, the proportion of bold words in the total number of words in the text, line spacing and font size, the number of scanned files, and the text reading direction.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
8. A computer storage medium, characterized in that: The computer storage medium stores instructions, and when the instructions are executed on a computer, the computer is caused to perform the method according to any one of claims 1 to 5.
