Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Graph Data Science: an abstraction layer in Python for building knowledge graphs, integrated with popular graph libraries – atop Pandas, NetworkX, RAPIDS, RDFlib, pySHACL, PyVis, morph-kgc, pslpython, pyarrow, etc.

License

NotificationsYou must be signed in to change notification settings

DerwenAI/kglab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DOILicenceRepo sizeGitHub commit activityChecked with mypysecurity: banditCIdownloadssponsor

Welcome toGraph Data Science:https://derwen.ai/docs/kgl/

Thekglab library provides a simple abstraction layer in Python 3.7+for building knowledge graphs, leveraging Pandas, NetworkX, RAPIDS, RDFLib,Morph-KGC, pythonPSL, and many more.

SPECIAL REQUEST:
Which features would you like in an open source Python library for building knowledge graphs?
Please add your suggestions through this survey:
https://forms.gle/FMHgtmxHYWocprMn6
This will help us prioritize thekglab roadmap.

Reviews

@kaaloo:

"Feels like it's a Hugging Face for graphs! 🤯"

Getting Started

See the"Getting Started"section of the online documentation.

Usingkglab as a library for your Python project

We recommend installing fromPyPi orconda:

pip

python3 -m pip install kglab

pipenv

pipenv install kglab

conda

conda env create -n kglabconda activate kglabpip install kglab

Or, install from source:

If you work directly from this Git repo, be sure to install thedependencies:

pip

python3 -m pip install -U pip wheelpython3 -m pip install -r requirements.txt

pipenv

pipenv install --dev

Alternatively, to install dependencies usingconda:

conda env create -f environment.yml --forceconda activate kglab

Sample Code

Then to run some simple uses of this library:

importkglab# create a KnowledgeGraph objectkg=kglab.KnowledgeGraph()# load RDF from a URLkg.load_rdf("http://bigasterisk.com/foaf.rdf",format="xml")# measure the graphmeasure=kglab.Measure()measure.measure_graph(kg)print("edges: {}\n".format(measure.get_edge_count()))print("nodes: {}\n".format(measure.get_node_count()))# serialize as a string in "Turtle" TTL formatttl=kg.save_rdf_text()print(ttl)

See thetutorial notebooks in theexamples subdirectory forsample code and patterns to use in integratingkglab with othergraph libraries in Python:https://derwen.ai/docs/kgl/tutorial/

WARNING when installing in an existing environment:
Installing a new package in an existing environment may reveal
or create version conflicts. See thekglab requirements
inrequirements.txt before you do. For example, there are
known version conflicts regarding NumPy (>= 1.19.4) andTensorFlow 2+ (~-1.19.2)

Using Docker

For a simple approach to running the tutorials, see use ofdocker compose:https://derwen.ai/docs/kgl/tutorial/#use-docker-compose

Also, container images for each release are available on DockerHub:https://hub.docker.com/repository/docker/derwenai/kglab

To build a container image and run it for the tutorials:

docker build --pull --rm -f"docker/Dockerfile" -t kglab:latest.docker run -p 8888:8888 -it kglab

To build and run a container image for testing:

docker build --pull --rm -f"docker/testsuite.Dockerfile" -t kglabtest:latest.docker run --rm -it kglabtest
Build InstructionsNote: unless you are contributing code and updates,in most use cases won't need to build this package locally.

Instead, simply install fromPyPior useConda.

To set up the build environment locally, see the"Build Instructions"section of the online documentation.

Semantic Versioning

Beforekglab reaches releasev1.0.0 thetypes and classes may undergo substantial changes and the project isnot guaranteed to have a consistent API.

Even so, we'll try to minimize breaking changes.We'll also be sure to provide careful notes.

See:changelog.txt

Contributing Code

We welcome people getting involved as contributors to this open sourceproject!

For detailed instructions please see:CONTRIBUTING.md

License and Copyright

Source code forkglab plus its logo, documentation, and exampleshave anMIT license which issuccinct and simplifies use in commercial applications.

All materials herein are Copyright © 2020-2023 Derwen, Inc.

AttributionPlease use the following BibTeX entry for citing **kglab** if you useit in your research or software.Citations are helpful for the continued development and maintenance ofthis library.
@software{kglab,author ={Paco Nathan},title ={{kglab: a simple abstraction layer in Python for building knowledge graphs}},year =2020,publisher ={Derwen},doi ={10.5281/zenodo.6360664},url ={https://github.com/DerwenAI/kglab}}

illustration of a knowledge graph, plus laboratory glassware

Kudos

Many thanks to our open sourcesponsors;and to our contributors:@ceteri,@dvsrepo,@Ankush-Chander,@louisguitton,@tomaarsen,@Mec-iS,@jake-aft,@Tpt,@ArenasGuerreroJulian,@fils,@cutterkom,@RishiKumarRay,@gauravjaglan,@pebbie,@CatChenal,@jorisSchaller,@dmoore247,plus general support fromDerwen, Inc.;theKnowledge Graph ConferenceandConnected Data World;plus an even larger scope ofuse casesrepresented by their communities;Kubuntu Focus,theRAPIDS team @ NVIDIA,Gradient Flow,andManning Publications.

kglab contributors

Star History

Star History Chart

About

Graph Data Science: an abstraction layer in Python for building knowledge graphs, integrated with popular graph libraries – atop Pandas, NetworkX, RAPIDS, RDFlib, pySHACL, PyVis, morph-kgc, pslpython, pyarrow, etc.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

 

[8]ページ先頭

©2009-2025 Movatter.jp