Text sentiment classification method, device, equipment, and storage medium

By obtaining the noun keywords and contribution degrees in the user's published text, combined with the neural network model and preset rules, it solves the problem of difficulty in identifying diversified network terms and multiple evaluated objects in emotion classification in the existing technology, and improves the emotional Classification accuracy.

CN112445907BActive Publication Date: 2024-10-15SF TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910823271.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-09-02
Publication Date
2024-10-15
Estimated Expiration
2039-09-02

AI Technical Summary

Technical Problem

It is difficult for the existing technology to adapt to diverse Internet terms in text emotion classification, and it is difficult to identify which object a comment containing multiple evaluated objects is specifically aimed at, resulting in low emotion recognition accuracy.

Method used

By obtaining the noun keywords in the user's published text, calculate their contribution, and use the trained neural network model to identify emotional categories, combine the initial emotional attributes and the target object to obtain the emotional attributes, and use preset rules to make corrections to improve accuracy. sex.

Benefits of technology

The accuracy of identifying emotional attributes of texts containing multiple evaluated objects is improved. Especially when the text contains Internet terms, the emotional attributes are accurately identified and the accuracy of emotion classification is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112445907B_ABST
    Figure CN112445907B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a text sentiment classification method, device, equipment and computer-readable storage medium, which obtains user published text; selects noun keywords in the user published text; obtains the contribution of the noun keywords in the user published text, and takes the noun keywords with the highest contribution as the target object; obtains a trained neural network model, and uses the trained neural network model to identify the sentiment category of the user published text to obtain the initial sentiment attribute of the user published text, wherein the trained neural network model is obtained by training with training samples containing network terms; and obtains the sentiment attribute corresponding to the target object according to the initial sentiment attribute. The accuracy of text sentiment classification is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a text sentiment classification method, device, equipment and storage medium. Background Art

[0002] With the rapid development of e-commerce and the Internet, browsing products, placing orders, paying, and posting personal experience and evaluation of products online have become people's daily habits. These review texts reflect consumers' likes and dislikes of this product in various dimensions, that is, users' evaluation attributes of the product. For example, a user's evaluation of a certain mobile phone is "OK, the appearance is gorgeous, the battery consumes too fast, and the camera function is average." Among them, the emotional tendency of the evaluation attribute "appearance" is positive, the emotional tendency of "battery consumption" is negative, and the emotional tendency of "camera function" is neutral. Positive, negative, and neutral are the emotions of the evaluation attributes.

[0003] Existing technologies usually use sentiment dictionaries and syntactic analysis to dissect texts and judge the positive and negative sentiment of texts, or use deep learning methods to classify text sentiment. However, dictionaries and syntactic analysis are difficult to adapt to the diverse expressions of online terms, and require continuous collection of new online vocabulary and expressions. The formulation of grammatical rules is prone to neglecting one thing while focusing on another. Deep learning methods are difficult to identify which object a comment containing multiple evaluated objects is specifically targeting, especially the judgment of praising one object and criticizing another object is prone to errors. In addition, traditional text corpora cannot adapt to the diverse online terms of social networks, resulting in low accuracy in sentiment recognition. Summary of the invention

[0004] The embodiments of the present application provide a text sentiment classification method, apparatus, device and storage medium, which can achieve the efficiency of acquiring sentiment attributes and improve the accuracy of text sentiment classification.

[0005] In a first aspect, an embodiment of the present application provides a text sentiment classification method, comprising:

[0006] Get the text posted by the user;

[0007] Selecting noun keywords in the text posted by the user;

[0008] Obtaining the contribution of the noun keyword in the text published by the user, and taking the noun keyword with the highest contribution as the target object;

[0009] Obtaining a trained neural network model, and using the trained neural network model to perform sentiment category recognition on the text posted by the user to obtain the initial sentiment attribute of the text posted by the user, wherein the trained neural network model is obtained by training with training samples containing network terms;

[0010] The emotional attribute corresponding to the target object is acquired according to the initial emotional attribute.

[0011] In some implementations, obtaining the text posted by the user includes:

[0012] Crawl user candidate published texts through preset websites;

[0013] Merging and removing duplicates from the candidate published texts of the user to obtain a merged published text;

[0014] A preset text library is obtained, and the merged published text is filtered according to the preset text library to obtain the user published text.

[0015] In some embodiments, before obtaining the trained neural network model, the method further includes:

[0016] Acquire a preset corpus, wherein the preset corpus includes network terms updated in real time;

[0017] Segmenting the text in the corpus using a segmentation model to obtain segmented words;

[0018] Training the segmented words to obtain word vectors;

[0019] Performing sentiment annotation on the text in the corpus;

[0020] Combining the text in the corpus after sentiment annotation with the word vector to obtain a training sample;

[0021] The neural network model is trained according to the training samples to obtain a trained neural network model.

[0022] In some implementations, selecting noun keywords in the text posted by the user includes:

[0023] Get the preset noun keyword library;

[0024] Noun keywords in the text posted by the user are matched from the preset noun keyword library.

[0025] In some implementations, obtaining the contribution of the noun keyword in the text published by the user and taking the noun keyword with the highest contribution as the target object includes:

[0026] Obtaining the TFIDF score of the noun keyword by using the TFIDF algorithm, and setting the TFIDF score as the contribution of the noun keyword in the text published by the user;

[0027] Sorting the contribution to obtain the noun keyword with the highest contribution;

[0028] The noun keywords with the highest contribution are selected as the target objects.

[0029] In some implementations, after obtaining the emotional attribute of the evaluation subject corresponding to the text posted by the user according to the initial emotional attribute and the target object, the method further includes:

[0030] Get preset rules;

[0031] The emotional attribute corresponding to the target object is modified according to the preset rule to obtain the modified emotional attribute.

[0032] In some implementations, the step of modifying the emotional attribute corresponding to the target object by using the preset rule to obtain the modified emotional attribute includes:

[0033] Obtaining a preset sentence pattern in the preset rule;

[0034] Matching the user published text with a preset sentence pattern;

[0035] If the preset sentence pattern is matched in the user published text, the evaluation object contained in the preset sentence pattern is compared with the target object;

[0036] If the evaluation object included in the preset sentence pattern is consistent with the target object, and the emotional attribute corresponding to the target object is negative, the emotional attribute corresponding to the target object is corrected to be positive.

[0037] In a second aspect, the present application also provides a text sentiment classification device, including:

[0038] A first acquisition unit, used to acquire text posted by a user;

[0039] A selection unit, used for selecting noun keywords in the text posted by the user;

[0040] A second acquisition unit is used to acquire the contribution of the noun keyword in the text published by the user, and take the noun keyword with the highest contribution as the target object;

[0041] A third acquisition unit is used to acquire a trained neural network model, and perform sentiment category recognition on the user-posted text by using the trained neural network model to obtain an initial sentiment attribute of the user-posted text, wherein the trained neural network model is obtained by training with training samples containing network terms;

[0042] The fourth acquisition unit is used to acquire the emotional attribute corresponding to the target object according to the initial emotional attribute.

[0043] In some implementations, the first acquisition unit includes:

[0044] A crawling subunit is used to crawl user candidate published texts through a preset website;

[0045] A merging subunit, used to merge and remove duplicates of the user's candidate published texts to obtain a merged published text;

[0046] The first acquisition subunit is used to acquire a preset text library, and filter the merged published text according to the preset text library to obtain the user published text.

[0047] In some implementations, the text sentiment classification device further includes:

[0048] A fifth acquisition unit, configured to acquire a preset corpus, wherein the preset corpus includes network terms updated in real time;

[0049] A word segmentation unit, used to segment the text in the corpus through a word segmentation model to obtain segmented words;

[0050] A first training unit is used to train the segmented words to obtain word vectors;

[0051] A sentiment annotation unit, used for performing sentiment annotation on the text in the corpus;

[0052] A combining unit is used to combine the text in the corpus after sentiment annotation with the word vector to obtain a training sample

[0053] The second training unit is used to train the neural network model by taking the sentiment-annotated word vectors as training samples to obtain a trained neural network model.

[0054] In some embodiments, the selection unit includes:

[0055] The second acquisition subunit is used to acquire a preset noun keyword library;

[0056] The first matching subunit is used to match the noun keywords in the text posted by the user from the preset noun keyword library.

[0057] In some implementations, the second acquisition unit includes:

[0058] A third acquisition subunit is used to acquire the TFIDF score of the noun keyword by using a TFIDF algorithm, and set the TFIDF score as the contribution of the noun keyword in the text published by the user;

[0059] The sorting subunit is used to sort the contribution to obtain the noun keyword with the highest contribution; and take the noun keyword with the highest contribution as the target object.

[0060] In some implementations, the text sentiment classification device further includes:

[0061] A sixth acquisition unit, used to acquire a preset rule;

[0062] The correction unit is used to correct the emotional attribute corresponding to the target object according to the preset rule to obtain the corrected emotional attribute.

[0063] In some embodiments, the correction unit comprises:

[0064] A fourth acquisition subunit, used to acquire a preset sentence pattern in the preset rule;

[0065] A second matching subunit, used for matching the user posted text with a preset sentence pattern;

[0066] A comparison subunit, configured to compare the evaluation object contained in the preset sentence pattern with the target object if the preset sentence pattern is matched in the text published by the user;

[0067] The correction subunit is used to correct the emotional attribute corresponding to the target object to be positive if the evaluation object contained in the preset sentence is consistent with the target object and the emotional attribute corresponding to the target object is negative.

[0068] In a third aspect, an embodiment of the present application further provides a device, comprising a processor and a memory, wherein the memory stores program code, and when the processor calls the program code in the memory, the text sentiment classification method as described above is executed.

[0069] In a fourth aspect, an embodiment of the present application further provides a storage medium, wherein the storage medium stores a computer program, which is loaded by a processor to execute the text sentiment classification method as described above.

[0070] The embodiment of the present application obtains the user's published text; selects noun keywords in the user's published text; obtains the contribution of noun keywords in the user's published text, and uses the noun keyword with the highest contribution as the target object, that is, the target evaluation object, so as to obtain the target evaluation object in the user's published text. When the user's published text contains multiple evaluation objects, the accuracy of identifying the emotional attributes of the text containing multiple evaluated objects is improved by determining the target evaluation object; obtains the trained neural network model, and performs emotional category recognition on the user's published text through the trained neural network model to obtain the initial emotional attributes of the user's published text, wherein the trained neural network model is obtained by training with training samples containing network terms; because the trained neural network model is obtained by training with training samples containing network terms, when the user's published text contains network terms, the corresponding emotional attributes are accurately identified, and then the emotional attributes of the target object are obtained by combining the initial emotional attributes with the target object. Because the target object is combined and the neural network model obtained by training with the training sample containing network terms is used for recognition, the accuracy of identifying the emotional attributes of the text containing multiple evaluated objects and the text containing network terms is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0072] Figure 1 It is a flowchart of a text sentiment classification method provided in an embodiment of the present application;

[0073] Figure 2 is another flow chart of the text sentiment classification method provided in the embodiment of the present application;

[0074] Figure 3 is a structural schematic diagram of a text sentiment classification device provided in an embodiment of the present application;

[0075] Figure 4 It is a schematic diagram of the structure of the device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0076] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0077] See also Figure 1 , Figure 1 : is a flowchart of a text sentiment classification method provided by an embodiment of the present application. The execution subject of the text sentiment classification method may be a text sentiment classification device provided by an embodiment of the present application, or a device integrated with the text sentiment classification device, such as a terminal or a server, etc. The device may be a smart phone, a tablet computer, a PDA, or a laptop computer, a fixed computer, and a server, etc. The text sentiment classification method may include:

[0078] S101, obtaining the text published by the user.

