Nothing Special   »   [go: up one dir, main page]

CN118364106A - Text irony detection model and method based on expression package contrast contradictory features - Google Patents

Text irony detection model and method based on expression package contrast contradictory features Download PDF

Info

Publication number
CN118364106A
CN118364106A CN202410527311.7A CN202410527311A CN118364106A CN 118364106 A CN118364106 A CN 118364106A CN 202410527311 A CN202410527311 A CN 202410527311A CN 118364106 A CN118364106 A CN 118364106A
Authority
CN
China
Prior art keywords
features
text
feature
expression package
expression
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
CN202410527311.7A
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.)
Yto Express Co ltd
Original Assignee
Yto Express 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 Yto Express Co ltd filed Critical Yto Express Co ltd
Priority to CN202410527311.7A priority Critical patent/CN118364106A/en
Publication of CN118364106A publication Critical patent/CN118364106A/en
Pending legal-status Critical Current

Links

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/35Clustering; Classification
    • 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/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • G06N3/0442Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • G06N3/0455Auto-encoder networks; Encoder-decoder networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • 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)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Machine Translation (AREA)

Abstract

The invention discloses a text irony detection model and a method based on expression package comparison contradictory features, wherein after the text features and expression package semantic features in an expression package text are extracted, the comparison contradictory features between the expression package and the text are further extracted according to the text features and the expression package semantic features, and then the text features, the expression package emotion features and the comparison contradictory features between the emotion package and the text are fused for irony prediction, so that irony detection of the text containing the expression package is realized.

Description

