CN112445907A - Text emotion classification method, device and equipment and storage medium - Google Patents

Text emotion classification method, device and equipment and storage medium Download PDF

Info

Publication number
CN112445907A
CN112445907A CN201910823271.XA CN201910823271A CN112445907A CN 112445907 A CN112445907 A CN 112445907A CN 201910823271 A CN201910823271 A CN 201910823271A CN 112445907 A CN112445907 A CN 112445907A
Authority
CN
China
Prior art keywords
text
user
emotion
published
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910823271.XA
Other languages
Chinese (zh)
Inventor
夏继
姚小龙
王桥
韩晓玉
范思理
李灵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SF Technology Co Ltd
SF Tech Co Ltd
Original Assignee
SF Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SF Technology Co Ltd filed Critical SF Technology Co Ltd
Priority to CN201910823271.XA priority Critical patent/CN112445907A/en
Publication of CN112445907A publication Critical patent/CN112445907A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/335Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses a text emotion classification method, a device, equipment and a computer readable storage medium, wherein a user published text is obtained; selecting noun keywords in the published text of the user; acquiring the contribution degree of the noun keywords in the user published text, and taking the noun keywords with the highest contribution degree as target objects; acquiring a trained neural network model, and performing emotion type recognition on the user published text through the trained neural network model to obtain an initial emotion attribute of the user published text, wherein the trained neural network model is obtained by training a training sample containing network expressions; and acquiring the emotion attribute corresponding to the target object according to the initial emotion attribute. The method improves the accuracy of text emotion classification.

Description

