Giter Club home page Giter Club logo

owe-sbert's Introduction

Out-of-knowledge-base entities linking

1. Introduction:

This repository is the code part of the CMPUT 692 class project: A study of out-of-KB entities.

2. Dependencies:

For finding OOKB entities from text

pip install spacy
python -m spacy download en_core_web_md

For training and testing model

pip install -U sentence-transformers
pip install torch
pip install numpy
pip install tqdm

3. Dataset & model download:

After downloading, unzip and put in the corresponding directory.

4. Execution:

Recognize out-of-KB entities in a document

cd open_world
python OOKB_entities_recognition.py

The program will ask for a file name. A sample document is in open_world/example_text/sample.txt

Training a closed-world model:

Thanks to OpenKE KGC framework

cd openKE_scripts/openke
bash make.sh
cd ..
python train_transe300D_DBpedia50k.py

Traning a open-world model:

cd open-world
python run_open_world.py --mode train

Benchmarking:

cd open-world
python run_open_world.py --mode benchmark

Predict a single OOKB entity with the description:

Prepare a file with the following format:
First line: ID of the relation
Second line: description of the entity

cd open-world
python run_open_world.py --mode predict --file [filename]

A sample file is in open_world/example_text/test_predict.txt

5. Acknowledge:

owe-sbert's People

Contributors

khalilbalaree avatar

Watchers

James Cloos avatar  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.