Text processing method, device and storage medium
By matrixing and normalizing the text to be processed, a collection of text feature values is generated, which solves the problem of low text processing accuracy in the prior art and achieves more efficient text fluency judgment.
Patent Information
- Application Number
- CN202111389153.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-22
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2041-11-22
AI Technical Summary
In the prior art, text processing has low accuracy and is difficult to effectively process low-quality text data with incorrect semantics or incomplete statements.
By obtaining the text to be processed, matrixing is performed to obtain the feature text, and then normalizing the feature text to obtain a set of text feature values, and the text processing results are calculated based on the set.
It improves the accuracy of text processing, can process low-quality text data more effectively, and improves the accuracy of text fluency judgment.
Smart Images

Figure CN114372456B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a text processing method, device and storage medium. Background Art
[0002] With the development of computer technology, natural language processing has also been widely developed, such as text processing, which refers to the processing of a sentence or a combination of sentences with complete and systematic meanings. For example, processing the fluency of text can identify some low-quality data with incomplete semantics or sentences in the text data set.
[0003] In the prior art, text fluency is often determined by segmenting sentences and judging fluency based on relevant information such as part of speech and word frequency, or by language models based on deep learning, which often suffer from low text processing accuracy. Summary of the invention
[0004] The present invention provides a text processing method, device and storage medium, which are used to solve the defect of low text processing accuracy in the prior art and achieve the purpose of improving the text processing accuracy.
[0005] The present invention provides a text processing method, comprising: obtaining a text to be processed; performing matrix processing on the text to be processed to obtain a feature text; performing normalization processing on the feature text to obtain a text feature value set; and obtaining a text processing result based on the text feature value set.
[0006] The present invention provides a text processing method, wherein the method of obtaining a text processing result based on the text feature value set comprises: performing statistics on each text feature value in the text feature value set to obtain a target text feature value; obtaining the text processing result value based on a functional relationship between the target text feature value and a text length; wherein the text length is the length of the text to be processed; and obtaining the text processing result based on the text processing result value.
[0007] The present invention provides a text processing method, wherein obtaining the text processing result based on the text processing result value comprises: obtaining the text processing result according to a trend correlation relationship between the text processing result value and the text processing result.
[0008] The present invention provides a text processing method, wherein the trend correlation relationship includes: if the trend of the text processing value is in the direction of increasing value, then the text processing result corresponding to the text processing value is determined as the direction of worsening result.
[0009] The present invention provides a text processing method, wherein the process of obtaining the functional relationship comprises: determining the target text feature value as a true number, and taking preset data as a base to obtain a first sub-function; taking the opposite number of the first sub-function as a divisor, and taking the text length as a dividend to obtain the functional relationship.
[0010] The present invention provides a text processing method, wherein the method of matrixing the text to be processed to obtain a feature text comprises: vectorizing the words, sentences and position information corresponding to the text to be processed to obtain a vector text; the position information is the position information of the word in the sentence; and matrixing the vector text to obtain the feature text.
[0011] The present invention also provides a text processing device, comprising: a first acquisition module, used to acquire a text to be processed; a first processing module, used to matrix the text to be processed to obtain a feature text; a second processing module, used to normalize the feature text to obtain a text feature value set; and a third processing module, used to obtain a text processing result based on the text feature value set.
[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above-mentioned text processing methods when executing the program.
[0013] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned text processing methods are implemented.
[0014] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of any of the above-mentioned text processing methods are implemented.
[0015] The text processing method, device and storage medium provided by the present invention obtain the text to be processed; perform matrix processing on the text to be processed to obtain feature text; perform normalization processing on the feature text to obtain a text feature value set; and obtain a text processing result based on the text feature value set. After matrix processing and normalization processing on the text to be processed, an accurate text feature value set is obtained, and based on the text feature value set, an accurate text processing result is obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 It is one of the flowcharts of the text processing method provided by the present invention;
[0018] Figure 2 This is the second flow chart of the text processing method provided by the present invention;
[0019] Figure 3 This is the third flow chart of the text processing method provided by the present invention;
[0020] Figure 4 This is the fourth flow chart of the text processing method provided by the present invention;
[0021] Figure 5 This is the fifth flow chart of the text processing method provided by the present invention;
[0022] Figure 6 This is one of the effect schematic diagrams of the text processing method provided by the present invention;
[0023] Figure 7 This is the second effect schematic diagram of the text processing method provided by the present invention;
[0024] Figure 8 is a structural schematic diagram of a text processing device provided by the present invention;
[0025] Fig. 9 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] Combine the following Figure 1-Figure 5 The text processing method of the present invention is described.
[0028] In one embodiment, Figure 1 As shown, a text processing method is provided, which is described by taking the method application server as an example, and includes the following steps:
[0029] Step 102, obtaining the text to be processed.
[0030] Specifically, the server may obtain the text to be processed directly or indirectly. The text to be processed is a text that needs to be processed, and the text may be a medical text.
[0031] Step 104, matrix processing is performed on the text to be processed to obtain feature text.
[0032] Specifically, after acquiring the text to be processed, the server vectorizes the text to be processed to obtain vector text, and matrixes the vector text to obtain feature text.
[0033] In one embodiment, after the server obtains the to-be-processed text, it inputs the to-be-processed text into the neural network model, performs vectorization processing in the input layer of the neural network model, obtains the vectorized text, and performs matrix processing on the vectorized text to obtain the feature text. It can be understood that the feature text is a semantic representation text with a certain dimension that can express the semantics of the text, wherein the dimension includes the number of words in the feature text or the length of the sentence in the feature text, etc.
[0034] Step 106, normalize the feature text to obtain a set of text feature values.
[0035] Specifically, after obtaining the feature text, the server normalizes the feature text and converts the feature text in each dimension into a text feature value between 0 and 1, thereby obtaining a text feature value set. For example, if the dimension of the feature text is 768, the feature text after normalization is represented by a text feature value set including the same number of text feature values as the dimension of the feature text, that is, 768 text feature values, that is, [0.12, 0.56, 0.215 ........ 0.546].
[0036] Step 108, obtaining a text processing result based on the text feature value set.
[0037] Specifically, after obtaining the text feature value set, the server performs statistical analysis on each text feature value in the text feature value set to obtain a target text feature value, and obtains a text processing result based on the target text feature value.
[0038] In one embodiment, after obtaining the text feature value set, the server can filter out the maximum text feature value in the text feature value set as the target text feature value, obtain the text processing result value based on the functional relationship between the target text feature value and the sentence length of the text to be processed, and obtain the text processing result based on the corresponding relationship between the result value and the text processing result. For example, the text feature value set is represented as E, and the target text feature value is represented as , the sentence length is expressed as , the text processing result value is expressed as , using the softmax function for normalization, then It can be expressed as a formula:
[0039] (1)
[0040] Text processing result value Expressed as a formula:
[0041] (2)
[0042] In the above text processing method, the text to be processed is obtained; the text to be processed is matrixed to obtain feature text; the feature text is normalized to obtain a text feature value set; and the text processing result is obtained based on the text feature value set. After matrixing and normalizing the text to be processed, an accurate text feature value set is obtained, and based on the text feature value set, an accurate text processing result is obtained.
[0043] In one embodiment, Figure 2 As shown, based on the text feature value set, the text processing results include:
[0044] Step 202: Count each text feature value in the text feature value set to obtain a target text feature value.
[0045] Specifically, after obtaining the text feature value set, the server may perform statistics on each text feature value in the text feature value set to obtain a final statistical value as the target text feature value.
[0046] In one embodiment, after obtaining the text feature value set, the server sorts the text feature values in the text feature value set from small to large or from large to small, and selects the text feature value in the middle of the text feature value set as the target text feature value.
[0047] In one embodiment, after obtaining the text feature value set, the server screens each text feature value in the text feature value set to obtain the maximum value of the text feature values in the set, and uses the maximum value as the target text feature value.
[0048] Step 204, obtaining a text processing result value according to the functional relationship between the target text feature value and the text length; wherein the text length is the length of the text to be processed.
[0049] The text length refers to the number of words or English letters in the text to be processed.
[0050] Specifically, after obtaining the target text feature value, the server obtains the text processing result value according to the functional relationship between the target text feature value and the text length. For example, the target text feature value is expressed as , the text length is expressed as , the text processing result value is expressed as , then the text processing result value Expressed as a formula:
[0051] (3)
[0052] Step 206, obtaining a text processing result based on the text processing result value.
[0053] Specifically, after obtaining the above text processing result value, the server obtains the corresponding text processing result according to the corresponding relationship between the text processing result value and the text processing result.
[0054] In one embodiment, the smaller the text processing result value, the better the text processing result; the larger the text processing result value, the worse the text processing result. In this embodiment, by statistically analyzing each text feature value in the text feature value set, the target text feature value is obtained, and the text processing result value is obtained according to the functional relationship between the target text feature value and the text length. Based on the text processing result value, the text processing result is obtained, which can achieve the purpose of intuitively and accurately obtaining the text processing result.
[0055] In one embodiment, obtaining the text processing result based on the text processing result value includes: obtaining the text processing result according to a trend correlation relationship between the text processing result value and the text processing result.
[0056] The trend correlation refers to the correlation between the text processing result value and the development direction of the text processing result. For example, if the text processing result value develops in a decreasing direction, the text processing result develops in a better direction; similarly, if the text processing result value develops in a increasing direction, the text processing result develops in a worse direction.
[0057] Specifically, there is a certain correspondence between the text processing result value and the text processing result. Through the correspondence, when the text processing result value is obtained, the text processing result can be obtained accordingly.
[0058] In one embodiment, the text processing result value is segmented, and according to the correspondence between the segmented text processing result value and the text processing result, when the text processing result value is known, the text processing result can be obtained according to the above correspondence. For example, the text processing result value between 0-0.1 corresponds to a text processing result with extremely high fluency; the text processing result value between 0.1-0.3 corresponds to a text processing result with high fluency; the text processing result value between 0.3-0.4 corresponds to a text processing result with medium fluency; the text processing result value between 0.4-0.5 corresponds to a text processing result with low fluency; and the text processing result value between 0.5-1.0 corresponds to a text processing result with extremely low fluency.
[0059] In this embodiment, obtaining the text processing result based on the text processing result value includes: obtaining the text processing result according to the trend correlation relationship between the text processing result value and the text processing result, so as to achieve the purpose of accurately obtaining the text processing result.
[0060] In one embodiment, the trend correlation relationship includes: if the trend of the text processing value is a direction in which the value becomes larger, then the text processing result corresponding to the text processing value is determined as a direction in which the result becomes worse.
[0061] Specifically, if the server determines that the trend of the text processing value is in the direction of increasing the value, it can be determined that the text processing result is in the direction of deteriorating the result.
[0062] In one embodiment, the server may sort the text processing values. If the text processing values in the sort are increasing, it may be determined that the result is deteriorating.
[0063] In this embodiment, by judging the trend direction of the text processing value, the changing direction of the text processing result can be accurately obtained, so that when there is continuous text input, the text result can be continuously judged, so as to select the text with the best processing result.
[0064] In one embodiment, Figure 3 The process of obtaining the functional relationship shown includes:
[0065] Step 302: determine the target text feature value as a true number, and use the preset data as the base to obtain a first sub-function.
[0066] Specifically, after obtaining the target text feature value, the server determines the target text feature value as the true number of the logarithmic function, and uses the preset data 2 as the base of the logarithmic function to obtain the first sub-function. Assume that the first sub-function is represented by A, and the target text feature value is represented by , then the first subfunction A is expressed as the formula:
[0067] (4)
[0068] Step 304, using the opposite number of the first sub-function as the divisor and the text length as the dividend to obtain a functional relationship.
[0069] Specifically, after obtaining the first sub-function, the server takes the opposite number of the first sub-function, that is, takes the negative number form of the first sub-function, and uses the opposite number of the first sub-function as the divisor and the text length as the dividend to obtain the functional relationship. For example, the text length is expressed as , then the functional relationship Y can be expressed as the formula:
[0070] (5)
[0071] In this embodiment, by determining the target text feature value as a true number and taking the preset data as the base, a first sub-function is obtained, the opposite of the first sub-function is used as the divisor, and the text length is used as the dividend, so as to achieve the purpose of accurately obtaining the functional relationship.
[0072] In one embodiment, Figure 4 As shown, the text to be processed is matrixed to obtain the feature text including:
[0073] Step 402, vectorize the words, sentences and position information corresponding to the text to be processed to obtain vector text; the position information is the position information of the word in the sentence.
[0074] Specifically, after the server obtains the text to be processed, the words, sentences and position information in the text to be processed are respectively vectorized to obtain vector text. For example, after the words are vectorized, the word vector is represented as a token embedding, after the sentences are vectorized, the word vector is represented as a segment embedding, and after the position information is vectorized, the position information vector is represented as a position embedding. The word vector in the sentence vector can be identified to obtain an accurate sentence vector. For example, the word vector token embedding included in a sentence vector segment embedding is marked with the same identifier. The above word vector, sentence vector and position information vector are added to obtain the vector text.
[0075] Step 404, matrix processing is performed on the vector text to obtain feature text.
[0076] Specifically, after obtaining the vector text, the server performs matrix processing on the vector text to obtain the feature text.
[0077] In one embodiment, the server inputs the vector text into a PubMedBERT neural network with 12 layers, and after being processed by the neural network, a feature text is obtained. It can be understood that PubMedBERT is a pre-trained model in the biomedical field and has a good processing effect on medical texts.
[0078] In one embodiment, the length of the text to be processed is set to less than 64 words, and the text feature dimension parameter of the output of the neural network is set to 768, which can output better feature text that can characterize the semantics of the text to be processed.
[0079] In this embodiment, by vectorizing the words, sentences and position information corresponding to the text to be processed to obtain vector text, the purpose of accurately obtaining the feature text can be achieved.
[0080] In one embodiment, Figure 5 As shown in the figure, the text to be processed is a medical text as an example. The medical text is input into the PubMedBERT pre-training model to obtain the semantic representation vector of the medical text, which is represented by CLS. The vector is a 768-dimensional sentence vector. After the semantic representation vector CLS is normalized by the normalization function softmax function, and then after linear transformation, a value that can represent the fluency of the text is obtained. The smaller the value, the more fluent the current text is; the larger the value, the less fluent the current text is, and there is an obvious numerical difference between fluent text and non-fluent text.
[0081] This embodiment uses the PubMedBERT pre-trained model to extract the representation vector of medical text, which is simple to implement and can greatly improve the accuracy of text fluency judgment, meeting the application requirements of more complex scenarios. It makes the semantic analysis of medical text more representative and suitable for other applicable scenarios.
[0082] In one embodiment, the text to be processed is processed using the PubMedBERT pre-trained model, the text to be processed is input into the input layer of the model, and the sentences of the text to be processed are converted into sentence vectors segment embedding, the words are converted into word vectors token embedding, and the position information of the words in the sentence is converted into position vectors position embedding, and the above sentence vectors, word vectors and position vectors are added together to obtain a linear sequence, which can be regarded as a vector representation of the sentence. In order to obtain a better semantic representation of the sentence, the sentence length is limited to less than 64 words, and the PubMedBERT pre-trained model has 12 layers. After processing by the input layer, the output is N 768, where N represents the length of the text and 768 is the vector dimension of each word vector. After the matrix is processed by the middle layer of the model, a 768-dimensional semantic representation vector that can express the input text is obtained. This vector is denoted as CLS, and after being processed by the normalization function softmax, a set of semantic representation vectors for the current text is obtained. In this set of semantic representation vectors, the maximum value of the semantic representation vector is screened, and the logarithm of the maximum value is divided by the current text length. The negative of the quotient is taken to obtain the text fluency value. Assume that the candidate semantic representation vector in the semantic representation vector set is denoted as E, and the maximum value of the semantic representation vector is denoted as , the current text length is expressed as , text fluency is expressed as , then the maximum value of the semantic representation vector Expressed as the above formula (1), text fluency It is expressed as formula (2). Figure 6 As shown, by random sampling we randomly extract positive data, and as Figure 7The experimental results of the random sampling of the corresponding negative data are verified, and it can be obtained that the fluency value of the positive data verification result is much smaller than the fluency value of the negative data verification result, and there is generally a large gap between the values. Therefore, this value can be used as the basis for fluency classification, and then the quality of the text data can be ranked. Among them, text is the input text to be processed, and the fluency value obtained after fluency processing is expressed. The larger the value, the worse the fluency of the text to be processed; the smaller the value, the better the fluency of the text to be processed. This embodiment can separate the positive data of the fluent text from the negative data of the non-fluent text by the fluency value, thereby providing a relatively simple and effective method for the subsequent use of the text. It can be understood that the processing effect of the medical text using the PubMedBERT model is better than that of other texts; among them, PubMed is a database related to biomedicine, and the PubMedBERT model is an English pre-trained model obtained by pre-training on the basis of the BERT model using the PubMed database, and the model is particularly suitable for the biomedical field. The above PubMedBERT model is an English pre-trained model that can process English data; at the same time, the model conversion parameters can be used to convert the model into a Chinese training model that can process Chinese data, and the model can be ChineseBERT.
[0083] The text processing device provided by the present invention is described below. The text processing device described below and the text processing method described above can be referenced to each other.
[0084] In one embodiment, Figure 8 As shown, a text processing device 800 is provided, including: a first acquisition module 802, a first processing module 804, a second processing module 806 and a third processing module 808, wherein: the first acquisition module 802 is used to acquire the text to be processed; the first processing module 804 is used to matrix the text to be processed to obtain a feature text; the second processing module 806 is used to normalize the feature text to obtain a text feature value set; the third processing module 808 is used to obtain a text processing result based on the text feature value set.
[0085] In one embodiment, the third processing module 808 is used to count the text feature values in the text feature value set to obtain the target text feature value; obtain the text processing result value according to the functional relationship between the target text feature value and the text length; wherein the text length is the length of the text to be processed; and obtain the text processing result based on the text processing result value.
[0086] In one embodiment, the third processing module 808 is used to obtain the text processing result according to the text processing result value and the trend correlation relationship between the text processing results.
[0087] In one embodiment, the third processing module 808 is used to determine the text processing result corresponding to the text processing value as a direction in which the result deteriorates if the trend of the text processing value is a direction in which the value increases.
[0088] In one embodiment, the third processing module 808 is used to determine the target text feature value as a true number, and use the preset data as the base to obtain a first sub-function; use the opposite number of the first sub-function as the divisor, and use the text length as the dividend to obtain a functional relationship.
[0089] In one embodiment, the first processing module 804 is used to vectorize the words, sentences and position information corresponding to the text to be processed to obtain vector text; the position information is the position information of the word in the sentence; the vector text is matrixed to obtain feature text.
[0090] Fig. 9 An example of a physical structure diagram of an electronic device is shown in FIG. Fig. 9 As shown, the electronic device may include: a processor 910, a communication interface 920, a memory 930 and a communication bus 940, wherein the processor 910, the communication interface 920 and the memory 930 communicate with each other through the communication bus 940. The processor 910 may call the logic instructions in the memory 930 to execute the text processing method, which includes: obtaining a text to be processed; matrixing the text to be processed to obtain a feature text; normalizing the feature text to obtain a text feature value set; and obtaining a text processing result based on the text feature value set.
[0091] In addition, the logic instructions in the above-mentioned memory 930 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the 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 for 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 invention. 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 codes.
[0092] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the text processing method provided by the above methods, which includes: obtaining a text to be processed; matrixing the text to be processed to obtain a feature text; normalizing the feature text to obtain a text feature value set; and obtaining a text processing result based on the text feature value set.
[0093] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the text processing method provided by the above-mentioned methods. The method includes: obtaining a text to be processed; matrixing the text to be processed to obtain a feature text; normalizing the feature text to obtain a text feature value set; and obtaining a text processing result based on the text feature value set.
[0094] The device embodiments described above are merely illustrative, wherein 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, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0095] Through the description of the above implementation modes, those skilled in the art can clearly understand that each implementation mode can be implemented by means of software plus a necessary general hardware platform, or of course by hardware. Based on such an understanding, the above technical solution can essentially or in other words be embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0096] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A text processing method, characterized in that: include: Get the text to be processed; Vectorize the words, sentences and position information corresponding to the text to be processed to obtain vector text; The position information is the position information of the word in the sentence; Matrix processing is performed on the vector text to obtain feature text; Normalizing the feature text to obtain a text feature value set; Counting each text feature value in the text feature value set to obtain a target text feature value; According to the functional relationship between the target text feature value and the text length, a text processing result value is obtained; wherein the text length is the length of the text to be processed; the process of obtaining the functional relationship includes: determining the target text feature value as a true number, and taking the preset data as the base to obtain a first sub-function; taking the opposite number of the first sub-function as the divisor, and taking the text length as the dividend, to obtain the functional relationship; The text processing result is obtained based on the trend correlation relationship between the text processing result value and the text processing result, and the trend correlation relationship includes: if the trend of the text processing result value is in the direction of increasing numerical value, then the text processing result corresponding to the text processing result value is determined as the direction of result deterioration, and the text processing result is used to determine the fluency of the text to be processed.
2. A text processing device, characterized in that: include: A first acquisition module, used to acquire the text to be processed; The first processing module is used to vectorize the words, sentences and position information corresponding to the text to be processed to obtain a vector text; the position information is the position information of the word in the sentence; Matrix processing is performed on the vector text to obtain feature text; A second processing module is used to perform normalization processing on the feature text to obtain a text feature value set; A third processing module is used to collect statistics on each text feature value in the text feature value set to obtain a target text feature value; The third processing module is further used to obtain a text processing result value according to the functional relationship between the target text feature value and the text length; wherein the text length is the length of the text to be processed; the process of obtaining the functional relationship includes: determining the target text feature value as a true number, and taking the preset data as the base to obtain a first sub-function; taking the opposite number of the first sub-function as the divisor, and taking the text length as the dividend, to obtain the functional relationship; The third processing module is also used to obtain the text processing result based on the trend correlation relationship between the text processing result value and the text processing result, and the trend correlation relationship includes: if the trend of the text processing result value is in the direction of increasing numerical value, then the text processing result corresponding to the text processing result value is determined as the direction of result deterioration, and the text processing result is used to determine the fluency of the text to be processed.
3. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the text processing method according to claim 1 are implemented.
4. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the text processing method as claimed in claim 1 are implemented.
5. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the text processing method as claimed in claim 1 are implemented.
Citation Information
Patent Citations
Text representation method and device and computer equipment
CN112364666A