{"id":28966236,"url":"https://github.com/dice-group/learnalclengths","last_synced_at":"2026-02-11T22:35:04.342Z","repository":{"id":111884711,"uuid":"464923074","full_name":"dice-group/LearnALCLengths","owner":"dice-group","description":"Concept length prediction for the ALC description logic.","archived":false,"fork":false,"pushed_at":"2025-02-12T15:18:43.000Z","size":21398,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-06-24T07:37:23.854Z","etag":null,"topics":["concept-learning","description-logics","knowledge-base","owl","owl2","web-ontology-language"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dice-group.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-03-01T14:19:31.000Z","updated_at":"2025-02-12T15:18:48.000Z","dependencies_parsed_at":"2024-05-03T22:34:25.365Z","dependency_job_id":"ba1523af-1644-424e-a10e-9359847595f5","html_url":"https://github.com/dice-group/LearnALCLengths","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":0.09090909090909094,"last_synced_commit":"47a61406d582804c9730689a8c603d37a9fb031e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dice-group/LearnALCLengths","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dice-group%2FLearnALCLengths","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dice-group%2FLearnALCLengths/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dice-group%2FLearnALCLengths/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dice-group%2FLearnALCLengths/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dice-group","download_url":"https://codeload.github.com/dice-group/LearnALCLengths/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dice-group%2FLearnALCLengths/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29348326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T20:11:40.865Z","status":"ssl_error","status_checked_at":"2026-02-11T20:10:41.637Z","response_time":97,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["concept-learning","description-logics","knowledge-base","owl","owl2","web-ontology-language"],"created_at":"2025-06-24T07:31:06.210Z","updated_at":"2026-02-11T22:35:04.315Z","avatar_url":"https://github.com/dice-group.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LearnALCLengths\nThis repository contains our implementation of concept length predictors in the ALC description logic.\n\n## Installation\n\n- Clone this repository:\n```\nhttps://github.com/dice-group/LearnALCLengths.git\n```\n- Install Anaconda3, then all required librairies by executing the following commands (Linux):\n\n1. ```conda create -n clip python==3.11.5 \u0026\u0026 conda activate clip ```\n2. ```pip install -r requirements.txt ```\n3. ```git clone https://github.com/dice-group/Ontolearn.git \u0026\u0026 cd Ontolearn \u0026\u0026 git checkout 0.5.4 \u0026\u0026 pip install -e .```\n\n- Download DL-Learner-1.4.0 from [github](https://github.com/SmartDataAnalytics/DL-Learner/releases) and extract it into this repository (cloned above)\n\n- Clone DLFoil and DLFocl [dlfoil](https://bitbucket.org/grizzo001/dl-foil.git), [dlfocl](https://bitbucket.org/grizzo001/dlfocl.git), and extract the two repositories into `LearnALCLengths/`\n\n- Install Java (version 8+) and Apache Maven (Only necessary for running DL-Learner and DL-Foil/DL-Focl)\n\n## Reproducing the reported results\n\n### Datasets (necessary for running the algorithms)\n\n- Download [datasets](https://files.dice-research.org/archive/CLIP/) and extract the zip file into `LearnALCLengths/` and rename the folder as Datasets\n\n### CLIP (our method)\n\n*Open a terminal and navigate into /reproduce_results/ ``` cd LearnALCLengths/reproduce_results/```\n- Reproduce CLIP concept learning results on all KBs ``` sh reproduce_celoe_clp_experiment_all_kbs.sh```\n- Reproduce the training of concept length predictors ``` sh reproduce_training_clp_on_all_kbs.sh```\n- Furthermore, one can train concept length predictors on a single knowledge base as follows  ``` python reproduce_training_length_predictors_K_kb.py```, where ```K``` is one of carcinogenesis, mutagenesis, semantic_bible or vicodi. Use -h to see more training options (example ```python reproduce_training_length_predictors_carcinogenesis_kb.py -h ```).\n\n### CELOE, ELTL, OCEL from DL-Learner\n\n*Open a terminal and navigate into /other_learning_systems/scripts ``` cd LearnALCLengths/dllearner/scripts```\n- Reproduce concept learning results on knowledge base K for algorithm Algo ``` python reproduce_dllearner_experiment.py --learning_systems Algo --knowledge_bases K```\n- To reproduce the results for multiple algorithms on multiple knowledge bases, use the schema ``` python reproduce_dllearner_experiment.py --learning_systems Algo1 Algo2... --knowledge_bases K1 K2...```\n\nNote that ```Algo``` is one of celoe, ocel or eltl, and ```K``` is one of carcinogenesis, mutagenesis, semantic_bible or vicodi (all lower cased)\n\n### DLFoil and DLFocl\n\n*For DLFoil, open a terminal and navigate into /dl-foil/DLFoil2* ``` cd LearnALCLengths/dl-foil/DLFoil2```\n- Run ```mvn clean install```\n- Open a different terminal and run the following ```python LearnALCLengths/generators/generate_dlfoil_config_all_kbs.py```\n- Now execute the following in the first terminal (in LearnALCLengths/dl-foil/DLFoil2): ```mvn -e exec:java -Dexec.mainClass=it.uniba.di.lacam.ml.DLFoilTest -Dexec.args=K_config.xml \u003e\u003e ../dlfoil_out_K.txt```, where `K` is one of carcinogenesis, mutagenesis, semantic_bible or vicodi.\n\nNote that DLFoil fails to solve our learning problems as it gets stuck on the refinement of certain partial descriptions.\n\n*We could not run DLFocl.* \n\nThe authors did not provide sufficient documentation to run  their algorithm; the documentation is [here](https://bitbucket.org/grizzo001/dlfocl.git)\n\n\n### Statistical Test\n\n*Open a terminal and navigate into /reproduce_results/* ``` cd LearnALCLengths/reproduce_results/```\n- Run Wilcoxon statistical test on concept learning results `All Algos vs CLIP`: ``` sh run_statistical_test_on_all_kbs.sh```\n\n### Use your own data\n\n- Add your data into Datasets: it should be a folder containing a file formatted as RDF/XML or OWL/XML and should have the same name as the folder.\n\n- Navigate into /generators and run ```python train_data/generate_training_data.py --kb your_folder_name```, use -h to see more options. The generated file Data.json under ```your_folder_name/Train_data/``` should serve for training concept length predictors, see example scripts in ```/reproduce_results/train_clp/```.\n\n- Similarly, learning problems can be generated using one of the example files in generators/learning_problems/ (replace folder names by your folder name)\n\n- Navigate into /Embeddings/Compute-Embeddings/ and run the following to embed your knowledge base: ```python run_script.py --path_dataset_folder your_folder_name```\n\n- Train concept length predictors by preparing and running your python file ``` reproduce_training_length_predictors_K_kb.py ``` following examples in ```/reproduce_results/train_clp/```.\n\n- Finally, prepare a script (see examples in ```/reproduce_results/celoe_clp/```) and run CLIP on your data. \n\n\n## Acknowledgement \nWe based our implementation on the open source implementation of [ontolearn](https://docs--ontolearn-docs-dice-group.netlify.app/). We would like to thank the Ontolearn team for the readable codebase.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdice-group%2Flearnalclengths","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdice-group%2Flearnalclengths","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdice-group%2Flearnalclengths/lists"}