Giter Site home page Giter Site logo

srravula1 / openkg Goto Github PK

View Code? Open in Web Editor NEW

This project forked from theblackcat102/language-models-are-knowledge-graphs-pytorch

1.0 1.0 0.0 238 KB

Language models are open knowledge graphs ( non official implementation )

License: MIT License

Python 100.00%

openkg's Introduction

language-models-are-knowledge-graphs-pytorch

Language models are open knowledge graphs ( work in progress )

A non official reimplementation of Language models are open knowledge graphs

The implemtation of Match is in process.py

example bob dylan

Execute MAMA(Match and Map) section

Do note the extracted results is still quite noisy and should then filtered based on relation unique pair frequency

python extract.py examples/bob_dylan.txt bert-large-cased-bob_dynlan.jsonl --language_model bert-large-cased --use_cuda true

Map

  1. Entity linking

The original download link for Stanford Entity linking is removed (nlp.stanford.edu/pubs/crosswikis-data.tar.bz2)[nlp.stanford.edu/pubs/crosswikis-data.tar.bz2]. I will use (REL)[https://github.com/informagi/REL] for entity disambiguation model (supervised instead of the original unsupervied) to achieve the same task.

  1. Relations linking (page 5, 2.2.1)

Lemmatization is done in the previous steps process.py, in this stage we remove inflection, auxiliary verbs, adjectives, adverbs words.

Adjectives extracted from here: https://gist.github.com/hugsy/8910dc78d208e40de42deb29e62df913

Adverbs extracted from here : https://raw.githubusercontent.com/janester/mad_libs/master/List%20of%20Adverbs.txt

Environment setup

This repo is run using virtualenv

virtualenv -p python3 env
source env/bin/activate
pip install -r requirements.txt

openkg's People

Contributors

theblackcat102 avatar

Stargazers

 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.