In-memory Graph Database and Knowledge Graph with Natural Language Interface, compatible with Pandas

Overview

CogniPy

CogniPy for Pandas - In-memory Graph Database and Knowledge Graph with Natural Language Interface

Whats in the box

Reasoning, exploration of RDF/OWL, FluentEditor CNL files, with OWL/RL Reasoner (Jena) as well as SPARQL Graph queries (Jena) and visualization.

What you can do with this:

  1. Write your graph/ontology in Controlled Natural Language or import it from RDF/OWL
  2. Add reasoning rules/T-Box in Controlled Natural Language
  3. Import data using Pandas or scrap them from the Internet
  4. Draw the resulting, materialized graph
  5. Use SPARQL to execute graph query
  6. Use output Dataframe for further processing with Pandas

Getting started

Installation

Prerequisites:

  • If you are on Mac or Linux You MUST have mono installed on your system.
  • Graph drawing based on pydot that is dependent on GraphViz - you should try to download and install it manually. Or just conda install pydot graphviz
  • Tested with Anaconda
  • Tested on MacOS, Winows and Linux (Ubuntu)

Install cognipy on your system using :

pip install cognipy

Hello world program

In Jupyter you write:

from cognipy.ontology import Ontology #the ontology processing class
%%writefile hello.encnl
World says Hello.
Hello is a word.
onto = Ontology("cnl/file","hello.encnl")
print(onto.select_instances_of("a thing that says a word")[["says","Instance"]])

Output (Pandas DataFrame):

says Instance
0 Hello World

Examples

Example Jupyter notebooks that use CogniPy in several scenarios can be found in the Examples section

Cognipy documentation

Compiled documentation is stored on github pages here: Cognipy Documentation

Related research papers

  1. Semantic rules representation in controlled natural language in FluentEditor
  2. Collaborative Editing of Ontologies Using Fluent Editor and Ontorion
  3. Semantic OLAP with FluentEditor and Ontorion Semantic Excel Toolchain
  4. Ontology-aided software engineering
  5. Ontology of the Design Pattern Language for Smart Cities Systems

How to cite CogniPy

We would be grateful if scientific publications resulting from projects that make use of CogniPy would include the following sentence in the acknowledgments section: "This work was conducted using the CogniPy package, which is an open-source project maintained by Cognitum Services S.A. https://www.cognitum.eu"

Cognitum

Contributors

Open Source Libraries this project is build on

  1. IKVM
  2. CommandLineParser
  3. Newtonsoft.JSon
  4. ELK - ELK is an ontology reasoner that aims to support the OWL 2 EL profile. See http://elk.semanticweb.org/ for further information.
  5. HermiT - HermiT is a conformant OWL 2 DL reasoner that uses the direct semantics. It supports all OWL2 DL constructs and the datatypes required by the OWL 2 specification.
  6. Apache Jena - Jena is a Java framework for building semantic web applications. It provides tools and Java libraries to help you to develop semantic web and linked-data apps, tools and servers.
  7. OWLAPI

Building new version

