For a large amount of semi-structured and unstructured text information,how to automatically extract structured and valuable information from these information is an important topic of information extraction.Relationship extraction is one of the important subtasks of information extraction,and the quality of relationship extraction directly determines the quality of knowledge graph.More and more deep neural network-based methods have been applied to the relationship extraction task and achieved good results,but there is still a problem that the extraction of entity representations is not sufficient.To address this problem,this paper improves the sentence-level and document-level relationship extraction models,enhances the performance of the models,and builds a relationship extraction application platform around the relationship extraction model.The main work and innovation points of the paper are as follows:1.In the sentence-level relationship extraction task,we propose a new model based on the combination of BERT pre-training model,downstream superimposed long and short-term memory network(LSTM)and entity location attention group for the problem of low utilization of entity-related features and inadequate extraction of text structure features and location features in the location-aware relationship extraction model(LPA).In the data preprocessing,entity locations are marked with special characters while the target entities are masked with entity type information to fully extract potential features such as location features and entity type features.By testing on TACRED and Sem Eval 2020 Task 8,the experimental results show that the improved model outperforms some of the previous models in terms of performance metrics.2.In the document-level relationship extraction task,to address the problem that the relationship extraction model of bipartite graph inference(GAIN)using graph convolutional neural network cannot reflect the importance of neighboring nodes when aggregating graph nodes in extracting the mentioned level graph features,we propose to optimize the problem by using graph attention network,and also to extract entity features by using BERT attention mechanism to extract entity-related contextual information fused into entity features to enhance entity feature representation.By testing on Doc RED dataset,the experimental results show that the performance index of the improved model is better than the previous model.3 Design and implement the relationship extraction application platform system around the relationship extraction model.The system uses the modular design idea to deal with the relationship extraction model.The system is divided into a Web-side and a mobile-side application system.The Web-side mainly implements functions such as model management and relationship extraction,while the mobile-side is implemented by We Chat applets,which are used as an extension of the Web-side functions and mainly implement functions such as model training monitoring and model data comparison.The relationship extraction function needs to call the relationship extraction model to realize the relationship classification task,and the relationship extraction model is encapsulated as a microservice to provide services to the Web service and We Chat applet service,while the system data is shared between different services,and the result of relationship extraction is saved in the database in the form of entity pairs to form a small knowledge graph. |