Skip to main content

Python library for RDF Schemas generation from prompts using GPT-3 magic 🪄🪄🪄

Project description

SchemaGPT

Note: The generated RDF Schemas are not 100% accurate and may require manual correction.

SchemaGPT is a Python library that utilizes the power of OpenAI's GPT-3 and schema.org vocabulary to generate RDF Schemas from natural language.

The library aims to simplify the process of creating RDF Schemas by automatically generating them from a user-defined description written in natural language.

The generated Schemas are in the form of RDF, a popular data model for semantic web technologies, making it easier for developers to work with linked data.

Who can benefit from using this library?

Anyone who wants to simplify the process of creating RDF Schemas for linked data can benefit from using the SchemaGPT library. This includes software developers, data scientists, semantic web practitioners, and anyone else who needs to work with RDF data. The library is especially useful for those who are not familiar with the intricacies of RDF Schema creation, as it provides a way to generate Schemas from a natural language description, making the process much easier and faster.

Installation

To install SchemaGPT, simply run the following command using pip:

pip install schemagpt

or using Poetry:

poetry add schemagpt

Usage

Using SchemaGPT is straightforward. Here's a simple example:

from schemagpt import SchemaGPT

generator = SchemaGPT(<YOUR_OPENAI_API_KEY>)
schema = generator.schema("Tesla Model X")
print(schema)

This will generate the following RDF Schema:

{
  "@context": "https://schema.org",
  "@type": "Car",
  "name": "Tesla Model X",
  "brand": {
    "@type": "Brand",
    "name": "Tesla"
  },
  "model": "Model X"
}

Features

Feature Status
Schemas generation/updates using natural language :white_check_mark:
Schemas validation/fixes (according to schema.org) with Pydantic :construction:

Supported formats for RDF Schemas

Format Description Status
RDF/XML The standard XML format for RDF :x:
Turtle A terse, human-readable RDF syntax :x:
N-Triples A line-based, plain-text format for RDF :x:
N-Quads A line-based, plain-text format for RDF with context information :x:
JSON-LD A JSON-based format for RDF :white_check_mark:

Contribution

SchemaGPT is open-source. If you have an idea for a new feature, or you've found a bug, please feel free to open an issue or submit a pull request.

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

schemagpt-0.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

schemagpt-0.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file schemagpt-0.1.0.tar.gz.

File metadata

  • Download URL: schemagpt-0.1.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.11.0 Darwin/22.2.0

File hashes

Hashes for schemagpt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0da3a54039fb53ffb94a30a9d788f08611d380f241578528be4c219f31d2643f
MD5 146913d9396716a9c24e22130ab6e38a
BLAKE2b-256 8989d0e072d08f11bd20b7faabdd953f91f17aff4999c5ded2643688f8fe39e2

See more details on using hashes here.

File details

Details for the file schemagpt-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: schemagpt-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.11.0 Darwin/22.2.0

File hashes

Hashes for schemagpt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3910c4113e483c24612c751fc443dcf987dbd410852cb094d5981f746e1ea65f
MD5 d051cb0b2d8169a6c6abb17d0f1371d1
BLAKE2b-256 c274cb932b2e5fd3ea25a65d427d8ac840ad2f7d72d3d19b813d381ec6383c54

See more details on using hashes here.

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