Giter Club home page Giter Club logo

coref_barebones's Introduction

Basic entity extraction pipeline using Hugging Face's neural coreference spacy model https://github.com/huggingface/neuralcoref

Installation

Run pip install -e . in a virtualenv

All requirements are listed within setup.py

If you decide to install with requirements.txt you will also need to install neural coref seperately from the Hugging Face repo https://github.com/huggingface/neuralcoref

To check you can run the named entity extraction run:

python entity/extract_entities.py

Which should run fine if the neural coref is installed correctly

To run the piplline:

Set your env variables in example_env

Load all the env variables:

source example_env

Run pipeline locally:

./launch_local.sh

Run pipeline on Google Cloud Dataflow:

To debug installation

Download Hugging Face's large neural coref model https://github.com/huggingface/neuralcoref-models/releases/download/en_coref_lg-3.0.0/en_coref_lg-3.0.0.tar.gz into this folder and install from there.

Comment out the wget CustomCommand from setup.py this way the neural coreference libary will be installed locally.

Docker installation

docker build -t minimal-coref .
docker run -it -m 10GB --oom-kill-disable -v /Users/chris/coref_barebones/:/coref_barebones/ -v /Users/chris/.gcp/:/.gcp/ -v /Users/chris/.config:/root/.config/ minimal-coref:latest /bin/bash
source /coref_barebones/.env

With dataflow image

docker run -it -m 10GB --oom-kill-disable -v /Users/chris/coref_barebones/:/coref_barebones/ -v /Users/chris/.gcp/:/.gcp/ -v /Users/chris/.config:/root/.config/ --entrypoint /bin/bash minimal-coref:latest 

coref_barebones's People

Contributors

swartchris8 avatar

Watchers

James Cloos avatar

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.