nuget restore cognipy\CogniPy.sln
msbuild cognipy\CogniPy.sln /t:Rebuild /p:Configuration=Release /p:Platform="any cpu"
python setup.py bdist_wheel
python -m twine upload dist/* --verbose

FAQ

Why it is done this way?

The software emerged as an offspring of FluentEditor and therefore it has some common parts. One of them is the .net. We are planning to move these parts to java so whole stack will be more technology consistent. The convert_to_java branch already contains the project files converted automatically from .net to java. Anyway, manual crafting is now required to make it all work.

Lightweight, extensible data validation library for Python

Cerberus Cerberus is a lightweight and extensible data validation library for Python. v = Validator({'name': {'type': 'string'}}) v.validate({

eve 2.9k Dec 27, 2022
Easily convert matplotlib plots from Python into interactive Leaflet web maps.

mplleaflet mplleaflet is a Python library that converts a matplotlib plot into a webpage containing a pannable, zoomable Leaflet map. It can also embe

Jacob Wasserman 502 Dec 28, 2022
The Metabolomics Integrator (MINT) is a post-processing tool for liquid chromatography-mass spectrometry (LCMS) based metabolomics.

MINT (Metabolomics Integrator) The Metabolomics Integrator (MINT) is a post-processing tool for liquid chromatography-mass spectrometry (LCMS) based m

Sören Wacker 0 May 04, 2022
Fast visualization of radar_scenes based on oleschum/radar_scenes

RadarScenes Tools About This python package provides fast visualization for the RadarScenes dataset. The Open GL based visualizer is smoother than ole

Henrik Söderlund 2 Dec 09, 2021
a robust room presence solution for home automation with nearly no false negatives

Argos Room Presence This project builds a room presence solution on top of Argos. Using just a cheap raspberry pi zero w (plus an attached pi camera,

Angad Singh 46 Sep 18, 2022
Python scripts for plotting audiograms and related data from Interacoustics Equinox audiometer and Otoaccess software.

audiometry Python scripts for plotting audiograms and related data from Interacoustics Equinox 2.0 audiometer and Otoaccess software. Maybe similar sc

Hamilton Lab at UT Austin 2 Jun 15, 2022
This is a Cross-Platform Plot Manager for Chia Plotting that is simple, easy-to-use, and reliable.

Swar's Chia Plot Manager A plot manager for Chia plotting: https://www.chia.net/ Development Version: v0.0.1 This is a cross-platform Chia Plot Manage

Swar Patel 1.3k Dec 13, 2022
Create HTML profiling reports from pandas DataFrame objects

Pandas Profiling Documentation | Slack | Stack Overflow Generates profile reports from a pandas DataFrame. The pandas df.describe() function is great

10k Jan 01, 2023
阴阳师后台全平台(使用网易 MuMu 模拟器)辅助。支持御魂,觉醒,御灵,结界突破,秘闻副本,地域鬼王。

阴阳师后台全平台辅助 Python 版本:Python 3.8.3 模拟器:网易 MuMu | 雷电模拟器 模拟器分辨率:1024*576 显卡渲染模式:兼容(OpenGL) 兼容 Windows 系统和 MacOS 系统 思路: 利用 adb 截图后,使用 opencv 找图找色,模拟点击。使用

简讯 27 Jul 09, 2022
Matplotlib JOTA style for making figures

Matplotlib JOTA style for making figures This repo has Matplotlib JOTA style to format plots and figures for publications and presentation.

JOTA JORNALISMO 2 May 05, 2022
Tidy data structures, summaries, and visualisations for missing data

naniar naniar provides principled, tidy ways to summarise, visualise, and manipulate missing data with minimal deviations from the workflows in ggplot

Nicholas Tierney 611 Dec 22, 2022
Python Data Validation for Humans™.

validators Python data validation for Humans. Python has all kinds of data validation tools, but every one of them seems to require defining a schema

Konsta Vesterinen 670 Jan 09, 2023
An intuitive library to add plotting functionality to scikit-learn objects.

Welcome to Scikit-plot Single line functions for detailed visualizations The quickest and easiest way to go from analysis... ...to this. Scikit-plot i

Reiichiro Nakano 2.3k Dec 31, 2022
Simple and fast histogramming in Python accelerated with OpenMP.

pygram11 Simple and fast histogramming in Python accelerated with OpenMP with help from pybind11. pygram11 provides functions for very fast histogram

Doug Davis 28 Dec 14, 2022
🎨 Python3 binding for `@AntV/G2Plot` Plotting Library .

PyG2Plot 🎨 Python3 binding for @AntV/G2Plot which an interactive and responsive charting library. Based on the grammar of graphics, you can easily ma

hustcc 990 Jan 05, 2023
A Scheil-Gulliver simulation tool using pycalphad.

scheil A Scheil-Gulliver simulation tool using pycalphad. import matplotlib.pyplot as plt from pycalphad import Database, variables as v from scheil i

pycalphad 6 Dec 10, 2021
Comparing USD and GBP Exchange Rates

Currency Data Visualization Comparing USD and GBP Exchange Rates This is a bar graph comparing GBP and USD exchange rates. I chose blue for the UK bec

5 Oct 28, 2021
Data aggregated from the reports found at the MCPS COVID Dashboard into a set of visualizations.

Montgomery County Public Schools COVID-19 Visualizer Contents About this project Data Support this project About this project Data All data we use can

James 3 Jan 19, 2022
A Python toolbox for gaining geometric insights into high-dimensional data

"To deal with hyper-planes in a 14 dimensional space, visualize a 3D space and say 'fourteen' very loudly. Everyone does it." - Geoff Hinton Overview

Contextual Dynamics Laboratory 1.8k Dec 29, 2022
Python & Julia port of codes in excellent R books

X4DS This repo is a collection of Python & Julia port of codes in the following excellent R books: An Introduction to Statistical Learning (ISLR) Stat

Gitony 5 Jun 21, 2022