A Partition Filter Network for Joint Entity and Relation Extraction EMNLP 2021

Overview

PFN (Partition Filter Network)

This repository contains codes of the official implementation for the paper A Partition Filter Network for Joint Entity and Relation Extraction EMNLP 2021 [PDF] [PPT]

Quick links

Model Overview

In this work, we present a new framework equipped with a novel recurrent encoder named partition filter encoder designed for multi-task learning. The encoder enforces bilateral interaction between NER and RE in two ways:

  1. The shared partition represents inter-task information and is equally accessible to both tasks, allowing for balanced interaction between NER and RE.
  2. The task partitions represent intra-task information and are formed through concerted efforts of entity and relation gates, making sure that encoding process of entity and relation features are dependent upon each other.

Preparation

Environment Setup

The experiments were performed using one single NVIDIA-RTX3090 GPU. The dependency packages can be installed with the following command:

pip install -r requirements.txt

Also, make sure that the python version is 3.7.10

Data Acquisition and Preprocessing

This is the first work that covers all the mainstream English datasets for evaluation, including [NYT, WEBNLG, ADE, ACE2005, ACE2004, SCIERC, CONLL04]. Please follow the instructions of reademe.md in each dataset folder in ./data/ for data acquisition and preprocessing.

Custom Dataset

If your custom dataset has a large number of triples that contain head-overlap entities (common in Chinese dataset), accuracy of the orignal PFN will not be good.

The orignal one will not be able to decode triples with head-overlap entities. For example, if New York and New York City are both entities, and there exists a RE prediction such as (new, cityof, USA), we cannot know what New corresponds to.

Luckily, the impact on evaluation of English dataset is limited, since such triple is either filtered out (for ADE) or rare (one in test set of SciERC, one in ACE04, zero in other datasets).

You can use our updated PFN-nested to handle the issue. PFN-nested is an enhanced version of PFN. This model is better in leveraging entity tail information and capable of handling nested triple prediction. For usage, replace the files in the root directory with the files in the PFN-nested folder, then follow the directions in Quick Start.

Performance comparison in SciERC

Model NER RE
PFN 66.8 38.4
PFN-nested 67.9 38.7

Quick Start

Model Training

The training command-line is listed below (command for CONLL04 is in Evaluation on CoNLL04):

python main.py \
--data ${NYT/WEBNLG/ADE/ACE2005/ACE2004/SCIERC} \
--do_train \
--do_eval \
--embed_mode ${bert_cased/albert/scibert} \
--batch_size ${20 (for most datasets) /4 (for SCIERC)} \
--lr ${0.00002 (for most datasets) /0.00001 (for SCIERC)} \
--output_file ${the name of your output files, e.g. ace_test} \
--eval_metric ${micro/macro} 

After training, you will obtain three files in the ./save/${output_file}/ directory:

  • ${output_file}.log records the logging information.
  • ${output_file}.txt records loss, NER and RE results of dev set and test set for each epoch.
  • ${output_file}.pt is the saved model with best average F1 results of NER and RE in the dev set.

Evaluation on Pre-trained Model

The evaluation command-line is listed as follows:

python eval.py \
--data ${NYT/WEBNLG/ADE/ACE2005/ACE2004/SCIERC} \
--eval_metric ${micro/macro} \
--model_file ${the path of saved model you want to evaluate. e.g. save/ace_test.pt} \
--embed_mode ${bert_cased/albert/scibert}

Inference on Customized Input

If you want to evaluate the model with customized input, please run the following code:

python inference.py \
--model_file ${the path of your saved model} \
--sent ${sentence you want to evaluate, str type restricted}

{model_file} must contain information about the datasets the model trained on (web/nyt/ade/ace/sci) and the type of pretrained embedding the model uses (albert/bert/scibert). For example, model_file could be set as "web_bert.pt"

Example

input:
python inference.py \
--model_file save/sci_test_scibert.pt \
--sent "In this work , we present a new framework equipped with a novel recurrent encoder   
        named partition filter encoder designed for multi-task learning ."