[0079] Specifically, in this embodiment, user published texts may include personal user experience and evaluation texts of commodities, or personal reading experience of certain texts, etc., which are not limited here. Specifically, user published texts may be obtained by data crawling. According to the user published text crawling conditions set by the user, the user published texts to be crawled are selected and collected to obtain candidate user published texts. Since the user published texts are crawled according to the user published text crawling conditions set by the user, the accuracy of obtaining candidate user published texts is improved. Then, the candidate user published texts are merged, deduplicated and filtered to obtain the user published texts. Specifically, the user published text crawling conditions may include user identification, such as the mobile phone number bound by the user, and the publication time of the user published text. When the user published text crawling conditions include the user identification, the published texts related to the user identification are crawled.

[0080] Specifically, step S101 may include:

[0081] Crawl user candidate published texts on the preset website;

[0082] Merging and removing duplicates from the candidate published texts of the user to obtain a merged published text;

[0083] A preset text library is obtained, and the merged published text is filtered according to the preset text library to obtain the user published text.

[0084] The user's candidate published texts are crawled on a preset website, wherein the preset website can be a single website or a combination of multiple websites, which can be specifically set according to user needs and is not limited here.

[0085] First, start the data collector added in the server or device, where the data collector can be a data collector installed in the browser. The data collector is an information tool used to batch collect the content of web pages, forums, etc., and directly save them to the data or publish them to the network. It can automatically collect the original web pages according to the rules set by the user and obtain the required content in the format of the web pages. For example, the SQL Server 2008 performance data collector allows users to create a central database to store performance data; it contains three built-in data collection groups to collect and store data; in order to help identify and troubleshoot SQLServer performance-related issues, you can use its three built-in reports to view the collected and stored data. Then, according to the received user published text crawling conditions, the user published texts to be crawled are selected and collected to obtain candidate user published texts, thereby improving the accuracy of obtaining candidate user published texts. The candidate user published texts are then merged and deduplicated, that is, the candidate user published texts with completely identical content are deleted, thereby avoiding subsequent repeated analysis of the emotional attributes of the user published texts. Then, a preset text library is obtained, and the merged published texts are filtered according to the preset text library, wherein the preset text library may include marketing, event promotion, social sharing, and information dictionaries. The preset text library is established through relevant words of marketing, event promotion, social sharing, and information. That is, the marketing, advertising and other irrelevant content in the merged published texts can be filtered through marketing, event promotion, social sharing, and information dictionaries to obtain user published texts.

[0086] S102, selecting noun keywords in the text published by the user.

[0087] After obtaining the user's published text, noun keywords in the user's published text can be selected. In the specific implementation process, the user's impressions of the product or some text after reading, the product or book is generally a noun, such as the evaluation of the quality of the mobile phone, the speed of the express delivery, the writing quality of the book, etc. It can be seen that the objects of evaluation include mobile phones, express delivery, books, etc., which are all nouns. Therefore, in the process of selecting keywords, noun keywords can be selected. Specifically, the selection can be carried out through a preset keyword library. First, a preset noun keyword library is obtained; from the preset noun keyword library, the noun keywords in the user's published text can be matched.

[0088] Further, step S102 may include:

[0089] Get the preset noun keyword library;

[0090] Noun keywords in the text posted by the user are matched from the preset noun keyword library.

[0091] Obtain a preset noun keyword library, where the noun keyword library is constructed based on the pre-set subject to be identified. For example, to investigate the public opinion of the express delivery industry, the names of the express delivery companies need to be identified. List the names of the express delivery companies in a dictionary, and set their parts of speech to certain parts of speech that are more prominent in the sentence, such as stipulating that the parts of speech of "SF" and "EMS" are proper nouns or institutional nouns, thereby constructing a preset noun keyword library.

[0092] Or it can be constructed based on the historical evaluation subject. Specifically, the historical evaluation subject is obtained, and the obtained historical evaluation subject is subjected to text analysis. Specifically, the historical evaluation subject can be segmented by a full segmentation algorithm to obtain the segmentation of the historical evaluation subject; the segmentation of the historical evaluation subject is quantified by a neural network language model to obtain the word vector of the segmentation of the historical evaluation subject; the word vector of the segmentation of the historical evaluation subject is input into a preset database model, and the preset database model may include a general Euclidean distance calculation model to obtain the Euclidean distance between the word vector of the segmentation of the historical evaluation subject and the word vector in the preset database; the semantics of the historical evaluation subject is analyzed based on the Euclidean distance between the word vector of the segmentation of the historical evaluation subject and the word vector in the preset database, and the historical evaluation subject is classified according to the semantics of the historical evaluation subject, and the occurrence frequency of each type of word is calculated according to the historical evaluation subject after the word classification, and the words with an occurrence frequency greater than the preset value are set as keywords, and a noun keyword library is established according to the set keywords. Further, the updated subject to be evaluated can be further added to the noun keyword library.

[0093] The obtained user published text is then matched in a noun keyword library. When content consistent with the user published text is matched in the noun keyword library, it is determined that the user published text contains noun keywords, thereby realizing keyword extraction and obtaining noun keywords.

[0094] S103, obtaining the contribution of the noun keyword in the text published by the user, and taking the noun keyword with the highest contribution as the target object.

[0095] The contribution of noun keywords in the texts published by users can be obtained. Specifically, the TFIDF score of the noun keywords can be calculated through the TFIDF algorithm, and the contribution of the noun keywords can be obtained according to the TFIDF score. The noun keywords with the highest contribution can be taken as the target objects.

[0096] Specifically, step S103 includes:

[0097] Obtaining the TFIDF score of the noun keyword by using the TFIDF algorithm, and setting the TFIDF score as the contribution of the noun keyword in the text published by the user;

[0098] Sorting the contribution to obtain the noun keyword with the highest contribution;

[0099] The noun keywords with the highest contribution are selected as the target objects.

[0100] Specifically, the TFIDF score of the noun keyword is obtained through the TFIDF algorithm. Specifically, the frequency of occurrence of each noun keyword in the user's published text, that is, the TFIDF score, is calculated through the TFIDF algorithm, and the TFIDF score is set as the contribution of the noun keyword in the user's published text. The contribution is sorted, which can be specifically sorted in reverse order or in ascending order, etc., which is not limited here, so as to obtain the noun keyword with the highest contribution; the noun keyword with the highest contribution is taken as the target object.

