Skip to main content

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


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)

Uploaded Source

Built Distribution

ontolearn-0.0.1-py3-none-any.whl (22.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page