Food ontologies require significant effort to create and maintain, as it involves manual and time-consuming tasks. In this project, we propose a semi-supervised framework for automated ontology learning from an existing ontology scaffold by using word embeddings.
Following is a short description of each directory under the root folder.
config
: Contains all configurations files.data
: Contains all data files.hpc_scripts
: Scripts for running the code on HPC.managers
: Contains all python modules.output
: All output files go here.utils
: Other utility files used in the project go here.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
In addition to Python 3.6+, you can run the following command to install the required Python libraries.
pip install -r requirements.txt
Python package pattern
depends on libmysqlclient-dev
. For Debian / Ubuntu, install like following.
sudo apt-get install libmysqlclient-dev
You need to download the GloVe 6B pre-trained weights. Following command downloads the word embeddings in GloVe format and converts them to Word2Vec compatible format.
cd root/data/pretrain
./download_convert_glove.sh
Configuration files use a general path /path/to/project/root/directory
for compatibility. Please update these general paths to match your local computer. You can run the following script to do so.
# Update to local path.
./update_paths.sh
# You can optionally revert to the original path by running the following command.
./update_paths.sh revert
You can run all the code by running the following script. Please refer to the in-line comments of the script for details.
cd managers
python parse_foodon.py
cd ..
./run.sh
- Jason Youn @ https://github.com/jasonyoun
- Tarini Naravane @ https://github.com/nytarini
For any questions, please contact us at [email protected].
Paper is under review. This section will be updated once paper is published.
This project is licensed under the GNU GPLv3 License. Please see the LICENSE
file for details.
- We would like to thank the members of the Tagkopoulos lab for their suggestions.