Information Extraction and Text Mining
DAI Shangfeng, SUN Chengjie, SHAN Lili, LIN Lei, LIU Bingquan
2021, 35(8): 56-63.
Aiming at the task of cross-domain few-shot relation classification, a Piecewise Attention Matching Network (PAMN) is proposed. To improve the sentence similarity algorithm for the task of relation extraction, two sentences are matched with their segmentations in PAMN, which can better estimate the similarity between relation classification instances. PAMN consists of encoding layer and sentence matching layer. At the encoding layer, PAMN uses the pre-trained model BERT to encode the sentence pair, divides the sentence into three segments according to the location of entity, and adapts the different domain through dynamic segmentation length. At the sentence matching layer, PAMN uses a text matching method based on the segmental attention mechanism to calculate the similarity between the query instance and each instance in the support set, and the average is taken as the similarity between the query instance and the support set. The experimental results show that PAMN has achieved the best results on the evaluation list in the field of FewRel 2.0 adaptation tasks.