result:
entity_name: framework, entity type: Generic
entity_name: recurrent encoder, entity type: Method
entity_name: partition filter encoder, entity type: Method
entity_name: multi-task learning, entity type: Task
triple: recurrent encoder, Used-for, framework
triple: recurrent encoder, Part-of, framework
triple: recurrent encoder, Used-for, multi-task learning
triple: partition filter encoder, Hyponym-of, recurrent encoder
triple: partition filter encoder, Used-for, multi-task learning



input:  
python inference.py \
--model_file save/ace_test_albert.pt \
--sent "As Williams was struggling to gain production and an audience for his work in the late 1930s ,  
        he worked at a string of menial jobs that included a stint as caretaker on a chicken ranch in   
        Laguna Beach , California . In 1939 , with the help of his agent Audrey Wood , Williams was 
        awarded a $1,000 grant from the Rockefeller Foundation in recognition of his play Battle of 
        Angels . It was produced in Boston in 1940 and was poorly received ."

result:
entity_name: Williams, entity type: PER
entity_name: audience, entity type: PER
entity_name: his, entity type: PER
entity_name: he, entity type: PER
entity_name: caretaker, entity type: PER
entity_name: ranch, entity type: FAC
entity_name: Laguna Beach, entity type: GPE
entity_name: California, entity type: GPE
entity_name: his, entity type: PER
entity_name: agent, entity type: PER
entity_name: Audrey Wood, entity type: PER
entity_name: Williams, entity type: PER
entity_name: Rockefeller Foundation, entity type: ORG
entity_name: his, entity type: PER
entity_name: Boston, entity type: GPE
triple: caretaker, PHYS, ranch
triple: ranch, PART-WHOLE, Laguna Beach
triple: Laguna Beach, PART-WHOLE, California

Evaluation on CoNLL04

We also run the test on the dataset CoNLL04, but we did not report the results in our paper due to several reasons:

The command for running CoNLL04 is listed below:

python main.py \
--data CONLL04 \
--do_train \
--do_eval \
--embed_mode albert \
--batch_size 10 \
--lr 0.00002 \
--output_file ${the name of your output files} \
--eval_metric micro \
--clip 1.0 \
--epoch 200

Pre-trained Models and Training Logs

We provide you with pre-trained models for NYT/WEBNLG/ACE2005/ACE2004/SCIERC/CONLL04, along with recorded results of each epoch, identical with training results under the specified configurations above.

Download Links

Due to limited space in google drive, 10-fold model files for ADE are not available to you (training record still available).

After downloading the linked files below, unzip them and put ${data}_test.pt in the directory of ./save/ before running eval.py. Also, ${data}_test.txt and ${data}_test.log records the results of each epoch. You should check that out as well.

Dataset File Size Embedding Download
NYT 393MB Bert-base-cased Link
WebNLG 393MB Bert-base-cased Link
ACE05 815MB Albert-xxlarge-v1 Link
ACE04 3.98GB Albert-xxlarge-v1 Link
SciERC 399MB Scibert-uncased Link
ADE 214KB Bert + Albert Link
CoNLL04 815MB Albert-xxlarge-v1 Link

Result Display

F1 results on NYT/WebNLG/ACE05/SciERC:

Dataset Embedding NER RE
NYT Bert-base-cased 95.8 92.4
WebNLG Bert-base-cased 98.0 93.6
ACE05 Albert-xxlarge-v1 89.0 66.8
SciERC Scibert-uncased 66.8 38.4

F1 results on ACE04:

5-fold 0 1 2 3 4 Average
Albert-NER 89.7 89.9 89.5 89.7 87.6 89.3
Albert-RE 65.5 61.4 63.4 61.5 60.7 62.5

F1 results on CoNLL04:

Model Embedding Micro-NER Micro-RE
Table-sequence Albert-xxlarge-v1 90.1 73.6
PFN Albert-xxlarge-v1 89.6 75.0