[0101] S104, obtaining a trained neural network model, and using the trained neural network model to perform sentiment category recognition on the text posted by the user to obtain initial sentiment attributes of the text posted by the user, wherein the trained neural network model is obtained by training with training samples containing network terms.

[0102] The trained neural network model is obtained, and the emotional category of the text posted by the user is identified by the trained neural network model to obtain the initial emotional attribute of the text posted by the user, wherein the trained neural network model is obtained by training with training samples containing network terms. The trained neural network model is a model deployed in the text emotional classification device.

[0103] Therefore, before step S104, the specific training process may include:

[0104] Acquire a preset corpus, wherein the preset corpus includes network terms updated in real time;

[0105] Segmenting the text in the corpus using a segmentation model to obtain segmented words;

[0106] Training the segmented words to obtain word vectors;

[0107] Performing sentiment annotation on the text in the corpus;

[0108] Combining the text in the corpus after sentiment annotation with the word vector to obtain a training sample;

[0109] The neural network model is trained according to the training samples to obtain a trained neural network model.

[0110] A preset corpus is obtained, wherein the preset corpus includes real-time updated network terms and historical texts published by users, that is, a corpus constructed by real-time updated network terms and historical texts published by users, and the text in the corpus is segmented by a word segmentation model to obtain a segmented corpus, and the segmented words are trained, that is, word vectors are constructed to obtain word vectors, wherein the word segmentation model can be constructed based on the network context, and specifically can include Word2vec model, GloVe model, FastText model, etc., which are not limited here.

[0111] Specifically, word segmentation processing may include:

[0112] Segment the text in the corpus to obtain words that match the preset vocabulary to obtain initial words;

[0113] Obtaining the optimal path between the initial word and each word in the preset word library through the word segmentation model;

[0114] The words constituting the text in the corpus are determined according to the optimal path.

[0115] That is, firstly, the word segmentation model is used to segment the text in the corpus into all possible words that match the preset word library to obtain the initial words, and then the statistical language model is used to determine the optimal segmentation result. First, the term search is performed (generally stored in Trie), and all matching terms are found and expressed in the form of word lattices. Then, a path search is performed to find the optimal path based on the statistical language model (such as n-gram), that is, to find the distance between words, and the optimal segmentation result can be calculated to obtain the word segmentation result, that is, to obtain the words that make up the text in the corpus. Then, the segmented words are trained to obtain word vectors, and the text in the corpus is sentimentally annotated; the text in the corpus after sentiment annotation is combined with the word vectors to obtain training samples, and the neural network model is trained according to the training samples to obtain a trained neural network model.

[0116] S105: Acquire the emotional attribute corresponding to the target object according to the initial emotional attribute.

[0117] In this embodiment, the initial sentiment attribute is specifically combined with the target object to obtain the evaluation of the object for which the user publishes the text. For example, if the target object is A courier and the initial sentiment attribute is positive, the sentiment attribute of the user's published text can be obtained as a positive evaluation of A courier. This solves the problem that traditional sentiment classification is easily disturbed by other objects commented on in the sentence, and thus cannot judge the sentiment for a specific object.

[0118] Specifically, after obtaining the emotional attribute corresponding to the target object, the emotional attribute may be further modified, that is, after S105, the following steps are further included:

[0119] Get preset rules;

[0120] The emotional attribute corresponding to the target object is modified according to the preset rule to obtain the modified emotional attribute.

[0121] The preset rules are obtained, wherein the preset rules may include expression conformance, preset sentence patterns, etc. Then, the emotional attributes are modified according to the preset rules, thereby obtaining the modified emotional attributes.

[0122] Specifically, the step of “correcting the emotional attribute corresponding to the target object by using the preset rule to obtain the corrected emotional attribute” may include:

[0123] Obtaining a preset sentence pattern in the preset rule;

[0124] Matching the user published text with a preset sentence pattern;

[0125] If the preset sentence pattern is matched in the user published text, the evaluation object contained in the preset sentence pattern is compared with the target object;

[0126] If the evaluation object contained in the preset sentence pattern is consistent with the target object, and the emotional attribute corresponding to the target object is negative, the emotional attribute corresponding to the target object is automatically corrected to be positive.

[0127] Furthermore, when multiple evaluation objects appear, there may be a situation where object A is evaluated positively, while other objects are evaluated negatively. In order to avoid misjudgment, the sentiment attribute can be further corrected through a preset sentence. Specifically, when the preset rule is a preset sentence, such as "Now the express service is so bad, except for express A", when the preset sentence appears, it can be judged as a positive evaluation of express A, or when express A is better than express B, it can also be judged as a positive evaluation of express A, and a negative evaluation of B. Then the user's published text is matched with the preset sentence. If the preset sentence is matched in the user's published text, the evaluation object contained in the preset sentence is compared with the target object; if the evaluation object contained in the preset sentence is consistent with the target object, and the sentiment attribute corresponding to the target object is negative, the sentiment attribute corresponding to the target object is corrected to positive. If the evaluation object contained in the preset sentence is consistent with the target object, and the sentiment attribute corresponding to the target object is positive, there is no need to modify the sentiment attribute corresponding to the target object. If the evaluation object contained in the preset sentence pattern is inconsistent with the target object, there is no need to modify the emotional attribute corresponding to the target object.

[0128] Furthermore, the preset sentence pattern may also be a comparative sentence pattern, such as A is worse than B, A and B are worse than C, etc. In this case, "correcting the emotional attribute corresponding to the target object by the preset rule to obtain the corrected emotional attribute" may include:

[0129] Obtaining a preset sentence pattern in the preset rule;

[0130] Matching the user published text with a preset sentence pattern;

[0131] If the preset sentence pattern is matched in the user published text, the evaluation object contained in the preset sentence pattern is compared with the target object;

[0132] If the evaluation object included in the preset sentence pattern is consistent with the target object, and the emotional attribute corresponding to the target object is positive, the emotional attribute corresponding to the target object is corrected to negative.