Text emotion classification method, device and equipment and storage medium
Technical Field
The application relates to the technical field of data processing, in particular to a text emotion classification method, device, equipment and storage medium.
Background
With the rapid development of electronic commerce and the internet, browsing commodities on the internet, placing orders, paying and publishing personal feelings and evaluations of using commodities have become daily habits of people. The comment texts reflect the recognition, depreciation and dislike of the product in each dimension by the consumer, namely the evaluation attribute of the product by the user, such as the evaluation of the user on a certain mobile phone, namely 'good bar, gorgeous appearance, too fast battery power consumption and moderate photographing function', wherein the emotional tendency of the evaluation attribute 'appearance' is positive, the emotional tendency of the battery power consumption 'is negative, the emotional tendency of the photographing function' is neutral, and the positive direction, the negative direction and the neutral direction are the emotions of the evaluation attribute.
In the prior art, an emotion dictionary and syntactic analysis are generally adopted to dissect a text, judge positive and negative emotions of the text, or classify the text emotions by adopting a deep learning method. Dictionary and syntactic analysis are difficult to adapt to diversified network expressions, new network vocabularies and expressions need to be collected continuously, and the formulation of grammar rules is easy to consider; however, the deep learning method is difficult to identify which object a comment containing multiple evaluated objects is specifically directed to, and particularly, the judgment of commenting one object and derogating another object is easy to make mistakes, and the conventional text corpus cannot adapt to diversified network expressions of the social network, so that the emotion identification accuracy is low.
Disclosure of Invention
The embodiment of the application provides a text emotion classification method, device, equipment and storage medium, which can achieve the efficiency of obtaining emotion attributes and improve the accuracy of text emotion classification.
In a first aspect, an embodiment of the present application provides a text emotion classification method, including:
acquiring a published text of a user;
selecting noun keywords in the published text of the user;
acquiring the contribution degree of the noun keywords in the user published text, and taking the noun keywords with the highest contribution degree as target objects;
acquiring a trained neural network model, and performing emotion type recognition on the user published text through the trained neural network model to obtain an initial emotion attribute of the user published text, wherein the trained neural network model is obtained by training a training sample containing network expressions;
and acquiring the emotion attribute corresponding to the target object according to the initial emotion attribute.
In some embodiments, the obtaining the user publication text comprises:
crawling user candidate published texts through a preset website;
merging and de-duplicating the user candidate published texts to obtain merged published texts;
and acquiring a preset text library, and filtering the combined published text according to the preset text library to acquire the published text of the user.
In some embodiments, before the obtaining the trained neural network model, the method further includes:
acquiring a preset corpus, wherein the preset corpus comprises real-time updated network expressions;
segmenting words of the text in the corpus through a word segmentation model to obtain segmented words;
training the words after word segmentation to obtain word vectors;
performing emotion marking on the text in the corpus;
combining the text in the corpus after emotion marking with the word vectors to obtain a training sample;
and training the neural network model according to the training sample to obtain the trained neural network model.
In some embodiments, the selecting noun keywords in the user published text includes:
acquiring a preset noun keyword library;
and matching the noun key words in the user published text from the preset noun key word library.
In some embodiments, the obtaining the contribution degree of the noun class keyword in the user published text, and taking the noun class keyword with the highest contribution degree as a target object includes:
acquiring a TFIDF score of the first-name word class keyword through a TFIDF algorithm, and setting the TFIDF score as the contribution degree of the first-name word class keyword in the user published text;
sequencing the contribution degrees to obtain the first-name word class key words with the highest contribution degrees;
and taking the name word class key word with the highest contribution degree as a target object.
In some embodiments, after obtaining the emotion attribute of the evaluation subject corresponding to the user published text according to the initial emotion attribute and the target object, the method further includes:
acquiring a preset rule;
and modifying the emotion attribute corresponding to the target object through the preset rule to obtain the modified emotion attribute.
In some embodiments, the modifying, according to the preset rule, the emotion attribute corresponding to the target object to obtain a modified emotion attribute includes:
acquiring 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, comparing the evaluation object contained in the preset sentence pattern with the target object;
and if the evaluation object contained in the preset sentence pattern is consistent with the target object and the emotion attribute corresponding to the target object is negative, correcting the emotion attribute corresponding to the target object to be positive.
In a second aspect, an embodiment of the present application further provides a text emotion classification apparatus, including:
the first acquisition unit is used for acquiring a published text of a user;
the selecting unit is used for selecting noun keywords in the published text of the user;
a second obtaining unit, configured to obtain a contribution degree of the noun-class keyword in the user published text, and use the noun-class keyword with the highest contribution degree as a target object;
a third obtaining unit, configured to obtain a trained neural network model, perform emotion type recognition on the user published text through the trained neural network model, and obtain an initial emotion attribute of the user published text, where the trained neural network model is obtained by training a training sample containing network expressions;
and the fourth acquisition unit is used for acquiring the emotion attribute corresponding to the target object according to the initial emotion attribute.
In some embodiments, the first obtaining unit includes:
the crawling subunit is used for crawling user candidate published texts through a preset website;
a merging subunit, configured to merge and deduplicate the user candidate published text to obtain a merged published text;
and the first acquisition subunit is used for acquiring a preset text library, and filtering the combined published text according to the preset text library to acquire the published text of the user.
In some embodiments, the text emotion classification apparatus further includes:
a fifth obtaining unit, configured to obtain a preset corpus, where the preset corpus includes real-time updated network expressions;
the word segmentation unit is used for segmenting words of the text in the corpus through a word segmentation model to obtain words after word segmentation;
the first training unit is used for training the words after word segmentation to obtain word vectors;
the emotion marking unit is used for carrying out emotion marking on the text in the corpus;
a combining unit, configured to combine the text in the corpus after emotion annotation with the word vector to obtain a training sample
And the second training unit is used for training the neural network model by taking the word vector after emotion marking as a training sample to obtain the trained neural network model.
In some embodiments, the selecting unit includes:
the second acquisition subunit is used for acquiring a preset noun keyword library;
and the first matching subunit is used for matching the noun keywords in the user published text from the preset noun keyword library.
In some embodiments, the second obtaining unit includes:
a third obtaining subunit, configured to obtain a TFIDF score of the first-name word class keyword through a TFIDF algorithm, and set the TFIDF score as a contribution degree of the first-name word class keyword in the user published text;
the ordering subunit is used for ordering the contribution degrees to obtain the first-name word class key words with the highest contribution degrees; and taking the name word class key word with the highest contribution degree as a target object.
In some embodiments, the text emotion classification apparatus further includes:
a sixth obtaining unit, configured to obtain a preset rule;
and the correcting unit is used for correcting the emotion attribute corresponding to the target object through the preset rule to obtain the corrected emotion attribute.
In some embodiments, the correction unit includes:
a fourth obtaining subunit, configured to obtain a preset sentence pattern in the preset rule;
the second matching subunit is used for matching the user published text with a preset sentence pattern;
a comparison subunit, configured to compare, if the preset sentence pattern is matched in the user published text, the evaluation object included in the preset sentence pattern with the target object;
and the correcting subunit is used for correcting the emotion attribute corresponding to the target object to be in the positive direction if the evaluation object contained in the preset sentence pattern is consistent with the target object and the emotion attribute corresponding to the target object is in the negative direction.
In a third aspect, an embodiment of the present application further provides an apparatus, where the apparatus includes a processor and a memory, where the memory stores program codes, and the processor executes the text emotion classification method as described above when calling the program codes in the memory.
In a fourth aspect, the present application further provides a storage medium storing a computer program, which is loaded by a processor to execute the text emotion classification method described above.
The embodiment of the application obtains the published text of the user; selecting noun keywords in the published text of the user; the method comprises the steps of obtaining the contribution degree of noun keywords in a user published text, and taking the noun keywords with the highest contribution degree as target objects, namely target evaluation objects, so as to obtain the target evaluation objects in the user published text, and when the user published text contains a plurality of evaluation objects, improving the accuracy of identifying the emotional attributes of the text containing the plurality of evaluated objects by determining the target evaluation objects; acquiring a trained neural network model, and performing emotion type recognition on a user published text through the trained neural network model to obtain an initial emotion attribute of the user published text, wherein the trained neural network model is obtained by training a training sample containing network expressions; the trained neural network model is obtained by training a training sample containing the network expression, so that when a user published text contains the network expression, the corresponding emotional attribute is accurately identified, and then the initial emotional attribute and the target object are combined to obtain the emotional attribute of the target object. Due to the combination of the target object and the recognition of the neural network model obtained by training the training sample containing the network expression, the accuracy of recognizing the texts containing a plurality of evaluated objects and the emotional attributes containing the texts containing the network expression is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flowchart of a text emotion classification method provided in an embodiment of the present application;
FIG. 2 is another schematic flowchart of a text emotion classification method provided in an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a text emotion classification apparatus provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of an apparatus provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a flowchart illustrating a text emotion classification method according to an embodiment of the present application. The execution main body of the text emotion classification method can be the text emotion classification device provided by the embodiment of the application, or equipment such as a terminal or a server and the like integrated with the text emotion classification device, and the equipment can be a smart phone, a tablet computer, a palm computer, a notebook computer, a stationary computer, a server and the like. The text emotion classification method can comprise the following steps:
s101, acquiring a user publication text.
Specifically, in this embodiment, the user publication text may include a usage feeling and an evaluation text of the user published on the commodity, or a read-after feeling of the user published on some characters, and the like, which is not limited herein. The method specifically comprises the steps of acquiring a user published text in a data crawling mode, selecting the user published text needing to be crawled according to a user published text crawling condition set by a user, and acquiring the user published text to be a candidate, wherein the user published text to be a candidate is acquired. Specifically, the crawling condition for the published text of the user can include a user identifier, such as a mobile phone number bound by the user, and the publishing time of the published text of the user, and when the crawling condition for the published text of the user includes the user identifier, the published text related to the user identifier is crawled.
Specifically, step S101 may include:
crawling user candidate published texts on a preset website;
merging and de-duplicating the user candidate published texts to obtain merged published texts;
and acquiring a preset text library, and filtering the combined published text according to the preset text library to acquire the published text of the user.
Crawling user candidates for posting texts on a preset website, wherein the preset website can be a single website or a combination of multiple websites, and the preset website can be specifically set according to user requirements and is not limited herein.
Firstly, starting a data collector added in a Server or equipment, wherein the data collector can be a data collector installed in a browser, the data collector is an information tool used for collecting contents of web pages, forums and the like in batches, directly storing the contents into data or publishing the contents to a network, and can automatically collect original web pages according to rules set by a user to obtain the contents required by formatted web pages, for example, a SQL Server 2008 performance data collector can enable the user to create a central database to store performance data; three built-in data collection groups are included to collect and store data; to help identify and eliminate SQL Server performance related issues, the three reports it has built in can be used to view the collected stored data. Then according to the crawling condition of the received published texts of the users, selecting and collecting the published texts of the users to be crawled, namely obtaining the published texts of the candidate users, improving the accuracy of obtaining the published texts of the candidate users, then merging and de-duplicating the published texts of the candidate users, namely deleting the published texts of the candidate users with completely consistent contents, thereby avoiding subsequent repeated analysis of the emotional attributes of the published texts of the users, then obtaining a preset text library, and filtering the merged published texts according to the preset text library, wherein the preset text library can comprise marketing, activity promotion, social sharing and information dictionaries, and the preset text library is obtained by establishing related terms of marketing, activity promotion, social sharing and information, namely the marketing, activity promotion, social sharing and information dictionaries can be specifically used for marketing, social sharing and information dictionaries in the merged published texts, And filtering irrelevant contents such as advertisements and the like to obtain the published text of the user.
S102, selecting noun keywords in the user published text.
After obtaining the user published text, the noun keywords in the user published text can be selected, in the specific implementation process, the user feels the read-after-feel of the commodity or some characters, the commodity or the book is generally nouns, for example, the quality of the mobile phone is evaluated, the express speed is fast and slow, the writing quality of the book is evaluated, and it can be seen that the evaluation objects include the mobile phone, the express delivery, the book and the like, which are all nouns, so that in the process of selecting the keywords, the keywords of the noun can be selected. Specifically, the selection can be performed through a preset keyword library, and a preset noun keyword library is obtained firstly; matching the noun key words in the published text of the user from a preset noun key word library.
Further, step S102 may include:
acquiring a preset noun keyword library;
and matching the noun key words in the user published text from the preset noun key word library.
The method comprises the steps of obtaining a preset noun class keyword library, wherein the noun class keyword library is obtained by constructing a main body needing to be identified according to the preset condition, for example, public opinions of express industry are investigated, and then the name of each express company needs to be identified. The names of the express companies are listed in a dictionary, and the parts of speech of the express companies are set as parts of speech which are more prominent in sentences, for example, the parts of speech of 'shunfeng' and 'EMS' are specified as proper nouns or institutional nouns, so that a preset noun class keyword library is constructed.
Or the word segmentation method is obtained by constructing according to the historical evaluation main body, specifically, the historical evaluation main body is obtained, text analysis is carried out on the obtained historical evaluation main body, and specifically, word segmentation processing can be carried out on the historical evaluation main body through a full segmentation algorithm to obtain the word segmentation of the historical evaluation main body; carrying out quantitative processing on the participles of the historical evaluation subject through a neural network language model to obtain word vectors of the participles of the historical evaluation subject; inputting the word vector of the word segmentation of the historical evaluation subject into a preset database model, wherein the preset database model can comprise a general Euclidean distance calculation model, and obtaining the Euclidean distance between the word vector of the word segmentation of the historical evaluation subject and the word vector in the preset database; the method comprises the steps of analyzing the semantics of a history evaluation main body according to the Euclidean distance between word vectors of word segments of the history evaluation main body and word vectors in a preset database, carrying out word classification on the history evaluation main body according to the semantics of the history evaluation main body, calculating the occurrence frequency of various words according to the history evaluation main body after word classification, setting the words with the occurrence frequency larger than the preset value as keywords, and establishing a name word class keyword library according to the set keywords. Further, an updated subject to be evaluated can be further added to the noun class keyword library.
And then matching the obtained published text of the user in a noun class keyword library, and determining that the published text of the user contains the noun class keywords when the content consistent with the published text of the user is matched in the noun class keyword library, so that keyword extraction is realized, and the noun class keywords are obtained.
S103, acquiring the contribution degree of the noun keywords in the user published text, and taking the noun keywords with the highest contribution degree as target objects.
The method comprises the steps of obtaining the contribution degree of noun keywords in a user published text, specifically calculating the TFIDF score of the noun keywords through a TFIDF algorithm, obtaining the contribution degree of the noun keywords according to the TFIDF score, and taking the noun keywords with the highest contribution degree as target objects.
Specifically, step S103 includes:
acquiring a TFIDF score of the first-name word class keyword through a TFIDF algorithm, and setting the TFIDF score as the contribution degree of the first-name word class keyword in the user published text;
sequencing the contribution degrees to obtain the first-name word class key words with the highest contribution degrees;
and taking the name word class key word with the highest contribution degree as a target object.
Specifically, a TFIDF score of the noun key words is obtained through a TFIDF algorithm, the occurrence frequency of each noun key word in a user published text, namely the TFIDF score, is calculated through the TFIDF algorithm, the TFIDF score is set as the contribution degree of the noun key words in the user published text, the contribution degree is sorted, specifically, the contribution degree can be sorted in a reverse order or a forward order, and the like, and no limitation is made on the contribution degree, so that the noun key words with the highest contribution degree are obtained; and taking the name word class key word with the highest contribution degree as a target object.
And S104, acquiring a trained neural network model, and performing emotion type recognition on the user published text through the trained neural network model to obtain an initial emotion attribute of the user published text, wherein the trained neural network model is obtained through training of a training sample containing network expressions.
Acquiring a trained neural network model, and performing emotion type recognition on a user published text through the trained neural network model to obtain an initial emotion attribute of the user published text, wherein the trained neural network model is obtained through training a training sample containing network expressions. The trained neural network model is a model deployed in the text emotion classification device.
Therefore, before step S104, the specific training process may include:
acquiring a preset corpus, wherein the preset corpus comprises real-time updated network expressions;
segmenting words of the text in the corpus through a word segmentation model to obtain segmented words;
training the words after word segmentation to obtain word vectors;
performing emotion marking on the text in the corpus;
combining the text in the corpus after emotion marking with the word vectors to obtain a training sample;
and training the neural network model according to the training sample to obtain the trained neural network model.
The method comprises the steps of obtaining a preset corpus, wherein the preset corpus comprises real-time updated network expressions and historical texts published by a user, namely the corpus is constructed by the real-time updated network expressions and the historical texts published by the user, segmenting the texts in the corpus by a segmentation model to obtain the segmented corpus, and training the segmented words to construct Word vectors, so as to obtain the Word vectors, wherein the segmentation model can be constructed based on a network context, and specifically comprises a Word2vec model, a GloVe model, a FastText model and the like, and is not limited herein.
Specifically, the word segmentation process may include:
segmenting words matched with a preset word bank from the text in the corpus to obtain initial words;
acquiring an optimal path between the initial word and each word in a preset word bank through the word segmentation model;
determining words composing text in the corpus according to the optimal path.
The method comprises the steps of firstly segmenting a text in a corpus into all possible words matched with a preset lexicon through a word segmentation model to obtain an initial word, then determining an optimal segmentation result by using a statistical language model, firstly carrying out entry retrieval (generally using Trie for storage), finding all matched entries, expressing the entries in a word grid (word lattices) form, then carrying out path search, finding an optimal path based on the statistical language model (such as n-gram), namely finding the distance between the words, and calculating to obtain the optimal segmentation result, thereby obtaining the word segmentation result, namely obtaining the words forming the text in the corpus. Then training the words after word segmentation to obtain word vectors, and carrying out emotion labeling on the texts in the corpus; combining the text in the corpus after emotion marking with the word vectors to obtain training samples, and training the neural network model according to the training samples to obtain the trained neural network model.
And S105, acquiring the emotion attribute corresponding to the target object according to the initial emotion attribute.
In this embodiment, the initial emotion attribute is specifically combined with the target object, so that the evaluation made by the object for which the user publishes the text is obtained, and if the target object is assumed to be the a express delivery and the initial emotion attribute is the forward direction, the emotion attribute of the user publishing the text can be obtained as the forward evaluation of the a express delivery. The problem that the traditional emotion classification is easily interfered by other objects commented in sentences, so that the emotion of a certain specific object cannot be judged is solved.
Specifically, after obtaining the emotion attribute corresponding to the target object, the method may further modify the emotion attribute, that is, after S105, the method further includes:
acquiring a preset rule;
and modifying the emotion attribute corresponding to the target object through the preset rule to obtain the modified emotion attribute.
And acquiring a preset rule, wherein the preset rule can comprise expression conformity, a preset sentence pattern and the like. And then modifying the emotional attribute through a preset rule, thereby obtaining the modified emotional attribute.
Specifically, the step of "modifying the emotion attribute corresponding to the target object according to the preset rule to obtain a modified emotion attribute" may include:
acquiring 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, comparing the evaluation object contained in the preset sentence pattern with the target object;
and if the evaluation object contained in the preset sentence pattern is consistent with the target object and the emotion attribute corresponding to the target object is negative, automatically correcting the emotion attribute corresponding to the target object to be positive.
Further, when a plurality of evaluation objects appear, there may be a case where the object a is evaluated positively and the other objects are evaluated negatively, and in this case, in order to avoid misjudgment, the emotion attribute may be further corrected by a preset period. Specifically, when the preset rule is a preset sentence pattern, for example, "express service is good at present, except for a express, when the preset sentence pattern except for a appears, it may be determined that the evaluation is positive evaluation of the express a, or when the express a appears better than the express B, it may also be determined that the evaluation is positive evaluation of the express a, and the evaluation is negative evaluation of the express B, then the user publication text is matched with the preset sentence pattern, if the preset sentence pattern is matched in the user publication text, the evaluation object included in the preset sentence pattern is compared with the target object; and if the evaluation object contained in the preset sentence pattern is consistent with the target object and the emotion attribute corresponding to the target object is negative, correcting the emotion attribute corresponding to the target object to be positive, and if the evaluation object contained in the preset sentence pattern is consistent with the target object and the emotion attribute corresponding to the target object is positive, not modifying the emotion attribute corresponding to the target object. If the evaluation object contained in the preset sentence pattern is inconsistent with the target object, the emotion attribute corresponding to the target object does not need to be modified.
Further, the preset period may also be a comparative period, such as a difference between a and B, or a difference between a and B and C. At this time, "modifying the emotion attribute corresponding to the target object according to the preset rule to obtain the modified emotion attribute" may include:
acquiring 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, comparing the evaluation object contained in the preset sentence pattern with the target object;
and if the evaluation object contained in the preset sentence pattern is consistent with the target object and the emotion attribute corresponding to the target object is positive, correcting the emotion attribute corresponding to the target object to be negative.
When a plurality of evaluation objects appear, the B object may be evaluated positively, and other objects are evaluated negatively, specifically, when the preset rule is a preset sentence pattern, for example, "express a service is much worse than express B service", it may be determined that the B object is evaluated negatively for a express, the B object is evaluated positively, then the user publication text is matched with the preset sentence pattern, and if the preset sentence pattern is matched in the user publication text, the evaluation object included in the preset sentence pattern is compared with the target object; and if the evaluation object contained in the preset sentence pattern is consistent with the target object and the emotion attribute corresponding to the target object is in the positive direction, correcting the emotion attribute corresponding to the target object to be in the negative direction, and if the evaluation object contained in the preset sentence pattern is consistent with the target object and the emotion attribute corresponding to the target object is in the negative direction, not modifying the emotion attribute corresponding to the target object. If the evaluation object contained in the preset sentence pattern is inconsistent with the target object, the emotion attribute corresponding to the target object does not need to be modified.
Further, when the preset rule is an emoticon, the emotion attribute can be further modified through the emoticon.
Specifically, the step of "modifying the emotion attribute corresponding to the target object according to the preset rule to obtain a modified emotion attribute" may include:
acquiring a preset emoticon and an emotion attribute corresponding to the emoticon;
matching the user published text with emoticons;
if the emoticons are matched in the user published text, comparing the emotion attributes corresponding to the emoticons with the emotion attributes of the target object;
if the emotion attribute corresponding to the emoticon is consistent with the emotion attribute of the target object, no modification is needed;
and if the emotion attribute corresponding to the expression symbol is not consistent with the emotion attribute of the target object, modifying the emotion attribute of the target object according to the emotion attribute corresponding to the expression symbol.
The embodiment obtains the published text of the user; selecting noun keywords in the published text of the user; the method comprises the steps of obtaining the contribution degree of noun keywords in a user published text, and taking the noun keywords with the highest contribution degree as target objects, namely target evaluation objects, so as to obtain the target evaluation objects in the user published text, and when the user published text contains a plurality of evaluation objects, improving the accuracy of identifying the emotional attributes of the text containing the plurality of evaluated objects by determining the target evaluation objects; acquiring a trained neural network model, and performing emotion type recognition on a user published text through the trained neural network model to obtain an initial emotion attribute of the user published text, wherein the trained neural network model is obtained by training a training sample containing network expressions; the trained neural network model is obtained by training a training sample containing the network expression, so that when a user published text contains the network expression, the corresponding emotional attribute is accurately identified, and then the initial emotional attribute and the target object are combined to obtain the emotional attribute of the target object. Due to the combination of the target object and the recognition of the neural network model obtained by training the training sample containing the network expression, the accuracy of recognizing the texts containing a plurality of evaluated objects and the emotional attributes containing the texts containing the network expression is improved.
The text emotion classification method described in the above embodiments will be described in further detail below. In the embodiment, the text published by the user is used as the text sentiment classification method for the comment text of the commodity.
Referring to fig. 2, fig. 2 is a flowchart of a text emotion classification method according to an embodiment of the present application.
S201, acquiring a user publication text.
Specifically, in this embodiment, the user publication text may include a usage feeling and an evaluation text of the user published on the commodity, or a read-after feeling of the user published on some characters, and the like, which is not limited herein. The method specifically comprises the steps of acquiring a user published text in a data crawling mode, selecting the user published text needing to be crawled according to a user published text crawling condition set by a user, and acquiring the user published text to be a candidate, wherein the user published text to be a candidate is acquired. Specifically, the crawling condition for the published text of the user can include a user identifier, such as a mobile phone number bound by the user, and the publishing time of the published text of the user, and when the crawling condition for the published text of the user includes the user identifier, the published text related to the user identifier is crawled.
S202, selecting noun keywords in the user published text.
After the user published text is obtained, noun keywords in the user published text can be selected, specifically, the noun keywords can be selected through a preset keyword library, the preset noun keyword library is firstly obtained, then the obtained user published text is matched in the noun keyword library, and when content consistent with the user published text is matched in the noun keyword library, the fact that the user published text contains the noun keywords is determined, so that keyword extraction is achieved, and the noun keywords are obtained.
S203, acquiring the contribution degree of the noun keywords in the user published text, and taking the noun keywords with the highest contribution degree as target objects.
The method comprises the steps of obtaining the contribution degree of noun keywords in a user published text, specifically calculating the TFIDF score of the noun keywords through a TFIDF algorithm, obtaining the contribution degree of the noun keywords according to the TFIDF score, and taking the noun keywords with the highest contribution degree as target objects.
S204, a preset corpus is obtained.
S205, performing word segmentation on the text in the corpus through a word segmentation model to obtain words after word segmentation.
And S206, training the word after word segmentation to obtain a word vector.
And performing emotion annotation on the text in the corpus.
And S207, combining the text in the corpus after emotion marking with the word vector to obtain a training sample.
And S208, training the neural network model according to the training sample to obtain the trained neural network model.
The method comprises the steps of obtaining a preset corpus, wherein the preset corpus comprises real-time updated network expressions and historical texts published by a user, segmenting the texts in the corpus through a segmentation model to obtain a segmented corpus, training the segmented words to construct Word vectors, and accordingly obtaining the Word vectors, wherein the segmentation model can be constructed based on a network context, and specifically can comprise a Word2vec model, a GloVe model, a FastText model and the like, and is not limited herein.
Segmenting all possible words matched with a preset word bank from a text in a corpus by a word segmentation model to obtain initial words, determining an optimal segmentation result by using a statistical language model, firstly, performing entry retrieval, finding all matched entries, expressing the entries in a word grid form, then, performing path search, finding an optimal path based on the statistical language model, namely, finding the distance between words, calculating to obtain the optimal segmentation result, thereby obtaining a word segmentation result, namely, obtaining the words forming the text in the corpus, training the words after word segmentation to obtain word vectors, and performing emotion annotation on the text in the corpus; combining the text in the corpus after emotion marking with the word vectors to obtain training samples, and training the neural network model according to the training samples to obtain the trained neural network model.
S209, obtaining the trained neural network model, and performing emotion type recognition on the user published text through the trained neural network model to obtain the initial emotion attribute of the user published text.
Acquiring a trained neural network model, and performing emotion type recognition on a user published text through the trained neural network model to obtain an initial emotion attribute of the user published text, wherein the trained neural network model is obtained through training a training sample containing network expressions. The trained neural network model is a model deployed in the text emotion classification device.
And S210, acquiring the emotion attribute corresponding to the target object according to the initial emotion attribute.
In this embodiment, the initial emotion attribute is specifically combined with the target object, so that the evaluation made by the object for which the user publishes the text is obtained, and if the target object is assumed to be the a express delivery and the initial emotion attribute is the forward direction, the emotion attribute of the user publishing the text can be obtained as the forward evaluation of the a express delivery. The problem that the traditional emotion classification is easily interfered by other objects commented in sentences, so that the emotion of a certain specific object cannot be judged is solved.
And S211, acquiring a preset rule.
S212, modifying the emotion attribute corresponding to the target object through a preset rule to obtain the modified emotion attribute.
And acquiring a preset rule, wherein the preset rule can comprise expression conformity, a preset sentence pattern and the like. And then modifying the emotional attribute through a preset rule, thereby obtaining the modified emotional attribute.
The embodiment obtains the published text of the user; selecting noun keywords in the published text of the user; the method comprises the steps of obtaining the contribution degree of noun keywords in a user published text, and taking the noun keywords with the highest contribution degree as target objects, namely target evaluation objects, so as to obtain the target evaluation objects in the user published text, and when the user published text contains a plurality of evaluation objects, improving the accuracy of identifying the emotional attributes of the text containing the plurality of evaluated objects by determining the target evaluation objects; acquiring a trained neural network model, and performing emotion type recognition on a user published text through the trained neural network model to obtain an initial emotion attribute of the user published text, wherein the trained neural network model is obtained by training a training sample containing network expressions; the trained neural network model is obtained by training a training sample containing the network expression, so that when a user published text contains the network expression, the corresponding emotional attribute is accurately identified, and then the initial emotional attribute and the target object are combined to obtain the emotional attribute of the target object. Due to the combination of the target object and the recognition of the neural network model obtained by training the training sample containing the network expression, the accuracy of recognizing the texts containing a plurality of evaluated objects and the emotional attributes containing the texts containing the network expression is improved.
In order to better implement the text emotion classification method provided by the embodiment of the application, the embodiment of the application also provides a text emotion classification device based on the text emotion classification method. The meanings of the nouns are the same as those in the text emotion classification method, and specific implementation details can refer to the description in the method embodiment.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a text emotion classification apparatus according to an embodiment of the present application, where the text emotion classification apparatus may include a first obtaining unit 301, a selecting unit 302, a second obtaining unit 303, a third obtaining unit 303, a fourth obtaining unit 305, and the like.
Specifically, the text emotion classification device comprises:
a first obtaining unit 301, configured to obtain a user published text;
a selecting unit 302, configured to select a noun keyword in the user published text;
a second obtaining unit 303, configured to obtain a contribution degree of the noun class keyword in the user published text, and use the noun class keyword with the highest contribution degree as a target object;
a third obtaining unit 304, configured to obtain a trained neural network model, and perform emotion class identification on the user published text through the trained neural network model to obtain an initial emotion attribute of the user published text, where the trained neural network model is obtained by training a training sample containing network expressions;
a fourth obtaining unit 305, configured to obtain an emotion attribute corresponding to the target object according to the initial emotion attribute.
In some embodiments, the first obtaining unit 301 includes:
the crawling subunit is used for crawling user candidate published texts through a preset website;
a merging subunit, configured to merge and deduplicate the user candidate published text to obtain a merged published text;
and the first acquisition subunit is used for acquiring a preset text library, and filtering the combined published text according to the preset text library to acquire the published text of the user.
In some embodiments, the text emotion classification apparatus further includes:
a fifth obtaining unit, configured to obtain a preset corpus, where the preset corpus includes real-time updated network expressions;
the word segmentation unit is used for segmenting words of the text in the corpus through a word segmentation model to obtain words after word segmentation;
the first training unit is used for training the words after word segmentation to obtain word vectors;
the emotion marking unit is used for carrying out emotion marking on the text in the corpus;
the combining unit is used for combining the text in the corpus after emotion marking with the word vectors to obtain a training sample;
and the second training unit is used for training the neural network model according to the training sample to obtain the trained neural network model.
In some embodiments, the selecting unit 302 includes:
the second acquisition subunit is used for acquiring a preset noun keyword library;
and the first matching subunit is used for matching the noun keywords in the user published text from the preset noun keyword library.
In some embodiments, the second obtaining unit 303 includes:
a third obtaining subunit, configured to obtain a TFIDF score of the first-name word class keyword through a TFIDF algorithm, and set the TFIDF score as a contribution degree of the first-name word class keyword in the user published text;
the ordering subunit is used for ordering the contribution degrees to obtain the first-name word class key words with the highest contribution degrees; and taking the name word class key word with the highest contribution degree as a target object.
In some embodiments, the text emotion classification apparatus further includes:
a sixth obtaining unit, configured to obtain a preset rule;
and the correcting unit is used for correcting the emotion attribute corresponding to the target object through the preset rule to obtain the corrected emotion attribute.
In some embodiments, the correction unit includes:
a fourth obtaining subunit, configured to obtain a preset sentence pattern in the preset rule;
the second matching subunit is used for matching the user published text with a preset sentence pattern;
a comparison subunit, configured to compare, if the preset sentence pattern is matched in the user published text, the evaluation object included in the preset sentence pattern with the target object;
and the correcting subunit is used for correcting the emotion attribute corresponding to the target object to be in the positive direction if the evaluation object contained in the preset sentence pattern is consistent with the target object and the emotion attribute corresponding to the target object is in the negative direction.
The specific implementation of the above operations can refer to the foregoing embodiments, and will not be described herein.
Fig. 4 shows a specific structural block diagram of an apparatus provided in an embodiment of the present invention, which may be used to implement the text emotion classification method provided in the above embodiment. The device 400 may be a smartphone or tablet computer, etc.
As shown in fig. 4, the apparatus 400 may include RF (Radio Frequency) circuit 110, memory 120 including one or more computer-readable storage media (only one shown), input unit 130, display unit 140, transmission module 170, processor 180 including one or more processing cores (only one shown), and power supply 190. Those skilled in the art will appreciate that the configuration of the apparatus 400 shown in fig. 4 does not constitute a limitation of the apparatus 400 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the RF circuit 110 is used for receiving and transmitting electromagnetic waves, and performs interconversion between the electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices. The RF circuitry 110 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth. The RF circuitry 110 may communicate with various networks such as the internet, an intranet, a wireless network, or with other devices over a wireless network. The wireless network may comprise a cellular telephone network, a wireless local area network, or a metropolitan area network. The Wireless network may 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) (e.g., Institute of Electrical and Electronics Engineers (IEEE) standard IEEE802.11 a, IEEE802.11 b, IEEE802.11g, and/or IEEE802.11 n), Voice over Internet Protocol (VoIP), world wide mail Access (Microwave Access for micro), wimax-1, other suitable short message protocols, and any other suitable Protocol for instant messaging, and may even include those protocols that have not yet been developed.
The memory 120 may be used to store software programs and modules, such as program instructions/modules of the text emotion classification method in the above embodiment, and the processor 180 executes various functional applications and data processing, i.e., functions of calculating the volume of the object, by operating the software programs and modules stored in the memory 120. Memory 120 may include high speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 120 may further include memory located remotely from processor 180, which may be connected to device 400 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input unit 130 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 130 may include a touch-sensitive surface 131 as well as other input devices 132. The touch-sensitive surface 131, also referred to as a touch display screen or a touch pad, may collect touch operations by a user on or near the touch-sensitive surface 131 (e.g., operations by a user on or near the touch-sensitive surface 131 using a finger, a stylus, or any other suitable object or attachment), and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface 131 may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 180, and can receive and execute commands sent by the processor 180. Additionally, the touch-sensitive surface 131 may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface 131, the input unit 130 may also include other input devices 132. In particular, 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, and the like.
The display unit 140 may be used to display information input by or provided to a user and various graphical user interfaces of the device 400, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 140 may include a Display panel 141, and optionally, the Display panel 141 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface 131 may cover the display panel 141, and when a touch operation is detected on or near the touch-sensitive surface 131, the touch operation is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 provides a corresponding visual output on the display panel 141 according to the type of the touch event. Although in FIG. 4, touch-sensitive surface 131 and display panel 141 are shown as two separate components to implement input and output functions, in some embodiments, touch-sensitive surface 131 may be integrated with display panel 141 to implement input and output functions.
The device 400, via the transport module 170 (e.g., Wi-Fi module), may assist the user in emailing, browsing web pages, accessing streaming media, etc., which provides wireless broadband internet access to the user. Although fig. 4 shows the transmission module 170, it is understood that it does not belong to the essential constitution of the apparatus 400 and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 180 is the control center of the device 400, connects various parts of the entire handset using various interfaces and lines, and performs various functions of the device 400 and processes data by running or executing software programs and/or modules stored in the memory 120 and calling data stored in the memory 120, thereby performing overall monitoring of the handset. Optionally, processor 180 may include one or more processing cores; in some embodiments, the processor 180 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 180.
The device 400 also includes a power supply 190 (e.g., a battery) for powering the various components, which may be logically coupled to the processor 180 via a power management system in some embodiments to manage charging, discharging, and power consumption management functions via the power management system. The power supply 190 may also include any component including one or more of a dc or ac power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Specifically, in this embodiment, the display unit 140 of the apparatus 400 is a touch screen display, the apparatus 400 further includes a memory 120, and one or more programs, wherein the one or more programs are stored in the memory 120, and the one or more programs configured to be executed by the one or more processors 180 include steps for:
acquiring a published text of a user;
selecting noun keywords in the published text of the user;
acquiring the contribution degree of the noun keywords in the user published text, and taking the noun keywords with the highest contribution degree as target objects;
acquiring a trained neural network model, and performing emotion type recognition on the user published text through the trained neural network model to obtain an initial emotion attribute of the user published text, wherein the trained neural network model is obtained by training a training sample containing network expressions;
and acquiring the emotion attribute corresponding to the target object according to the initial emotion attribute.
In the above embodiments, the descriptions of the embodiments have respective emphasis, and parts that are not described in detail in a certain embodiment may refer to the above detailed description of the text emotion classification method, which is not described herein again.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the present application provides a storage medium, where a computer program is stored, where the program is loaded by a processor to execute the steps in any one of the text emotion classification methods provided in the present application. For example, the computer program may perform the steps of:
acquiring a published text of a user;
selecting noun keywords in the published text of the user;
acquiring the contribution degree of the noun keywords in the user published text, and taking the noun keywords with the highest contribution degree as target objects;
acquiring a trained neural network model, and performing emotion type recognition on the user published text through the trained neural network model to obtain an initial emotion attribute of the user published text, wherein the trained neural network model is obtained by training a training sample containing network expressions;
and acquiring the emotion attribute corresponding to the target object according to the initial emotion attribute.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the computer program stored in the storage medium can execute the steps in any text emotion classification method provided in the embodiments of the present application, the beneficial effects that can be achieved by any text emotion classification method provided in the embodiments of the present application can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The text emotion classification method, device, equipment and storage medium provided by the embodiment of the present application are introduced in detail, and a specific example is applied to explain the principle and the implementation manner of the present application, and the description of the embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A text emotion classification method is characterized by comprising the following steps:
acquiring a published text of a user;
selecting noun keywords in the published text of the user;
acquiring the contribution degree of the noun keywords in the user published text, and taking the noun keywords with the highest contribution degree as target objects;
acquiring a trained neural network model, and performing emotion type recognition on the user published text through the trained neural network model to obtain an initial emotion attribute of the user published text, wherein the trained neural network model is obtained by training a training sample containing network expressions;
and acquiring the emotion attribute corresponding to the target object according to the initial emotion attribute.
2. The method for emotion classification of text according to claim 1, wherein the obtaining of the user published text comprises:
crawling user candidate published texts through a preset website;
merging and de-duplicating the user candidate published texts to obtain merged published texts;
and acquiring a preset text library, and filtering the combined published text according to the preset text library to acquire the published text of the user.
3. The method for classifying emotion of text according to claim 1, wherein the obtaining of the trained neural network model comprises:
acquiring a preset corpus, wherein the preset corpus comprises real-time updated network expressions;
segmenting words of the text in the corpus through a word segmentation model to obtain segmented words;
training the words after word segmentation to obtain word vectors;
performing emotion marking on the text in the corpus;
combining the text in the corpus after emotion marking with the word vectors to obtain a training sample;
and training the neural network model according to the training sample to obtain the trained neural network model.
4. The method for classifying emotion of text according to claim 1, wherein said selecting noun keywords in said user published text comprises:
acquiring a preset noun keyword library;
and matching the noun key words in the user published text from the preset noun key word library.
5. The method for classifying emotion of text according to claim 1, wherein said obtaining the contribution degree of said noun class keyword in said user published text, and using the noun class keyword with the highest contribution degree as a target object comprises:
acquiring a TFIDF score of the first-name word class keyword through a TFIDF algorithm, and setting the TFIDF score as the contribution degree of the first-name word class keyword in the user published text;
sequencing the contribution degrees to obtain the first-name word class key words with the highest contribution degrees;
and taking the name word class key word with the highest contribution degree as a target object.
6. The method for classifying text emotion according to any one of claims 1 to 5, wherein after obtaining the emotion attribute of the subject of evaluation corresponding to the user published text according to the initial emotion attribute and the target object, the method further comprises:
acquiring a preset rule;
and modifying the emotion attribute corresponding to the target object through the preset rule to obtain the modified emotion attribute.
7. The text emotion classification method of claim 6, wherein the modifying the emotion attribute corresponding to the target object through the preset rule to obtain a modified emotion attribute comprises:
acquiring 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, comparing the evaluation object contained in the preset sentence pattern with the target object;
and if the evaluation object contained in the preset sentence pattern is consistent with the target object and the emotion attribute corresponding to the target object is negative, correcting the emotion attribute corresponding to the target object to be positive.
8. A text emotion classification device, comprising:
the first acquisition unit is used for acquiring a published text of a user;
the selecting unit is used for selecting noun keywords in the published text of the user;
a second obtaining unit, configured to obtain a contribution degree of the noun-class keyword in the user published text, and use the noun-class keyword with the highest contribution degree as a target object;
a third obtaining unit, configured to obtain a trained neural network model, perform emotion type recognition on the user published text through the trained neural network model, and obtain an initial emotion attribute of the user published text, where the trained neural network model is obtained by training a training sample containing network expressions;
and the fourth acquisition unit is used for acquiring the emotion attribute corresponding to the target object according to the initial emotion attribute.
9. An apparatus comprising a processor and a memory, the memory having program code stored therein, the processor when calling the program code in the memory performing the text emotion classification method as recited in any of claims 1 to 7.
10. 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 emotion classification method according to any of claims 1 to 7.
CN201910823271.XA 2019-09-02 2019-09-02 Text emotion classification method, device and equipment and storage medium Pending CN112445907A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910823271.XA CN112445907A (en) 2019-09-02 2019-09-02 Text emotion classification method, device and equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910823271.XA CN112445907A (en) 2019-09-02 2019-09-02 Text emotion classification method, device and equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112445907A true CN112445907A (en) 2021-03-05