F1 results on ADE:

10-fold 0 1 2 3 4 5 6 7 8 9 Average
Bert-NER 89.6 92.3 90.3 88.9 88.8 90.2 90.1 88.5 88.0 88.9 89.6
Bert-RE 80.5 85.8 79.9 79.4 79.3 80.5 80.0 78.1 76.2 79.8 80.0
Albert-NER 91.4 92.9 91.9 91.5 90.7 91.6 91.9 89.9 90.6 90.7 91.3
Albert-RE 83.9 86.8 82.8 83.2 82.2 82.4 84.5 82.3 81.9 82.2 83.2

Robustness Against Input Perturbation

We use robustness test to evaluate our model under adverse circumstances. In this case, we use the domain transformation methods of NER from Textflint.

The test files can be found in the folder of ./robustness_data/. Our reported results are evaluated with the linked ACE2005-albert model above. For each test file, move it to ./data/ACE2005/ and rename it as test_triples.json, then run eval.py with the instructions above.

Citation

Please cite our paper if it's helpful to you in your research.

@misc{yan2021partition,
      title={A Partition Filter Network for Joint Entity and Relation Extraction}, 
      author={Zhiheng Yan and Chong Zhang and Jinlan Fu and Qi Zhang and Zhongyu Wei},
      year={2021},
      eprint={2108.12202},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}
