Git Product home page Git Product logo

bites-corenlp's Introduction

This project implements three custom RDF extractors based on Stanford's CoreNLP library.

CoreNLPMentionRDFExtractor

Extracts named entities mentions, with the same output format as Stardog's entities extractor.

CoreNLPEntityLinkerRDFExtractor

Extracts and links entity mentions to existing resources in a knowledge graph. Same output format as Stardog's linker extractor.

CoreNLPRelationRDFExtractor

Extracts relations between named entity mentions. For example, the sentence:

The Orioles are a professional baseball team based in Baltimore

Will generate three triples:

entity:e435cd0347642bc7d2736155815a54e2 rdfs:label "Orioles"
entity:eb3cdb4e267d28feebb638711f8bd7b1 rdfs:label "Baltimore"
iri:e435cd0347642bc7d2736155815a54e2 relation:org:city_of_headquarters iri:eb3cdb4e267d28feebb638711f8bd7b1

Usage

  1. Download the latest release
  2. Add the jar to Stardog's classpath:
    • Copy it to server/ext or other folder in the server (e.g., server/dbms)
    • OR
    • Point the environment variable STARDOG_EXT to the its folder
  3. Restart the Stardog server
  4. CoreNLPMentionRDFExtractor, CoreNLPEntityLinkerRDFExtractor, and CoreNLPRelationRDFExtractor will be available as RDF extractors, accessible through the CLI, API, and HTTP interfaces

For example, using the CLI, if you want to add a document to BITES and extract its entities:

stardog doc put --rdf-extractors CoreNLPMentionRDFExtractor myDatabase document.pdf

CoreNLP models can consume large amounts of system memory. If greeted with a GC overhead limit exceeded error when using any of the extractors, increase the amount of memory available to Stardog.

Advanced Usage

  1. Tweak build.gradle to the language of your choice (e.g., change CoreNLP dependency to models-spanish)
  2. Run gradlew clean fatjar for a single jar, or gradlew clean copyDeps for individual dependencies
  3. Add files in build/libs to Stardog's classpath
  4. Restart the Stardog server

bites-corenlp's People

Contributors

cpdomina avatar klinovp avatar snowell avatar zacharywhitley avatar

Watchers

 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.