Git Product home page Git Product logo

relationextraction's Introduction

RelationExtraction

-- data_prep.py: reads and loads necessary data for the classifier.

-- features.py: contains "Mention" and "MentionPair" classes to do feature engineering.

-- run.py: contains the main function to run the whole system.

-- data folder: contains original train/dev/test file, and also extra knowledge and tree data.

-- model/train.txt/test.txt/test.tagged: outputs of the system with best performance.

Please follow the instructions below to get results. The final score should be 42.89%.

  1. Get on a department machine.
  2. Clone the GitHub repo: https://github.com/jiaeyan/RelationExtraction , and get into that repo, and run following commands (if you would like to directly check the final performance, please do STEP 7):
  3. python run.py --task train # to generate train feature file
  4. python run.py --task test # to generate test feature file
  5. sh mallet-maxent-classifier.sh -train -model=model -gold=train.txt
  6. sh mallet-maxent-classifier.sh -classify -model=model -input=test.txt > test.tagged
  7. python relation-evaluator.py data/rel-testset.gold test.tagged

Note: Step 6 takes long time, and please ignore the "ClassNotFound" error.

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.