All Projects → patverga → Bran

patverga / Bran

Licence: apache-2.0
Full abstract relation extraction from biological texts with bi-affine relation attention networks

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Bran

Nre
Neural Relation Extraction, including CNN, PCNN, CNN+ATT, PCNN+ATT
Stars: ✭ 795 (+616.22%)
Mutual labels:  relation-extraction
Exemplar
An open relation extraction system
Stars: ✭ 46 (-58.56%)
Mutual labels:  relation-extraction
Copymtl
AAAI20 "CopyMTL: Copy Mechanism for Joint Extraction of Entities and Relations with Multi-Task Learning"
Stars: ✭ 97 (-12.61%)
Mutual labels:  relation-extraction
Gigabert
Zero-shot Transfer Learning from English to Arabic
Stars: ✭ 23 (-79.28%)
Mutual labels:  relation-extraction
Jointre
End-to-end neural relation extraction using deep biaffine attention (ECIR 2019)
Stars: ✭ 41 (-63.06%)
Mutual labels:  relation-extraction
Rcnn Relation Extraction
Tensorflow Implementation of Recurrent Convolutional Neural Network for Relation Extraction
Stars: ✭ 64 (-42.34%)
Mutual labels:  relation-extraction
Lightnlp
基于Pytorch和torchtext的自然语言处理深度学习框架。
Stars: ✭ 739 (+565.77%)
Mutual labels:  relation-extraction
Pytorch multi head selection re
BERT + reproduce "Joint entity recognition and relation extraction as a multi-head selection problem" for Chinese and English IE
Stars: ✭ 105 (-5.41%)
Mutual labels:  relation-extraction
Bbw
Semantic annotator: Matching CSV to a Wikibase instance (e.g., Wikidata) via Meta-lookup
Stars: ✭ 42 (-62.16%)
Mutual labels:  relation-extraction
Relation extraction
Relation Extraction using Deep learning(CNN)
Stars: ✭ 96 (-13.51%)
Mutual labels:  relation-extraction
Knowledge Graphs
A collection of research on knowledge graphs
Stars: ✭ 845 (+661.26%)
Mutual labels:  relation-extraction
Rex
REx: Relation Extraction. Modernized re-write of the code in the master's thesis: "Relation Extraction using Distant Supervision, SVMs, and Probabalistic First-Order Logic"
Stars: ✭ 21 (-81.08%)
Mutual labels:  relation-extraction
Distre
[ACL 19] Fine-tuning Pre-Trained Transformer Language Models to Distantly Supervised Relation Extraction
Stars: ✭ 75 (-32.43%)
Mutual labels:  relation-extraction
Nrepapers
Must-read papers on neural relation extraction (NRE)
Stars: ✭ 831 (+648.65%)
Mutual labels:  relation-extraction
Intra Bag And Inter Bag Attentions
Code for NAACL 2019 paper: Distant Supervision Relation Extraction with Intra-Bag and Inter-Bag Attentions
Stars: ✭ 98 (-11.71%)
Mutual labels:  relation-extraction
Entity Relation Extraction
Entity and Relation Extraction Based on TensorFlow and BERT. 基于TensorFlow和BERT的管道式实体及关系抽取,2019语言与智能技术竞赛信息抽取任务解决方案。Schema based Knowledge Extraction, SKE 2019
Stars: ✭ 784 (+606.31%)
Mutual labels:  relation-extraction
Chinese Relation Extraction
Relation Extraction 中文关系提取
Stars: ✭ 57 (-48.65%)
Mutual labels:  relation-extraction
Atnre
Adversarial Training for Neural Relation Extraction
Stars: ✭ 108 (-2.7%)
Mutual labels:  relation-extraction
Zhopenie
Chinese Open Information Extraction (Tree-based Triple Relation Extraction Module)
Stars: ✭ 98 (-11.71%)
Mutual labels:  relation-extraction
Tre
[AKBC 19] Improving Relation Extraction by Pre-trained Language Representations
Stars: ✭ 95 (-14.41%)
Mutual labels:  relation-extraction

Full Abstract Relation Extraction from Biological Texts with Bi-affine Relation Attention Networks

This code was used in the paper:

Simultaneously Self-attending to All Mentions for Full-Abstract Biological Relation Extraction
Patrick Verga , Emma Strubell, and Andrew McCallum.
North American Chapter of the Association for Computational Linguistics (NAACL) 2018

Requirements

python version 2.7 tensorflow version 1.0.1

Setup Environment Variables

From this directory call: source set_environment.sh
Note: this will only set the paths for this session.

Processing Data

CDR

Process the CDR dataset
${CDR_IE_ROOT}/bin/process_CDR/process_CDR.sh

Process the CDR dataset including additional weakly labeled data
${CDR_IE_ROOT}/bin/process_CDR/process_CDR_extra_data.sh

These scripts will use byte-pair encoding (BPE) tokenization. There are also scripts to tokenize using the Genia tokenizer.

Run Model

Train a model locally on gpu id 0
${CDR_IE_ROOT}/bin/run.sh ${CDR_IE_ROOT}/configs/cdr/relex/cdr_2500 0

If you are using a cluster with Slurm, you can instead use this command:
${CDR_IE_ROOT}/bin/srun.sh ${CDR_IE_ROOT}/configs/cdr/relex/cdr_2500

Saving loading models

By default the model will be evaulated on the CDR dev set. To save the best model to the file 'model.tf', add the save_model flag
${CDR_IE_ROOT}/bin/run.sh ${CDR_IE_ROOT}/configs/cdr/relex/cdr_2500 0 --save_model model.tf

To load a saved model, run
${CDR_IE_ROOT}/bin/run.sh ${CDR_IE_ROOT}/configs/cdr/relex/cdr_2500 0 --load_model path/to/model.tf

Pretrained Models

You can download some pretrained models here

Generating the CTD dataset

This script will generate the full CTD dataset. The following command will tokenize using BPE with a budget of 50k tokens.
${CDR_IE_ROOT}/bin/process_CTD/generate_full_CTD_data.sh

You can also generate the data using the genia tokenizer with
${CDR_IE_ROOT}/bin/process_CTD/generate_full_CTD_data_genia.sh

By default, abstracts with > 500 tokens are discarded. To not filter you can change the MAX_LEN variable to a very large number.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].