Comments
  • 关于Extension on Ablation Study

    关于Extension on Ablation Study

    您好,感谢您额外展示出encoding scheme相关的NER结果。 基于您展示的结果,我观察到在NER的结果上Sequential >>Parallel > original。 如果original model是您文中提出的PFN模型的话,这是否说明PFN的编码方式损害了NER的性能。因为Sequential方式是只将entity信息送给Relation model而不将relation信息送入entity model,而Sequential的NER结果远好于original model。甚至Parallel 也是略好于original的。 但是您文中的核心论点是与以前的related work结论相反, 您证明了re是对ner有利的,这也是最吸引我的一个观点。 所以我想问一下,这个Extension on Ablation Study的实验结果和您的结论是否矛盾?希望能够得到您的解答。

    opened by wcwowwwww 6
  • 关于头尾实体特征和关系特征的问题

    关于头尾实体特征和关系特征的问题

    大佬您好,请教个问题: 我看实体特征里面,实体开始结束特征为什么这么定义,能说说您的想法吗? 为什么repeat(1, length, 1, 1)就表示开始特征,repeat(length, 1, 1, 1)表示结尾特征,有什么含义在里面吗? `st = h_ner.unsqueeze(1).repeat(1, length, 1, 1)

    en = h_ner.unsqueeze(0).repeat(length, 1, 1, 1)

    ner = torch.cat((st, en, h_global), dim=-1) `

    以及,关系抽取的时候,关系特征,为什么会分为r1和r2两个子特征,是表示头实体对于关系r的特征和尾实体对于关系r的特征吗? `r1 = h_re.unsqueeze(1).repeat(1, length, 1, 1)

    r2 = h_re.unsqueeze(0).repeat(length, 1, 1, 1)

    re = torch.cat((r1, r2, h_global), dim=-1) ` 多谢大佬指教!

    opened by WangYao-GoGoGo 5
  • 有一个报错问题,不知道是环境不对还是,

    有一个报错问题,不知道是环境不对还是,

    您好,我应该用的是30系列的显卡,然后按照这个requirements的环境要求安装了相关的环境,然而,当我运行 python main.py
    --data CONLL04
    --do_train
    --do_eval
    --embed_mode albert
    --batch_size 10
    --lr 0.00002
    --output_file conll04
    --eval_metric micro
    --clip 1.0
    --epoch 200 这个命令的时候,给我报错如下:

    11/22/2021 14:59:58 - INFO - main - ['main.py', '--data', 'CONLL04', '--do_train', '--do_eval', '--embed_mode', 'albert', '--batch_size', '10', '--lr', '0.00002', '--output_file', 'conll04', '--eval_metric', 'micro', '--clip', '1.0', '--epoch', '200'] 11/22/2021 14:59:58 - INFO - main - Namespace(batch_size=10, clip=1.0, data='CONLL04', do_eval=True, do_train=True, dropconnect=0.1, dropout=0.1, embed_mode='albert', epoch=200, eval_batch_size=10, eval_metric='micro', hidden_size=300, linear_warmup_rate=0.0, lr=2e-05, max_seq_len=128, output_file='conll04', seed=0, steps=50, weight_decay=0) 11/22/2021 15:00:19 - INFO - main - ------Training------ Some weights of the model checkpoint at albert-xxlarge-v1 were not used when initializing AlbertModel: ['predictions.decoder.bias', 'predictions.bias', 'predictions.LayerNorm.weight', 'predictions.dense.bias', 'predictions.decoder.weight', 'predictions.LayerNorm.bias', 'predictions.dense.weight']

    • This IS expected if you are initializing AlbertModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).

    • This IS NOT expected if you are initializing AlbertModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model). /home/ps/anaconda3/envs/lwc/lib/python3.7/site-packages/torch/cuda/init.py:106: UserWarning: NVIDIA GeForce RTX 3090 with CUDA capability sm_86 is not compatible with the current PyTorch installation. The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_70. If you want to use the NVIDIA GeForce RTX 3090 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/

      warnings.warn(incompatible_device_warn.format(device_name, capability, " ".join(arch_list), device_name)) /home/ps/anaconda3/envs/lwc/lib/python3.7/site-packages/torch/cuda/init.py:106: UserWarning: NVIDIA GeForce RTX 3080 Ti with CUDA capability sm_86 is not compatible with the current PyTorch installation. The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_70. If you want to use the NVIDIA GeForce RTX 3080 Ti GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/

      warnings.warn(incompatible_device_warn.format(device_name, capability, " ".join(arch_list), device_name)) 0%| | 0/93 [00:00<?, ?it/s] Traceback (most recent call last): File "main.py", line 196, in ner_pred, re_pred = model(text, mask) File "/home/ps/anaconda3/envs/lwc/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, **kwargs) File "/home/ps/lwc/PFN/model/pfn.py", line 260, in forward x = self.bert(**x)[0] File "/home/ps/anaconda3/envs/lwc/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, **kwargs) File "/home/ps/anaconda3/envs/lwc/lib/python3.7/site-packages/transformers/models/albert/modeling_albert.py", line 715, in forward extended_attention_mask = extended_attention_mask.to(dtype=self.dtype) # fp16 compatibility RuntimeError: CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

    不是很明白这个错误。pytorch的社区解释说,是pytorch的版本不对而引起的,但是没有找到合理的解决方案,请您帮助,谢谢。

    opened by aaa1999 5
  • 其他数据集训练出错

    其他数据集训练出错

    我按照您对数据的处理(nytAndWebnlg),应用在其他数据集上: 我猜测您dataloader之中 ` subj = entity[subj_idx]

            obj = entity[obj_idx]
    
            rc_head_labels+=[subj['start'], obj['start'], re['type']]
    
            rc_tail_labels+=[subj['end']-1, obj['end']-1, re['type']]
    

    的含义是实体变成[1, 1, 'None', 16, 20, 'None'],两个数字是实体的单词起始和结束下标,None是类型 关系是:rc_head_labels = [1, 1, '/location/location/contains],rc_tail_labels= [16, 20, '/location/location/contains]`,即头实体和尾实体的单词下标对和关系类型。

    我想请教的是:

    1. 我对于数据的处理是否理解正确?
    2. 实体的类型为None或者实际的类型有什么区别吗?
    3. 在训练中,进行forward()的时候,出现了维度不匹配的问题,这是什么原因呢?应当如何解决?

    Traceback (most recent call last): File "B:\work\pycharm\PYCHARM\PyCharm Community Edition 2020.3.4\plugins\python-ce\helpers\pydev\pydevd.py", line 1483, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File "B:\work\pycharm\PYCHARM\PyCharm Community Edition 2020.3.4\plugins\python-ce\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "B:/model/PFN-nested/main.py", line 197, in ner_pred, re_head_pred, re_tail_pred = model(text, mask) File "B:\work\anaconda\envs\pfn\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl return forward_call(*input, **kwargs) File "B:\model\PFN-nested\model\pfn.py", line 260, in forward x = self.bert(**x)[0] File "B:\work\anaconda\envs\pfn\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl return forward_call(*input, **kwargs) File "B:\work\anaconda\envs\pfn\lib\site-packages\transformers\models\bert\modeling_bert.py", line 989, in forward past_key_values_length=past_key_values_length, File "B:\work\anaconda\envs\pfn\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl return forward_call(*input, **kwargs) File "B:\work\anaconda\envs\pfn\lib\site-packages\transformers\models\bert\modeling_bert.py", line 221, in forward embeddings += position_embeddings RuntimeError: The size of tensor a (588) must match the size of tensor b (512) at non-singleton dimension 1

    Process finished with exit code 1

    opened by Yuknoshita 5
  • 关于results of ablation study

    关于results of ablation study

    您好,非常感谢您非常优秀的工作成果,让我重新认识了relation识别对entity识别有帮助的可能。在阅读paper时,有一些疑问,希望能够得到解答。

    1. 文章中说到在SciERC上进行了ablation study实验,但是不同ablation的结果都很相近,请问下您的结果是单轮的训练结果吗?我运行了您的代码,发现SciERC上的结果非常不稳定,在不同random seed上结果变化较大,您是否能够给出显著性的值呢?或者在其他数据集上ablation study的结果和SciERC数据集上结论相同吗?
    2. ablation study实验结果中只显示了relation extraction的结果,请问不同方式对entity extraction结果有怎样的影响呢?是否有导致relation extraction结果高但是entity extraction结果低的情况呢?
    3. 您使用了partition操作但是并没有验证这个操作的效果,请问在使用filter操作的情况下,使用partition操作和其他方式的实验结果区别是怎样的呢? 非常感谢!
    opened by wcwowwwww 5
  • 为什么PFN-nested model在关系训练时候可以利用实体tail信息呢?

    为什么PFN-nested model在关系训练时候可以利用实体tail信息呢?

    您好: 膜拜您的设计和实现!!!有一个小问题想请教一下: 您的介绍中提到:PFN-nested is an enhanced version of PFN. It is better in leveraging entity tail information and capable of handling nested triple prediction. 在PFN-nested网络结构中(PFN.py),有这样的代码: re_head_score = self.re_head(h_re, h_share, mask)
    re_tail_score = self.re_tail(h_share, h_re, mask)
    分别是利用实体head和tail的信息进行关系抽取对吧?在这里self.re_head和self.re_tail都是re_unit结构,仅仅将这里的h_share, h_re换一下位置,是如何利用的tail信息的呢?self.re_tail(h_share, h_re, mask)利用的是h_share中的信息计算的r1和r2,如何体现的tail信息呢?

    opened by jingsongs 2
  • evaluate the model with customized input

    evaluate the model with customized input

    I appreciate the work you shared, but I'm having some problems

    I have many samples to predict, what should I do with them? python inference.py --model_file ${the path of your saved model} --sent ${sentence you want to evaluate, str type restricted} This approach seems to load the model once to process only one sample, which is very slow. Is there any way to process all samples after loading the model once? Do you have any suggestions?

    Thanks.

    opened by DK158 2
  • OOM for my own bigger datasets

    OOM for my own bigger datasets

    When I finished the model training and began to test, the OOM occurred, since the model does not optimize with multi-gpu, did you have this problem before?

    opened by AndDoIt 2
  • why use albert-xxlarge instead of bert-base when training on some datasets?

    why use albert-xxlarge instead of bert-base when training on some datasets?

    I run the code using bert-base on the dataset Conll04, and got F1-scores approximately 66. I find the f1 is much lower than using albert-large. I wonder whether the comparison between this model using albert-large and the previous work using bert-base is really reasonable?

    opened by Kobayashi-Wang 2
  • 对于不是一个单词的实体

    对于不是一个单词的实体

    您好,我将您的模型用于实验室的生物文献数据集上,我的格式是是按照casrel的格式处理的,但是发现您在处理实体的时候默认所有的实体都是一个单词,而我的数据集的实体大部分都是多单词,会在预处理时就报错。 您将许多的多单词实体的最后一个单词作为实体是处于什么样的考虑呢? 还有对于这种存在多单词的实体数据集,您推荐使用哪种启动参数配置才能处理呢?

    { "text": "HES1 as an independent prognostic marker in esophageal squamous cell carcinoma .", "triple_list": [ [ "HES1", "/Gene/Cancer/prognostic_factor_orMarkers", "esophageal squamous cell carcinoma" ] ] }

    opened by Wonderson-wpp 2
  • SEMEVAL dataset

    SEMEVAL dataset

    I have a dataset that is a translated version of SEMEVAL. I tried to change your code to evaluate your model on my dataset but I didn't get good results. so I want to know why you didn't report your model's performance on SEMEVAL? you didn't try at all or for some reason it didn't work?

    opened by arian1995 1
  • 关于实验结果复现的问题

    关于实验结果复现的问题

    大佬您好,感谢您提供您工作的开源代码,您的工作对我十分有意义!想询问下关于论文结果复现的问题:在您提供的代码中按照您提供的参数训练测试了webnlg数据集,但结果总达不到您链接中提供的结果,一共进行了三次实验,但最终结果都不理想,想询问下我的参数设置是否存在问题,万分感谢!以下是我的训练log WEBNLG_baseline_true.log WEBNLG_baseline_true.txt

    opened by everglow0 0
