CN111222330B - Chinese event detection method and system - Google Patents
Chinese event detection method and system Download PDFInfo
- Publication number
- CN111222330B CN111222330B CN201911366648.XA CN201911366648A CN111222330B CN 111222330 B CN111222330 B CN 111222330B CN 201911366648 A CN201911366648 A CN 201911366648A CN 111222330 B CN111222330 B CN 111222330B
- Authority
- CN
- China
- Prior art keywords
- event type
- character
- detected
- characters
- preliminary
- 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.)
- Active
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 55
- 230000000875 corresponding Effects 0.000 claims abstract description 143
- 238000004364 calculation method Methods 0.000 claims description 13
- 230000011218 segmentation Effects 0.000 claims description 13
- 238000010276 construction Methods 0.000 claims description 6
- 230000004913 activation Effects 0.000 claims description 5
- 238000006243 chemical reaction Methods 0.000 claims description 4
- 239000000126 substance Substances 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 8
- 238000000034 method Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 4
- 238000003058 natural language processing Methods 0.000 description 4
- 230000001537 neural Effects 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 3
- 238000011176 pooling Methods 0.000 description 3
- 230000018109 developmental process Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000006011 modification reaction Methods 0.000 description 2
- 238000007796 conventional method Methods 0.000 description 1
- 239000002360 explosive Substances 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
Abstract
The invention provides a Chinese event detection method, which comprises the following steps: converting a text to be detected into a character vector sequence and a word vector sequence; inputting the character vector sequence and the word vector sequence into a pre-established Chinese event detection model to obtain a trigger word of a text to be detected and a corresponding event type; the Chinese event detection model considers the co-occurrence relationship among event types. The invention can search the classification of other events in the text by utilizing the co-occurrence relation among the event types for the uncertain result output by the original basic model detection, correct partial error output results and improve the Chinese event detection performance.
Description
Technical Field
The invention belongs to the technical field of natural language processing, and particularly relates to a method and a system for detecting a Chinese event.
Background
With the development of computer technology, the computing power of computers is greatly improved, the research of machine learning and deep learning obtains a series of important achievements, and natural language processing is gradually and widely applied, for example, user preferences in commodity comments are mined through an emotion analysis technology, foreign language contents are automatically translated for users through a machine translation technology, and the like. Meanwhile, with the popularization of the internet and particularly the rapid development of social media, the generated text data shows explosive test growth, and has important significance and value for automatically processing and analyzing a large amount of information. Therefore, the natural language processing technology has gained wide attention of society by virtue of its efficient text processing and analysis capability. For the country, the processing and analysis of Chinese is closely related to the life work of people. The Chinese event detection is used as a basic task for extracting Chinese information, is based on tasks such as Chinese word segmentation, Chinese part-of-speech tagging, named entity identification and the like, and is widely applied to the fields such as automatic abstracting, automatic question answering, information retrieval, event reasoning and the like.
Conventional methods for event detection include pattern matching, structured perceptrons, maximum entropy models, and the like. In recent years, a feed-forward neural network, a long-short term memory model, a convolutional neural network, an attention mechanism and the like in deep learning are used for an event detection task and achieve good effects on a public data set, while natural language processing needs to complete the classification and text label extraction of massive texts in a large amount of text information at an extremely high speed, and high-efficiency detection performance is needed, so that how to improve the performance of Chinese event detection is a problem to be solved by the technical personnel in the field.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a method for detecting a Chinese event, which comprises the following steps:
converting the text to be detected into a character vector sequence and a word vector sequence;
inputting the character vector sequence and the word vector sequence into a pre-established Chinese event detection model to obtain a trigger word of the text to be detected and a corresponding event type;
the Chinese event detection model takes into account co-occurrence relationships between event types.
Preferably, converting the text to be detected into a character vector sequence and a word vector sequence includes:
converting the text to be detected into a character sequence and a word sequence by adopting a Chinese word segmentation tool;
and converting the character sequence and the word sequence into a character vector sequence and a word vector sequence based on the character vector table and the word vector table.
Preferably, the establishment of the chinese event detection model includes:
constructing a training set based on the text with the determined trigger words and the event types;
constructing a basic model, and training the basic model by adopting a training set to obtain a trigger word in a training set text and a preliminary event type characteristic and a preliminary event type probability distribution corresponding to each character;
constructing a co-occurrence relation layer for modeling co-occurrence relation among event types on a basic model, taking the initial event type characteristics and the initial event type probability distribution corresponding to each character obtained in the basic model as the input of the co-occurrence relation layer, and calculating the event type characteristics corresponding to each character and considering the co-occurrence relation among the event types;
and constructing a classification layer on the co-occurrence relation layer, taking the event type characteristics of the co-occurrence relation among the considered event types corresponding to the characters obtained by the co-occurrence relation layer as input, calculating the event type probability distribution of the co-occurrence relation among the considered event types corresponding to the characters, and taking the event type with the highest probability as an event type result.
Preferably, the establishing of the chinese event detection model further includes:
obtaining a cross entropy loss function of model training based on the event type probability distribution predicted by the classification layer and the real event type probability distribution;
and solving the inverse gradient of the cross entropy loss function, and updating the parameters in the co-occurrence relation layer and the classification layer according to the learning rate.
Preferably, the step of calculating the event type feature considering the co-occurrence relationship between the event types corresponding to each character by using the preliminary event type feature and the preliminary event type probability distribution corresponding to each character obtained in the basic model as the input of the co-occurrence relationship layer includes:
sequentially calculating the relevance scores between the characters to be detected and the preliminary event type characteristics corresponding to other characters on the basis of the preliminary event type characteristics corresponding to the characters to be detected and the preliminary event type probability distribution corresponding to other characters;
based on the relevancy scoring between the preliminary event type characteristics corresponding to the character to be detected and other characters, sequentially calculating the relevancy weight between the preliminary event type characteristics corresponding to the character to be detected and other characters;
calculating co-occurrence relation characteristics corresponding to the characters to be detected based on the relevancy weight between the characters to be detected and the preliminary event type characteristics corresponding to other characters;
and calculating the event type characteristic of the character to be detected considering the co-occurrence relation based on the co-occurrence relation characteristic corresponding to the character to be detected and the preliminary event type characteristic corresponding to the character to be detected.
Preferably, based on the probability distribution of the preliminary event type corresponding to the character to be detected and the preliminary event types corresponding to other characters, the relevance scores between the character to be detected and the preliminary event type corresponding to other characters are sequentially calculated, and the calculation formula is as follows:
wherein the content of the first and second substances,is the preliminary event type characteristic corresponding to the character to be detected,is a preliminary event type probability distribution, W, corresponding to the jth characterAFor trainable parameters, scjAnd scoring the correlation degree between the preliminary event type characteristics corresponding to the character to be detected and the jth character.
Preferably, based on the relevance score between the preliminary event type features corresponding to the character to be detected and other characters, the relevance weight between the preliminary event type features corresponding to the character to be detected and other characters is sequentially calculated, and the calculation formula is as follows:
wherein s iscjScoring the correlation between the preliminary event type features corresponding to the character to be detected and the jth character, acjAnd the correlation weight between the characters to be detected and the preliminary event type characteristics corresponding to the jth character is obtained.
Preferably, based on the correlation weight between the character to be detected and the preliminary event type features corresponding to other characters, the co-occurrence relationship features corresponding to the character to be detected are calculated, and the calculation formula is as follows:
wherein, acjIs the correlation weight between the characters to be detected and the preliminary event type characteristics corresponding to the jth character,indicating the preliminary event type feature corresponding to the jth character,the co-occurrence relation characteristic corresponding to the character to be detected.
Preferably, based on the co-occurrence relationship characteristic corresponding to the character to be detected and the preliminary event type characteristic corresponding to the character to be detected, the event type characteristic of the character to be detected considering the co-occurrence relationship is calculated, and the calculation formula is as follows:
wherein the content of the first and second substances,for the co-occurrence characteristics corresponding to the pre-detection characters,is the preliminary event type characteristic corresponding to the character to be detected,event type characteristics of co-occurrence relations are considered for the characters to be detected.
Based on the same inventive concept, the invention also provides a Chinese event detection system, which comprises:
the text processing module is used for converting the text to be detected into a character vector sequence and a word vector sequence;
the file detection module is used for inputting the character vector sequence and the word vector sequence into a pre-established Chinese event detection model to obtain a trigger word and a corresponding event type of the text to be detected;
the Chinese event detection model takes into account co-occurrence relationships between event types.
Preferably, the text processing module includes:
the word segmentation module is used for converting the text to be detected into a character sequence and a word sequence by adopting a Chinese word segmentation tool;
and the conversion module is used for converting the character sequence and the word sequence into a character vector sequence and a word vector sequence based on the character vector table and the word vector table.
Preferably, the chinese event detection module includes:
the training set building module is used for building a training set based on the text with the determined trigger words and the event types;
the basic model building module is used for training the basic model by adopting a training set to obtain the initial event type characteristics and the initial event type probability distribution corresponding to the trigger words and the characters in the text of the training set;
a co-occurrence relation layer construction module, configured to use the preliminary event type features and the preliminary event type probability distribution corresponding to each character obtained in the basic model as input of the co-occurrence relation layer, and calculate event type features corresponding to each character, which take into account co-occurrence relations among event types;
and the classification layer construction module is used for taking the event type characteristics which are obtained by the co-occurrence relation layer and correspond to the characters and take the co-occurrence relation among the event types into consideration as input, calculating the event type probability distribution which corresponds to the characters and takes the co-occurrence relation among the event types, and taking the event type with the highest probability as the event type result.
Compared with the closest prior art, the invention has the following beneficial effects:
the invention provides a Chinese event detection method, which comprises the following steps: converting the text to be detected into a character vector sequence and a word vector sequence; inputting the character vector sequence and the word vector sequence into a pre-established Chinese event detection model to obtain a trigger word of a text to be detected and a corresponding event type; the Chinese event detection model considers the co-occurrence relationship among event types. The invention can search the classification of other events in the text by utilizing the co-occurrence relation among the event types for the uncertain result output by the original basic model detection, correct partial error output results and improve the Chinese event detection performance.
Drawings
FIG. 1 is a schematic diagram of a method for detecting a Chinese event according to the present invention;
FIG. 2 is a schematic diagram of a system for detecting a Chinese event according to the present invention;
FIG. 3 is a diagram illustrating a Chinese event detection model according to the present invention;
fig. 4 is a schematic process diagram for acquiring character-level features and word-level features of a character to be detected according to an embodiment of the present invention;
fig. 5 is a schematic process diagram for fusing character-level features and word-level features corresponding to characters to be detected, provided in the embodiment of the present invention;
fig. 6 is a schematic diagram of a process for calculating a boundary type of a trigger word and a corresponding event type according to an embodiment of the present invention.
Detailed Description
The following describes embodiments of the present invention in further detail with reference to the accompanying drawings.
Example 1:
the schematic diagram of the method for detecting a Chinese event provided by the invention is shown in fig. 1, and the method comprises the following steps: converting the text to be detected into a character vector sequence and a word vector sequence; inputting the character vector sequence and the word vector sequence into a pre-established Chinese event detection model to obtain a trigger word of a text to be detected and a corresponding event type; the Chinese event detection model considers the co-occurrence relationship among event types.
In this embodiment, the length of the character of the input chinese text is N, the character to be detected is C, j represents any character in the text, and the specific detection method is as follows:
101, for a given Chinese text, performing word segmentation by using a jieba Chinese word segmentation tool, converting the word segmentation tool into a character sequence and a word sequence, and converting the character sequence into a character vector sequence and the word sequence into a word vector sequence through an existing character vector table and an existing word vector table;
102, using a Nugget Proposal Networks for Chinese Event Detection as a basic model layer, sequentially using each character as a character to be detected, inputting a corresponding character vector sequence and a word vector sequence, acquiring task-related characteristics for each character by using a convolution network, and outputting a trigger word and preliminary Event type characteristics and preliminary Event type probability distribution corresponding to each character in the text;
specifically, taking the process of acquiring the trigger word, the preliminary event type feature and the preliminary event type probability distribution corresponding to the character c to be detected as an example, the calculation steps are as follows:
102-1 As shown in FIG. 4, Word/Position Embedding represents a Word/Position vector, relational Feature Map represents a Convolutional Feature mapping, Compositional Feature represents a synthetic Feature, Token Level Feature represents a Token Level Feature, Lexical Feature represents a Lexical Level Feature, and Dynamic Multi-Pooling represents Dynamic Multi-Pooling forInput character vector sequenceAnd corresponding word vector sequenceUtilizing DMCNN (namely dynamic multi-pool convolution neural network) to respectively obtain character level characteristics and word level characteristics corresponding to the character c to be detected, wherein the calculation processes of the two characteristics are the same and are described in a unified way as follows:
xj=[ej:pj]formula (2-1)
rij=tanh(Wixj:j+h-1+bi) Formula (2-2)
ri left=maxj<crijFormula (2-3)
ri right=maxj≥crijFormula (2-4)
fc=[rleft:rright:ec-1:ec+1]Formula (2-5)
Where h denotes the sequence width covered by the convolution kernel, ejRepresenting an embedded representation of the jth character or word, pjIndicating that the position corresponding to position j is embedded in the representation, WiRepresenting the trainable i-th convolution kernel, biRepresenting the offset, r, corresponding to the trainable i-th convolution kernelijRepresenting character features calculated by the ith convolution kernel for the jth character, fcThe character-level features (denoted as) Or word-level features (denoted as)。
102-2 as shown in fig. 5, the model calculates the trigger word calculation boundary feature and the event type feature corresponding to the character c to be detected by using the character level feature and the word level feature corresponding to the character c to be detected, which are obtained by fusing Hybrid Representation Learning (DMCNN) (i.e. dynamic multi-pooling convolutional neural network), and has three implementation forms:
the Concat Hybrid mode is shown below:
the General Hybrid mode is shown below:
the Task-specific Hybrid approach is shown as follows:
wherein, WN、UN、bN、WT、UT、bTFor trainable parameters, s is an activation function, z is a weight unified by the character information in calculating the trigger word boundary type and event class, zNAnd zTWeights corresponding to the character information when calculating the trigger word boundary type and the event category,andand calculating boundary characteristics and preliminary event type characteristics for the trigger words corresponding to the characters c to be detected.
102-3 as shown in fig. 6, the Nugget Generator represents a shell Generator for calculating a boundary of a trigger Word, the Type Classifier represents an event Classifier for outputting a result of event classification, the Hybrid Char-Word retrieval Learning represents Word mixed Representation Learning, the boundary feature and the event Type feature are calculated based on the trigger Word corresponding to the character c to be detected, and the boundary probability distribution and the corresponding event Type feature probability distribution are calculated by the Nuggets pro positive Networks.
Calculating boundary probability distribution according to the trigger word, and determining that if the set maximum character sequence length of the trigger word is L, the corresponding possible boundary containing the current character hasIn one embodiment, the boundary types represent a condition that the trigger word covers the character c to be detected, and the calculated probability is as follows:
wherein, WG、bG、WC、bCIn order to train the parameters, the user may,andand respectively taking the probability of the nth boundary and the probability of the kth event category for the character c to be detected.
102-4, calculating boundary probability distribution according to the trigger words, and determining the trigger word calculation boundary corresponding to the maximum probability in the probability distribution as the trigger word boundary corresponding to the character c to be detected;
102-5, calculating a trigger word corresponding to the character c to be detected according to the trigger word boundary corresponding to the character c to be detected;
102-6 according to steps 102-1 to 102-5, all trigger words in the text are identified;
103, building a Self-orientation layer for modeling a co-occurrence relation between event types on the basic model layer, wherein the Self-orientation layer is the co-occurrence relation layer, inputting the preliminary event type characteristics and the preliminary event type probability distribution corresponding to the character c to be detected obtained in the step 102-3 into the co-occurrence relation layer, and outputting the event type characteristics considering the co-occurrence relation corresponding to the character c to be detected, wherein the calculation process is as follows:
wherein the content of the first and second substances,is the preliminary event type characteristic corresponding to the character to be detected,is a preliminary event type probability distribution, W, corresponding to the jth characterAFor trainable parameters, scjScoring the correlation between the preliminary event type features corresponding to the character to be detected and the jth character, acjIs the correlation weight between the characters to be detected and the preliminary event type characteristics corresponding to the jth character,indicating the preliminary event type feature corresponding to the jth character,is the co-occurrence relation characteristic corresponding to the character to be detected,is the preliminary event type characteristic corresponding to the character to be detected,event type characteristics corresponding to the characters to be detected and considering the co-occurrence relationship;
104, inputting the event type characteristics, which are corresponding to the character c to be detected and take the co-occurrence relationship into a Classifier layer (classification layer) in the step 103, calculating new event type probability distribution, wherein the event type result with the highest probability is the event type result corresponding to the character c to be detected, and the classification layer comprises a full connection layer and a Softmax activation function;
105, constructing a cross entropy loss function for model training based on the probability distribution of the event class predicted in the step 104 and the probability distribution of the real event class, and calculating by adopting cross entropy as shown in the following formula:
L(θ)=-∑(x,y)∈Slog P (y | x; theta) formula (5-1)
The method comprises the steps that S represents a training set, each piece of training data comprises a character vector sequence, a word vector sequence and an event type corresponding to a marked character sequence, x represents the character vector sequence and the word vector sequence corresponding to a character to be detected, y represents a correct event type result of the character to be detected, and theta represents parameters of a model, a word vector table and a word vector table;
106, solving the inverse gradient of the cross entropy loss function in the step 105, and updating parameters of a Self-Attention layer (a co-occurrence relation layer) and a full connection layer according to the learning rate to obtain a new Chinese event detection model;
and 107, based on the trained Chinese event detection model, performing Chinese event detection on the Chinese text according to the steps 101 to 104 to obtain a trigger word and an event type corresponding to the text.
Detecting a text by using the trained chinese event detection model, as shown in fig. 3, inputting text information into a basic model layer of the chinese event detection model after processing the text information in step 101 to obtain a trigger word and a corresponding event type of the text to be detected, including:
processing text information and inputting the processed text information into a basic model layer of a Chinese event detection model to obtain trigger words of a text to be detected and old event type distribution and old event classification characteristics corresponding to each character, wherein the old event type distribution is primary event type probability distribution, and the old event classification characteristics are primary event classification characteristics;
inputting the old event type distribution and the old event classification characteristics corresponding to each character into a Self-Attention layer (co-occurrence relation layer) to obtain new event classification characteristics corresponding to each character, wherein the new event classification characteristics are the event classification characteristics considering contribution relation;
and inputting the new event type characteristics of each character considering the co-occurrence relationship into a Classiier layer (classification layer) to obtain the event type corresponding to the text trigger word.
Example 2:
the schematic diagram of the system for detecting a chinese event provided by the present invention is shown in fig. 2, and includes:
the system comprises a text processing module and a file detection module;
the text processing module is used for converting the text to be detected into a character vector sequence and a word vector sequence;
the file detection module is used for inputting the character vector sequence and the word vector sequence into a pre-established Chinese event detection model to obtain trigger words and corresponding event types of the text to be detected;
the Chinese event detection model considers the co-occurrence relationship among event types, namely: because of the inherent correlation between events, some event types often appear together in text, while some event types do not.
Wherein, the text processing module comprises:
the word segmentation module and the conversion module;
the word segmentation module is used for converting the text to be detected into a character sequence and a word sequence by adopting a Chinese word segmentation tool;
and the conversion module is used for converting the character sequence and the word sequence into a character vector sequence and a word vector sequence based on the character vector table and the word vector table.
Wherein, the Chinese incident detection module includes:
the device comprises a training set building module, a basic model building module, a co-occurrence relation layer building module and a classification layer building module;
the training set building module is used for building a training set based on the text with the determined trigger words and the event types;
the basic model building module is used for training the basic model by adopting a training set to obtain the initial event type characteristics and the initial event type probability distribution corresponding to the trigger words and the characters in the text of the training set;
a co-occurrence relation layer construction module, configured to use the preliminary event type features and the preliminary event type probability distribution corresponding to each character obtained in the basic model as input of the co-occurrence relation layer, and calculate event type features corresponding to each character, which take into account co-occurrence relations among event types;
and the classification layer construction module is used for taking the event type characteristics which are obtained by the co-occurrence relation layer and correspond to the characters and take the co-occurrence relation among the event types into consideration as input, calculating the event type probability distribution which corresponds to the characters and takes the co-occurrence relation among the event types, and taking the event type with the highest probability as the event type result. The classification layer comprises a full connection layer and an activation function layer.
The invention supplements the co-occurrence relation characteristics corresponding to other characters in the same text in the event type characteristics of the original basic model, and for the uncertain results output by the original basic model detection, the invention can search the classification of other events in the text by using the co-occurrence relation among the event types, correct partial wrong output results and improve the Chinese event detection performance.
It should be noted that the above-mentioned embodiments are only for illustrating the technical solutions of the present application and not for limiting the scope of protection thereof, and although the present application is described in detail with reference to the above-mentioned embodiments, those skilled in the art should understand that after reading the present application, they can make various changes, modifications or equivalents to the specific embodiments of the application, but these changes, modifications or equivalents are all within the scope of protection of the claims to be filed.
Claims (9)
1. A method for detecting Chinese events is characterized by comprising the following steps:
converting the text to be detected into a character vector sequence and a word vector sequence;
inputting the character vector sequence and the word vector sequence into a pre-established Chinese event detection model to obtain a trigger word of the text to be detected and a corresponding event type;
the Chinese event detection model considers the co-occurrence relation among event types;
the establishment of the Chinese event detection model comprises the following steps:
constructing a training set based on the text with the determined trigger words and the event types;
constructing a basic model, and training the basic model by adopting a training set to obtain a trigger word in a training set text and a preliminary event type characteristic and a preliminary event type probability distribution corresponding to each character;
constructing a co-occurrence relation layer for modeling co-occurrence relation among event types on a basic model, taking the initial event type characteristics and the initial event type probability distribution corresponding to each character obtained in the basic model as the input of the co-occurrence relation layer, and calculating the event type characteristics corresponding to each character and considering the co-occurrence relation among the event types;
constructing a classification layer on a co-occurrence relation layer, taking the event type characteristics of the co-occurrence relation among the considered event types corresponding to the characters obtained by the co-occurrence relation layer as input, calculating the event type probability distribution of the co-occurrence relation among the considered event types corresponding to the characters, and taking the event type with the highest probability as an event type result; the classification layer comprises a full connection layer and an activation function layer; taking the preliminary event type features and the preliminary event type probability distribution corresponding to each character obtained in the basic model as the input of the co-occurrence relation layer, and calculating the event type features corresponding to each character and considering the co-occurrence relation among the event types, wherein the event type features include:
sequentially calculating the relevance scores between the characters to be detected and the preliminary event type characteristics corresponding to other characters on the basis of the preliminary event type characteristics corresponding to the characters to be detected and the preliminary event type probability distribution corresponding to other characters;
based on the relevancy scoring between the preliminary event type characteristics corresponding to the character to be detected and other characters, sequentially calculating the relevancy weight between the preliminary event type characteristics corresponding to the character to be detected and other characters;
calculating co-occurrence relation characteristics corresponding to the characters to be detected based on the relevancy weight between the characters to be detected and the preliminary event type characteristics corresponding to other characters;
and calculating the event type characteristic of the character to be detected considering the co-occurrence relation based on the co-occurrence relation characteristic corresponding to the character to be detected and the preliminary event type characteristic corresponding to the character to be detected.
2. The method of claim 1, wherein converting the text to be detected into a sequence of character vectors and a sequence of word vectors comprises:
converting the text to be detected into a character sequence and a word sequence by adopting a Chinese word segmentation tool;
and converting the character sequence and the word sequence into a character vector sequence and a word vector sequence based on the character vector table and the word vector table.
3. The method of claim 1, wherein the establishing of the chinese event detection model further comprises:
obtaining a cross entropy loss function of model training based on the event type probability distribution predicted by the classification layer and the real event type probability distribution;
and solving the inverse gradient of the cross entropy loss function, and updating the parameters in the co-occurrence relation layer and the classification layer according to the learning rate.
4. The method according to claim 1, wherein the relevance scores between the preliminary event type features corresponding to the characters to be detected and the other characters are sequentially calculated based on the preliminary event type probability distributions corresponding to the preliminary event type features corresponding to the characters to be detected and the other characters, and the calculation formula is as follows:
wherein the content of the first and second substances,is the preliminary event type characteristic corresponding to the character to be detected,is a preliminary event type probability distribution, W, corresponding to the jth characterAFor trainable parameters, scjAnd scoring the correlation degree between the preliminary event type characteristics corresponding to the character to be detected and the jth character.
5. The method according to claim 1, wherein the correlation weights between the characters to be detected and the preliminary event type features corresponding to other characters are sequentially calculated based on the correlation scores between the characters to be detected and the preliminary event type features corresponding to other characters, and the calculation formula is as follows:
wherein s iscjScoring the correlation between the preliminary event type features corresponding to the character to be detected and the jth character, acjAnd the correlation weight between the characters to be detected and the preliminary event type characteristics corresponding to the jth character is obtained.
6. The method according to claim 1, wherein the co-occurrence relationship characteristic corresponding to the character to be detected is calculated based on the correlation weight between the preliminary event type characteristics corresponding to the character to be detected and each of the other characters and the preliminary event type characteristics corresponding to each of the other characters, and the calculation formula is as follows:
wherein, acjIs the correlation weight between the characters to be detected and the preliminary event type characteristics corresponding to the jth character,indicating the preliminary event type feature corresponding to the jth character,and the co-occurrence relation characteristic corresponding to the character to be detected.
7. The method according to claim 1, wherein the event type feature of the character to be detected, which takes the co-occurrence relationship into consideration, is calculated based on the co-occurrence relationship feature corresponding to the character to be detected and the preliminary event type feature corresponding to the character to be detected, and the calculation formula is as follows:
wherein, the first and the second end of the pipe are connected with each other,for the co-occurrence relationship characteristic corresponding to the pre-detection character,is the preliminary event type characteristic corresponding to the character to be detected,event type characteristics of co-occurrence relations are considered for the characters to be detected.
8. A Chinese event detection system, comprising:
the text processing module is used for converting the text to be detected into a character vector sequence and a word vector sequence;
the file detection module is used for inputting the character vector sequence and the word vector sequence into a pre-established Chinese event detection model to obtain trigger words and corresponding event types of the text to be detected;
the Chinese event detection model takes the co-occurrence relation among event types into consideration;
the Chinese event detection module comprises:
the training set building module is used for building a training set based on the text with the determined trigger words and the event types;
the basic model building module is used for training the basic model by adopting a training set to obtain the initial event type characteristics and the initial event type probability distribution corresponding to the trigger words and the characters in the text of the training set;
a co-occurrence relation layer construction module, configured to use the preliminary event type features and the preliminary event type probability distribution corresponding to each character obtained in the basic model as input of the co-occurrence relation layer, and calculate event type features corresponding to each character, where the co-occurrence relation between the event types is considered;
the classification layer construction module is used for taking the event type characteristics which are obtained by the co-occurrence relation layer and are corresponding to the characters and take the co-occurrence relation among the event types as input, calculating the event type probability distribution which is corresponding to the characters and takes the co-occurrence relation among the event types, and taking the event type with the highest probability as the event type result; the classification layer comprises a full connection layer and an activation function layer;
taking the preliminary event type features and the preliminary event type probability distribution corresponding to each character obtained in the basic model as the input of the co-occurrence relation layer, and calculating the event type features corresponding to each character and considering the co-occurrence relation among the event types, wherein the event type features include:
sequentially calculating the relevancy scores between the preliminary event type characteristics corresponding to the characters to be detected and the preliminary event type characteristics corresponding to other characters based on the preliminary event type characteristics corresponding to the characters to be detected and the preliminary event type probability distribution corresponding to other characters;
based on the relevance scores between the characters to be detected and the preliminary event type characteristics corresponding to other characters, sequentially calculating the relevance weights between the characters to be detected and the preliminary event type characteristics corresponding to other characters;
calculating co-occurrence relation characteristics corresponding to the characters to be detected based on the relevancy weight between the characters to be detected and the preliminary event type characteristics corresponding to other characters;
and calculating the event type characteristic of the character to be detected considering the co-occurrence relation based on the co-occurrence relation characteristic corresponding to the character to be detected and the preliminary event type characteristic corresponding to the character to be detected.
9. The system of claim 8, wherein the text processing module comprises:
the word segmentation module is used for converting the text to be detected into a character sequence and a word sequence by adopting a Chinese word segmentation tool;
and the conversion module is used for converting the character sequence and the word sequence into a character vector sequence and a word vector sequence based on the character vector table and the word vector table.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911366648.XA CN111222330B (en) | 2019-12-26 | 2019-12-26 | Chinese event detection method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911366648.XA CN111222330B (en) | 2019-12-26 | 2019-12-26 | Chinese event detection method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111222330A CN111222330A (en) | 2020-06-02 |
CN111222330B true CN111222330B (en) | 2022-07-12 |
Family
ID=70829207
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911366648.XA Active CN111222330B (en) | 2019-12-26 | 2019-12-26 | Chinese event detection method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111222330B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111767402B (en) * | 2020-07-03 | 2022-04-05 | 北京邮电大学 | Limited domain event detection method based on counterstudy |
CN114841162A (en) * | 2022-05-20 | 2022-08-02 | 中国电信股份有限公司 | Text processing method, device, equipment and medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109446333A (en) * | 2019-01-16 | 2019-03-08 | 深兰人工智能芯片研究院(江苏)有限公司 | A kind of method that realizing Chinese Text Categorization and relevant device |
CN109710919A (en) * | 2018-11-27 | 2019-05-03 | 杭州电子科技大学 | A kind of neural network event extraction method merging attention mechanism |
CN109726293A (en) * | 2018-11-14 | 2019-05-07 | 数据地平线(广州)科技有限公司 | A kind of causal event map construction method, system, device and storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107908635B (en) * | 2017-09-26 | 2021-04-16 | 百度在线网络技术(北京)有限公司 | Method and device for establishing text classification model and text classification |
-
2019
- 2019-12-26 CN CN201911366648.XA patent/CN111222330B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109726293A (en) * | 2018-11-14 | 2019-05-07 | 数据地平线(广州)科技有限公司 | A kind of causal event map construction method, system, device and storage medium |
CN109710919A (en) * | 2018-11-27 | 2019-05-03 | 杭州电子科技大学 | A kind of neural network event extraction method merging attention mechanism |
CN109446333A (en) * | 2019-01-16 | 2019-03-08 | 深兰人工智能芯片研究院(江苏)有限公司 | A kind of method that realizing Chinese Text Categorization and relevant device |
Non-Patent Citations (1)
Title |
---|
秦彦霞等.基于混合表示的中文事件检测方法研究.《中文信息学报》.2019,(第04期), * |
Also Published As
Publication number | Publication date |
---|---|
CN111222330A (en) | 2020-06-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11631007B2 (en) | Method and device for text-enhanced knowledge graph joint representation learning | |
WO2021164199A1 (en) | Multi-granularity fusion model-based intelligent semantic chinese sentence matching method, and device | |
CN113011533A (en) | Text classification method and device, computer equipment and storage medium | |
CN107193796B (en) | Public opinion event detection method and device | |
CN112256866B (en) | Text fine-grained emotion analysis algorithm based on deep learning | |
Fogarolli | Word sense disambiguation based on wikipedia link structure | |
CN110633366B (en) | Short text classification method, device and storage medium | |
CN111143569A (en) | Data processing method and device and computer readable storage medium | |
CN111222330B (en) | Chinese event detection method and system | |
CN111368082A (en) | Emotion analysis method for domain adaptive word embedding based on hierarchical network | |
US11669740B2 (en) | Graph-based labeling rule augmentation for weakly supervised training of machine-learning-based named entity recognition | |
CN114676255A (en) | Text processing method, device, equipment, storage medium and computer program product | |
CN113486645A (en) | Text similarity detection method based on deep learning | |
Guo et al. | Deep semantic-based feature envy identification | |
CN111723583B (en) | Statement processing method, device, equipment and storage medium based on intention role | |
Lee et al. | Detecting suicidality with a contextual graph neural network | |
CN113360582B (en) | Relation classification method and system based on BERT model fusion multi-entity information | |
CN114648029A (en) | Electric power field named entity identification method based on BiLSTM-CRF model | |
CN114398482A (en) | Dictionary construction method and device, electronic equipment and storage medium | |
CN113901224A (en) | Knowledge distillation-based secret-related text recognition model training method, system and device | |
CN113742733A (en) | Reading understanding vulnerability event trigger word extraction and vulnerability type identification method and device | |
CN113705207A (en) | Grammar error recognition method and device | |
CN111199154A (en) | Fault-tolerant rough set-based polysemous word expression method, system and medium | |
CN111325036A (en) | Emerging technology prediction-oriented evidence fact extraction method and system | |
CN110909547A (en) | Judicial entity identification method based on improved deep learning |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |