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.

Profile and test to gain insights into the performance of your beautiful Python code

Profile and test to gain insights into the performance of your beautiful Python code View Demo - Report Bug - Request Feature QuickPotato in a nutshel

Joey Hendricks 138 Dec 06, 2022
Generate graphs with NetworkX, natively visualize with D3.js and pywebview

webview_d3 This is some PoC code to render graphs created with NetworkX natively using D3.js and pywebview. The main benifit of this approac

byt3bl33d3r 68 Aug 18, 2022
Python+Numpy+OpenGL: fast, scalable and beautiful scientific visualization

Python+Numpy+OpenGL: fast, scalable and beautiful scientific visualization

Glumpy 1.1k Jan 05, 2023
Scientific Visualization: Python + Matplotlib

An open access book on scientific visualization using python and matplotlib

Nicolas P. Rougier 8.6k Dec 31, 2022
Automate the case review on legal case documents and find the most critical cases using network analysis

Automation on Legal Court Cases Review This project is to automate the case review on legal case documents and find the most critical cases using netw

Yi Yin 7 Dec 28, 2022
This is my favourite function - the Rastrigin function.

This is my favourite function - the Rastrigin function. What sparked my curiosity and interest in the function was its complexity in terms of many local optimum points, which makes it particularly in

1 Dec 27, 2021
Farhad Davaripour, Ph.D. 1 Jan 05, 2022
Example Code Notebooks for Data Visualization in Python

This repository contains sample code scripts for creating awesome data visualizations from scratch using different python libraries (such as matplotli

Javed Ali 27 Jan 04, 2023
Open-questions - Open questions for Bellingcat technical contributors

Open questions for Bellingcat technical contributors These are difficult, long-term projects that would contribute to open source investigations at Be

Bellingcat 234 Dec 31, 2022
LinkedIn connections analyzer

LinkedIn Connections Analyzer ๐Ÿ”— https://linkedin-analzyer.herokuapp.com Hey hey ๐Ÿ‘‹ , welcome to my LinkedIn connections analyzer. I recently found ou

Okkar Min 5 Sep 13, 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
Tools for writing, submitting, debugging, and monitoring Storm topologies in pure Python

Petrel Tools for writing, submitting, debugging, and monitoring Storm topologies in pure Python. NOTE: The base Storm package provides storm.py, which

AirSage 247 Dec 18, 2021
A package for plotting maps in R with ggplot2

Attention! Google has recently changed its API requirements, and ggmap users are now required to register with Google. From a userโ€™s perspective, ther

David Kahle 719 Jan 04, 2023
Mapomatic - Automatic mapping of compiled circuits to low-noise sub-graphs

mapomatic Automatic mapping of compiled circuits to low-noise sub-graphs Overvie

Qiskit Partners 27 Nov 06, 2022
flask extension for integration with the awesome pydantic package

Flask-Pydantic Flask extension for integration of the awesome pydantic package with Flask. Installation python3 -m pip install Flask-Pydantic Basics v

249 Jan 06, 2023
Process dataframe in a easily way.

Popanda Written by Shengxuan Wang at OSU. Used for processing dataframe, especially for machine learning. The name is from "Po" in the movie Kung Fu P

ShawnWang 1 Dec 24, 2021
Jupyter notebook and datasets from the pandas Q&A video series

Python pandas Q&A video series Read about the series, and view all of the videos on one page: Easier data analysis in Python with pandas. Jupyter Note

Kevin Markham 2k Jan 05, 2023
Arras.io Highest Scores Over Time Bar Chart Race

Arras.io Highest Scores Over Time Bar Chart Race This repo contains a python script (make_racing_bar_chart.py) that can generate a csv file which can

Road 2 Jan 16, 2022
Open-source demos hosted on Dash Gallery

Dash Sample Apps This repository hosts the code for over 100 open-source Dash apps written in Python or R. They can serve as a starting point for your

Plotly 2.7k Jan 07, 2023