Ontolearn is an open-source software library for structured machine learning in Python.Ontolearn includes modules for processing knowledge bases, inductive logic programming and ontology. engineering.
Project description
Ontolearn
Ontolearn is an open-source software library for structured machine learning in Python. Ontolearn includes modules for processing knowledge bases, representation learning, inductive logic programming and ontology engineering.
Current Installation
1) git clone https://github.com/dice-group/OntoPy.git
2) conda create -n temp python=3.6.2 # Or be sure that your have Python => 3.6.
3) conda activate temp
4) python ontolearn/setup.py install
# After you receive this Finished processing dependencies for OntoPy==0.0.1
5) python -c "import ontolearn"
Later Installation
pip install ontolearn
Usage
from ontolearn import KnowledgeBase, Refinement
kb = KnowledgeBase(path='data/family-benchmark_rich_background.owl')
rho = Refinement(kb)
for refs in enumerate(rho.refine(kb.thing)):
print(refs)
from ontolearn import KnowledgeBase,SampleConceptLearner
kb = KnowledgeBase(path='data/family-benchmark_rich_background.owl')
model = SampleConceptLearner(knowledge_base=kb,iter_bound=100,verbose=False)
p = {'http://www.benchmark.org/family#F10M173', 'http://www.benchmark.org/family#F10M183'}
n = {'http://www.benchmark.org/family#F1F5', 'http://www.benchmark.org/family#F1F7'}
model.predict(pos=p, neg=n)
model.show_best_predictions(top_n=10)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ontolearn-0.0.1.tar.gz
(77.9 kB
view hashes)
Built Distribution
ontolearn-0.0.1-py3-none-any.whl
(22.3 kB
view hashes)
Close
Hashes for ontolearn-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fb44770b63edc1ccd1d8ec1d47741e7916d64c36f3085c31c0c1a3283953f59 |
|
MD5 | 07fcd657f0fc38a66a999674f60ed19d |
|
BLAKE2b-256 | 634b69d5eefa0e6d2443eb31c7d83ced2052bdf3538fc8a982f1e39086c6b075 |