[0133] When there are multiple evaluation objects, there may be a situation where object B is evaluated positively and other objects are evaluated negatively. Specifically, when the preset rule is a preset sentence pattern, such as "Express A service is much worse than Express B service", it can be judged as a negative evaluation of Express A, and a positive evaluation of object B, and then the user's published text is matched with the preset sentence pattern. If the preset sentence pattern is matched in the user's published text, the evaluation object contained in the preset sentence pattern is compared with the target object; if the evaluation object contained in the preset sentence pattern is consistent with the target object, and the emotional attribute corresponding to the target object is positive, the emotional attribute corresponding to the target object is corrected to negative. If the evaluation object contained in the preset sentence pattern is consistent with the target object, and the emotional attribute corresponding to the target object is negative, there is no need to modify the emotional attribute corresponding to the target object. If the evaluation object contained in the preset sentence pattern is inconsistent with the target object, there is no need to modify the emotional attribute corresponding to the target object.

[0134] Furthermore, when the preset rule is an emoticon, the emotional attribute can be further modified by the emoticon.

[0135] Specifically, the step of “correcting the emotional attribute corresponding to the target object by using the preset rule to obtain the corrected emotional attribute” may include:

[0136] Obtaining preset emoticons and emotional attributes corresponding to the emoticons;

[0137] Matching the user posted text with emoticons;

[0138] If the emoticon is matched in the text posted by the user, the emotional attribute corresponding to the emoticon is compared with the emotional attribute of the target object;

[0139] If the emotional attribute corresponding to the emoticon is consistent with the emotional attribute of the target object, no modification is required;

[0140] If the emotional attribute corresponding to the emoticon is inconsistent with the emotional attribute of the target object, the emotional attribute of the target object is modified according to the emotional attribute corresponding to the emoticon.

[0141] This embodiment obtains the user's published text; selects noun keywords in the user's published text; obtains the contribution of noun keywords in the user's published text, and uses the noun keyword with the highest contribution as the target object, that is, the target evaluation object, so as to obtain the target evaluation object in the user's published text. When the user's published text contains multiple evaluation objects, the accuracy of identifying the emotional attributes of the text containing multiple evaluated objects is improved by determining the target evaluation object; obtains the trained neural network model, and performs emotional category recognition on the user's published text through the trained neural network model to obtain the initial emotional attributes of the user's published text, wherein the trained neural network model is obtained by training with training samples containing network terms; because the trained neural network model is obtained by training with training samples containing network terms, when the user's published text contains network terms, the corresponding emotional attributes are accurately identified, and then the emotional attributes of the target object are obtained by combining the initial emotional attributes with the target object. Since the target object is combined and the neural network model obtained by training with the training samples containing network terms is used for recognition, the accuracy of identifying the emotional attributes of the text containing multiple evaluated objects and the text containing network terms is improved.

[0142] The text sentiment classification method described in the above embodiment will be further described in detail below. In this embodiment, a method for classifying the sentiment of a descriptive text is performed on a user's comment text on a product.

[0143] See also Figure 2 , Figure 2 Another flow chart of the text sentiment classification method provided in the embodiment of the present application.

[0144] S201, obtaining the text published by the user.

[0145] Specifically, in this embodiment, user published texts may include personal user experience and evaluation texts of commodities, or personal reading experience of certain texts, etc., which are not limited here. Specifically, user published texts may be obtained by data crawling. According to the user published text crawling conditions set by the user, the user published texts to be crawled are selected and collected to obtain candidate user published texts. Since the user published texts are crawled according to the user published text crawling conditions set by the user, the accuracy of obtaining candidate user published texts is improved. Then, the candidate user published texts are merged, deduplicated and filtered to obtain the user published texts. Specifically, the user published text crawling conditions may include user identification, such as the mobile phone number bound by the user, and the publication time of the user published text. When the user published text crawling conditions include the user identification, the published texts related to the user identification are crawled.

[0146] S202, selecting noun keywords in the text posted by the user.

[0147] After obtaining the user's published text, noun keywords in the user's published text can be selected. Specifically, the selection can be made through a preset keyword library. First, the preset noun keyword library is obtained, and then the obtained user's published text is matched in the noun keyword library. When content consistent with the user's published text is matched in the noun keyword library, it is determined that the user's published text contains noun keywords, thereby realizing keyword extraction and obtaining noun keywords.

[0148] S203, obtaining the contribution of noun keywords in the text published by the user, and taking the noun keyword with the highest contribution as the target object.

[0149] The contribution of noun keywords in the texts published by users can be obtained. Specifically, the TFIDF score of the noun keywords can be calculated through the TFIDF algorithm, and the contribution of the noun keywords can be obtained according to the TFIDF score. The noun keywords with the highest contribution can be taken as the target objects.

[0150] S204, obtaining a preset corpus.

[0151] S205, segmenting the text in the corpus using a segmentation model to obtain segmented words.

[0152] S206, training the segmented words to obtain word vectors.

[0153] Perform sentiment annotation on the text in the corpus.

[0154] S207, combining the text in the corpus after sentiment annotation with the word vector to obtain a training sample.

[0155] S208, training the neural network model according to the training samples to obtain a trained neural network model.

[0156] A preset corpus is obtained, wherein the preset corpus includes real-time updated network terms and historical texts published by users, the text in the corpus is segmented by a word segmentation model to obtain a segmented corpus, and the segmented words are trained, that is, word vectors are constructed to obtain word vectors, wherein the word segmentation model can be constructed based on the network context, and specifically can include Word2vec model, GloVe model, FastText model, etc., which are not limited here.

[0157] The word segmentation model is used to segment the text in the corpus into all possible words that match the preset vocabulary to obtain the initial words, and then the statistical language model is used to determine the optimal segmentation result. First, a term search is performed to find all matching terms and represent them in the form of a word grid. Then a path search is performed to find the optimal path based on the statistical language model, that is, to find the distance between words, and the optimal segmentation result can be calculated to obtain the word segmentation result, that is, to obtain the words that make up the text in the corpus, train the segmented words to obtain word vectors, and perform sentiment annotation on the text in the corpus; the text in the corpus after sentiment annotation is combined with the word vectors to obtain training samples, and the neural network model is trained according to the training samples to obtain a trained neural network model.

