| Relation extraction has been an important task in natural language processing for many years,which aims to automatically identify the relations between entities from unstructured text,and is the basis for downstream tasks such as knowledge graph construction,intelligent question answering,etc.However,the extraction methods under the traditional supervised mode rely on large-scale high-quality annotated data for model training,which is costly and time-consuming.The distant supervision methods suffer from error propagation and long-tail distribution problems.Therefore,few-shot relation extraction methods that do not depend on large-scale annotated data have attracted attention.At present,many effective models and methods have been proposed in the general domain,and the performance of few-shot relation extraction tasks has been continuously improved.However,in the specific domain such as bridge inspection,medical health,etc.,Chinese texts often have characteristics such as long sentences,large spans of head and tail entities,overlapping relations,etc.,and the existing research methods have not fully considered the domain-specific characteristics.Therefore,the research on few-shot relation extraction methods for domain-specific is an important research topic in the current few-shot learning field.Based on the background of bridge inspection and Chinese medical health domains,this thesis aims at the poor performance of the existing methods on the few-shot relation extraction tasks in the two domains due to domain-specific context characteristics,and mainly conducts the following research:1)Few-shot relation extraction for domain-specific with multi-dimensional feature fusion.This thesis analyzes the characteristics of long sentences and overlapping relations in the texts of bridge inspection and Chinese medical health domains,and proposes a fewshot relation extraction model that fuses multi-dimensional features.The model uses the pre-trained model RoBERTa as the basic encoding unit,and further integrates the context directional feature extraction module and the entity feature module based on BiLSTM model to achieve multi-dimensional feature enhancement.Since BiLSTM structure has a powerful long-distance directional context modeling ability,the model designs a context feature extraction module composed of BiLSTM to further model the text and overcoming the problems of long sentences and large entity spans in specific domain.Through the entity feature extraction module,the entity features in the text are extracted.These features are fused to reduce the impact of domain characteristics on model performance.Finally,the prototype network is used for relation prediction.2)Few-shot relation extraction for verticals based on attention prototype network.There are large differences between long and short instance texts of the same relation category in the two domains,and irrelevant information in long texts will interfere with relational prototype computation.Affected by the relation overlapping problem,the same instance texts may belong to multiple relations in the bridge inspection domain,and multiple identical instance texts may belong to one relation in the medical health domain.In the prototype network,the average value is used to calculate the relation prototype,ignoring the contribution of each relation instance to the relation prototype,which cannot meet the above challenges.In order to improve the defects of the average method,this thesis applies the attention mechanism to the prototype network,calculates the relationship prototype through weight and weighted sum,so that the relation prototype can reflect the contribution of each instance to it,and further weaken the impact of domain-specific characteristics,and improve the performance of the model on few-shot relation extraction tasks in specific domains.To verify the method proposed in this thesis,extensive experiments were conducted on the bridge inspection and Chinese medical health domain datasets,and the method was also validated on the general domain dataset FewRell.0.The experimental results show that the proposed method effectively reduces the interference of domain-specific characteristics,and better completes the few-shot relation extraction tasks in specific domain,and also shows excellent performance on the 5-way-5-shot and 10-way-5-shot tasks in the general domain. |