Family

ID=74734301

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910823271.XA Pending CN112445907A (en) 2019-09-02 2019-09-02 Text emotion classification method, device and equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112445907A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101540683B1 (en) * 2014-10-20 2015-07-31 숭실대학교산학협력단 Method and server for classifying emotion polarity of words
CN106897439A (en) * 2017-02-28 2017-06-27 百度在线网络技术(北京)有限公司 The emotion identification method of text, device, server and storage medium
CN108038725A (en) * 2017-12-04 2018-05-15 中国计量大学 A kind of electric business Customer Satisfaction for Product analysis method based on machine learning
CN108647205A (en) * 2018-05-02 2018-10-12 深圳前海微众银行股份有限公司 Fine granularity sentiment analysis model building method, equipment and readable storage medium storing program for executing
CN108664469A (en) * 2018-05-07 2018-10-16 首都师范大学 A kind of emotional category determines method, apparatus and server
CN108804512A (en) * 2018-04-20 2018-11-13 平安科技(深圳)有限公司 Generating means, method and the computer readable storage medium of textual classification model
CN109522412A (en) * 2018-11-14 2019-03-26 北京神州泰岳软件股份有限公司 Text emotion analysis method, device and medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101540683B1 (en) * 2014-10-20 2015-07-31 숭실대학교산학협력단 Method and server for classifying emotion polarity of words
CN106897439A (en) * 2017-02-28 2017-06-27 百度在线网络技术(北京)有限公司 The emotion identification method of text, device, server and storage medium
CN108038725A (en) * 2017-12-04 2018-05-15 中国计量大学 A kind of electric business Customer Satisfaction for Product analysis method based on machine learning
CN108804512A (en) * 2018-04-20 2018-11-13 平安科技(深圳)有限公司 Generating means, method and the computer readable storage medium of textual classification model
CN108647205A (en) * 2018-05-02 2018-10-12 深圳前海微众银行股份有限公司 Fine granularity sentiment analysis model building method, equipment and readable storage medium storing program for executing
CN108664469A (en) * 2018-05-07 2018-10-16 首都师范大学 A kind of emotional category determines method, apparatus and server
CN109522412A (en) * 2018-11-14 2019-03-26 北京神州泰岳软件股份有限公司 Text emotion analysis method, device and medium