[0158] S209, obtaining a trained neural network model, and using the trained neural network model to perform sentiment category recognition on the text posted by the user to obtain initial sentiment attributes of the text posted by the user.

[0159] The trained neural network model is obtained, and the emotional category of the text posted by the user is identified by the trained neural network model to obtain the initial emotional attribute of the text posted by the user, wherein the trained neural network model is obtained by training with training samples containing network terms. The trained neural network model is a model deployed in the text emotional classification device.

[0160] S210, acquiring the emotional attribute corresponding to the target object according to the initial emotional attribute.

[0161] In this embodiment, the initial sentiment attribute is specifically combined with the target object to obtain the evaluation of the object for which the user publishes the text. For example, if the target object is A courier and the initial sentiment attribute is positive, the sentiment attribute of the user's published text can be obtained as a positive evaluation of A courier. This solves the problem that traditional sentiment classification is easily disturbed by other objects commented on in the sentence, and thus cannot judge the sentiment for a specific object.

[0162] S211, obtaining preset rules.

[0163] S212, modifying the emotional attribute corresponding to the target object according to a preset rule to obtain a modified emotional attribute.

[0164] The preset rules are obtained, wherein the preset rules may include expression conformance, preset sentence patterns, etc. Then, the emotional attributes are modified according to the preset rules, thereby obtaining the modified emotional attributes.

[0165] This embodiment obtains the user's published text; selects noun keywords in the user's published text; obtains the contribution of noun keywords in the user's published text, and uses the noun keyword with the highest contribution as the target object, that is, the target evaluation object, so as to obtain the target evaluation object in the user's published text. When the user's published text contains multiple evaluation objects, the accuracy of identifying the emotional attributes of the text containing multiple evaluated objects is improved by determining the target evaluation object; obtains the trained neural network model, and performs emotional category recognition on the user's published text through the trained neural network model to obtain the initial emotional attributes of the user's published text, wherein the trained neural network model is obtained by training with training samples containing network terms; because the trained neural network model is obtained by training with training samples containing network terms, when the user's published text contains network terms, the corresponding emotional attributes are accurately identified, and then the emotional attributes of the target object are obtained by combining the initial emotional attributes with the target object. Since the target object is combined and the neural network model obtained by training with the training samples containing network terms is used for recognition, the accuracy of identifying the emotional attributes of the text containing multiple evaluated objects and the text containing network terms is improved.

[0166] In order to better implement the text sentiment classification method provided in the embodiment of the present application, the embodiment of the present application also provides a text sentiment classification device based on the above. The meaning of the nouns is the same as that in the above text sentiment classification method, and the specific implementation details can refer to the description in the method embodiment.

[0167] See also Figure 3 , Figure 3 A structural schematic diagram of a text sentiment classification device provided in an embodiment of the present application, wherein the text sentiment classification device may include a first acquisition unit 301, a selection unit 302, a second acquisition unit 303, a third acquisition unit 303 and a fourth acquisition unit 305, etc.

[0168] Specifically, the text sentiment classification device includes:

[0169] The first acquisition unit 301 is used to acquire the text published by the user;

[0170] A selection unit 302 is used to select noun keywords in the text posted by the user;

[0171] The second acquisition unit 303 is used to acquire the contribution of the noun keyword in the text published by the user, and take the noun keyword with the highest contribution as the target object;

[0172] The third acquisition unit 304 is used to acquire a trained neural network model, and perform sentiment category recognition on the user-posted text by using the trained neural network model to obtain the initial sentiment attribute of the user-posted text, wherein the trained neural network model is obtained by training with training samples containing network terms;

[0173] The fourth acquisition unit 305 is used to acquire the emotional attribute corresponding to the target object according to the initial emotional attribute.

[0174] In some implementations, the first acquiring unit 301 includes:

[0175] A crawling subunit is used to crawl user candidate published texts through a preset website;

[0176] A merging subunit, used to merge and remove duplicates of the user's candidate published texts to obtain a merged published text;

[0177] The first acquisition subunit is used to acquire a preset text library, and filter the merged published text according to the preset text library to obtain the user published text.

[0178] In some implementations, the text sentiment classification device further includes:

[0179] A fifth acquisition unit, configured to acquire a preset corpus, wherein the preset corpus includes network terms updated in real time;

[0180] A word segmentation unit, used to segment the text in the corpus through a word segmentation model to obtain segmented words;

[0181] A first training unit is used to train the segmented words to obtain word vectors;

[0182] A sentiment annotation unit, used for performing sentiment annotation on the text in the corpus;

[0183] A combining unit, used for combining the text in the corpus after sentiment annotation with the word vector to obtain a training sample;

[0184] The second training unit is used to train the neural network model according to the training samples to obtain a trained neural network model.

[0185] In some implementations, the selection unit 302 includes:

[0186] The second acquisition subunit is used to acquire a preset noun keyword library;

[0187] The first matching subunit is used to match the noun keywords in the text posted by the user from the preset noun keyword library.

[0188] In some implementations, the second acquiring unit 303 includes:

[0189] A third acquisition subunit is used to acquire the TFIDF score of the noun keyword by using a TFIDF algorithm, and set the TFIDF score as the contribution of the noun keyword in the text published by the user;

[0190] The sorting subunit is used to sort the contribution to obtain the noun keyword with the highest contribution; and take the noun keyword with the highest contribution as the target object.

[0191] In some implementations, the text sentiment classification device further includes:

[0192] A sixth acquisition unit, used to acquire a preset rule;

[0193] The correction unit is used to correct the emotional attribute corresponding to the target object according to the preset rule to obtain the corrected emotional attribute.

[0194] In some embodiments, the correction unit comprises:

[0195] A fourth acquisition subunit, used to acquire a preset sentence pattern in the preset rule;

[0196] A second matching subunit, used for matching the user posted text with a preset sentence pattern;

[0197] A comparison subunit, configured to compare the evaluation object contained in the preset sentence pattern with the target object if the preset sentence pattern is matched in the text published by the user;

[0198] The correction subunit is used to correct the emotional attribute corresponding to the target object to be positive if the evaluation object contained in the preset sentence is consistent with the target object and the emotional attribute corresponding to the target object is negative.

[0199] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0200] Figure 4 The specific structural block diagram of the device provided by the embodiment of the present invention is shown, and the device can be used to implement the text sentiment classification method provided in the above embodiment. The device 400 can be a smart phone or a tablet computer.

[0201] like Figure 4As shown, the device 400 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more (only one is shown in the figure) computer-readable storage media, an input unit 130, a display unit 140, a transmission module 170, a processor 180 including one or more (only one is shown in the figure) processing cores, and a power supply 190. Those skilled in the art will understand that Figure 4 The structure of the device 400 shown in the figure does not constitute a limitation on the device 400, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0202] The RF circuit 110 is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices. The RF circuit 110 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity module (SIM) cards, memories, etc. The RF circuit 110 can communicate with various networks such as the Internet, corporate intranets, wireless networks, or communicate with other devices through wireless networks. The above-mentioned wireless networks may include cellular telephone networks, wireless local area networks, or metropolitan area networks. The above-mentioned wireless networks can use various communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (such as Institute of Electrical and Electronics Engineers standards IEEE 802.11a, IEEE 802.11b, IEEE802.11g and / or IEEE802.11n), Voice over Internet Protocol (VoIP), Worldwide Interoperability for Microwave Access (Wi-Max), other protocols for email, instant messaging and short messages, and any other suitable communication protocols, even those that have not yet been developed.

[0203] The memory 120 can be used to store software programs and modules, such as the program instructions / modules of the text sentiment classification method in the above embodiment. The processor 180 executes various functional applications and data processing by running the software programs and modules stored in the memory 120, that is, realizing the function of object volume calculation. The memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 120 may further include a memory remotely arranged relative to the processor 180, and these remote memories may be connected to the device 400 via a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0204] The input unit 130 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 130 may include a touch-sensitive surface 131 and other input devices 132. The touch-sensitive surface 131, also known as a touch display screen or a touch pad, can collect user touch operations on or near it (such as operations performed by users using fingers, styluses, or any other suitable objects or accessories on or near the touch-sensitive surface 131), and drive corresponding connection devices according to a pre-set program. Optionally, the touch-sensitive surface 131 may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 180, and can receive and execute commands sent by the processor 180. In addition, the touch-sensitive surface 131 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch-sensitive surface 131, the input unit 130 may further include other input devices 132. Specifically, other input devices 132 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc.

[0205] The display unit 140 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the device 400, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit 140 may include a display panel 141. Optionally, the display panel 141 may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 131 may cover the display panel 141. When the touch-sensitive surface 131 detects a touch operation on or near it, it is transmitted to the processor 180 to determine the type of touch event. Subsequently, the processor 180 provides a corresponding visual output on the display panel 141 according to the type of touch event. Although in Figure 4 In the embodiment, the touch-sensitive surface 131 and the display panel 141 are implemented as two independent components to realize the input and output functions. However, in some embodiments, the touch-sensitive surface 131 and the display panel 141 can be integrated to realize the input and output functions.

[0206] The device 400 can help users send and receive emails, browse web pages, and access streaming media through the transmission module 170 (such as a Wi-Fi module), and it provides users with wireless broadband Internet access. Figure 4 The transmission module 170 is shown, but it is understandable that it is not a necessary component of the device 400 and can be omitted as needed without changing the essence of the invention.

[0207] The processor 180 is the control center of the device 400. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 120, and calling data stored in the memory 120, it executes various functions of the device 400 and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 180 may include one or more processing cores; in some embodiments, the processor 180 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 180.

[0208] The device 400 also includes a power supply 190 (such as a battery) for supplying power to various components. In some embodiments, the power supply can be logically connected to the processor 180 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. The power supply 190 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0209] Specifically in this embodiment, the display unit 140 of the device 400 is a touch screen display, and the device 400 further includes a memory 120 and one or more programs, wherein the one or more programs are stored in the memory 120 and are configured to be executed by one or more processors 180. The one or more programs include steps for performing the following operations:

[0210] Get the text posted by the user;

[0211] Selecting noun keywords in the text posted by the user;

[0212] Obtaining the contribution of the noun keyword in the text published by the user, and taking the noun keyword with the highest contribution as the target object;

[0213] Obtaining a trained neural network model, and using the trained neural network model to perform sentiment category recognition on the text posted by the user to obtain the initial sentiment attribute of the text posted by the user, wherein the trained neural network model is obtained by training with training samples containing network terms;

[0214] The emotional attribute corresponding to the target object is acquired according to the initial emotional attribute.

[0215] In the above embodiments, the description of each embodiment has its own focus. For the part that is not described in detail in a certain embodiment, please refer to the detailed description of the text sentiment classification method above, and will not be repeated here.

[0216] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0217] To this end, an embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, which is loaded by a processor to execute the steps in any of the text sentiment classification methods provided in the embodiments of the present application. For example, the computer program may execute the following steps:

[0218] Get the text posted by the user;

[0219] Selecting noun keywords in the text posted by the user;

[0220] Obtaining the contribution of the noun keyword in the text published by the user, and taking the noun keyword with the highest contribution as the target object;

[0221] Obtaining a trained neural network model, and using the trained neural network model to perform sentiment category recognition on the text posted by the user to obtain the initial sentiment attribute of the text posted by the user, wherein the trained neural network model is obtained by training with training samples containing network terms;

[0222] The emotional attribute corresponding to the target object is acquired according to the initial emotional attribute.

