GithubHelp home page GithubHelp logo

fagan2888 / kge_qa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from iamaziz/kge_qa

0.0 1.0 0.0 12.52 MB

Simple-Question Answering based on Knowledge Graph Embeddings

License: MIT License

Makefile 0.39% Python 92.25% Shell 7.36%

kge_qa's Introduction

KGE QA

License: MIT

Simple-Questions Answering System based on Knowledge Graphs Embeddings.

Setup

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

Getting Started

Run in command line mode:

$ python -m kgeqa.main

Run in web browser mode - requires streamlit:

$ streamlit run app.py

Building KGE for a new domain knowledge

We can build new KGE for a new KG dataset either from the CLI or UI (streamlit interface)

From command-line:

$ python -m kgeqa.build_new_model -csv data/sample1_KG.csv
Started a model builder for data from: data/sample1_KG.csv
Building a new embedding model for 15 tokens ..
Done. See output: data/ENT.vec
Building a new embedding model for 7 tokens ..
Done. See output: data/REL.vec
Converting models to .magnitude format ..
Loading vectors... (this may take some time)
Found 15 key(s)
Each vector has 300 dimension(s)
Creating magnitude format...
Writing vectors... (this may take some time)
...
Successfully converted 'data/ENT.vec' to 'data/ENT.vec.magnitude'!
...
Successfully converted 'data/REL.vec' to 'data/REL.vec.magnitude'!
Done.

Description of the generated models:

  • data/ENT.vec Entity model in .txt format (intermediate result - not used in the app)
  • data/ENT.vec.magnitude Entity model in PyMagnitude format
  • data/REL.vec Relation model in .txt format (intermediate result - not used in the app)
  • data/REL.vec.magnitude Relation model in PyMagnitude format

Author

  • Aziz Altowayan (Nov. 2019)

kge_qa's People

Contributors

iamaziz 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.