Simple-Questions Answering System based on Knowledge Graphs Embeddings.
$ virtualenv .env -p python3.7
$ source .env/bin/activate
$ pip install -r requirements.txt
Run in command line mode:
$ python -m kgeqa.mainRun in web browser mode - requires streamlit:
$ streamlit run app.pyWe 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.vecEntity model in.txtformat (intermediate result - not used in the app)data/ENT.vec.magnitudeEntity model inPyMagnitudeformatdata/REL.vecRelation model in.txtformat (intermediate result - not used in the app)data/REL.vec.magnitudeRelation model inPyMagnitudeformat
- Aziz Altowayan (Nov. 2019)