Text irony detection model and method based on expression package contrast contradictory features
Technical Field
The invention relates to the field of text emotion analysis, in particular to a text irony detection model and a method based on expression package contrast contradictory characteristics.
Background
On the currently prevailing social media platform, irony's speech is widely used by people in its unique linguistic form and ironic connotation. Along with the dissatisfaction or criticism, irony is also used by netwife to disguise true emotions, increase humor and fun, create resonance and connection, etc. Therefore, the anti-mock detection has important value and significance for improving the online communication quality. This not only helps to better identify the potentially true emotion one is delivering, but learning contradictory feature expressions in irony helps the machine to better understand the emotion expressions implied in the text. In addition, the speech styles integrated into the anti-mock can further help to generate the text with humanization and be applied to scenes such as intelligent customer service.
Understanding and testing irony has long been a difficult task. The implicit nature of the anti-mock itself, i.e., usually depending on language cues such as irony, exaggeration and swaying, is that the text tagged with anti-mock is less than normal text, and thus there is a problem of data imbalance, which in turn affects the training and generalization performance of the model. Some of the existing irony detection models incorporate context, multimodal, speaker habit features, etc. auxiliary information, which is however difficult to obtain for short texts lacking emotion cues in spoken and face-to-face conversations, such as social media posts. Whereas performing irony tests on the text itself can easily result in erroneous determinations. Aiming at the plain text without the context, the method adopted at present mainly utilizes the characteristic of learning irony from the viewpoint of the emotion contradiction before and after capturing by using word pairs or half sentence pairs. However, short texts sometimes contain too little semantic information, and learning semantic features therein is difficult. Through observation of the existing irony corpus data set, most of the data are derived from social media, and most of comments in the social media have the characteristics of short and small, spoken language and high irony proportion, so the data are suitable data resources for carrying out irony detection tasks. From the irony corpus data, it is easy to find that the corpus contains more expression packages, such as emoji symbols, and the irony detection of the plain text is assisted by the expression packages, so that the important research direction is realized.
In recent years, many researchers have attempted irony detection using information from expression packs. For example, researchers use word and emoji embeddings simultaneously to train deep learning models with attention layers for irony detection, or irony detection with structural and emotional features of the tweets. Structural features include hash tags, links, emoji, references, etc., and also use the number of references, exclamation marks, capitalization, accents, links, and verbs, nouns, and adjectives, in combination with various emotion resources to capture emotion polarity and emotion. Also scholars have adopted an ensemble learning method, using LSTM to represent emoji and hash tags, and build CNN-LSTM to represent case, stop words, punctuation and emotion. These methods perform well in many ironic detection tasks, but still have some problems:
(1) Aiming at the expression package, two strategies are mostly adopted: the expression package is replaced by the text description of the expression package, and then the expression package is combined into the initial text for subsequent processing. Or directly vectorizing the expression package by using a word2 vec-like tool to obtain a corresponding word embedded representation. However, neither of these strategies adequately mines the expression package itself as information for image-driven and implicit content description text, ignoring the semantic information presented by the expression package pictures and descriptions.
(2) Failure to carefully analyze the feature of the expression package causes text irony, so that the effect of the expression package on the polarity reversal of the text cannot be fully exploited, and the contrast contradictory features with the text word-level clues are captured.
(3) Ignoring the feature that expression packages often contain the true emotion and mood of the speaker.
Disclosure of Invention
The following presents a simplified summary of one or more aspects in order to provide a basic understanding of such aspects. This summary is not an extensive overview of all contemplated aspects, and is intended to neither identify key or critical elements of all aspects nor delineate the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to the more detailed description that is presented later.
The invention aims to solve the problems and provides a text irony detection model and a method based on expression package comparison contradictory features, wherein after the text features and expression package semantic features in an expression package text are extracted, the comparison contradictory features between the expression package and the text are further extracted according to the text features and the expression package semantic features, and then the text features, the expression package emotion features and the comparison contradictory features between the emotion package and the text are fused for irony prediction, so that irony detection of the text containing the expression package is realized.
The technical scheme of the invention is as follows:
The invention provides a text irony detection model based on expression package contrast contradictory features, which comprises a text feature extraction module, an expression package semantic feature extraction module, a contrast contradictory feature capture module, an expression package emotion feature extraction module, a feature fusion module and a reverse mock feature prediction module; wherein,
The text feature extraction module is used for extracting text features of the text to be detected containing the expression package and transmitting the text features to the contrast contradiction feature capture module and the feature fusion module;
the expression package semantic feature extraction module is used for extracting expression package semantic features of an expression package contained in the text to be detected and transmitting the expression package semantic features to the contrast contradiction feature capture module;
the contrast contradiction feature capturing module is used for capturing contrast contradiction features between the expression package semantics and the text according to the text features and the expression package semantic features and transmitting the contrast contradiction features to the feature fusion module;
the expression package emotion feature extraction module is used for extracting expression package emotion features of an expression package contained in the text to be detected and transmitting the expression package emotion features to the feature fusion module;
the feature fusion module is used for fusing the text features, the expression package emotion features and the contrast contradiction features to obtain feature fusion vectors, and transmitting the feature fusion vectors to the irony feature prediction module;
the irony feature prediction module is used for performing irony prediction based on the feature fusion vector to obtain a irony detection result.
According to one embodiment of the text irony detection model based on the expression package comparison contradictory features, after an input text to be detected is obtained by the text feature extraction module, the input text to be detected is mapped into an input text sequence through the word embedding model, and then feature extraction is performed on each text vector in the input text sequence through the pre-training language model, so that the text features of the text to be detected are obtained; the text features comprise sentence-level features transmitted to the feature fusion module for feature fusion and word-level features transmitted to the contrast contradiction feature capture module for contrast contradiction feature extraction.
According to an embodiment of the text irony detection model based on expression package contrast contradictory features of the present invention, when the text feature extraction module extracts text features, embedding is adopted as a word embedding model, ALBERT is adopted as a pre-training language model, and sentence-level features and word-level features are extracted from an input text sequence s with a length of m by the following formula:
x=Embedding(s)={x1,x2,…,xi},i∈{1,2,…,m},xi∈Rm×d
Ts,Tw=ALBERT([CLS],x),Ts∈R1×d,Tw∈Rm×d
where d represents the word embedding space dimension,
X represents an input text sequence s with a length of m, the input text sequence being model mapped by a word embedding model Embedding,
X i represents the i-th text vector in the input text sequence,
T s represents sentence-level features extracted by the pre-trained language model ALBERT encoding,
T w represents word-level features extracted by the pre-trained language model ALBERT encoding.
According to one embodiment of the text irony detection model based on the expression package comparison contradictory features, after the text feature extraction module extracts sentence-level features, the extracted sentence-level features are transmitted to the feature fusion module for fusion so as to obtain feature fusion vectors; before the text feature extraction module transmits the sentence-level features, a multi-head attention mechanism is adopted to capture the attention weights of all words in the sentence-level features, so that the sentence-level features represented by the multi-head attention are obtained.
According to an embodiment of the text irony detection model based on expression package contrast contradictory features of the present invention, the text feature extraction module uses the sentence-level feature T s as the query (Q), the key (K) and the number (V) simultaneously when calculating the sentence-level feature of the multi-head attention representation, and then calculates the sentence-level feature MHA of the multi-head attention representation by the following formula:
MHA=MultiHeadAttention(Q,K,V)
=Concat(head1,head2,…,headh)·Wo
dq=dk=dv=d/h
where d represents the dimension of the input sentence-level feature T s,
H represents the number of heads of attention,
Q i、Ki、Vi represents the query, key, and value of the i-th vocabulary respectively,
D q、dk、dv represents the dimensions of the query, key and value respectively,
Head i represents the attention weight of the i-th vocabulary,
Each representing a learnable projection matrix parameter,
A learnable projection matrix parameter representing a multi-headed attention.
According to one embodiment of the text irony detection model based on expression package comparison contradictory features, after a text feature extraction module calculates to obtain sentence-level features MHA expressed by multiple attentions, the sentence-level features MHA expressed by the multiple attentions are mapped to the same dimension d w through a linear layer, so that encoded sentence-level features F t are obtained and transmitted to a feature fusion module for feature fusion; wherein the text feature extraction module encodes the sentence-level feature MHA by the following formula:
Wherein F t represents the encoded sentence-level feature,
Representing a parameter of a transformation matrix that can be learned,
B r represents a bias parameter.
According to one embodiment of the text irony detection model based on the expression package comparison contradiction feature, after the text feature extraction module extracts word-level features, a Bi-directional long-short-term memory network Bi-LSTM is adopted to further extract the text features of the word-level features, word-level features combined with context information are obtained, and then the word-level features combined with the context information are transmitted to the comparison contradiction feature capture module for capturing the comparison contradiction features between the expression package semantics and the text; the text feature extraction module extracts word-level features h of the combined context information through the following formula:
where T w represents word-level features extracted by the pre-trained language model ALBERT encoding,
Represents the learnable parameters set by the Bi-LSTM,
Representing the dimension of the hidden layer size.
According to the embodiment of the text irony detection model based on the expression package comparison contradictory features, when the expression package semantic feature extraction module extracts the expression package semantic features of the expression package contained in the text to be detected, the expression package additional information is mined by combining the pre-training language model and the convolutional neural network, and then the mined expression package additional information is fused, so that the corresponding expression package semantic features are obtained.
According to an embodiment of the text irony detection model based on the expression package contrast contradictory features of the present invention, the expression package additional information includes expression package description text and expression package presentation image; when the expression package semantic feature extraction module extracts the expression package semantic features, the expression package description text semantic features are extracted through a pre-training language model ALBERT, the expression package presentation image semantic features are extracted through a convolutional neural network CNN, and then the extracted description text semantic features and the presentation image semantic features are fused through a full-connection network layer to obtain corresponding expression package semantic features; the expression package semantic feature extraction module extracts expression package semantic features of the expression package through the following formula:
ei=tanh(Wi[ALBERT(Di);CNN(Ii)]+bi)
=tan h(Wi[di;ii]+bi)
Wherein e i represents the expression package semantic features of the ith expression package,
D i represents the expression pack description text of the ith expression pack,
I i denotes an expression pack presentation image of the I-th expression pack,
Tanh represents the linear transformation function of the fully connected network layer,
The matrix W i and the constant b i are both learnable parameters of the fully connected network layer.
According to an embodiment of the text irony detection model based on the expression package comparison contradictory features, the expression package semantic feature extraction module further comprises an attention layer for extracting comprehensive expression package semantic features of the text to be detected containing a plurality of expression packages, and transmitting the extracted comprehensive expression package semantic features as expression package semantic features to the comparison contradictory feature module for comparison contradictory feature extraction; when extracting comprehensive expression package semantic features integrating n expression package semantic features, the expression package semantic feature extraction module firstly sends the expression package semantic feature matrix [ e 1;e2;…;en ] into an attention layer for weight distribution to obtain a weight matrix [ alpha 12;…,αK ], then sequentially calculates the importance of each expression package based on the distributed weights, and sums up the importance, so that a final comprehensive expression package semantic feature v e is obtained, wherein the formula is as follows:
ve=∑αiei
wherein alpha i represents the weight of the semantic feature of the ith expression packet,
V w and W w represent a learnable transformation matrix parameter,
B w denotes a bias parameter.
According to one embodiment of the text irony detection model based on the expression package comparison contradiction features, after the word-level features and the expression package semantic features are acquired by the comparison contradiction feature acquisition module, a comparison attention mechanism is adopted to acquire the comparison contradiction features between the expression package semantic and the text; when the contrast contradictory feature capturing module captures contrast contradictory features, word-level features combined with context information are simultaneously used as keys (K) and values (V), expression package semantic features are used as queries (Q), and contrast attention between texts and expression packages is calculated through the following formula, namely a contrast vector r:
ao=softmax(1-ac)
Wherein d k denotes the dimension of the key (K),
A c represents the similarity between word-level features and expression package features,
A o represents the weight of the comparative attention,
Representing the dimensions of word-level text features.
According to one embodiment of the text irony detection model based on the expression package comparison contradiction feature, after the comparison contradiction feature capture module obtains a contradiction contrast vector r between the expression package semantics and the text, the contradiction contrast vector r is mapped to the same dimension d w through a linear layer, so that a coded contradiction contrast vector F r is obtained and is transmitted to the feature fusion module for feature fusion; wherein, the contradictory contrast feature capture module encodes the contradictory contrast vector r by the following formula:
Wherein, Representing a learnable transformation matrix parameter, b r represents a bias parameter.
According to the embodiment of the text irony detection model based on the expression package comparison contradictory features, when the expression package emotion feature extraction module extracts the expression package emotion features, an expression package warehouse based on emotion representation maps the expression packages in the text to be detected into an expression package embedded vector e w, and then a Bi-directional long-short-term memory network Bi-LSTM is adopted to perform feature extraction on the expression package embedded vector, so that expression package emotion features h e combined with context information are obtained; the expression pack emotion feature extraction module extracts expression pack emotion features h e according to the following formula:
Wherein, An embedded vector representing the ith expression pack E i mapped via the emotion representation-based expression pack repository,
Represents the learnable parameters set by the Bi-LSTM,
Representing the dimension size of the hidden layer unit.
According to one embodiment of the text irony detection model based on the expression package comparison contradictory features, after the expression package feature extraction module obtains the expression package emotion feature h e of the combined context information, the expression package emotion feature h e of the combined context information is mapped to the same dimension d w through a linear layer, so that the coded expression package feature F e is obtained and transmitted to the feature fusion module for feature fusion; the expression package feature extraction module encodes the expression package emotion feature h e according to the following formula:
Wherein, Representing a learnable transformation matrix parameter, b e represents a bias parameter.
According to one embodiment of the text irony detection model based on the expression package comparison contradictory features, after the feature fusion module obtains word-level features, expression package emotion features and comparison contradictory features between the expression package semantics and the text, a gating multi-mode unit is adopted to perform gating fusion on the obtained word-level features, expression package emotion features and the comparison contradictory features, so that feature fusion vectors are obtained.
According to an embodiment of the text irony detection model based on the expression package contrast contradictory features of the present invention, the gating multi-mode unit performs feature fusion on word-level features F t, expression package emotion features F e, and contrast contradictory features F r, which are obtained by:
Step C1: coding the input word-level characteristic F t, expression package emotion characteristic F e and contrast contradiction characteristic F r by adopting an activation function tanh to obtain a uniformly coded characteristic element h i; wherein, define F i∈{Ft,Fr,Fe }, encoded by the following formula:
Wherein, Representing a learnable projection matrix parameter.
Step C2: the method comprises the steps of splicing input word-level features F t, expression package emotion features F e and contrast contradictory features to obtain a feature splicing sequence F, filtering the feature splicing sequence F through a gating function sigma, and accordingly distributing weights alpha i to each feature element h i, wherein the formula is as follows:
F=Concat(Ft,Fe,Fr)
αi=σ(Wg′.F+bg′)
Wherein, Representing a learnable projection matrix parameter, b g′ representing a bias parameter.
Step C3: the importance of each feature element h i is calculated by combining the assigned weights, and fusion is carried out through a fusion function f, so that a final feature fusion vector Z fusion is obtained, and the formula is as follows:
Zfusion∈R1×3d
Wherein, Indicating the weighted importance of the ith feature element.
According to an embodiment of the text irony detection model based on expression package contrast contradictory features of the present invention, after the irony feature prediction module obtains the feature fusion vector, the feature fusion vector is input into a fully connected prediction layer for prediction classification, a prediction classification vector is obtained, and then a irony detection result is determined according to the output prediction classification vector, where the formula is as follows:
Wherein, A prediction classification vector representing the prediction layer output,
Z fusion represents the feature fusion vector of the input,
W f denotes a learnable projection matrix parameter,
B f denotes a bias parameter.
According to an embodiment of the text irony detection model based on the expression package comparison contradictory features, the irony feature prediction module can also independently utilize the expression package emotion features to conduct inverse mock prediction to obtain irony detection results; after the expression package feature extraction module obtains the coded expression package emotion feature F e, directly transmitting the expression package feature F e to the irony feature prediction module for irony prediction to obtain a irony detection resultThe calculation formula is as follows:
Wherein W m represents a learnable parameter and b represents a bias parameter.
The invention provides a text irony detection method based on expression package contrast contradictory features, which comprises the following steps:
step S1: acquiring a text to be detected containing an expression package, and extracting text characteristics of the text to be detected containing the expression package;
step S2: extracting expression package semantic features of expression packages contained in the text to be detected;
step S3: capturing contrast contradiction characteristics between the expression package semantics and the text according to the text characteristics and the expression package semantic characteristics;
Step S4: extracting emotion characteristics of an emotion package contained in a text to be detected;
step S5: fusing the text features, the expression package emotion features and the contrast contradiction features to obtain feature fusion vectors;
step S6: and carrying out irony prediction based on the feature fusion vector to obtain irony detection results.
According to an embodiment of the text irony detection method based on the expression package contrast contradictory features, after the text irony detection method based on the expression package features obtains an input text to be detected, mapping the input text to be detected into an input text sequence through a word embedding model, and then extracting features of each text vector in the input text sequence through a pre-training language model, so that the text features of the text to be detected are obtained; the text features comprise sentence-level features for feature fusion and word-level features for extraction of contrast contradictory features.
According to an embodiment of the text irony detection method based on expression package contrast contradictory features of the present invention, when the text feature is extracted by the text anti-mock detection method based on expression package features, embedding is adopted as a word embedding model, ALBERT is adopted as a pre-training language model, and sentence-level features and word-level features are extracted from an input text sequence s with a length of m by the following formula:
x=Embedding(s)={x1,x2,…,xi},i∈{1,2,…,m},xi∈Rm×d
Ts,Tw=ALBERT([CLS],x),Ts∈R1×d,Tw∈Rm×d
where d represents the word embedding space dimension,
X represents an input text sequence s with a length of m, the input text sequence being model mapped by a word embedding model Embedding,
X i represents the i-th text vector in the input text sequence,
T s represents sentence-level features extracted by the pre-trained language model ALBERT encoding,
T w represents word-level features extracted by the pre-trained language model ALBERT encoding.
According to an embodiment of the text irony detection method based on the expression package contrast contradiction characteristics, after the sentence-level characteristics are extracted by the text irony detection method based on the expression package characteristics, the attention weights of words in the sentence-level characteristics are captured by adopting a multi-head attention mechanism, so that the sentence-level characteristics of multi-head attention representation are obtained.
According to an embodiment of the text irony detection method based on expression package contrast contradictory features of the present invention, when calculating sentence-level features of a multi-head attention expression, the method for detecting text irony based on expression package features uses the sentence-level features T s as a query (Q), a key (K) and a value (V) at the same time, and then calculates the sentence-level features MHA of the multi-head attention expression by the following formula:
MHA=MultiHeadAttention(Q,K,V)
=Concat(head1,head2,…,headh)·Wo
dq=dk=dv=d/h
where d represents the dimension of the input sentence-level feature T s,
H represents the number of heads of attention,
Q i、Ki、Vi represents the query, key, and value of the i-th vocabulary respectively,
D q、dk、dv represents the dimensions of the query, key and value respectively,
Head i represents the attention weight of the i-th vocabulary,
Each representing a learnable projection matrix parameter,
A learnable projection matrix parameter representing a multi-headed attention.
According to an embodiment of the text irony detection method based on the expression package contrast contradictory features, after the sentence level feature MHA expressed by the multi-head attention is calculated by the text irony detection method based on the expression package features, the sentence level feature MHA expressed by the multi-head attention is mapped to the same dimension d w through a linear layer, so that the encoded sentence level feature F t is obtained, and subsequent feature fusion is performed; the text irony detection method based on the expression package features encodes sentence-level features MHA through the following formula:
Wherein F t represents the encoded sentence-level feature,
Representing a parameter of a transformation matrix that can be learned,
B r represents a bias parameter.
According to an embodiment of the text irony detection method based on the expression package contrast contradiction feature, after the word-level feature is extracted by the text irony detection method based on the expression package feature, the text feature of the word-level feature is further extracted by adopting a Bi-directional long-short-term memory network Bi-LSTM, so that the word-level feature combined with the context information is obtained and is used for capturing the contrast contradiction feature between the following expression package semantics and the text; the text irony detection method based on the expression package features extracts word level features h of the combined context information through the following formula:
where T w represents word-level features extracted by the pre-trained language model ALBERT encoding,
Represents the learnable parameters set by the Bi-LSTM,
Representing the dimension of the hidden layer size.
According to an embodiment of the text irony detection method based on the expression package contrast contradictory features, when the expression package semantic features of the expression package contained in the text to be detected are extracted, the expression package additional information is mined by combining the pre-training language model and the convolutional neural network, and then the mined expression package additional information is fused, so that the corresponding expression package semantic features are obtained.
According to an embodiment of the text irony detection method based on the expression package contrast contradictory features, the expression package additional information comprises expression package description text and expression package presentation images; when the text irony detection method based on the expression package features extracts the expression package semantic features, the pre-training language model ALBERT is used for extracting description text semantic features of the expression package description text, the convolutional neural network CNN is used for extracting presentation image semantic features of expression package presentation images, and then the extracted description text semantic features and the presentation image semantic features are fused through a full-connection network layer to obtain corresponding expression package semantic features; the text irony detection method based on the expression package features extracts expression package semantic features of the expression package through the following formula:
ei=tanh(Wi[ALBERT(Di);CNN(Ii)]+bi)
=tan h(Wi[di;ii]+bi)
Wherein e i represents the expression package semantic features of the ith expression package,
D i represents the expression pack description text of the ith expression pack,
I i denotes an expression pack presentation image of the I-th expression pack,
Tanh represents the linear transformation function of the fully connected network layer,
The matrix W i and the constant b i are both learnable parameters of the fully connected network layer.
According to an embodiment of the text irony detection method based on the expression package contrast contradictory features, the text irony detection method based on the expression package features is further provided with an attention layer for extracting comprehensive expression package semantic features of the text to be detected containing a plurality of expression packages and for carrying out contrast contradictory feature extraction; when extracting comprehensive expression package semantic features of comprehensive n expression package semantic features, the text irony detection method based on the expression package features firstly sends the expression package semantic feature matrix [ e 1;e2;…;en ] into an attention layer for weight distribution to obtain a weight matrix [ alpha 12;…,αK ], then calculates the importance of each expression package in sequence based on the distributed weights, and sums up the importance, so that the final comprehensive expression package semantic feature v e is obtained, and the formula is as follows:
ve=∑αiei
wherein alpha i represents the weight of the semantic feature of the ith expression packet,
V w and W w represent a learnable transformation matrix parameter,
B w denotes a bias parameter.
According to an embodiment of the text irony detection method based on the expression package contrast contradictory features of the present invention, the text irony detection method based on the expression package features of claim 20 is characterized in that after the word-level features and the expression package semantic features are obtained by the text irony detection method based on the expression package features, a contrast attention mechanism is adopted to capture the contrast contradictory features between the expression package semantics and the text; when the text irony detection method based on the expression package features captures contrast contradictory features, word level features combined with context information are used as keys (K) and numerical values (V) at the same time, expression package semantic features are used as queries (Q), and contrast attention between the text and the expression package is calculated through the following formula, namely a contradictory contrast vector r:
ao=softmax(1-ac)
Wherein d k denotes the dimension of the key (K),
A c represents the similarity between word-level features and expression package features,
A o represents the weight of the comparative attention,
Representing the dimensions of word-level text features.
According to an embodiment of the text irony detection method based on the expression package contrast contradictory features, after the expression package feature-based text irony detection method obtains a contradictory contrast vector r between the expression package semantics and the text, mapping the contradictory contrast vector r to the same dimension d w through a linear layer, thereby obtaining a coded contradictory contrast vector F r for subsequent feature fusion; the text irony detection method based on the expression package features encodes the contradictory contrast vector r through the following formula:
Wherein, Representing a learnable transformation matrix parameter, b r represents a bias parameter.
According to an embodiment of the text irony detection method based on the expression package contrast contradictory features, when the text irony detection method based on the expression package features extracts the emotion features of the expression package, an expression package warehouse based on emotion representation maps the expression package in the text to be detected into an expression package embedded vector e w, and then a Bi-directional long-short-term memory network Bi-LSTM is adopted to perform feature extraction on the expression package embedded vector, so that the expression package emotion features h e combined with context information are obtained; the text irony detection method based on the expression package features extracts expression package emotion features h e through the following formula:
Wherein, An embedded vector representing the ith expression pack E i mapped via the emotion representation-based expression pack repository,
Represents the learnable parameters set by the Bi-LSTM,
Representing the dimension size of the hidden layer unit.
According to an embodiment of the text irony detection method based on the expression package contrast contradictory features, after the expression package emotion feature h e of the combined context information is obtained by the text irony detection method based on the expression package features, the expression package emotion feature h e of the combined context information is mapped to the same dimension d w through a linear layer, so that an encoded expression package feature F e is obtained and used for carrying out subsequent feature fusion; the text irony detection method based on the expression package features encodes the expression package emotion features h e through the following formula:
Wherein, Representing a learnable transformation matrix parameter, b e represents a bias parameter.
According to an embodiment of the text irony detection method based on the expression package contrast contradictory features, after the word-level features, the expression package emotion features and the contrast contradictory features between the expression package semantics and the text are obtained by the expression package feature-based text irony detection method, gating fusion is performed on the obtained word-level features, expression package emotion features and the contrast contradictory features by using a gating multi-mode unit, so that feature fusion vectors are obtained.
According to an embodiment of the text irony detection method based on expression package contrast contradictory features of the present invention, the gating multi-modal unit performs feature fusion on word-level features F t, expression package emotion features F e, and contrast contradictory features F r, which are obtained by:
Step C1: coding the input word-level characteristic F t, expression package emotion characteristic F e and contrast contradiction characteristic F r by adopting an activation function tanh to obtain a uniformly coded characteristic element h i; wherein, define F i∈{Ft,Fr,Fe }, encoded by the following formula:
Wherein, Representing a learnable projection matrix parameter.
Step C2: the method comprises the steps of splicing input word-level features F t, expression package emotion features F e and contrast contradictory features to obtain a feature splicing sequence F, filtering the feature splicing sequence F through a gating function sigma, and accordingly distributing weights alpha i to each feature element h i, wherein the formula is as follows:
F=Concat(Ft,Fe,Fr)
αi=σ(Wg′.F+bg′)
Wherein, Representing a learnable projection matrix parameter, b g′ representing a bias parameter.
Step C3: the importance of each feature element h i is calculated by combining the assigned weights, and fusion is carried out through a fusion function f, so that a final feature fusion vector Z fusion is obtained, and the formula is as follows:
Zfusion∈R1×3d
Wherein, Indicating the weighted importance of the ith feature element.
According to an embodiment of the text irony detection method based on the expression package contrast contradictory features of the present invention, after the feature fusion vector is obtained by the text irony detection method based on the expression package features, the feature fusion vector is input into a fully connected prediction layer for prediction classification, a prediction classification vector is obtained, and then a irony detection result is determined according to the output prediction classification vector, where the formula is as follows:
Wherein, A prediction classification vector representing the prediction layer output,
Z fusion represents the feature fusion vector of the input,
W f denotes a learnable projection matrix parameter,
B f denotes a bias parameter.
According to an embodiment of the text irony detection method based on the expression pack contrast contradiction characteristics, the text irony detection method based on the expression pack characteristics can also be used for performing inverse mock prediction by independently using the expression pack emotion characteristics to obtain irony detection results; after the coded emotion feature F e of the emotion package is obtained by the text irony detection method based on the emotion package features, the emotion feature F e is directly input into a fully-connected prediction layer for irony prediction, and irony detection results are obtainedThe calculation formula is as follows:
Wherein W m represents a learnable parameter and b represents a bias parameter.
The invention also provides a computer readable medium storing computer program code which, when executed by a processor, implements a method as described above.
The invention also provides a deployment package deployment device supporting containerization, which comprises:
A memory for storing instructions executable by the processor; and
And a processor for executing the instructions to implement the method as described above.
Compared with the prior art, the invention has the following beneficial effects: according to irony detection of the text containing the expression package, after the text features and the expression package semantic features in the text containing the expression package are extracted, the contrast contradictory features between the expression package and the text are further extracted based on the text features and the expression package semantic features, and then irony prediction is performed by combining the text features, the expression package emotion features and the contrast contradictory features between the emotion package and the text, so that irony detection of the text containing the expression package is realized. Compared with the prior art, the method fully mines the information of the image presented by the expression package and the implicit content description text, fuses the semantic features of the description text of the mined expression package and the semantic features of the presentation image into the emotion features of the expression package, and applies the emotion features of the expression package to the final irony prediction, so that the condition that the semantic information displayed by the expression package picture and the description text is omitted is avoided. Meanwhile, the method carefully analyzes the characteristics of the text irony caused by the expression package, fully digs the influence of the expression package on the polarity inversion of the text, captures the contrast contradictory characteristics of the expression package and the word-level clues of the text by utilizing the word-level characteristics of the text and the semantic characteristics of the expression package, and further improves the prediction accuracy of the text irony. In addition, the invention considers the characteristic that the expression package often contains the true emotion and mood of a speaker, adopts a multi-task feature learning strategy, and sets a task of learning the semantic features of the expression package besides the task of learning the text features, the emotion features of the expression package and the contrast contradictory features between the emotion package and the text, so that the anti-mock prediction can be directly carried out according to the emotion features of the expression package, and more choices are provided for the text irony prediction.
Drawings
The above features and advantages of the present invention will be better understood after reading the detailed description of embodiments of the present disclosure in conjunction with the following drawings. In the drawings, the components are not necessarily to scale and components having similar related features or characteristics may have the same or similar reference numerals.
FIG. 1 is a block diagram illustrating one embodiment of a text irony detection model based on the expression-package-versus-contradiction features of the present invention.
FIG. 2 is a data flow diagram illustrating an embodiment of text irony detection of the present invention.
Fig. 3 is a data flow diagram illustrating one embodiment of the present invention for expression package semantic feature extraction.
Fig. 4is a flow chart illustrating steps of one embodiment of the present invention for gating fusion using a gated multi-mode unit GMU.
Fig. 5 is a data flow diagram illustrating one embodiment of the present invention employing a gated multi-modal unit GMU for gating fusion.
FIG. 6 is a flow chart illustrating one embodiment of a text irony detection method based on the expression-package-versus-contradiction feature of the present invention.
Detailed Description
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are used in the description of the embodiments will be briefly described below. It is apparent that the drawings in the following description are only some examples or embodiments of the present application, and it is apparent to those of ordinary skill in the art that the present application may be applied to other similar situations according to the drawings without inventive effort. Unless otherwise apparent from the context of the language or otherwise specified, like reference numerals in the figures refer to like structures or operations.
As used in the specification and in the claims, the terms "a," "an," "the," and/or "the" are not specific to a singular, but may include a plurality, unless the context clearly dictates otherwise. In general, the terms "comprises" and "comprising" merely indicate that the steps and elements are explicitly identified, and they do not constitute an exclusive list, as other steps or elements may be included in a method or apparatus.
The relative arrangement of the components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present application unless it is specifically stated otherwise. Meanwhile, it should be understood that the sizes of the respective parts shown in the drawings are not drawn in actual scale for convenience of description. Techniques, methods, and apparatus known to one of ordinary skill in the relevant art may not be discussed in detail, but should be considered part of the specification where appropriate. In all examples shown and discussed herein, any specific values should be construed as merely illustrative, and not a limitation. Thus, other examples of the exemplary embodiments may have different values. It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further discussion thereof is necessary in subsequent figures.
In describing embodiments of the present invention in detail, the cross-sectional view of the device structure is not partially exaggerated to a general scale for convenience of explanation, and the schematic drawings are only examples and should not limit the scope of the present invention herein. In addition, the three-dimensional dimensions of length, width and depth should be included in actual fabrication.
In the description of the present application, it should be understood that the azimuth or positional relationships indicated by the azimuth terms such as "front, rear, upper, lower, left, right", "lateral, vertical, horizontal", and "top, bottom", etc., are generally based on the azimuth or positional relationships shown in the drawings, merely to facilitate description of the present application and simplify the description, and these azimuth terms do not indicate and imply that the apparatus or elements referred to must have a specific azimuth or be constructed and operated in a specific azimuth, and thus should not be construed as limiting the scope of protection of the present application; the orientation word "inner and outer" refers to inner and outer relative to the contour of the respective component itself.
For ease of description, spatially relative terms such as "under", "below", "beneath", "above", "upper" and the like may be used herein to describe one element or feature's relationship to another element or feature as illustrated in the figures. It will be understood that these spatially relative terms are intended to encompass other orientations of the device in use or operation in addition to the orientation depicted in the figures. For example, if the device in the figures is turned over, elements described as "below" or "beneath" other elements or features would then be oriented "above" the other elements or features. Thus, the exemplary words "below" and "beneath" can encompass both an orientation of above and below. The device may have other orientations (rotated 90 degrees or in other orientations) and the spatially relative descriptors used herein interpreted accordingly. Furthermore, it will be understood that when a layer is referred to as being "between" two layers, it can be the only layer between the two layers, or one or more intervening layers may also be present.
In the context of the present application, a structure described as a first feature being "on" a second feature may include embodiments where the first and second features are formed in direct contact, as well as embodiments where additional features are formed between the first and second features, such that the first and second features may not be in direct contact.
It will be understood that when an element is referred to as being "on," "connected to," "coupled to," or "contacting" another element, it can be directly on, connected or coupled to, or contacting the other element or intervening elements may be present. In contrast, when an element is referred to as being "directly on," "directly connected to," "directly coupled to," or "directly contacting" another element, there are no intervening elements present. Likewise, when a first element is referred to as being "electrically contacted" or "electrically coupled" to a second element, there are electrical paths between the first element and the second element that allow current to flow. The electrical path may include a capacitor, a coupled inductor, and/or other components that allow current to flow even without direct contact between conductive components.
In addition, the terms "first", "second", etc. are used to define the components, and are only for convenience of distinguishing the corresponding components, and the terms have no special meaning unless otherwise stated, and therefore should not be construed as limiting the scope of the present application. Furthermore, although terms used in the present application are selected from publicly known and commonly used terms, some terms mentioned in the present specification may be selected by the applicant at his or her discretion, the detailed meanings of which are described in relevant parts of the description herein. Furthermore, it is required that the present application is understood, not simply by the actual terms used but by the meaning of each term lying within.
An embodiment of a text irony detection model based on expression-package-contrast contradictory features (hereinafter sometimes simply referred to as text irony detection model) is disclosed herein, and fig. 1 is a schematic diagram showing an embodiment of a text irony detection model based on expression-package-contrast contradictory features according to the present invention. As shown in fig. 1, in this embodiment, the text irony detection model includes a text feature extraction module, an expression package semantic feature extraction module, a contrast contradictory feature capture module, an expression package emotion feature extraction module, a feature fusion module, and an inverse mock feature prediction module. The text feature extraction module is used for extracting text features of the text to be detected containing the expression package and transmitting the text features to the contrast contradiction feature capture module and the feature fusion module. The expression package semantic feature extraction module is used for extracting expression package semantic features of an expression package contained in the text to be detected and transmitting the expression package semantic features to the contrast contradiction feature capture module. The contrast contradiction feature capturing module is used for capturing contrast contradiction features between the expression package semantics and the text according to the text features and the expression package semantic features, and transmitting the contrast contradiction features to the feature fusion module. The expression package emotion feature extraction module is used for extracting expression package emotion features of an expression package contained in the text to be detected and transmitting the expression package emotion features to the feature fusion module. The feature fusion module is used for fusing text features, expression package emotion features and contrast contradiction features to obtain feature fusion vectors, and transmitting the feature fusion vectors to the irony feature prediction module irony feature prediction module which is used for performing irony prediction based on the feature fusion vectors to obtain irony detection results.
Specifically, in this embodiment, when the text feature extraction module performs text feature extraction, firstly, an input text to be detected is mapped into an input text sequence through a word embedding model, and then feature extraction is performed on each text vector in the input text sequence through a pre-training language model, so as to obtain text features of the text to be detected. The text features comprise sentence-level features transmitted to the feature fusion module for feature fusion and word-level features transmitted to the contrast contradiction feature capture module for contrast contradiction feature extraction.
In one implementation, the text feature extraction module uses Embedding as a word embedding model and ALBERT as a pre-trained language model for text features. FIG. 2 is a data flow diagram illustrating an embodiment of text irony detection of the present invention. As shown in fig. 2, the text to be detected is set to include a plurality of emoji expression packages, and for an input text sequence s with a length of m, the text sequence s is mapped into a sequence x through a word embedding model Embedding, namely:
x=Embedding(s)={x1,x2,…,xi},i∈{1,2,…,m},xi∈Rm×d
where d represents the word embedding space dimension and x i represents the i-th text vector in the input text sequence. After each element in the input text sequence is mapped into a word embedding vector through the word embedding model Embedding, the word embedding vector is encoded through the pre-training language model ALBERT, so that text feature extraction is realized. Let T s denote sentence-level features extracted by the pre-trained language model ALBERT code, T w denote word-level features extracted by the pre-trained language model ALBERT code, the coding formula being as follows:
Ts,Tw=ALBERT([CLS],x)
As can be seen from the above equation, ALBERT inserts a CLS flag at the front end of the input word-embedded vector when encoding, and the output vector T s∈R1×d corresponding to the symbol represents sentence-level features, which include semantic information of the entire text. And T w∈Rm×d represents word-level features for subsequent contrast contradictory feature extraction.
In addition, in this embodiment, considering that self-attention can highlight more important features and relationships in text, in order to better capture inter-dependent features and extract more abundant semantic information from the context representation, attention weights of words in the sentence-level features are captured through a multi-head attention mechanism based on a transducer structure before the extracted sentence-level features are transmitted to a feature fusion module for fusion, so as to obtain the sentence-level features of the multi-head attention representation.
Specifically, in the present embodiment, the text feature extraction module sets the sentence-level feature T s as the query (Q), the key (K), and the number (V) at the same time when calculating the sentence-level feature of the multi-head attention expression, and then calculates the sentence-level feature MHA of the multi-head attention expression by the following formula:
MHA=MultiHeadAttention(Q,K,V)
=Concat(head1,head2,…,headh)·Wo
dq=dk=dv=d/h
Where d represents the dimension of the input sentence-level feature T s and h represents the number of attentiveness heads, i.e. the number of times the scaled dot product attention is applied. Q i、Ki、Vi represents the query, key, and value of the i-th vocabulary, d q、dk、dv represents the dimensions of the query, key, and value, respectively, head i represents the attention weight of the i-th vocabulary, Each representing a learnable projection matrix parameter,A learnable projection matrix parameter representing a multi-headed attention.
Finally, in order to facilitate further calculation of the subsequent gating fusion, the sentence-level features MHA represented by the multiple attentions are mapped to the same dimension d w through a linear layer, so as to obtain the encoded sentence-level features F t, and then the encoded sentence-level features F t are transmitted to a feature fusion module for feature fusion. Wherein the text feature extraction module encodes the sentence-level feature MHA by the following formula:
Wherein F t represents the encoded sentence-level feature, Representing a learnable transformation matrix parameter, b r represents a bias parameter.
In this embodiment, for the word-level feature extracted by the text feature extraction module, in order to better capture the context information, the Bi-directional long-short-term memory network Bi-LSTM is used to further extract the text feature of the word-level feature, so as to obtain the word-level feature of the combined context information, and then the word-level feature of the combined context information is transmitted to the contrast contradiction feature capture module for capturing the contrast contradiction feature between the expression package semantics and the text. The text feature extraction module extracts word-level features h of the combined context information through the following formula:
where T w represents word-level features extracted by the pre-trained language model ALBERT encoding, Represents the learnable parameters set by the Bi-LSTM,Representing the dimension of the hidden layer size.
In this embodiment, when the contrast contradictory feature capturing module extracts and captures contrast contradictory features between the expression package semantics and the text, the word-level features of the context information need to be combined, and expression package semantics features need to be combined. When the expression package semantic feature extraction module extracts the expression package semantic features of the expression package contained in the text to be detected, the expression package additional information needs to be mined by combining the pre-training language model and the convolutional neural network, and then the mined expression package additional information is fused, so that the corresponding expression package semantic features are obtained.
Specifically, the expression package additional information includes expression package description text and expression package presentation images. When the expression package semantic feature extraction module extracts the expression package semantic features, the expression package description text semantic features are required to be extracted through the pre-training language model ALBERT, the expression package presentation image semantic features are extracted through the convolutional neural network CNN, and then the extracted description text semantic features and the presentation image semantic features are fused through a full-connection network layer, so that the corresponding expression package semantic features are obtained.
Fig. 3 is a data flow diagram illustrating one embodiment of the present invention for expression package semantic feature extraction. As shown in fig. 3, n emoji expression packages are included in the input text sequence, and the included emoji set is set to be represented as { { { D 1,I1},{D2,I2}…,{Dn,In }, where D i represents the expression package description text of the ith emoji, and I i represents the expression package presentation image of the ith emoji. The sentence-level features are adopted to represent the expression package description text of emoji in consideration of the fact that the whole information is more comprehensive than the local information. Then, for each pair { D i,Ii }, a training language model ALBERT is adopted to extract the description text semantic features of the expression package description text D i, the presentation image semantic features of the expression package presentation image I i are extracted through a convolutional neural network CNN, and are fused, so that the corresponding expression package semantic features e i are obtained, and the extraction formula is as follows:
ei=tanh(Wi[ALBERT(Di);CNN(Ii)]+bi)
=tan h(Wi[di;ii]+bi)
Where tanh represents the linear transformation function of the fully connected network layer, the matrix W i and the constant b i are both learnable parameters of the fully connected network layer.
The expression package semantic feature extraction module further comprises an attention layer, wherein the attention layer is used for extracting comprehensive expression package semantic features of texts to be detected containing a plurality of expression packages, and transmitting the extracted comprehensive expression package semantic features serving as expression package semantic features to the contrast contradiction feature module for contrast contradiction feature extraction. The method comprises the steps of obtaining a corresponding expression package semantic feature matrix [ e 1;e2;…;en ] according to the formula aiming at an emoji set contained in an input text sequence, and sending the expression package semantic feature matrix into an attention layer for weight distribution to obtain a weight matrix [ alpha 12;…,αK ]. The weight matrix represents the importance of each emoji in the sentence, then the importance of each expression package is sequentially calculated based on the assigned weights, and summation is carried out, so that the final comprehensive expression package semantic feature v e is obtained, and the formula is as follows:
ve=∑αiei
Wherein, α i represents the weight of the semantic feature of the ith expression packet, V w and W w respectively represent a leachable transformation matrix parameter, and b w represents a bias parameter. Through the step, richer semantic information carried by each emoji in the text to be detected can be captured, and expression package semantic features capable of reflecting the overall meaning and importance of all emoji in the sentence are obtained.
In this embodiment, after the word-level feature and the expression package semantic feature are obtained by the contrast contradiction feature capturing module, in order to better capture the contrast contradiction feature of the emoji expression package and the text word-level clues, according to the different polarities of the emoji and the text vocabulary, a contrast attention mechanism is adopted to capture the contradiction or irrelevant part between the expression package semantic and the text. Among them, the contrast attention mechanism is converted from the self-attention mechanism used in the transducer, whose key is to map the query (Q) to a key (K) -value (X) pair:
Specifically, in this embodiment, when the contrast contradictory feature capturing module captures contrast contradictory features, word-level features of the joint context information are used as keys (K) and values (V) at the same time, expression package semantic features are used as queries (Q), and contrast attention between text and expression package, namely, a contradictory contrast vector r, is calculated by the following formula:
ao=softmax(1-ac)
where d k represents the dimension of the key (K), i.e., d, a c represents the similarity between word-level features and expression package features, a o represents the weight of contrast attention, since h represents word-level text features, and t represents text, then Representing a set of word-level text features. Unlike the conventional contrast attention weight a c that mainly captures the relevant portions of Q and K, the contrast attention weight a o in this embodiment mainly focuses on the contrast contradictory or irrelevant portions thereof. Thus finally calculatedAnd the contradiction contrast vector between the text and the emoji expression package is represented and used for representing the inconsistency between the text and the emoji expression package, and the dimension of the contradiction contrast vector is consistent with the dimension of the encoded word-level vector. Through a contrast attention mechanism, the text can be effectively compared with semantic features of the emoji expression package, and the machine can learn contradictory features better.
Consistent with the sentence-level feature F t, in order to facilitate further calculation of the subsequent gating fusion, the contradictory contrast vector r is mapped to the same dimension d w through a linear layer, so as to obtain the encoded contradictory contrast vector F r, and the encoded contradictory contrast vector F r is transmitted to a feature fusion module for feature fusion. Wherein, the contradictory contrast feature capture module encodes the contradictory contrast vector r by the following formula:
Wherein, Representing a learnable transformation matrix parameter, b r represents a bias parameter.
In this embodiment, the emotion feature of the expression packet is also required to be combined when final feature fusion is performed. When the expression pack emotion feature extraction module extracts the emotion feature of the expression pack, in order to more fully utilize emotion information contained in the emoji expression pack, an emoji embedded representation is obtained by means of an open-source emojinal warehouse. Different from the mainstream extraction emoji embedding method, the emojinal warehouse is an emotion expression packet warehouse based on emotion expression, and the emotion packet in the text to be detected is mapped into an emotion packet embedding vector e w through the warehouse, so that emotion clues contained in the emotion packet embedding vector can be focused more.
Wherein E i represents the ith emoji expression package,The embedded vector of the ith expression pack E i mapped through the emotion representation-based expression pack warehouse is represented. Then, in order to better capture the context information of the emoji expression package in the sequence, the feature extraction is carried out on the expression package embedded vector by adopting a Bi-directional long-short-term memory network Bi-LSTM, and the following formula is adopted:
Wherein h e represents the emotion characteristics of the expression packet extracted by the Bi-directional long-short-term memory network Bi-LSTM, Represents the learnable parameters set by the Bi-LSTM,Representing the dimension size of the hidden layer unit.
Finally, in order to facilitate further calculation of subsequent gate control fusion, the expression package emotion characteristics h e of the combined context information are mapped to the same dimension d w through a linear layer, so that the coded expression package characteristics F e are obtained and transmitted to a characteristic fusion module for characteristic fusion. The expression package feature extraction module encodes the expression package emotion feature h e according to the following formula:
Wherein, Representing a learnable transformation matrix parameter, b e represents a bias parameter.
In this embodiment, after the feature fusion module obtains word-level features, expression package emotion features, and contrast contradictory features between expression package semantics and text, the feature fusion module adopts the gating multi-mode unit GMU to perform gating fusion on the obtained word-level features, expression package emotion features, and contrast contradictory features, thereby obtaining a feature fusion vector. The gating multi-mode unit GMU is generally applied to dynamically adjusting feature fusion, and further optimizes and weights the fused features by learning the importance of different features in the fusion process. That is, the gated multimodal unit GMU can adaptively learn the weights of each input feature, thereby enhancing the modeling ability of the model for interactions between different features.
Fig. 4 is a flow chart illustrating steps of an embodiment of the present invention for gating fusion with a gated multi-mode unit GMU, and fig. 5 is a data flow diagram illustrating an embodiment of the present invention for gating fusion with a gated multi-mode unit GMU. Referring to fig. 4 and 5, the following is a detailed description of the steps of gate fusion using the gate multi-mode unit GMU:
Step C1: and coding the input word-level characteristic F t, expression package emotion characteristic F e and contrast contradiction characteristic F r by adopting an activation function tanh to obtain a uniformly coded characteristic element h i. Wherein, define F i∈{Ft,Fr,Fe }, encoded by the following formula:
Wherein, Representing a learnable projection matrix parameter. By this step, each feature element of the input is encoded for subsequent weighting calculation.
Step C2: the method comprises the steps of splicing input word-level features F t, expression package emotion features F e and contrast contradictory features to obtain a feature splicing sequence F, filtering the feature splicing sequence F through a gating function sigma, and accordingly distributing weights alpha i to each feature element h i, wherein the formula is as follows:
F=Concat(Ft,Fe,Fr)
αi=σ(Wg′.F+bg′)
Wherein, Representing a learnable projection matrix parameter, b g′ representing a bias parameter. By this step, a weight is adaptively assigned to each element, whereby the importance of each input feature element can be calculated.
Step C3: the importance of each feature element h i is calculated by combining the assigned weights, and fusion is carried out through a fusion function f, so that a final feature fusion vector Z fusion is obtained, and the formula is as follows:
Zfusion∈R1×3d
Wherein, Indicating the weighted importance of the ith feature element.
In this embodiment, after the feature fusion vector Zfusion is obtained through the above steps, the feature fusion vector is input to a fully connected prediction layer for prediction classification, so as to obtain a prediction classification vector, and then a irony detection result is determined according to the output prediction classification vector, where the formula is as follows:
Wherein, Representing the prediction classification vector output by the prediction layer, Z fusion representing the feature fusion vector input, W f representing a learnable projection matrix parameter, and b f representing a bias parameter.
In addition, in this embodiment, considering that the emoji expression package often includes the real emotion and mood characteristics of the speaker, the irony feature prediction module may perform irony detection according to the feature fusion vector, and may also directly perform inverse mock prediction by using the emoji expression package. Specifically, after the expression package feature extraction module obtains the coded expression package emotion feature F e, the expression package feature F e is directly transmitted to the irony feature prediction module to perform irony prediction, and irony detection results are obtainedThe calculation formula is as follows:
Wherein W m represents a learnable parameter and b represents a bias parameter.
Because irony the feature prediction module adopts a multi-task feature learning strategy, two tasks are set to perform feature learning. One task is used for learning and integrating word-level features, emotion features of the expression package and contrast contradictory features between the semantic and text of the expression package, and the other task is used for directly learning the emotion features of the emoji expression package. Thus, its training loss consists of two parts, calculated as follows:
Where loss e represents the loss of predictive classification using only emoji expression package emotion features, and loss fusion represents the loss of predictive classification using fused feature vectors.
The present disclosure also discloses an embodiment of a text irony detection method based on expression-package-comparison contradictory features (hereinafter sometimes referred to as text irony detection method), and fig. 6 is a flowchart illustrating an embodiment of a text irony detection method based on expression-package-comparison contradictory features according to the present invention. Referring to fig. 6, the following is a detailed description of each step of the text irony detection method based on the expression package contrast contradictory features.
Step S1: and acquiring the text to be detected containing the expression package, and extracting text characteristics of the text to be detected containing the expression package.
In this embodiment, when extracting text features, firstly, an input text to be detected is mapped into an input text sequence through a word embedding model, and then feature extraction is performed on each text vector in the input text sequence through a pre-training language model, so as to obtain text features of the text to be detected. The text features comprise sentence-level features for feature fusion and word-level features transmitted to the extraction of contrast contradictory features.
In one embodiment, text features are performed using Embedding as a word embedding model and ALBERT as a pre-trained language model. FIG. 2 is a data flow diagram illustrating an embodiment of text irony detection of the present invention. As shown in fig. 2, the text to be detected is set to include a plurality of emoji expression packages, and for an input text sequence s with a length of m, the text sequence s is mapped into a sequence x through a word embedding model Embedding, namely:
x=Embedding(s)={x1,x2,…,xi},i∈{1,2,…,m},xi∈Rm×d
where d represents the word embedding space dimension and x i represents the i-th text vector in the input text sequence. After each element in the input text sequence is mapped into a word embedding vector through the word embedding model Embedding, the word embedding vector is encoded through the pre-training language model ALBERT, so that text feature extraction is realized. Let T s denote sentence-level features extracted by the pre-trained language model ALBERT code, T w denote word-level features extracted by the pre-trained language model ALBERT code, the coding formula being as follows:
Ts,Tw=ALBERT([CLS],x)
As can be seen from the above equation, ALBERT inserts a CLS flag at the front end of the input word-embedded vector when encoding, and the output vector T s∈R1×d corresponding to the symbol represents sentence-level features, which include semantic information of the entire text. And T w∈Rm×d represents word-level features for subsequent contrast contradictory feature extraction.
In addition, in this embodiment, considering that self-attention can highlight more important features and relationships in text, in order to better capture inter-dependent features and extract more abundant semantic information from the context representation, after extracting sentence-level features, attention weights of words in the sentence-level features are captured through a multi-head attention mechanism based on a transform structure, so as to obtain sentence-level features of the multi-head attention representation.
Specifically, in the present embodiment, in calculating the sentence-level feature of the multi-head attention expression, the sentence-level feature T s is set as the query (Q), the key (K), and the number (V) at the same time, and then the sentence-level feature MHA of the multi-head attention expression is calculated by the following formula:
MHA=MultiHeadAttention(Q,K,V)
=Concat(head1,head2,…,headh)·Wo
dq=dk=dv=d/h
Where d represents the dimension of the input sentence-level feature T s and h represents the number of attentiveness heads, i.e. the number of times the scaled dot product attention is applied. Q i、Ki、Vi represents the query, key, and value of the i-th vocabulary, d q、dk、dv represents the dimensions of the query, key, and value, respectively, head i represents the attention weight of the i-th vocabulary, Each representing a learnable projection matrix parameter,A learnable projection matrix parameter representing a multi-headed attention.
Finally, in order to facilitate further computation of subsequent gating fusion, the sentence-level features MHA of the multi-head attention representation are mapped to the same dimension d w through a linear layer to obtain the encoded sentence-level features F t for subsequent feature fusion. The sentence-level feature MHA encoding formula is as follows:
Wherein F t represents the encoded sentence-level feature, Representing a learnable transformation matrix parameter, b r represents a bias parameter.
In this embodiment, for the extracted word-level features, in order to better capture the context information, bi-directional long-short-term memory network Bi-LSTM is used to further extract text features of the word-level features, so as to obtain word-level features of the combined context information, and then the word-level features of the combined context information are transmitted to contrast features for capturing contrast contradictory features between the emotion package semantics and the text. The word-level feature h of the joint context information has the following coding formula:
where T w represents word-level features extracted by the pre-trained language model ALBERT encoding, Represents the learnable parameters set by the Bi-LSTM,Representing the dimension of the hidden layer size.
Step S2: and extracting expression package semantic features of expression packages contained in the text to be detected.
In this embodiment, when the contradictory feature of contrast between the captured expression package semantic and the text is extracted, the expression package semantic feature needs to be combined in addition to the word-level feature of the context information. When extracting expression package semantic features of an expression package contained in a text to be detected, the expression package additional information needs to be mined by combining a pre-training language model and a convolutional neural network, and then the mined expression package additional information is fused, so that corresponding expression package semantic features are obtained.
Specifically, the expression package additional information includes expression package description text and expression package presentation images. When extracting the semantic features of the expression package, the semantic features of the description text of the expression package description text are required to be extracted through a pre-training language model ALBERT, the semantic features of the presentation image of the expression package presentation image are extracted through a convolutional neural network CNN, and then the extracted semantic features of the description text and the semantic features of the presentation image are fused through a fully connected network layer, so that the corresponding semantic features of the expression package are obtained.
Fig. 3 is a data flow diagram illustrating one embodiment of the present invention for expression package semantic feature extraction. As shown in fig. 3, n emoji expression packages are included in the input text sequence, and the included emoji set is set to be represented as { { { D 1,I1},{D2,I2}…,{Dn,In }, where D i represents the expression package description text of the ith emoji, and I i represents the expression package presentation image of the ith emoji. The sentence-level features are adopted to represent the expression package description text of emoji in consideration of the fact that the whole information is more comprehensive than the local information. Then, for each pair { D i,Ii }, a training language model ALBERT is adopted to extract the description text semantic features of the expression package description text D i, the presentation image semantic features of the expression package presentation image I i are extracted through a convolutional neural network CNN, and are fused, so that the corresponding expression package semantic features e i are obtained, and the extraction formula is as follows:
ei=tanh(Wi[ALBERT(Di);CNN(Ii)]+bi)
=tan h(Wi[di;ii]+bi)
Where tanh represents the linear transformation function of the fully connected network layer, the matrix W i and the constant b i are both learnable parameters of the fully connected network layer.
In addition, in this embodiment, an attention layer is further provided, which is configured to extract comprehensive expression package semantic features of the text to be detected including a plurality of expression packages, and use the extracted comprehensive expression package semantic features as expression package semantic features for subsequent extraction of contradictory features. The method comprises the steps of obtaining a corresponding expression package semantic feature matrix [ e 1;e2;…;en ] according to the formula aiming at an emoji set contained in an input text sequence, and sending the expression package semantic feature matrix into an attention layer for weight distribution to obtain a weight matrix [ alpha 12;…,αK ]. The weight matrix represents the importance of each emoji in the sentence, then the importance of each expression package is sequentially calculated based on the assigned weights, and summation is carried out, so that the final comprehensive expression package semantic feature v e is obtained, and the formula is as follows:
ve=∑αiei
Wherein, α i represents the weight of the semantic feature of the ith expression packet, V w and W w respectively represent a leachable transformation matrix parameter, and b w represents a bias parameter. Through the step, richer semantic information carried by each emoji in the text to be detected can be captured, and expression package semantic features capable of reflecting the overall meaning and importance of all emoji in the sentence are obtained.
Step S3: and capturing contrast contradictory features between the expression package semantics and the text according to the text features and the expression package semantic features.
In this embodiment, after the word-level feature and the expression package semantic feature are obtained, in order to better capture the contrast contradictory feature of the emoji expression package and the text word-level clue, according to the different polarity characteristics between emoji and the text vocabulary, a contrast attention mechanism is adopted to capture the contradiction or irrelevant part between the expression package semantic and the text. Among them, the contrast attention mechanism is converted from the self-attention mechanism used in the transducer, whose key is to map the query (Q) to a key (K) -value (X) pair:
Specifically, in this embodiment, when capturing contrast contradictory features, word-level features of the joint context information are used as keys (K) and values (V) at the same time, expression package semantic features are used as queries (Q), and contrast attention between text and expression package, namely, a contradictory contrast vector r, is calculated by the following formula:
ao=softmax(1-ac)
Where d k represents the dimension of key (K), i.e., d, a c represents the similarity between word-level features and expression package features, and a o represents the weight of contrast attention. Since h represents word-level text feature and t represents text, then Representing the dimensions of word-level text features. Unlike the conventional contrast attention weight a c that mainly captures the relevant portions of Q and K, the contrast attention weight a o in this embodiment mainly focuses on the contrast contradictory or irrelevant portions thereof. Thus finally calculatedAnd the contradiction contrast vector between the text and the emoji expression package is represented and used for representing the inconsistency between the text and the emoji expression package, and the dimension of the contradiction contrast vector is consistent with the dimension of the encoded word-level vector. Through a contrast attention mechanism, the text can be effectively compared with semantic features of the emoji expression package, and the machine can learn contradictory features better.
Consistent with the sentence-level feature F t, in order to facilitate further calculation of the subsequent gating fusion, the contradictory contrast vector r is mapped to the same dimension d w through a linear layer, so as to obtain the encoded contradictory contrast vector F r for performing the subsequent feature fusion. Wherein, the coding formula of the contradictory contrast vector r is as follows:
Wherein, Representing a learnable transformation matrix parameter, b r represents a bias parameter.
Step S4: and extracting emotion characteristics of the expression package contained in the text to be detected.
In this embodiment, the emotion feature of the expression packet is also required to be combined when final feature fusion is performed. When extracting emotion characteristics of the expression package, in order to more fully utilize emotion information contained in the emoji expression package, an emoji embedded representation is obtained by means of an open-source emojinal warehouse. Different from the mainstream extraction emoji embedding method, the emojinal warehouse is an emotion expression packet warehouse based on emotion expression, and the emotion packet in the text to be detected is mapped into an emotion packet embedding vector e w through the warehouse, so that emotion clues contained in the emotion packet embedding vector can be focused more.
Wherein E i represents the ith emoji expression package,The embedded vector of the ith expression pack E i mapped through the emotion representation-based expression pack warehouse is represented. Then, in order to better capture the context information of the emoji expression package in the sequence, the feature extraction is carried out on the expression package embedded vector by adopting a Bi-directional long-short-term memory network Bi-LSTM, and the following formula is adopted:
Wherein h e represents the emotion characteristics of the expression packet extracted by the Bi-directional long-short-term memory network Bi-LSTM, Represents the learnable parameters set by the Bi-LSTM,Representing the dimension size of the hidden layer unit.
Finally, in order to facilitate further calculation of subsequent gating fusion, the expression package emotion features h e of the combined context information are mapped to the same dimension d w through a linear layer, so that encoded expression package features F e are obtained, and subsequent feature fusion is performed. The expression package emotion characteristic h e has the following coding formula:
Wherein, Representing a learnable transformation matrix parameter, b e represents a bias parameter.
Step S5: and fusing the text features, the expression package emotion features and the contrast contradiction features to obtain a feature fusion vector.
In this embodiment, after obtaining word-level features, emotion features of an emotion package, and contrast contradictory features between emotion package semantics and text, a gating multi-mode unit GMU is used to perform gating fusion on the obtained word-level features, emotion features of the emotion package, and contrast contradictory features, so as to obtain a feature fusion vector. The gated multi-modal unit GMU is typically applied with dynamic adjustment feature fusion, whereby the fused features are further optimized and weighted by learning the importance of the different features in the fusion process. That is, the gated multimodal unit GMU can adaptively learn the weights of each input feature, thereby enhancing the modeling ability of the model for interactions between different features.
Fig. 4 is a flow chart illustrating steps of an embodiment of the present invention for gating fusion with a gated multi-mode unit GMU, and fig. 5 is a data flow diagram illustrating an embodiment of the present invention for gating fusion with a gated multi-mode unit GMU. Referring to fig. 4 and 5, the following is a detailed description of the steps of gate fusion using the gate multi-mode unit GMU:
Step C1: and coding the input word-level characteristic F t, expression package emotion characteristic F e and contrast contradiction characteristic F r by adopting an activation function tanh to obtain a uniformly coded characteristic element h i. Wherein, define F i∈{Ft,Fr,Fe }, encoded by the following formula:
Wherein, Representing a learnable projection matrix parameter. By this step, each feature element of the input is encoded for subsequent weighting calculation.
Step C2: the method comprises the steps of splicing input word-level features F t, expression package emotion features F e and contrast contradictory features to obtain a feature splicing sequence F, filtering the feature splicing sequence F through a gating function sigma, and accordingly distributing weights alpha i to each feature element h i, wherein the formula is as follows:
F=Concat(Ft,Fe,Fr)
αi=σ(Wg′.F+bg′)
Wherein, Representing a learnable projection matrix parameter, b g′ representing a bias parameter. By this step, a weight is adaptively assigned to each element, whereby the importance of each input feature element can be calculated.
Step C3: the importance of each feature element h i is calculated by combining the assigned weights, and the feature elements are fused by a fusion function f, so that a final feature fusion vector Zfusion is obtained, and the formula is as follows:
Zfusion∈R1×3d
Wherein, Indicating the weighted importance of the ith feature element.
Step S6: and carrying out irony prediction based on the feature fusion vector to obtain irony detection results.
In this embodiment, after the feature fusion vector Zfusion is obtained through the above steps, the feature fusion vector is input to a fully connected prediction layer for prediction classification, so as to obtain a prediction classification vector, and then a irony detection result is determined according to the output prediction classification vector, where the formula is as follows:
Wherein, Representing the prediction classification vector output by the prediction layer, Z fusion representing the feature fusion vector input, W f representing a learnable projection matrix parameter, and b f representing a bias parameter.
In addition, in this embodiment, considering that the emoji expression package often includes the real emotion and mood characteristics of the speaker, besides performing irony detection according to the feature fusion vector, the emoji expression package can also be directly used for performing inverse mock prediction. Specifically, after the coded emotion feature F e of the emotion package is obtained, the emotion feature F e of the emotion package is directly transmitted to a fully-connected prediction layer for irony prediction, so as to obtain a irony detection resultThe calculation formula is as follows:
Wherein W m represents a learnable parameter and b represents a bias parameter.
In addition, since irony feature prediction module adopts a multi-task feature learning strategy, two tasks are set to perform feature learning. One task is used for learning and integrating word-level features, emotion features of the expression package and contrast contradictory features between the semantic and text of the expression package, and the other task is used for directly learning the emotion features of the emoji expression package. Thus, its training loss consists of two parts, calculated as follows:
Where loss e represents the loss of predictive classification using only emoji expression package emotion features, and loss fusion represents the loss of predictive classification using fused feature vectors.
Also provided in this specification is a computer readable medium storing computer program code which, when executed by a processor, implements the expression package contrast contradictory feature-based text irony detection method as described above.
The present disclosure also provides a text irony detection method device based on the expression-pack contrast contradictory feature, which includes an instruction memory for storing instructions executable by the processor, and a processor for executing the instructions in the instruction memory to implement the text irony detection method based on the expression-pack contrast contradictory feature as described above.
The previous description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples and designs described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The various illustrative logical blocks, modules, and circuits described in connection with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.
In one or more exemplary embodiments, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software as a computer program product, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a web site, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk (disk) and disc (disk) as used herein include Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), floppy disk and blu-ray disc where disks (disk) usually reproduce data magnetically, while discs (disk) reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.

Claims (38)

1. The text irony detection model based on the expression package contrast contradictory features is characterized by comprising a text feature extraction module, an expression package semantic feature extraction module, a contrast contradictory feature capture module, an expression package emotion feature extraction module, a feature fusion module and a reverse mock feature prediction module; wherein,
The text feature extraction module is used for extracting text features of the text to be detected containing the expression package and transmitting the text features to the contrast contradiction feature capture module and the feature fusion module;
the expression package semantic feature extraction module is used for extracting expression package semantic features of an expression package contained in the text to be detected and transmitting the expression package semantic features to the contrast contradiction feature capture module;
the contrast contradiction feature capturing module is used for capturing contrast contradiction features between the expression package semantics and the text according to the text features and the expression package semantic features and transmitting the contrast contradiction features to the feature fusion module;
the expression package emotion feature extraction module is used for extracting expression package emotion features of an expression package contained in the text to be detected and transmitting the expression package emotion features to the feature fusion module;
the feature fusion module is used for fusing the text features, the expression package emotion features and the contrast contradiction features to obtain feature fusion vectors, and transmitting the feature fusion vectors to the irony feature prediction module;
the irony feature prediction module is used for performing irony prediction based on the feature fusion vector to obtain a irony detection result.
2. The text irony detection model based on expression package contrast contradictory features according to claim 1, wherein after the text feature extraction module obtains an input text to be detected, the input text to be detected is mapped into an input text sequence through a word embedding model, and then feature extraction is performed on each text vector in the input text sequence through a pre-training language model, so that the text feature of the text to be detected is obtained; the text features comprise sentence-level features transmitted to the feature fusion module for feature fusion and word-level features transmitted to the contrast contradiction feature capture module for contrast contradiction feature extraction.
3. The text irony detection model based on expression package contrast contradictory features of claim 2, wherein when the text feature extraction module extracts text features, embedding is used as a word embedding model, ALBERT is used as a pre-training language model, and sentence-level features and word-level features are extracted from an input text sequence s with length m by the following formula:
x=Embedding(s)={x1,x2,…,xi},i∈{1,2,…,m},xi∈Rm×d
Ts,Tw=ALBERT([CLS],x),Ts∈R1×d,Tw∈Rm×d
where d represents the word embedding space dimension,
X represents an input text sequence s with a length of m, the input text sequence being model mapped by a word embedding model Embedding,
X i represents the i-th text vector in the input text sequence,
T s represents sentence-level features extracted by the pre-trained language model ALBERT encoding,
T w represents word-level features extracted by the pre-trained language model ALBERT encoding.
4. The text irony detection model based on expression package contrast contradictory features of claim 2, wherein after the text feature extraction module extracts sentence-level features, the extracted sentence-level features are transmitted to the feature fusion module for fusion, so as to obtain feature fusion vectors; before the text feature extraction module transmits the sentence-level features, a multi-head attention mechanism is adopted to capture the attention weights of all words in the sentence-level features, so that the sentence-level features represented by the multi-head attention are obtained.
5. The text irony detection model based on expression package contrast contradictory features of claim 4, wherein the text feature extraction module, when calculating sentence-level features of the multi-headed attention expression, uses the sentence-level features T s as the query (Q), the key (K) and the number (V) simultaneously, and then calculates the sentence-level features MHA of the multi-headed attention expression by the following formula:
dq=dk=dv=d/h
where d represents the dimension of the input sentence-level feature T s,
H represents the number of heads of attention,
Q i、Ki、Vi represents the query, key, and value of the i-th vocabulary respectively,
D q、dk、dv represents the dimensions of the query, key and value respectively,
Head i represents the attention weight of the i-th vocabulary,
Each representing a learnable projection matrix parameter,
A learnable projection matrix parameter representing a multi-headed attention.
6. The text irony detection model based on expression package contrast contradictory features of claim 5, wherein after the text feature extraction module calculates to obtain a sentence-level feature MHA of the multi-head attention representation, the sentence-level feature MHA of the multi-head attention representation is mapped to the same dimension d w through a linear layer, so as to obtain an encoded sentence-level feature F t, and the encoded sentence-level feature F t is transmitted to the feature fusion module for feature fusion; wherein the text feature extraction module encodes the sentence-level feature MHA by the following formula:
Wherein F t represents the encoded sentence-level feature,
Representing a parameter of a transformation matrix that can be learned,
B r represents a bias parameter.
7. The text irony detection model based on expression package contrast contradictory features according to claim 2, wherein after the text feature extraction module extracts word-level features, the text feature of the word-level features is further extracted by adopting a Bi-directional long-short-term memory network Bi-LSTM to obtain word-level features combined with context information, and then the word-level features combined with the context information are transmitted to the contrast contradictory feature capture module for capturing contrast contradictory features between expression package semantics and text; the text feature extraction module extracts word-level features h of the combined context information through the following formula:
where T w represents word-level features extracted by the pre-trained language model ALBERT encoding,
Represents the learnable parameters set by the Bi-LSTM,
Representing the dimension of the hidden layer size.
8. The text irony detection model based on expression package contrast contradictory features according to claim 1, wherein when the expression package semantic feature extraction module extracts expression package semantic features of an expression package contained in a text to be detected, the expression package additional information is mined by combining a pre-training language model and a convolutional neural network, and then the mined expression package additional information is fused, so that corresponding expression package semantic features are obtained.
9. The expression package contrast contradictory feature-based text irony detection model of claim 8, wherein the expression package additional information includes expression package descriptive text and expression package presentation images; when the expression package semantic feature extraction module extracts the expression package semantic features, the expression package description text semantic features are extracted through a pre-training language model ALBERT, the expression package presentation image semantic features are extracted through a convolutional neural network CNN, and then the extracted description text semantic features and the presentation image semantic features are fused through a full-connection network layer to obtain corresponding expression package semantic features; the expression package semantic feature extraction module extracts expression package semantic features of the expression package through the following formula:
ei=tanh(Wi[ALBERT(Di);CNN(Ii)]+bi)=tanh(Wi[di;ii]+bi)
Wherein e i represents the expression package semantic features of the ith expression package,
D i represents the expression pack description text of the ith expression pack,
I i denotes an expression pack presentation image of the I-th expression pack,
Tanh represents the linear transformation function of the fully connected network layer,
The matrix E i and the constant b i are both learnable parameters of the fully connected network layer.
10. The text irony detection model based on expression package contrast contradictory features of claim 9, wherein the expression package semantic feature extraction module further comprises an attention layer for extracting comprehensive expression package semantic features of a text to be detected containing a plurality of expression packages, and transmitting the extracted comprehensive expression package semantic features as expression package semantic features to the contrast contradictory feature module for contrast contradictory feature extraction; when extracting comprehensive expression package semantic features integrating n expression package semantic features, the expression package semantic feature extraction module firstly sends the expression package semantic feature matrix [ e 1;e2;…;en ] into an attention layer for weight distribution to obtain a weight matrix [ alpha 12;…,αK ], then sequentially calculates the importance of each expression package based on the distributed weights, and sums up the importance, so that a final comprehensive expression package semantic feature v e is obtained, wherein the formula is as follows:
ve=∑αiei
wherein alpha i represents the weight of the semantic feature of the ith expression packet,
V w and W w represent a learnable transformation matrix parameter,
B w denotes a bias parameter.
11. The text irony detection model based on expression package comparison contradictory features of claim 2, wherein after the comparison contradictory feature capture module obtains word-level features and expression package semantic features, a comparison attention mechanism is adopted to capture the comparison contradictory features between the expression package semantic and the text; when the contrast contradictory feature capturing module captures contrast contradictory features, word-level features combined with context information are simultaneously used as keys (K) and values (V), expression package semantic features are used as queries (Q), and contrast attention between texts and expression packages is calculated through the following formula, namely a contrast vector r:
ao=softmax(1-ac)
Wherein d k denotes the dimension of the key (K),
A c represents the similarity between word-level features and expression package features,
A o represents the weight of the comparative attention,
Representing the dimensions of word-level text features.
12. The text irony detection model based on expression package contrast contradictory features according to claim 11, wherein after the contrast contradictory feature capture module obtains a contradictory contrast vector r between the expression package semantics and the text, the contradictory contrast vector r is mapped to the same dimension d w through a linear layer, so as to obtain a coded contradictory contrast vector F r, and the coded contradictory contrast vector F r is transmitted to the feature fusion module for feature fusion; wherein, the contradictory contrast feature capture module encodes the contradictory contrast vector r by the following formula:
Wherein, Representing a learnable transformation matrix parameter, b r represents a bias parameter.
13. The text irony detection model based on the expression package contrast contradictory features of claim 1, wherein when the expression package emotion feature extraction module extracts the expression package emotion features, an expression package warehouse based on emotion representation maps expression packages in a text to be detected into an expression package embedded vector e w, and then a Bi-directional long-short-term memory network Bi-LSTM is adopted to perform feature extraction on the expression package embedded vector, so that expression package emotion features h e combined with context information are obtained; the expression pack emotion feature extraction module extracts expression pack emotion features h e according to the following formula:
Wherein, An embedded vector representing the ith expression pack E i mapped via the emotion representation-based expression pack repository,
Represents the learnable parameters set by the Bi-LSTM,
Representing the dimension size of the hidden layer unit.
14. The text irony detection model based on expression package contrast contradictory features of claim 13, wherein after the expression package feature extraction module obtains expression package emotion feature h e of the combined context information, the expression package emotion feature h e of the combined context information is mapped to the same dimension d w through a linear layer, so as to obtain coded expression package feature F e, and the coded expression package feature F e is transmitted to the feature fusion module for feature fusion; the expression package feature extraction module encodes the expression package emotion feature h e according to the following formula:
Wherein, Representing a learnable transformation matrix parameter, b e represents a bias parameter.
15. The text irony detection model based on the expression package comparison contradictory features of claim 2, wherein after the feature fusion module obtains word-level features, expression package emotion features and comparison contradictory features between expression package semantics and the text, a gating multi-mode unit is adopted to perform gating fusion on the obtained word-level features, expression package emotion features and comparison contradictory features, so that a feature fusion vector is obtained.
16. The expression package contrast contradictory feature-based text irony detection model of claim 15, wherein the gating multimodal unit performs feature fusion on word level features F t, expression package emotion features F e, and contrast contradictory features F r obtained by:
Step C1: coding the input word-level characteristic F t, expression package emotion characteristic F e and contrast contradiction characteristic F r by adopting an activation function tanh to obtain a uniformly coded characteristic element h i; wherein, define F i∈{Ft,Fr,Fe }, encoded by the following formula:
Wherein, Representing a learnable projection matrix parameter.
Step C2: the method comprises the steps of splicing input word-level features F t, expression package emotion features F e and contrast contradictory features to obtain a feature splicing sequence F, filtering the feature splicing sequence F through a gating function sigma, and accordingly distributing weights alpha i to each feature element h i, wherein the formula is as follows:
F=Concat(Ft,Fe,Fr)
Wherein, Representing a learnable projection matrix parameter, b g′ representing a bias parameter.
Step C3: the importance of each feature element h i is calculated by combining the assigned weights, and fusion is carried out through a fusion function f, so that a final feature fusion vector Z fusion is obtained, and the formula is as follows:
Wherein, Indicating the weighted importance of the ith feature element.
17. The text irony detection model based on the expression package contrast contradictory features of claim 16, wherein after the feature fusion vector is obtained by the feature prediction module irony, the feature fusion vector is input to a fully-connected prediction layer for prediction classification, a prediction classification vector is obtained, and then a irony detection result is determined according to the output prediction classification vector, and the formula is as follows:
Wherein, A prediction classification vector representing the prediction layer output,
Z fusion represents the feature fusion vector of the input,
W f denotes a learnable projection matrix parameter,
B f denotes a bias parameter.
18. The text irony detection model based on expression package contrast contradictory features of claim 1, wherein the irony feature prediction module is further capable of performing inverse mock prediction by using expression package emotion features alone to obtain irony detection results; after the expression package feature extraction module obtains the coded expression package emotion feature F e, directly transmitting the expression package feature F e to the irony feature prediction module for irony prediction to obtain a irony detection resultThe calculation formula is as follows:
Wherein W m represents a learnable parameter and b represents a bias parameter.
19. The text irony detection method based on the expression package characteristics is characterized by comprising the following steps of:
step S1: acquiring a text to be detected containing an expression package, and extracting text characteristics of the text to be detected containing the expression package;
step S2: extracting expression package semantic features of expression packages contained in the text to be detected;
step S3: capturing contrast contradiction characteristics between the expression package semantics and the text according to the text characteristics and the expression package semantic characteristics;
Step S4: extracting emotion characteristics of an emotion package contained in a text to be detected;
step S5: fusing the text features, the expression package emotion features and the contrast contradiction features to obtain feature fusion vectors;
step S6: and carrying out irony prediction based on the feature fusion vector to obtain irony detection results.
20. The method for detecting text irony based on the feature of the expression package according to claim 19, wherein after the text irony based on the feature of the expression package obtains the input text to be detected, the input text to be detected is mapped into an input text sequence through a word embedding model, and then feature extraction is performed on each text vector in the input text sequence through a pre-training language model, so as to obtain the text feature of the text to be detected; the text features comprise sentence-level features for feature fusion and word-level features for extraction of contrast contradictory features.
21. The method for detecting text irony based on expression package features according to claim 20, wherein when the method for detecting text mock based on expression package features extracts text features, embedding is used as a word embedding model and ALBERT is used as a pre-training language model, and sentence-level features and word-level features are extracted from an input text sequence s with a length of m by the following formula:
x=Embedding(s)={x1,x2,…,xi},i∈{1,2,…,m},xi∈Rm×d
Ts,Tw=ALBERT([CLS],x),Ts∈R1×d,Tw∈Rm×d
where d represents the word embedding space dimension,
X represents an input text sequence s with a length of m, the input text sequence being model mapped by a word embedding model Embedding,
X i represents the i-th text vector in the input text sequence,
T s represents sentence-level features extracted by the pre-trained language model ALBERT encoding,
T w represents word-level features extracted by the pre-trained language model ALBERT encoding.
22. The method for detecting text irony based on expression package features according to claim 21, wherein after the sentence-level features are extracted by the method for detecting text irony based on expression package features, a multi-head attention mechanism is used to capture the attention weights of words in the sentence-level features, so as to obtain the sentence-level features of multi-head attention representation.
23. The method for detecting text irony based on expression pack feature according to claim 22, wherein the method for detecting text irony based on expression pack feature calculates sentence-level features of multi-head attention expression by simultaneously using sentence-level feature T s as query (Q), key (K) and value (V) and then calculating sentence-level feature MHA of multi-head attention expression by the following formula:
MHA=MultiHeadAttention(Q,K,V)=Concat(head1,head2,…,headh)·Wo
dq=dk=dv=d/h
where d represents the dimension of the input sentence-level feature T s,
H represents the number of heads of attention,
Q i、Ki、Vi represents the query, key, and value of the i-th vocabulary respectively,
D q、dk、dv represents the dimensions of the query, key and value respectively,
Head i represents the attention weight of the i-th vocabulary,
Each representing a learnable projection matrix parameter,
A learnable projection matrix parameter representing a multi-headed attention.
24. The method for detecting text irony based on expression package features according to claim 23, wherein after the method for detecting text irony based on expression package features calculates to obtain sentence-level feature MHA expressed by multi-head attention, mapping the sentence-level feature MHA expressed by multi-head attention to the same dimension d w through a linear layer, thereby obtaining encoded sentence-level feature F t, and performing subsequent feature fusion; the text irony detection method based on the expression package features encodes sentence-level features MHA through the following formula:
Wherein F t represents the encoded sentence-level feature,
Representing a parameter of a transformation matrix that can be learned,
B r represents a bias parameter.
25. The method for detecting text irony based on feature of expression package according to claim 20, wherein after the word-level feature is extracted by the method for detecting text irony based on feature of expression package, further extracting the text feature of the word-level feature by using Bi-directional long-short-term memory network Bi-LSTM to obtain the word-level feature combined with context information for capturing the contrast contradiction feature between the semantic of expression package and the text; the text irony detection method based on the expression package features extracts word level features h of the combined context information through the following formula:
where T w represents word-level features extracted by the pre-trained language model ALBERT encoding,
Represents the learnable parameters set by the Bi-LSTM,
Representing the dimension of the hidden layer size.
26. The method for detecting text irony based on feature of expression package according to claim 19, wherein when extracting the semantic feature of expression package contained in the text to be detected, the method for detecting text irony based on feature of expression package is combined with a pre-training language model and a convolutional neural network to mine the additional information of expression package, and then the additional information of expression package is fused, so as to obtain the semantic feature of corresponding expression package.
27. The method for detecting text irony based on a feature of an expression pack according to claim 26, wherein the additional information of the expression pack includes expression pack description text and expression pack presentation image; when the text irony detection method based on the expression package features extracts the expression package semantic features, the pre-training language model ALBERT is used for extracting description text semantic features of the expression package description text, the convolutional neural network CNN is used for extracting presentation image semantic features of expression package presentation images, and then the extracted description text semantic features and the presentation image semantic features are fused through a full-connection network layer to obtain corresponding expression package semantic features; the text irony detection method based on the expression package features extracts expression package semantic features of the expression package through the following formula:
ei=tanh(Wi[ALBERT(Di);CNN(Ii)]+bi)=tanh(Wi[di;ii]+bi)
Wherein e i represents the expression package semantic features of the ith expression package,
D i represents the expression pack description text of the ith expression pack,
I i denotes an expression pack presentation image of the I-th expression pack,
Tanh represents the linear transformation function of the fully connected network layer,
The matrix W i and the constant b i are both learnable parameters of the fully connected network layer.
28. The method for detecting text irony based on feature of expression packages according to claim 27, wherein the method for detecting text irony based on feature of expression packages is further provided with an attention layer for extracting semantic features of a comprehensive expression package of a text to be detected including a plurality of expression packages for performing contrast contradiction feature extraction; when extracting comprehensive expression package semantic features of comprehensive n expression package semantic features, the text irony detection method based on the expression package features firstly sends the expression package semantic feature matrix [ e 1;e2;…;en ] into an attention layer for weight distribution to obtain a weight matrix [ alpha 12;…,αK ], then calculates the importance of each expression package in sequence based on the distributed weights, and sums up the importance, so that the final comprehensive expression package semantic feature v e is obtained, and the formula is as follows:
ve=∑αiei
wherein alpha i represents the weight of the semantic feature of the ith expression packet,
V w and W w represent a learnable transformation matrix parameter,
B w denotes a bias parameter.
29. The method for detecting text irony based on feature of expression package according to claim 20, wherein after the word-level feature and the semantic feature of expression package are obtained by the method for detecting text irony based on feature of expression package, a contrast attention mechanism is used to capture contrast contradictory features between the semantic of expression package and the text; when the text irony detection method based on the expression package features captures contrast contradictory features, word level features combined with context information are used as keys (K) and numerical values (V) at the same time, expression package semantic features are used as queries (Q), and contrast attention between the text and the expression package is calculated through the following formula, namely a contradictory contrast vector r:
ao=softmax(1-ac)
Wherein d k denotes the dimension of the key (K),
A c represents the similarity between word-level features and expression package features,
A o represents the weight of the comparative attention,
Representing the dimensions of word-level text features.
30. The method for detecting text irony based on feature of expression package according to claim 29, wherein after the method for detecting text irony based on feature of expression package obtains a contradictory contrast vector r between the semantic of expression package and the text, the contradictory contrast vector r is mapped to the same dimension d w through a linear layer, so as to obtain a coded contradictory contrast vector F r for subsequent feature fusion; the text irony detection method based on the expression package features encodes the contradictory contrast vector r through the following formula:
Wherein, Representing a learnable transformation matrix parameter, b r represents a bias parameter.
31. The method for detecting text irony based on feature of expression package according to claim 19, wherein when the method for detecting text irony based on feature of expression package extracts emotion features of expression package, an expression package warehouse based on emotion representation maps expression packages in a text to be detected into expression package embedded vectors e w, and then feature extraction is performed on the expression package embedded vectors by adopting Bi-LSTM (Bi-directional long-short term memory) network, so as to obtain expression package emotion features h e combined with context information; the text irony detection method based on the expression package features extracts expression package emotion features h e through the following formula:
Wherein, An embedded vector representing the ith expression pack E i mapped via the emotion representation-based expression pack repository,
Represents the learnable parameters set by the Bi-LSTM,
Representing the dimension size of the hidden layer unit.
32. The method for detecting text irony based on feature of expression package according to claim 31, wherein after the method for detecting text irony based on feature of expression package obtains feature h e of expression package of joint context information, the feature h e of expression package of joint context information is mapped to the same dimension d w through a linear layer, so as to obtain encoded feature F e of expression package for subsequent feature fusion; the text irony detection method based on the expression package features encodes the expression package emotion features h e through the following formula:
Wherein, Representing a learnable transformation matrix parameter, b e represents a bias parameter.
33. The method for detecting text irony based on expression package features according to claim 19, wherein after the word-level features, expression package emotion features and contrast contradictory features between expression package semantics and text are obtained by the method for detecting text irony based on expression package features, gating fusion is performed on the obtained word-level features, expression package emotion features and contrast contradictory features by using a gating multi-modal unit, so as to obtain feature fusion vectors.
34. The method for detecting text irony based on expression package features according to claim 33, wherein the gating multi-modal unit performs feature fusion on word-level features F t, expression package emotion features F e, and contrast contradictory features F r obtained by:
Step C1: coding the input word-level characteristic F t, expression package emotion characteristic F e and contrast contradiction characteristic F r by adopting an activation function tanh to obtain a uniformly coded characteristic element h i; wherein, define F i∈{Ft,Fr,Fe }, encoded by the following formula:
Wherein, Representing a learnable projection matrix parameter.
Step C2: the method comprises the steps of splicing input word-level features F t, expression package emotion features F e and contrast contradictory features to obtain a feature splicing sequence F, filtering the feature splicing sequence F through a gating function sigma, and accordingly distributing weights alpha i to each feature element h i, wherein the formula is as follows:
F=Concat(Ft,Fe,Fr)
Wherein, Representing a learnable projection matrix parameter, b g′ representing a bias parameter.
Step C3: the importance of each feature element h i is calculated by combining the assigned weights, and fusion is carried out through a fusion function f, so that a final feature fusion vector Z fusion is obtained, and the formula is as follows:
Wherein, Indicating the weighted importance of the ith feature element.
35. The method for detecting text irony based on feature of expression package according to claim 19, wherein after the feature fusion vector is obtained by the method for detecting text irony based on feature of expression package, the feature fusion vector is input into a fully-connected prediction layer for prediction classification, a prediction classification vector is obtained, and then a irony detection result is determined according to the output prediction classification vector, and the formula is as follows:
Wherein, A prediction classification vector representing the prediction layer output,
Z fusion represents the feature fusion vector of the input,
W f denotes a learnable projection matrix parameter,
B f denotes a bias parameter.
36. The method for detecting text irony based on expression pack features according to claim 19, wherein the method for detecting text irony based on expression pack features can also use expression pack emotion features alone to make a reverse mock prediction to obtain irony detection results; after the coded emotion feature F e of the emotion package is obtained by the text irony detection method based on the emotion package features, the emotion feature F e is directly input into a fully-connected prediction layer for irony prediction, and irony detection results are obtainedThe calculation formula is as follows:
Wherein W m represents a learnable parameter and b represents a bias parameter.
37. A computer readable medium having stored computer program code, which when executed by a processor implements the method of any of claims 19-36.
38. Text irony detection method and device based on expression package contrast contradictory features are characterized by comprising the following steps:
A memory for storing instructions executable by the processor; and
A processor for executing the instructions to implement the method of any of claims 19-36.
CN202410527311.7A 2024-04-29 2024-04-29 Text irony detection model and method based on expression package contrast contradictory features Pending CN118364106A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410527311.7A CN118364106A (en) 2024-04-29 2024-04-29 Text irony detection model and method based on expression package contrast contradictory features

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410527311.7A CN118364106A (en) 2024-04-29 2024-04-29 Text irony detection model and method based on expression package contrast contradictory features

Publications (1)

Publication Number Publication Date
CN118364106A true CN118364106A (en) 2024-07-19

Family

ID=91879328

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410527311.7A Pending CN118364106A (en) 2024-04-29 2024-04-29 Text irony detection model and method based on expression package contrast contradictory features

Country Status (1)

Country Link
CN (1) CN118364106A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118916680A (en) * 2024-08-16 2024-11-08 华南师范大学 Multi-mode cynics detection method, device, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118916680A (en) * 2024-08-16 2024-11-08 华南师范大学 Multi-mode cynics detection method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110162636B (en) D-LSTM-based emotion reason identification method
CN112528637B (en) Text processing model training method, device, computer equipment and storage medium
CN116661603A (en) User Intent Recognition Method Based on Multimodal Fusion in Complex Human-Computer Interaction Scenarios
CN111311364B (en) Product recommendation method and system based on multimodal product review analysis
CN118113855B (en) Ship test training scene question answering method, system, equipment and medium
CN108228576A (en) Text interpretation method and device
CN113393841B (en) Training method, device, equipment and storage medium of voice recognition model
CN114282013A (en) Data processing method, device and storage medium
CN113705315A (en) Video processing method, device, equipment and storage medium
Zhang Voice keyword retrieval method using attention mechanism and multimodal information fusion
CN117875395A (en) Training method, device and storage medium of multi-mode pre-training model
CN116977701A (en) Video classification model training method, video classification method and device
WO2023226239A1 (en) Object emotion analysis method and apparatus and electronic device
CN113407663B (en) Image-text content quality identification method and device based on artificial intelligence
CN118364106A (en) Text irony detection model and method based on expression package contrast contradictory features
CN118093936B (en) Video tag processing method, device, computer equipment and storage medium
CN113780350B (en) ViLBERT and BiLSTM-based image description method
CN118095261B (en) Text data processing method, device, equipment and readable storage medium
CN112084788B (en) Automatic labeling method and system for implicit emotion tendencies of image captions
CN117556276B (en) Method and device for determining similarity between text and video
CN118114667B (en) Named entity recognition model based on multitask learning and attention mechanism
CN118860152A (en) A virtual environment interaction system based on multimodal emotion recognition
CN118520091A (en) Multi-mode intelligent question-answering robot and construction method thereof
CN117493495A (en) Abnormal language detection method, electronic device, and storage medium
CN112287690B (en) Sign language translation method based on conditional sentence generation and cross-modal rearrangement

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