[0223] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0224] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0225] Since the computer program stored in the storage medium can execute the steps in any text sentiment classification method provided in the embodiments of the present application, the beneficial effects that can be achieved by any text sentiment classification method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0226] The above is a detailed introduction to a text sentiment classification method, device, equipment and storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A text sentiment classification method, characterized in that: include: Get the text posted by the user; Selecting noun keywords in the text posted by the user; Obtaining the contribution of the noun keyword in the text published by the user, and taking the noun keyword with the highest contribution as the target object; Obtaining a trained neural network model, and using the trained neural network model to perform sentiment category recognition on the text posted by the user to obtain the initial sentiment attribute of the text posted by the user, wherein the trained neural network model is obtained by training with training samples containing network terms; Acquire the emotional attribute corresponding to the target object according to the initial emotional attribute; The selecting of noun keywords in the text posted by the user includes: Obtain a preset noun keyword library, wherein the noun keyword library is constructed based on a preset subject to be identified, or the historical evaluation subject is segmented to obtain the segmentation of the historical evaluation subject; the segmentation of the historical evaluation subject is quantified by a neural network language model to obtain the word vector of the segmentation of the historical evaluation subject; the word vector of the segmentation of the historical evaluation subject is input into a preset database model, the preset database model includes a general Euclidean distance calculation model, and the Euclidean distance between the word vector of the segmentation of the historical evaluation subject and the word vector in the preset database is obtained; the semantics of the historical evaluation subject is analyzed based on the Euclidean distance between the word vector of the segmentation of the historical evaluation subject and the word vector in the preset database, and the historical evaluation subject is classified according to the semantics of the historical evaluation subject, the occurrence frequency of each type of word is calculated according to the historical evaluation subject after the word classification, and the words with an occurrence frequency greater than the preset value are set as keywords, and a noun keyword library is established according to the set keywords; Matching the noun keywords in the text posted by the user from the noun keyword library; After acquiring the emotional attribute corresponding to the target object according to the initial emotional attribute, the method further includes: Get preset rules; Correcting the emotional attribute corresponding to the target object according to the preset rule to obtain a corrected emotional attribute; The step of modifying the emotional attribute corresponding to the target object by using the preset rule to obtain the modified emotional attribute includes: Obtaining a preset sentence pattern in the preset rule; Matching the user published text with a preset sentence pattern; If the preset sentence pattern is matched in the user published text, the evaluation object contained in the preset sentence pattern is compared with the target object; If the evaluation object included in the preset sentence pattern is consistent with the target object, and the emotional attribute corresponding to the target object is negative, the emotional attribute corresponding to the target object is corrected to be positive.

2. The text sentiment classification method according to claim 1, characterized in that: The obtaining of the text published by the user includes: Crawl user candidate published texts through preset websites; Merging and removing duplicates from the candidate published texts of the user to obtain a merged published text; A preset text library is obtained, and the merged published text is filtered according to the preset text library to obtain the user published text.

3. The text sentiment classification method according to claim 1, characterized in that: The step of obtaining the trained neural network model includes: Acquire a preset corpus, wherein the preset corpus includes network terms updated in real time; Segmenting the text in the corpus using a segmentation model to obtain segmented words; Training the segmented words to obtain word vectors; Performing sentiment annotation on the text in the corpus; Combining the text in the corpus after sentiment annotation with the word vector to obtain a training sample; The neural network model is trained according to the training samples to obtain a trained neural network model.

4. The text sentiment classification method according to claim 1, characterized in that: The step of obtaining the contribution of the noun keyword in the text published by the user and taking the noun keyword with the highest contribution as the target object includes: Obtaining the TFIDF score of the noun keyword by using the TFIDF algorithm, and setting the TFIDF score as the contribution of the noun keyword in the text published by the user; Sorting the contribution to obtain the noun keyword with the highest contribution; The noun keywords with the highest contribution are selected as the target objects.

5. A text sentiment classification device, characterized in that: include: A first acquisition unit, used to acquire text posted by a user; A selection unit, used for selecting noun keywords in the text posted by the user; A second acquisition unit is used to acquire the contribution of the noun keyword in the text published by the user, and take the noun keyword with the highest contribution as the target object; A third acquisition unit is used to acquire a trained neural network model, and perform sentiment category recognition on the user-posted text by using the trained neural network model to obtain an initial sentiment attribute of the user-posted text, wherein the trained neural network model is obtained by training with training samples containing network terms; A fourth acquisition unit, configured to acquire the emotional attribute corresponding to the target object according to the initial emotional attribute; The selection unit is further used for: Obtain a preset noun keyword library, wherein the noun keyword library is constructed based on a preset subject to be identified, or the historical evaluation subject is segmented to obtain the segmentation of the historical evaluation subject; the segmentation of the historical evaluation subject is quantified by a neural network language model to obtain the word vector of the segmentation of the historical evaluation subject; the word vector of the segmentation of the historical evaluation subject is input into a preset database model, the preset database model includes a general Euclidean distance calculation model, and the Euclidean distance between the word vector of the segmentation of the historical evaluation subject and the word vector in the preset database is obtained; the semantics of the historical evaluation subject is analyzed based on the Euclidean distance between the word vector of the segmentation of the historical evaluation subject and the word vector in the preset database, and the historical evaluation subject is classified according to the semantics of the historical evaluation subject, the occurrence frequency of each type of word is calculated according to the historical evaluation subject after the word classification, and the words with an occurrence frequency greater than the preset value are set as keywords, and a noun keyword library is established according to the set keywords; Matching the noun keywords in the text posted by the user from the noun keyword library; The text sentiment classification device further includes: A sixth acquisition unit, used to acquire a preset rule; A correction unit, used to correct the emotional attribute corresponding to the target object according to the preset rule to obtain a corrected emotional attribute; The correction unit comprises: An acquisition subunit, used for acquiring a preset sentence pattern in the preset rule; A matching subunit, used for matching the user posted text with a preset sentence pattern; A comparison subunit, configured to compare the evaluation object contained in the preset sentence pattern with the target object if the preset sentence pattern is matched in the text published by the user; The correction subunit is used to correct the emotional attribute corresponding to the target object to be positive if the evaluation object contained in the preset sentence is consistent with the target object and the emotional attribute corresponding to the target object is negative.

6. A device, characterized in that: The method comprises a processor and a memory, wherein the memory stores program code, and the processor executes the text sentiment classification method according to any one of claims 1 to 4 when calling the program code in the memory.

7. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, which is loaded by a processor to execute the text sentiment classification method according to any one of claims 1 to 4.