Skip to main content

A toolkit for Relation Extraction and more...

Project description

REx

Build Status Codecov Documentation Status

A toolkit for Relation Extraction and more...

This project has not finished yet, so be careful when using it.

Dependencies

  • Python>=3.6
    • torch>=1.2.0 : project is developed with torch==1.5.1, should be compatable with >=1.2.0 versions
    • numpy>=1.19.0

Installation

pip install -e .

QuickStart

mkdir project_dir && cd project_dir
python -m rex startproject project_name # planned so, but has not finished

Structures

  • io: data loading, transformation operations and data building
    • utils: data load/dump
    • instance: common wrapper to make dict structure data able to access their attributes by obj.attribute
    • vocab: vocabulary building
    • transform: data cleaning/transformation, word cutting, and some utils for constructing data
  • core: core tools for data preprocess
    • dataset: abstract dataset wrapper
    • loader: wrapper for data loaders
    • trainer: main runner for model training process
  • metrics: evaluation measures, including many kinds of metrics
    • accuracy
    • (all|filtered)_(f1|precision|recall)
      • micro
      • macro
      • average
    • (max|all)_(all|filtered)_(prc|auc)
    • p@k
  • modules: basic modules
    • embeddings
      • word2vec
      • glove
      • fasttext
      • tf-idf
      • elmo
      • bert
    • encoders
      • sentence encoders
      • bag encoders
    • selectors
      • MaxBag
      • OneBag
      • AttBag
    • decoders
      • crf
        • SimpleCRF
        • ConstraintCRF
      • span
        • SingleSpan
        • DualSpan
  • models: entire models
  • utils: others for building projects
    • config
    • logger

Dataset Compatibility Adaptation

  • IPRE preprocess
  • NYT10
  • NYT-H
  • SemEval2010-Task8
  • TACRED
  • ACE05

Support

  • Chinese sentence level relation extraction
  • Chinese bag level RE
  • English sentence level RE
  • English bag level RE

Test

python -m unittest -v

Docs

cd docs
sphinx-apidoc -o . ..
make html

LICENCE

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytorch-rex-0.0.0.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

pytorch_rex-0.0.0-py3-none-any.whl (3.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page