{"id":13605188,"url":"https://github.com/dair-iitd/kbi-regex","last_synced_at":"2025-04-12T02:32:58.873Z","repository":{"id":87166900,"uuid":"406616377","full_name":"dair-iitd/kbi-regex","owner":"dair-iitd","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-12T16:08:23.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-08-02T19:37:01.092Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dair-iitd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-09-15T04:44:15.000Z","updated_at":"2023-09-04T12:12:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"3230b561-4144-48ab-8477-39c7345fadc2","html_url":"https://github.com/dair-iitd/kbi-regex","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dair-iitd%2Fkbi-regex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dair-iitd%2Fkbi-regex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dair-iitd%2Fkbi-regex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dair-iitd%2Fkbi-regex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dair-iitd","download_url":"https://codeload.github.com/dair-iitd/kbi-regex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223489753,"owners_count":17153824,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T19:00:55.517Z","updated_at":"2024-11-07T09:31:37.326Z","avatar_url":"https://github.com/dair-iitd.png","language":"Python","funding_links":[],"categories":["📈 Datasets and Benchmarking"],"sub_categories":["Regex Queries"],"readme":"# KBI-Regex\n\nThis repository contains code and data for reproducing the results of our paper:\n\nVaibhav Adlakha, Parth Shah, Srikanta Bedathur, Mausam. [Regex Queries over Incomplete Knowledge Bases](https://www.akbc.ws/2021/papers/4YQVfA5vEJS)\n\nTo cite this work, please use the following citation:\n```\n@inproceedings{\nadlakha2021regex,\ntitle={Regex Queries over Incomplete Knowledge Bases},\nauthor={Vaibhav Adlakha and Parth Shah and Srikanta J. Bedathur and Mausam .},\nbooktitle={3rd Conference on Automated Knowledge Base Construction},\nyear={2021},\nurl={https://openreview.net/forum?id=4YQVfA5vEJS}\n}\n```\n\n## Downloading Datasets\nThe paper introduces two datasets for regex queries over incomplete knowledge bases - FB15K-Regex and Wiki100-Regex. These datasets are available to be downloaded from the following links - \n1. [FB15K-Regex](https://zenodo.org/record/7071856/files/fb15k_regex_data.zip)\n2. [Wiki100-Regex](https://zenodo.org/record/7071856/files/wiki_v2_regex_data.zip)\n\nEach dataset is a `.zip` file. This needs to be placed in a `cache/raw-datasets` directory within the project directory. The directory structure should look like the following:\n```\nkbi-regex\n     |___ cache\n            |___ raw-datasets\n                     |____ fb15k_regex_data.zip\n                     |____ wiki_v2_regex_data,zip\n```\nThe zip files will be unpacked and encoded when the code is run for the first time, and will be used for subsequent runs.\n\n\n## Running Models\nTo run the model, we first need to install the repository as a package. From the project directory, run the following command:\n```\npip install --no-index --no-deps -e .\n```\n\nUse the following command to run RotatE-Box (Free parameter + Aggregation) on FB15K-Regex\n```\npython main.py \\\n    --model RotatE --box \\\n    --kleene_plus_op free_param \\\n    --dataset fb15k \\\n    -dim 800 \\\n    --query_types \"0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 21\" \\\n    --do_train \\\n    --learning_rate 1e-4 \\\n    --lr_schedule half \\\n    --truncate_loss \\\n    --batch_size 1024 \\\n    --negative_sample_count 256 \\\n    --max_epochs 500 \\\n    --resume_from_checkpoint \u003cPATH TO KBC MODEL\u003e \\\n    --seed 0 \\\n    --num_workers 8 \\\n    --save_dir \u003cPATH TO OUTPUT DIR\u003e\n```\n## Contact\nFor queries and clarifications please contact **vaibhav.adlakha (at) mila (dot) quebec**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdair-iitd%2Fkbi-regex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdair-iitd%2Fkbi-regex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdair-iitd%2Fkbi-regex/lists"}