malcolmgreaves / Rex

Licence: apache-2.0
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"

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to Rex

Pytorch graph Rel
A PyTorch implementation of GraphRel
Stars: ✭ 204 (+871.43%)
Mutual labels:  natural-language-processing, relation-extraction
Tacred Relation
PyTorch implementation of the position-aware attention model for relation extraction
Stars: ✭ 271 (+1190.48%)
Mutual labels:  natural-language-processing, relation-extraction
Deeplearning nlp
基于深度学习的自然语言处理库
Stars: ✭ 154 (+633.33%)
Mutual labels:  natural-language-processing, relation-extraction
Exemplar
An open relation extraction system
Stars: ✭ 46 (+119.05%)
Mutual labels:  natural-language-processing, relation-extraction
Knowledge Graphs
A collection of research on knowledge graphs
Stars: ✭ 845 (+3923.81%)
Mutual labels:  natural-language-processing, relation-extraction
Languagecrunch
LanguageCrunch NLP server docker image
Stars: ✭ 281 (+1238.1%)
Mutual labels:  natural-language-processing, relation-extraction
Reside
EMNLP 2018: RESIDE: Improving Distantly-Supervised Neural Relation Extraction using Side Information
Stars: ✭ 222 (+957.14%)
Mutual labels:  natural-language-processing, relation-extraction
Fewrel
A Large-Scale Few-Shot Relation Extraction Dataset
Stars: ✭ 526 (+2404.76%)
Mutual labels:  natural-language-processing, relation-extraction
Gcn Over Pruned Trees
Graph Convolution over Pruned Dependency Trees Improves Relation Extraction (authors' PyTorch implementation)
Stars: ✭ 312 (+1385.71%)
Mutual labels:  natural-language-processing, relation-extraction
Oie Resources
A curated list of Open Information Extraction (OIE) resources: papers, code, data, etc.
Stars: ✭ 283 (+1247.62%)
Mutual labels:  natural-language-processing, relation-extraction
Usc Ds Relationextraction
Distantly Supervised Relation Extraction
Stars: ✭ 378 (+1700%)
Mutual labels:  natural-language-processing, relation-extraction
Awesome Relation Extraction
📖 A curated list of awesome resources dedicated to Relation Extraction, one of the most important tasks in Natural Language Processing (NLP).
Stars: ✭ 656 (+3023.81%)
Mutual labels:  natural-language-processing, relation-extraction
Ciff
Cornell Instruction Following Framework
Stars: ✭ 23 (+9.52%)
Mutual labels:  natural-language-processing
Twitter Bot
👻 Markov chain-based Japanese twitter bot
Stars: ✭ 12 (-42.86%)
Mutual labels:  natural-language-processing
Spacy Transformers
🛸 Use pretrained transformers like BERT, XLNet and GPT-2 in spaCy
Stars: ✭ 919 (+4276.19%)
Mutual labels:  natural-language-processing
Covid 19 Bert Researchpapers Semantic Search
BERT semantic search engine for searching literature research papers for coronavirus covid-19 in google colab
Stars: ✭ 23 (+9.52%)
Mutual labels:  natural-language-processing
Sentence Similarity Based On Semantic Nets And Corpus Statistics
This is an implementation of the paper written by Yuhua Li, David McLean, Zuhair A. Bandar, James D. O’Shea, and Keeley Crockett
Stars: ✭ 20 (-4.76%)
Mutual labels:  natural-language-processing
Node Api.ai
[DEPRECATED] Ultimate Node.JS SDK for api.ai
Stars: ✭ 12 (-42.86%)
Mutual labels:  natural-language-processing
Gigabert
Zero-shot Transfer Learning from English to Arabic
Stars: ✭ 23 (+9.52%)
Mutual labels:  relation-extraction
Nlp With Ruby
Curated List: Practical Natural Language Processing done in Ruby
Stars: ✭ 907 (+4219.05%)
Mutual labels:  natural-language-processing

Build Status Coverage Status

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"

The thesis is here.

Setup

This project uses sbt for build management. If you're unfamiliar with sbt, see the last section for some pointers.

Build

To download all dependencies and compile code, run sbt compile.

Test

To run all tests, execute sbt test.

Moreover, to see code coverage, first run coverage, then test. The coverage report will be output as an HTML file.

Command Line Applications

To produce bash scripts that will execute each individual command-line application within this codebase, execute sbt pack.

Data

This project includes data that allows one to distantly supervise relation mentions in text. The files are located under data/: a local README further explains the data content, format, and purpose.

These files are large and are stored using git-lfs. Be sure to follow the appropriate instructions and ensure that you've set up this git plugin (i.e. have performed git lfs install once).

Example

To evaluate relation extraction performance on the UIUC relation dataset using 3 fold cross- validation, first build the executable scripts with sbt pack then execute:

./target/pack/bin/relation-extraction-learning-main \
learn_eval \
-li data/uiuc_cog_comp_group-entity_and_relation_recognition_corpora/all.corp \
--input_format uiuc \
-cg true \
--cost 1 \
--epsilon 0.003 \ 
--n_cv_folds 3

Where:

  • learn_eval is the command for the script
  • -li specifies where the labeled relation data lives
  • --input_format tells the program how to interpret the file at -li -- uuic means to use the UUIC relation classification data format
  • -cg true means that candidate generation is performed
  • --cost indicates the cost-sensitive learning parameter for the SVM
  • --epsilon controls the weight converage: stop when weight updates are less then this value
  • --n_cv_folds indicates the number of folds to perform for cross-validation

Invoking this program with the --help flag, or with no arguments, will output a detailed help message to stdout.

License

Everything within this repository is copyright (2015-) by Malcolm Greaves.

Use of this code is permitted according to the stipulations of the Apache 2 license.

How to use sbt

When using sbt, it is best to start it in the "interactive shell mode". To do this, simply execute from the command line:

$ sbt

After starting up (give it a few seconds), you can execute the following commands:

compile // compiles code
pack // creates executable scripts
test // runs tests
coverage / initializes the code-coverage system, use right before 'test'
reload // re-loads the sbt build definition, including plugin definitions
update // grabs all dependencies

There are a lot more commands for sbt. And a ton of community plugins that extend sbt's functionality.

Tips

Not necessary! Just a few suggestions...

We recommend using the following configuration for sbt:

sbt -J-XX:MaxPermSize=768m -J-Xmx2g -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled

This gives some more memory to sbt, gives it a better default GC option, and enables a better class loading & unloading module.

Also, to limit the logging output of the Spark framework export this environment variable before running tests:

export SPARK_CONF_DIR="<YOUR_PATH_TO_THIS_REPO>/src/main/resources"
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].