Text automatic classification and tagging method
By screening and allocating the availability of evaluation texts and analyzing difficult data, the problem of slow classification time in traditional methods is solved, and the efficiency of automatic text classification is improved and real evaluations are updated in a timely manner.
Patent Information
- Application Number
- CN202410882581.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2024-10-15
AI Technical Summary
Traditional automatic text classification and labeling methods have a slow classification time when classifying product evaluations, resulting in the inability to update the true evaluation status of products in a timely manner.
By obtaining the usability data and analysis difficulty data of the evaluation text, the available texts are filtered out and assigned to the preset text classification label model for classification and labeling, using the text timeliness coefficient, user reliability coefficient, sentence entropy value and keyword distance length Calculate available coefficients and analysis difficulty coefficients to optimize the text classification process.
It reduces the time for automatic text classification, ensures timely updates of the true evaluation status of products, reduces misunderstandings, and improves classification efficiency and accuracy.
Smart Images

Figure CN118779451A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of text classification, and in particular to a method for automatic text classification and labeling. Background Art
[0002] Automatic text classification and labeling refers to the process of using computer algorithms and technologies to process and analyze text data, thereby automatically assigning text to predefined categories or adding labels to text. It is widely used in various fields, such as product review classification, news article classification, email classification, and medical text classification. By automatically classifying and labeling different texts, it can greatly improve data processing efficiency and help users quickly obtain valuable information and insights from massive text data.
[0003] In the field of product evaluation classification, especially when shopping online, some customers often make their own choices based on product reviews when facing unfamiliar products. Therefore, it is necessary to classify and label product reviews through automated methods. For example, automatically classify reviews as "positive", "neutral" or "negative", and extract key topics such as "quality", "price", "user experience", etc. This not only helps consumers find the information they care about faster, but also helps merchants understand the advantages and disadvantages of products and improve products and services in a timely manner.
[0004] When classifying product reviews, traditional text automatic classification and labeling methods generally achieve accurate classification and labeling of review texts by inputting all review texts one by one into a preset text classification label model. However, for some review texts that are relatively easy to identify, the above method is still chosen for classification and labeling, which may result in slower classification time and thus fail to update the true review status of the product in a timely manner. Summary of the invention
[0005] The purpose of the present invention is to solve the problem that the classification time is slow and thus the real evaluation status of the product cannot be updated in time, and a method for automatic text classification and labeling is proposed.
[0006] The present invention proposes a method for automatic text classification and labeling, the method comprising:
[0007] All evaluation texts of the target product on the target platform are taken as a first evaluation text set, and availability data of each evaluation text in the first evaluation text set is obtained, and an availability coefficient of the evaluation text is obtained according to the availability data; the availability data includes a text timeliness coefficient and a user reliability coefficient;
[0008] Filter out available texts in the first evaluation text set according to the available coefficient and the preset available coefficient threshold to obtain a second evaluation text set;
[0009] Obtaining analyzable difficulty data of each text in the second evaluation text set, and obtaining an analysis difficulty coefficient of the text according to the analyzable difficulty data; the analyzable difficulty data includes a sentence entropy value and a keyword distance length;
[0010] According to the analysis difficulty coefficient, all texts in the second evaluation text set are assigned to preset different types of text classification label models for classification and labeling.
[0011] Optionally, the method for obtaining the text timeliness coefficient is:
[0012] Obtaining the account order time and evaluation release time corresponding to each evaluation text in the first evaluation text set, and calculating the difference between the two to obtain the usage time of the evaluation text;
[0013] Obtain the account delivery address and product delivery address corresponding to the evaluation text, calculate the closest drivable distance between the delivery address and the product delivery address, obtain the historical highest transportation speed of the corresponding transport courier, calculate the quotient between the closest drivable distance and the historical highest transportation speed, and record it as the fastest interval time;
[0014] The difference between the usage time and the fastest interval time is calculated to obtain the text timeliness coefficient.
[0015] Optionally, the method for obtaining the user reliability coefficient is:
[0016] The account creation time corresponding to each evaluation text in the first evaluation text set, as well as the account evaluation frequency and the number of similar product evaluations at the account creation time are obtained, and the user reliability coefficient is obtained according to the account creation time, the account evaluation frequency and the number of similar product evaluations. The specific formula is:
[0017] Dg=Td (a1*Es+a2*Er)
[0018] Where Dg is the user reliability coefficient, Td is the account creation time, Es is the account evaluation frequency, Er is the number of similar product evaluations, a1 and a2 are the proportional coefficients of the account evaluation frequency and the number of similar product evaluations, and a1 and a2 are both greater than 0.
[0019] Optionally, obtaining the availability coefficient of the evaluation text according to the availability data includes:
[0020] The text timeliness coefficient and the user reliability coefficient are weighted and summed to obtain the availability coefficient; the calculation expression is:
[0021]
[0022] Where Edg is the available coefficient, WH and Dg represent the text timeliness coefficient and the user reliability coefficient respectively, b1 and b2 are the proportional coefficients of the text timeliness coefficient and the user reliability coefficient, and b1 and b2 are both greater than 0.
[0023] Optionally, available texts in the first evaluation text set are screened out according to the available coefficient and a preset available coefficient threshold, and the second evaluation text set is obtained to include:
[0024] Compare the usability coefficient of each text in the first evaluation text set with a preset usability coefficient threshold value, if the usability coefficient is not less than the preset usability coefficient threshold value, then record the text as a usable text, if the usability coefficient is less than the preset usability coefficient threshold value, then record the text as an unusable text;
[0025] All available texts in the first evaluation text set are extracted as the second evaluation text set.
[0026] Optionally, the method for obtaining the sentence entropy value includes:
[0027] Extract the total number of words in each text in the second evaluation text set, divide the number of times each word appears in the text by the total number of words, and obtain the probability of occurrence of each word;
[0028] Extract all the part-of-speech types in the text, obtain the word quantity corresponding to each part-of-speech type, and divide the word quantity corresponding to the part-of-speech type by the total number of words to obtain the word quantity weight of the part-of-speech type;
[0029] Multiply the word volume weight of the part of speech type by the corresponding preset difficulty weight to obtain the actual difficulty weight;
[0030] Get the actual difficulty weights of all the parts of speech in the text, and combine the occurrence probability of each word to get the sentence entropy value of the text. The specific formula is:
[0031]
[0032] In the formula, H(S) is the sentence entropy value of the text, N is the total number of words, and A i is the word count of the part-of-speech type corresponding to the first i word, B i The preset difficulty weight of the part of speech type corresponding to the i-th word, P(w i ) is the probability of the i-th word appearing, w i is the i-th word in the text.
[0033] Optionally, obtaining the analysis difficulty coefficient of the text according to the analyzable difficulty data includes:
[0034] The sentence entropy value and the keyword distance length are weighted and summed to obtain the analysis difficulty coefficient; the calculation expression is:
[0035]
[0036] Where Sqa is the analysis difficulty coefficient, H(S) and Fy represent the sentence entropy value and keyword distance length respectively, c1 and c2 are the proportional coefficients of sentence entropy value and keyword distance length, and c1 and c2 are both greater than 0.
[0037] Optionally, allocating all the texts in the second evaluation text set to preset different types of classification label models for classification and labeling according to the analysis difficulty coefficient includes:
[0038] The analysis difficulty coefficient is compared with a preset analysis difficulty coefficient threshold. If the analysis difficulty coefficient is not less than the preset analysis difficulty coefficient threshold, the evaluation texts corresponding to the analysis difficulty coefficient are input one by one into a preset text classification label model based on a support vector machine to obtain the classification and label corresponding to the evaluation text;
[0039] If the analysis difficulty coefficient is less than the preset analysis difficulty coefficient threshold, several analysis difficulty coefficients are added together to obtain an input coefficient. When the added result is not greater than the preset input coefficient threshold, the evaluation texts corresponding to the analysis difficulty coefficients contained in the input coefficients are input together into the preset deep learning-based text classification label model to obtain the classifications and labels corresponding to the multiple evaluation texts.
[0040] Beneficial effects of the present invention:
[0041] The present invention proposes a text automatic classification and labeling method, which can reduce the time of text automatic classification and can timely update the real evaluation status of the product without causing misunderstanding of the product by merchants and users. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The present invention will be further described below in conjunction with the accompanying drawings.
[0043] Figure 1 A flowchart of a method for automatic text classification and labeling provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.
[0045] Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the field without making any creative work shall fall within the scope of protection of the present invention.
[0046] The embodiment of the present invention provides a method for automatic text classification and labeling. Figure 1 , Figure 1 A flowchart of a method for automatic text classification and labeling provided by an embodiment of the present invention. The method comprises the following steps:
[0047] All evaluation texts of the target product on the target platform are taken as a first evaluation text set, and availability data of each evaluation text in the first evaluation text set is obtained, and an availability coefficient of the evaluation text is obtained according to the availability data;
[0048] Filter out available texts in the first evaluation text set according to the available coefficient and the preset available coefficient threshold to obtain a second evaluation text set;
[0049] Obtaining analyzable difficulty data of each text in the second evaluation text set, and obtaining an analysis difficulty coefficient of the text according to the analyzable difficulty data; the analyzable difficulty data includes sentence entropy value and keyword distance length;
[0050] According to the analysis difficulty coefficient, all texts in the second evaluation text set are assigned to preset different types of text classification label models for classification and labeling.
[0051] Based on a text automatic classification and labeling method provided by an embodiment of the present invention, the time for automatic text classification can be reduced through the above-mentioned method, and the real evaluation status of the product can be updated in time.
[0052] In one embodiment, the availability data of each evaluation text in the first evaluation text set is obtained, and the availability data includes a text timeliness coefficient. The method for obtaining the text timeliness coefficient is:
[0053] Obtain the account order time and evaluation release time corresponding to each evaluation text in the first evaluation text set, and calculate the difference between the two to obtain the usage time of the evaluation text;
[0054] Obtain the account delivery address and product delivery address corresponding to the evaluation text, calculate the closest drivable distance between the delivery address and the product delivery address, obtain the historical highest transportation speed of the corresponding transport courier, calculate the quotient between the closest drivable distance and the historical highest transportation speed, and record it as the fastest interval time;
[0055] The difference between the usage time and the fastest interval time is calculated to obtain the text timeliness coefficient.
[0056] It should be noted that the account order time and evaluation release time corresponding to each evaluation text in the first evaluation text set can be obtained through the merchant's backend system, which will not be repeated here; in addition, the account delivery address and the product delivery address, as well as the nearest drivable distance between the delivery address and the product delivery address, and the corresponding historical maximum transportation speed of the transport courier can be obtained according to the corresponding work log, which will not be repeated here;
[0057] It should be noted that, the smaller the text timeliness coefficient is, the greater the unavailability of the evaluation text is, the smaller the evaluation text's reference value for the actual use effect of the product is, and it will affect the real evaluation status of the product. The evaluation text does not need to be input into the preset text classification label model for classification and labeling; conversely, the larger the text timeliness coefficient is, the less available the evaluation text is, the higher the evaluation text's reference value for the actual use effect of the product is, and it will not affect the real evaluation status of the product. The evaluation text can be input into the preset text classification label model for classification and labeling.
[0058] In one implementation, the text timeliness coefficient calculated by the above method is more accurate, and can better determine the evaluation reference value of the evaluation text for the actual use effect of the product, and can provide more accurate data for subsequent calculations.
[0059] In one embodiment, the availability data includes a user reliability coefficient, and the method for obtaining the user reliability coefficient is:
[0060] The account creation time corresponding to each evaluation text in the first evaluation text set, as well as the account evaluation frequency and the number of similar product evaluations at the account creation time are obtained. The user reliability coefficient is obtained according to the account creation time, the account evaluation frequency and the number of similar product evaluations. The specific formula is:
[0061] Dg=Td (a1*Es+a2*Er)
[0062] Where Dg is the user reliability coefficient, Td is the account creation time, Es is the account evaluation frequency, Er is the number of similar product evaluations, a1 and a2 are the proportional coefficients of the account evaluation frequency and the number of similar product evaluations, and a1 and a2 are both greater than 0.
[0063] It should be noted that the account creation time, account evaluation frequency and number of similar product evaluations can be directly obtained from the corresponding account history records stored in the platform, and the details will not be repeated here;
[0064] It should be noted that, the smaller the user reliability coefficient is, the greater the unusability of the evaluation text is, the less reference the evaluation text has for the actual use effect of the product, and it will affect the real evaluation status of the product. The evaluation text does not need to be input into the preset text classification label model for classification and labeling; conversely, the larger the user reliability coefficient is, the less usable the evaluation text is, the more reference the evaluation text has for the actual use effect of the product, and it will not affect the real evaluation status of the product. The evaluation text can be input into the preset text classification label model for classification and labeling.
[0065] In one implementation, the user reliability coefficient calculated by the above method is more accurate and can better determine the evaluation reference value of the evaluation text for the actual use effect of the product, and can provide more accurate data for subsequent calculations.
[0066] In one embodiment, obtaining the availability coefficient of the evaluation text according to the availability data includes:
[0067] The text timeliness coefficient and the user reliability coefficient are weighted and summed to obtain the availability coefficient; the calculation expression is:
[0068]
[0069] Where Edg is the available coefficient, WH and Dg represent the text timeliness coefficient and the user reliability coefficient respectively, b1 and b2 are the proportional coefficients of the text timeliness coefficient and the user reliability coefficient, and b1 and b2 are both greater than 0.
[0070] In one implementation, the usability coefficient of the evaluation text is calculated by the text timeliness coefficient and the user reliability coefficient, which can more comprehensively and accurately evaluate the reference value of each evaluation. Timeliness ensures the immediacy and authenticity of the evaluation, and user reliability ensures the credibility of the evaluator. These methods help improve the accuracy of text classification and labeling.
[0071] It should be noted that the reason why the text timeliness coefficient and the user reliability coefficient are chosen to calculate the availability coefficient is that, on the one hand, the data required for the calculation of the text timeliness coefficient and the user reliability coefficient are relatively easy to obtain, the calculation process is less complex, and the calculation results are relatively accurate. On the other hand, although other parameters such as the number of words in the evaluation text, the sentiment analysis score, and the number of likes can also provide certain information, they each have their limitations. The number of words in the evaluation text cannot directly reflect the quality of the evaluation, and a short evaluation may also be very useful. Although the sentiment analysis score can analyze the emotional tendency of the evaluation, it cannot distinguish the authenticity and timeliness of the evaluation. The number of likes is easy to manipulate and may not necessarily reflect the true quality of the evaluation. In contrast, the text timeliness coefficient and the user reliability coefficient can more comprehensively and accurately evaluate the reference value of each evaluation, ensuring the efficiency and accuracy of classification and labeling.
[0072] In one embodiment, available texts in the first evaluation text set are screened out according to the available coefficient and a preset available coefficient threshold, and the second evaluation text set is obtained to include:
[0073] Compare the usability coefficient of each text in the first evaluation text set with a preset usability coefficient threshold value, if the usability coefficient is not less than the preset usability coefficient threshold value, then record the text as a usable text, if the usability coefficient is less than the preset usability coefficient threshold value, then record the text as an unusable text;
[0074] All available texts in the first evaluation text set are extracted as the second evaluation text set.
[0075] It should be noted that the preset availability coefficient threshold is set by professionals based on actual conditions, and the details are not described in detail;
[0076] In one implementation, through the above method, all the texts in the second evaluation text set screened out are truly valid evaluations of the target product. In this way, screening reduces the amount of invalid data to be processed, optimizes resource utilization, and can improve overall processing efficiency and response speed.
[0077] In one embodiment, the analyzable difficulty data of each text in the second evaluation text set is obtained, and the analyzable difficulty data includes a sentence entropy value. The method for obtaining the sentence entropy value includes:
[0078] Extract the total number of words in each text in the second evaluation text set, divide the number of times each word appears in the text by the total number of words, and obtain the probability of occurrence of the word;
[0079] Extract all the part-of-speech types in the text, obtain the word quantity corresponding to each part-of-speech type, and divide the word quantity corresponding to the part-of-speech type by the total number of words to obtain the word quantity weight of the part-of-speech type;
[0080] Multiply the word volume weight of the part of speech type by the corresponding preset difficulty weight to obtain the actual difficulty weight;
[0081] Get the actual difficulty weights of all the parts of speech in the text, and combine the occurrence probability of each word to get the sentence entropy value of the text. The specific formula is:
[0082]
[0083] In the formula, H(S) is the sentence entropy value of the text, N is the total number of words, and A i is the word count of the part-of-speech type corresponding to the first i word, B i The preset difficulty weight of the part of speech type corresponding to the i-th word, P(w i ) is the probability of the i-th word appearing, w i is the i-th word in the text.
[0084] It should be noted that, according to the above calculation results, the larger the sentence entropy value, the more evenly distributed the words in the evaluation text are, the larger the amount of information is, the sentence may contain information or opinions from different aspects, and it is more difficult to analyze, and the corresponding analysis difficulty coefficient is larger; the smaller the sentence entropy value, the more concentrated the word distribution of the evaluation text is, the less information is, the information expressed by the sentence is clearer and more consistent, and it is easier to analyze, and the corresponding analysis difficulty coefficient is smaller.
[0085] It should be noted that the preset difficulty weight is set by professionals based on actual conditions. The setting logic is as follows: assuming that a text evaluation of a certain product is "This mobile phone has a fashionable appearance and stable performance, but the price is relatively high", in this sentence, noun: mobile phone; adjective: fashionable, stable, relatively high; conjunction: but; in the evaluation and classification of the text, nouns, as fixed pronouns, are easier to analyze and identify, so their preset difficulty weights can be set appropriately not so high; adjectives have a strong modifying effect and usually carry important evaluations of product characteristics. Words such as "fashionable", "stable", and "relatively high" directly affect consumers' overall impression of the product and purchase decisions. The emotions and attitudes expressed by adjectives can have a significant impact on the overall evaluation of the product, so their preset difficulty weights can be set appropriately high; the preset difficulty weight setting for conjunctions in the evaluation text is usually medium, and the preset difficulty weight setting for conjunctions in the evaluation text is usually medium. Conjunctions such as "but" serve to connect different or opposite opinions in a sentence. Although they do not carry direct information about product characteristics or consumer attitudes, in the evaluation analysis, the presence of conjunctions can imply the complexity and diversity of the evaluation. Therefore, although the analysis of conjunctions does not directly affect the emotional color of the evaluation or the description of product characteristics like adjectives, considering their important role in sentence structure, the preset difficulty weight will be set at a medium level to ensure that the grammatical structure of the text and the integrity of the evaluation content are taken into account.
[0086] In one implementation, the sentence entropy value of the text calculated by the above method can be analyzed according to the part-of-speech type in the actual evaluation text, and the entropy value can be calculated according to the number corresponding to the different part-of-speech types in the actual evaluation text. The entropy value calculated in this way is more accurate and more in line with the actual text evaluation situation, and the calculation process is more objective and standardized, reducing the influence of subjective factors.
[0087] In one embodiment, the analyzable difficulty data of each text in the second evaluation text set is obtained, and the analyzable difficulty data also includes keyword distance length. The method for obtaining the keyword distance length includes:
[0088] Extracting keywords from each text in the second evaluation text set, and matching each keyword with a preset keyword correlation table to obtain the level of the word in the preset keyword correlation table;
[0089] Add up the levels of all keywords in the text to get the keyword distance length.
[0090] It should be noted that the preset keyword correlation table is set by professionals based on actual product information. These keywords are usually determined based on product characteristics, user needs and market trends, and are intended to capture the most representative and critical words in user evaluations. The details are not elaborated herein; for example, for a certain mobile phone product evaluation, the word "mobile phone" in the evaluation is regarded as the highest level keyword and is marked as number 1. Expressions similar to "mobile phone", such as "device", are more inclined to represent the meaning of "mobile phone" in the evaluation. The word "device" is regarded as the middle level keyword and is marked as number 2. And so on. A keyword correlation table is set. The greater the relevance, the smaller the number. The level in the preset keyword correlation table is matched according to the specific words in the actual evaluation.
[0091] It should be noted that the longer the keyword distance length is, the more difficult it is to analyze the evaluation text, and the greater the corresponding analysis difficulty coefficient is; the shorter the keyword distance length is, the more difficult it is to analyze the evaluation text, and the smaller the corresponding analysis difficulty coefficient is.
[0092] In one implementation, the keyword distance length obtained by the above method is more accurate and can better represent the difficulty of text evaluation.
[0093] In one embodiment, obtaining the analysis difficulty coefficient of the text according to the analyzable difficulty data includes:
[0094] The sentence entropy value and the keyword distance length are weighted and summed to obtain the analysis difficulty coefficient; the calculation expression is:
[0095]
[0096] Where Sqa is the analysis difficulty coefficient, H(S) and Fy represent the sentence entropy value and keyword distance length respectively, c1 and c2 are the proportional coefficients of sentence entropy value and keyword distance length, and c1 and c2 are both greater than 0.
[0097] In one implementation, the analysis difficulty coefficient of the evaluation text is calculated by using the sentence entropy value and the keyword distance length, which can more accurately reflect the complexity and difficulty of the text. Comprehensive consideration of multiple factors can reduce the influence of subjective factors. The combined evaluation of sentence entropy value and keyword distance length can more comprehensively reflect the characteristics of the text and improve the objectivity and comparability of the evaluation results.
[0098] It should be noted that the reason why sentence entropy and keyword distance length are chosen to calculate the analysis difficulty coefficient instead of other parameters is that sentence entropy can comprehensively consider the distribution uniformity of words in the text. The higher the entropy value, the richer and more complex the text information is, and more in-depth analysis is required. This indicator can help analysts quickly understand the information density and diversity of the text, and help determine the depth and direction of the analysis. Keyword distance length measures the degree of semantic association between keywords in the text. A larger distance length indicates that the correlation between keywords is lower, and more text understanding and analysis may be required to accurately grasp the theme and content of the text. By considering the location and relevance of keywords, key information and trends in the evaluation text can be better understood.
[0099] In one embodiment, allocating all the texts in the second evaluation text set to preset different types of classification label models for classification and labeling according to the analysis difficulty coefficient includes:
[0100] The analysis difficulty coefficient is compared with a preset analysis difficulty coefficient threshold. If the analysis difficulty coefficient is not less than the preset analysis difficulty coefficient threshold, the evaluation texts corresponding to the analysis difficulty coefficient are input one by one into a preset text classification label model based on a support vector machine to obtain the classification and label corresponding to the evaluation text;
[0101] If the analysis difficulty coefficient is less than the preset analysis difficulty coefficient threshold, several analysis difficulty coefficients are added together to obtain an input coefficient. When the added result is not greater than the preset input coefficient threshold, the evaluation texts corresponding to the analysis difficulty coefficients contained in the input coefficients are input together into the preset deep learning-based text classification label model to obtain the classifications and labels corresponding to the multiple evaluation texts.
[0102] In one implementation, through the above method, different evaluation texts are divided into corresponding preset text classification label models according to their analysis difficulty coefficients. In this way, the time for automatic text classification can be improved and the real evaluation status of the product can be updated in a timely manner.
[0103] It should be noted that the preset text classification label model based on support vector machine is suitable for, for example, when the amount of data is small and it is desired to have better interpretability and processing speed, the model based on support vector machine can be selected. Therefore, when the analysis of the evaluation text is difficult, the preset text classification label model based on support vector machine can be used for one-to-one corresponding input, and the model can analyze a more accurate result; in addition, the preset text classification label model based on support vector machine has been trained in advance by the staff, and the details will not be repeated;
[0104] It should be noted that the preset text classification label model based on deep learning is suitable for when the amount of data is large and better interpretability and processing speed are desired. Therefore, when the analysis difficulty of the evaluation text is relatively small, multiple batches of data can be input at one time through the preset text classification label model based on deep learning, and the model can analyze more accurate results. In addition, the preset text classification label model based on deep learning has been trained in advance by the staff, and the details will not be repeated here.
[0105] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. A method for automatic text classification and labeling, characterized in that: The following steps are involved: Taking all evaluation texts of the target product on the target platform as a first evaluation text set, obtaining availability data of each evaluation text in the first evaluation text set, and obtaining an availability coefficient of the evaluation text according to the availability data; The availability data includes a text timeliness coefficient and a user reliability coefficient; Filter out available texts in the first evaluation text set according to the available coefficient and the preset available coefficient threshold to obtain a second evaluation text set; Acquire analyzable difficulty data of each text in the second evaluation text set, and obtain an analysis difficulty coefficient of the text according to the analyzable difficulty data; The analyzable difficulty data include sentence entropy value and keyword distance length; According to the analysis difficulty coefficient, all texts in the second evaluation text set are assigned to preset different types of text classification label models for classification and labeling.
2. A text automatic classification and labeling method according to claim 1, characterized in that: The method for obtaining the text timeliness coefficient is: Obtaining the account order time and evaluation release time corresponding to each evaluation text in the first evaluation text set, and calculating the difference between the two to obtain the usage time of the evaluation text; Obtain the account delivery address and product delivery address corresponding to the evaluation text, calculate the closest drivable distance between the delivery address and the product delivery address, obtain the historical highest transportation speed of the corresponding transport courier, calculate the quotient between the closest drivable distance and the historical highest transportation speed, and record it as the fastest interval time; The difference between the usage time and the fastest interval time is calculated to obtain the text timeliness coefficient.
3. The method for automatic text classification and labeling according to claim 1, characterized in that: The method for obtaining the user reliability coefficient is: The account creation time corresponding to each evaluation text in the first evaluation text set, as well as the account evaluation frequency and the number of similar product evaluations at the account creation time are obtained, and the user reliability coefficient is obtained according to the account creation time, the account evaluation frequency and the number of similar product evaluations. The specific formula is: Dg=Td (a1*Es+a2*Er) Where Dg is the user reliability coefficient, Td is the account creation time, Es is the account evaluation frequency, Er is the number of similar product evaluations, a1 and a2 are the proportional coefficients of the account evaluation frequency and the number of similar product evaluations, and a1 and a2 are both greater than 0.
4. The method for automatic text classification and labeling according to claim 1, characterized in that: The availability coefficients of the evaluation text obtained based on the availability data include: The text timeliness coefficient and the user reliability coefficient are weighted and summed to obtain the availability coefficient; the calculation expression is: Where Edg is the available coefficient, WH and Dg represent the text timeliness coefficient and the user reliability coefficient respectively, b1 and b2 are the proportional coefficients of the text timeliness coefficient and the user reliability coefficient, and b1 and b2 are both greater than 0.
5. The method for automatic text classification and labeling according to claim 1, characterized in that: The available texts in the first evaluation text set are screened out according to the available coefficient and the preset available coefficient threshold, and the second evaluation text set is obtained, including: Compare the usability coefficient of each text in the first evaluation text set with a preset usability coefficient threshold, if the usability coefficient is not less than the preset usability coefficient threshold, then record the text as a usable text, if the usability coefficient is less than the preset usability coefficient threshold, then record the text as an unusable text; All available texts in the first evaluation text set are extracted as the second evaluation text set.
6. The method for automatic text classification and labeling according to claim 1, characterized in that: The method for obtaining the sentence entropy value includes: Extract the total number of words in each text in the second evaluation text set, divide the number of times each word appears in the text by the total number of words, and obtain the probability of occurrence of each word; Extract all the part-of-speech types in the text, obtain the word quantity corresponding to each part-of-speech type, and divide the word quantity corresponding to the part-of-speech type by the total number of words to obtain the word quantity weight of the part-of-speech type; Multiply the word volume weight of the part of speech type by the corresponding preset difficulty weight to obtain the actual difficulty weight; Get the actual difficulty weights of all the parts of speech in the text, and combine the occurrence probability of each word to get the sentence entropy value of the text. The specific formula is: In the formula, H(S) is the sentence entropy value of the text, N is the total number of words, and A i is the word count of the part-of-speech type corresponding to the first i word, B i The preset difficulty weight of the part of speech type corresponding to the i-th word, P(w i ) is the probability of the i-th word appearing, w i is the i-th word in the text.
7. The method for automatic text classification and labeling according to claim 1, characterized in that: The analysis difficulty coefficient of the text obtained according to the analyzable difficulty data includes: The sentence entropy value and the keyword distance length are weighted and summed to obtain the analysis difficulty coefficient; the calculation expression is: Where Sqa is the analysis difficulty coefficient, H(S) and Fy represent the sentence entropy value and keyword distance length respectively, c1 and c2 are the proportional coefficients of sentence entropy value and keyword distance length, and c1 and c2 are both greater than 0.
8. The method for automatic text classification and labeling according to claim 1, characterized in that: According to the analysis difficulty coefficient, all the texts in the second evaluation text set are assigned to preset different types of classification label models for classification and labeling, including: The analysis difficulty coefficient is compared with a preset analysis difficulty coefficient threshold. If the analysis difficulty coefficient is not less than the preset analysis difficulty coefficient threshold, the evaluation texts corresponding to the analysis difficulty coefficient are input one by one into a preset text classification label model based on a support vector machine to obtain the classification and label corresponding to the evaluation text; If the analysis difficulty coefficient is less than the preset analysis difficulty coefficient threshold, several analysis difficulty coefficients are added together to obtain an input coefficient. When the added result is not greater than the preset input coefficient threshold, the evaluation texts corresponding to the analysis difficulty coefficients contained in the input coefficients are input together into the preset deep learning-based text classification label model to obtain the classifications and labels corresponding to the multiple evaluation texts.
Citation Information
Cited By
Charging station dynamic recommendation method based on user preference
CN119066276A