Similar Documents

Publication Publication Date Title
CN108804512B (en) Text classification model generation device and method and computer readable storage medium
CN108491433B (en) Chat response method, electronic device and storage medium
US11093854B2 (en) Emoji recommendation method and device thereof
US10878479B2 (en) Recommendation through conversational AI
WO2020125445A1 (en) Classification model training method, classification method, device and medium
US20170344224A1 (en) Suggesting emojis to users for insertion into text-based messages
CN107145571B (en) Searching method and device
CN107784092A (en) A kind of method, server and computer-readable medium for recommending hot word
CN106951494A (en) A kind of information recommendation method and device
CN106095845B (en) Text classification method and device
CN111177371B (en) Classification method and related device
WO2014031505A1 (en) Word detection and domain dictionary recommendation
KR20110115542A (en) Method for calculating semantic similarities between messages and conversations based on enhanced entity extraction
CN111144120A (en) Training sentence acquisition method and device, storage medium and electronic equipment
CN108228808B (en) Method and device for determining hot event, storage medium and electronic equipment
CN110069769A (en) Using label generating method, device and storage equipment
CN112650858A (en) Method and device for acquiring emergency assistance information, computer equipment and medium
CN112989235A (en) Knowledge base-based internal link construction method, device, equipment and storage medium
CN114416976A (en) Text labeling method and device and electronic equipment
CN113407738B (en) Similar text retrieval method and device, electronic equipment and storage medium
CN114116997A (en) Knowledge question answering method, knowledge question answering device, electronic equipment and storage medium
CN112307200A (en) Emotional attribute acquisition method, device, equipment and storage medium
CN112948573A (en) Text label extraction method, device, equipment and computer storage medium
CN113505293B (en) Information pushing method and device, electronic equipment and storage medium
CN113792230B (en) Service linking method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination