Skip to content

Commit

Permalink
prep initial distro for PyPi
Browse files Browse the repository at this point in the history
  • Loading branch information
ceteri committed Nov 9, 2020
1 parent 08cf143 commit 624e532
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 13 deletions.
62 changes: 52 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# kglab

This library provides a simple to use abstraction layer in Python for building knowledge graphs.
The **kglab** library provides a simple to use abstraction layer in Python
for building knowledge graphs.
For several KG projects, we kept reusing a similar working set of libraries:

* [`rdflib`](https://rdflib.readthedocs.io/)
Expand All @@ -10,11 +11,17 @@ For several KG projects, we kept reusing a similar working set of libraries:
* [`richcontext.scholapi`](https://pypi.org/project/richcontext-scholapi/)
* [`skosify`](https://skosify.readthedocs.io/)

Each of those libraries provides a useful piece of the pizzle when you need to leverage *knowledge representation*, *graph algorithms*, *entity linking*, *interactive visualization*, *metadata queries*, *axioms*, etc.
However, some of them are relatively low-level (e.g., `rdflib`) or perhaps not maintained as much (e.g., `skosify`) and there are challenges integrating them.

## Background

Each of those libraries provides a useful piece of the pizzle when you need
to leverage *knowledge representation*, *graph algorithms*, *entity linking*,
*interactive visualization*, *metadata queries*, *axioms*, etc.
However, some of them are relatively low-level (e.g., `rdflib`) or perhaps not
maintained as much (e.g., `skosify`) and there are challenges integrating them.
Challenges we kept having to reinvent work-arounds to resolve.

There are general kinds of operations that you need to perform on knowledge graphs:
There are general operations that one must perform on knowledge graphs:

* building triples
* quality assurance (e.g., axioms)
Expand All @@ -27,16 +34,44 @@ There are general kinds of operations that you need to perform on knowledge grap
* embedding
* other ML integrations

The `kglab` library, which is used in production at [Derwen](https://derwen.ai/) and its client projects, provides a reasonably "Pythonic" abstraction layer for these operations on KGs.
These class definitions can be subclassed and extended to handle more specific needs.
Meanwhile, we're also extending some of the key components with distributed versions, based on [`ray`](https://ray.io/) for better use of horizontal scale-out and parallelization.
The **kglab** library provides a reasonably "Pythonic" abstraction layer
for these operations on KGs.
These class definitions can be subclassed and extended to handle more
specific needs.
Meanwhile, we're also extending some of the key components with distributed
versions, based on [`ray`](https://ray.io/) for better use of horizontal
scale-out and parallelization.

NB: this repo is *UNDER CONSTRUCTION* and will undergo much iteration prior
to the "KG 101" tutorial at https://www.knowledgeconnexions.world/talks/kg-101/

See [wiki](https://github.com/DerwenAI/kglab/wiki) for further details.


## Installation

Prerequisites:

NB: this repo is *UNDER CONSTRUCTION* and will undergo much iteration prior to the "KG 101" tutorial at https://www.knowledgeconnexions.world/talks/kg-101/
- [Python 3.5+](https://www.python.org/downloads/)
- [rdflib](https://rdflib.readthedocs.io/)
- [NetworkX](https://networkx.org/)
- [pyvis](https://pyvis.readthedocs.io/)

See [wiki](https://github.com/DerwenAI/kglab/wiki) for further details
To install from [PyPi](https://pypi.python.org/pypi/kglab):

```
pip install kglab
```

## Outline
If you work directly from this Git repo, be sure to install the dependencies
as well:

```
pip install -r requirements.txt
```


## Tutorial Outline

1. Building a graph in RDF using `rdflib`
* [`ex01_0.ipynb`](https://github.com/DerwenAI/kglab/blob/main/ex01_0.ipynb)
Expand All @@ -52,3 +87,10 @@ See [wiki](https://github.com/DerwenAI/kglab/wiki) for further details
3. Interactive graph visualization with `pyvis`
* [`ex01_3.ipynb`](https://github.com/DerwenAI/kglab/blob/main/ex01_3.ipynb)
* render triples as an interactive graph


---

## Production Use Cases

* [Derwen](https://derwen.ai/) and its client projects
6 changes: 6 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# `kglab` changelog

## 0.1.1

2020-11-09

* first distribution on PyPi

## 0.1.0

2020-10-25
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="kglab",
version="0.1.0",
version="0.1.1",
author="Paco Nathan",
author_email="[email protected]",
description="Python wrapper for knowledge graph construction tools",
Expand All @@ -17,7 +17,7 @@
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Development Status :: 5 - Production/Stable",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Information Technology",
Expand All @@ -36,7 +36,7 @@
"rdflib",
"rdflib-jsonld",
],
keywords="knowledge graph, graph algorithms, graph visualization, rdf, skos, owl, controlled vocabulary, n3, turtle, json-ld",
keywords="knowledge graph, graph algorithms, interactive visualization, rdf, skos, owl, controlled vocabulary, managing namespaces, serialization, n3, turtle, json-ld",
license="MIT",
zip_safe=False,
)

0 comments on commit 624e532

Please sign in to comment.