Owner
zhy
Knowledge Graph, Information Extraction, Interpretability of NLP System
zhy
Few-shot Relation Extraction via Bayesian Meta-learning on Relation Graphs

Few-shot Relation Extraction via Bayesian Meta-learning on Relation Graphs This is an implemetation of the paper Few-shot Relation Extraction via Baye

MilaGraph 36 Nov 22, 2022
[EMNLP 2021] MuVER: Improving First-Stage Entity Retrieval with Multi-View Entity Representations

MuVER This repo contains the code and pre-trained model for our EMNLP 2021 paper: MuVER: Improving First-Stage Entity Retrieval with Multi-View Entity

null 24 May 30, 2022
Implementation for our AAAI2021 paper (Entity Structure Within and Throughout: Modeling Mention Dependencies for Document-Level Relation Extraction).

SSAN Introduction This is the pytorch implementation of the SSAN model (see our AAAI2021 paper: Entity Structure Within and Throughout: Modeling Menti

benfeng 69 Nov 15, 2022
Source code for "Pack Together: Entity and Relation Extraction with Levitated Marker"

PL-Marker Source code for Pack Together: Entity and Relation Extraction with Levitated Marker. Quick links Overview Setup Install Dependencies Data Pr

THUNLP 173 Dec 30, 2022
Source code for "UniRE: A Unified Label Space for Entity Relation Extraction.", ACL2021.

UniRE Source code for "UniRE: A Unified Label Space for Entity Relation Extraction.", ACL2021. Requirements python: 3.7.6 pytorch: 1.8.1 transformers:

Wang Yijun 109 Nov 29, 2022
Source code for paper "Document-Level Relation Extraction with Adaptive Thresholding and Localized Context Pooling", AAAI 2021

ATLOP Code for AAAI 2021 paper Document-Level Relation Extraction with Adaptive Thresholding and Localized Context Pooling. If you make use of this co

Wenxuan Zhou 146 Nov 29, 2022
Wanli Li and Tieyun Qian: Exploit a Multi-head Reference Graph for Semi-supervised Relation Extraction, IJCNN 2021

MRefG Wanli Li and Tieyun Qian: "Exploit a Multi-head Reference Graph for Semi-supervised Relation Extraction", IJCNN 2021 1. Requirements To reproduc

万理 5 Jul 26, 2022
Source code and dataset for ACL2021 paper: "ERICA: Improving Entity and Relation Understanding for Pre-trained Language Models via Contrastive Learning".

ERICA Source code and dataset for ACL2021 paper: "ERICA: Improving Entity and Relation Understanding for Pre-trained Language Models via Contrastive L

THUNLP 75 Nov 2, 2022
Multi-robot collaborative exploration and mapping through Voronoi partition and DRL in unknown environment

Voronoi Multi_Robot Collaborate Exploration Introduction In the unknown environment, the cooperative exploration of multiple robots is completed by Vo

PeaceWord 6 Nov 22, 2022
Get the partition that a file belongs and the percentage of space that consumes

tinos_eisai_sy Get the partition that a file belongs and the percentage of space that consumes (works only with OSes that use the df command) tinos_ei

Konstantinos Patronas 6 Jan 24, 2022
[EMNLP 2021] Distantly-Supervised Named Entity Recognition with Noise-Robust Learning and Language Model Augmented Self-Training

RoSTER The source code used for Distantly-Supervised Named Entity Recognition with Noise-Robust Learning and Language Model Augmented Self-Training, p

Yu Meng 60 Dec 30, 2022
This respository includes implementations on Manifoldron: Direct Space Partition via Manifold Discovery

Manifoldron: Direct Space Partition via Manifold Discovery This respository includes implementations on Manifoldron: Direct Space Partition via Manifo

dayang_wang 4 Apr 28, 2022
“Data Augmentation for Cross-Domain Named Entity Recognition” (EMNLP 2021)

Data Augmentation for Cross-Domain Named Entity Recognition Authors: Shuguang Chen, Gustavo Aguilar, Leonardo Neves and Thamar Solorio This repository

RiTUAL@UH 18 Sep 10, 2022
EMNLP'2021: Simple Entity-centric Questions Challenge Dense Retrievers

EntityQuestions This repository contains the EntityQuestions dataset as well as code to evaluate retrieval results from the the paper Simple Entity-ce

Princeton Natural Language Processing 119 Sep 28, 2022
EMNLP'2021: Simple Entity-centric Questions Challenge Dense Retrievers

EntityQuestions This repository contains the EntityQuestions dataset as well as code to evaluate retrieval results from the the paper Simple Entity-ce

Princeton Natural Language Processing 50 Sep 24, 2021
Code and datasets for the paper "KnowPrompt: Knowledge-aware Prompt-tuning with Synergistic Optimization for Relation Extraction"

KnowPrompt Code and datasets for our paper "KnowPrompt: Knowledge-aware Prompt-tuning with Synergistic Optimization for Relation Extraction" Requireme

ZJUNLP 137 Dec 31, 2022
Company clustering with K-means/GMM and visualization with PCA, t-SNE, using SSAN relation extraction

RE results graph visualization and company clustering Installation pip install -r requirements.txt python -m nltk.downloader stopwords python3.7 main.

Jieun Han 1 Oct 6, 2022
PURE: End-to-End Relation Extraction

PURE: End-to-End Relation Extraction This repository contains (PyTorch) code and pre-trained models for PURE (the Princeton University Relation Extrac

Princeton Natural Language Processing 657 Jan 9, 2023
[ACL 20] Probing Linguistic Features of Sentence-level Representations in Neural Relation Extraction

REval Table of Contents Introduction Overview Requirements Installation Probing Usage Citation License ?? Introduction REval is a simple framework for

null 13 Jan 6, 2023