Please follow the tutorial below to create your SynKB-like search engine.
Format your entity inference results as slot_sample.json.
Download Elasticsearch package on your server (we use version 6.8.19). Then start Elasticsearch service by running the following command under elasticsearch directory.
cd elasticsearch-6.8.19
./bin/elasticsearch
The default address for Elasticsearch is 127.0.0.1:9200. You could check if you have successfully started the service by visiting the above address.
python load_elastic.py --index_name chemu --file_flag 1 --dir_file_name slot_sample.json
Note that, if you change --index_name in the command, you need to update the index_name in load_elastic.py accordingly. Also, if you have a large dataset, this step may take a while.
cd SynKB
python manage.py runserver 0.0.0.0:YOUR_PORT
Format your semantic graph data as semantic_graph_sample.json.
python convert_odinson_format.py --input_file semantic_graph_sample.json --output_dir OUPUT_DIR
git clone https://github.com/bflashcp3f/odinson.git
cd odinson
git checkout synkb
mkdir -p extra/data/pets/docs
mv PRE-INDEXED_DATA/* extra/data/pets/docs
sbt "extra/runMain ai.lum.odinson.extra.IndexDocuments"
sbt backend/run