A method for Extracting Entity Relations from Complex Texts Based on Self Attention Mechanism
In order to clarify the semantic relationship and quickly identify information,a method of extracting en-tity relation from complex texts under self-attention mechanism was put forward.Firstly,by using a complex text vec-tor model to map all words into low degree real vectors,the text was transformed into a vector pattern.Then,by learn-ing embeddings based on the external context of words,all words within a sentence were transformed into an embed-ding matrix.Moreover,LSTM network was used to create text vectors,for accessing the previous and future contexts,thus fusing the two output vectors.The activation function was used to compress the word dimension and calculate the semantic contribution weight of the upper and lower text.After that,the self-attention mechanism was added between two-way LSTM layer and output layer.Furthermore,the sentence semantics of the matrix was drawn from multiple an-gles.And the score of feature vector of the combined sentence on the relationship was calculated.Finally,the complex text entity relation was extracted by the given parameter variable of probability random sampling weight.The experi-mental results prove that the proposed method has a good effect on the extraction of complex text entity relations as well as high accuracy.
Self-attention mechanismRelation extractionText vector modelComplex text entity