Giter Site home page Giter Site logo

trimf's Introduction

A Trigger-Sense Memory Flow Framework for Joint Entity andRelation Extraction

Code for TriMF: "A Trigger-Sense Memory Flow Framework for Joint Entity and Relation Extraction". accepted at WWW 2021.

Description

Setup

Requirements

pip install -r requirements.txt

Dataset Format

{"tokens": ["allan", "chernoff", "live", "from", "the", "new", "york", "stock", "exchange", "with", "more", "."], "entities": [{"type": "PER", "start": 0, "end": 2}, {"type": "FAC", "start": 5, "end": 9}], "relations": [{"type": "PHYS", "head": 0, "tail": 1}], "orig_id": "CNN_ENG_20030530_130025.12-4", "dependency": [{"tail": 0, "head": 1, "type": "nsubj"}, {"tail": 1, "head": 1, "type": "ROOT"}, {"tail": 2, "head": 1, "type": "advmod"}, {"tail": 3, "head": 2, "type": "prep"}, {"tail": 4, "head": 8, "type": "det"}, {"tail": 5, "head": 8, "type": "amod"}, {"tail": 6, "head": 7, "type": "compound"}, {"tail": 7, "head": 8, "type": "compound"}, {"tail": 8, "head": 3, "type": "pobj"}, {"tail": 9, "head": 1, "type": "prep"}, {"tail": 10, "head": 9, "type": "pobj"}, {"tail": 11, "head": 1, "type": "punct"}], "ltokens": ["aol", "time", "warner", "and", "microsoft", "are", "burying", "the", "hatchet", "."], "rtokens": ["bring", "us", "up", "to", "speed", "."]}, ··· ]

Examples

Download checkpoints from this link, and save in the data folder.

Train:

python trimf.py train --config configs/example.conf

Evaluate:

python trimf.py eval --config configs/batch_eval.conf

Acknowledgement

SpERT from https://github.com/markus-eberts/spert.git

SciBERT from https://github.com/allenai/scibert

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.