Skip to main content

semantify3

semantify³ - extract knowledge graph ready triples from human readable annotations whereever possible - Syntax matters!

PyPi PyPI Status License pypi format downloads
GitHub Github Actions Build Release Contributors Last Commit GitHub issues GitHub closed issues
Code style-black imports-isort
Docs API Docs formatter-docformatter style-google

Documentation

Wiki

Authors

Usage

usage: sem3 [-h] [-a] [-d] [--debugLocalPath DEBUGLOCALPATH] [--debugPort DEBUGPORT]
            [--debugRemotePath DEBUGREMOTEPATH] [--debugServer DEBUGSERVER] [-f] [-q] [-v] [-V] [-i INPUT]
            [-o OUTPUT] [--format {hext,json-ld,longturtle,n3,nquads,nt,nt11,ntriples,pretty-xml,trig,trix,ttl,turtle,xml}]
            [files ...]

Extract knowledge graph ready triples from human-readable annotations wherever possible — Syntax matters!

positional arguments:
  files

options:
  -h, --help            show this help message and exit
  -a, --about           show version info and open documentation
  -d, --debug           enable debug output
  --debugLocalPath DEBUGLOCALPATH
                        remote debug Server path mapping - localPath - path on machine where python runs
  --debugPort DEBUGPORT
                        remote debug Port [default: 5678]
  --debugRemotePath DEBUGREMOTEPATH
                        remote debug Server path mapping - remotePath - path on debug server
  --debugServer DEBUGSERVER
                        remote debug Server
  -f, --force           force overwrite or unsafe actions
  -q, --quiet           suppress all output
  -v, --verbose         increase output verbosity
  -V, --version         show program's version number and exit
  -i INPUT, --input INPUT
                        Input file glob expression
  -o OUTPUT, --output OUTPUT
                        Output file path for triples
  --format {hext,json-ld,longturtle,n3,nquads,nt,nt11,ntriples,pretty-xml,trig,trix,ttl,turtle,xml}
                        Output serialization format (default: turtle)

RDF fences

Besides yaml and sidif a fence may carry RDF directly. The fence label is the name of an rdflib parser: hext, json-ld, n3, nquads, nt, nt11, ntriples, trig, trix, ttl, turtle, xml. The marker is the first line inside the fence, the rest is parsed in the given format and merged into the output. Named graphs of quad formats such as trig are kept for the quad output formats hext, nquads, trig and trix.

# 🌐🕸
<http://example.org/#spiderman> <http://www.perceive.net/schemas/relationship/enemyOf> <http://example.org/#green-goblin> .

Examples per format are in sem3_examples, e.g. a json-ld fence in an HTML comment:

sem3 --extract sem3_examples/ceur_ws_vol3889.html
sem3 sem3_examples/trig_bob_alice.md --format nquads

Examples

markup extraction
sem3 --extract -i "**/*.py"
1: yaml in extractor.py:3
extractor:
  isA: PythonModule
  author: Wolfgang Fahl
  createdAt: 2025-11-29
  purpose: extraction of relevant markup snippets for semantify³.
--------------------
2: yaml in sem3_cmd.py:3
sem3_cmd:
  isA: PythonModule
  author: Wolfgang Fahl
  createdAt: 2025-11-29
  purpose: Command-line interface for semantify³.
--------------------
3: yaml in test_cmd.py:3
test_cmd:
  isA: PythonTestModule
  author: Wolfgang Fahl
  createdAt: 2025-11-29
  purpose: Unit tests for the semantify³ CLI.
--------------------
4: sidif in test_extractor.py:2
test_extractor isA PythonModule
  "Wolfgang Fahl" is author of it
  "2025-11-29" is createdAt of it
  "Test main micro annotation snippet extraction" is purpose of it
--------------------
5: yaml in test_extractor.py:63
ypgen.bitplan.com:
  isA: Service
  ui: nicegui
  url: https://ypgen.bitplan.com
  createdAt: 2024-07-23T09:19:32.709025
  publicity: intranet
--------------------
triple conversion
sem3 -i "**/*.py"
@prefix python_module: <https://semantify3.bitplan.com/source_code/> .

python_module:base_sem3test a python_module:PythonModule ;
    python_module:author "Wolfgang Fahl" ;
    python_module:createdAt "2025-11-30" ;
    python_module:isA "PythonModule" ;
    python_module:name "base_sem3test" ;
    python_module:purpose "Base Test class for semantify³ tests" .

python_module:extractor a python_module:PythonModule ;
    python_module:author "Wolfgang Fahl" ;
    python_module:createdAt "2025-11-29" ;
    python_module:isA "PythonModule" ;
    python_module:name "extractor" ;
    python_module:purpose "extraction of relevant markup snippets for semantify³." ;
    python_module:source "sem3/extractor.py:3" .

python_module:lod2rdf a python_module:PythonModule ;
    python_module:author "Wolfgang Fahl" ;
    python_module:createdAt "2025-11-10" ;
    python_module:isA "PythonModule" ;
    python_module:name "lod2rdf" ;
    python_module:purpose "list of dict to RDF conversion for semantify³." ;
    python_module:source "sem3/lod2rdf.py:2" .

python_module:sem3_cmd a python_module:PythonModule ;
    python_module:author "Wolfgang Fahl" ;
    python_module:createdAt "2025-11-29" ;
    python_module:isA "PythonModule" ;
    python_module:name "sem3_cmd" ;
    python_module:purpose "Command-line interface for semantify³." ;
    python_module:source "sem3/sem3_cmd.py:3" .

python_module:test_cmd a python_module:PythonModule ;
    python_module:author "Wolfgang Fahl" ;
    python_module:createdAt "2025-11-29" ;
    python_module:isA "PythonTestModule" ;
    python_module:name "test_cmd" ;
    python_module:purpose "Unit tests for the semantify³ CLI." ;
    python_module:source "tests/test_cmd.py:3" .

python_module:test_extractor a python_module:PythonModule ;
    python_module:author "Wolfgang Fahl" ;
    python_module:createdAt "2025-11-29" ;
    python_module:isA "PythonModule" ;
    python_module:name "test_extractor" ;
    python_module:purpose "Test main micro annotation snippet extraction" .

python_module:ypgen.bitplan.com a python_module:PythonModule ;
    python_module:createdAt "2024-07-23 09:19:32.709025" ;
    python_module:isA "Service" ;
    python_module:name "ypgen.bitplan.com" ;
    python_module:publicity "intranet" ;
    python_module:source "tests/test_extractor.py:42" ;
    python_module:ui "nicegui" ;
    python_module:url "https://ypgen.bitplan.com" .

Metadata

Release files for semantify3 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for semantify3 0.1.0
File Size Uploaded
semantify3-0.1.0.tar.gz 29.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for semantify3 0.1.0
File Interpreter ABI Platform
semantify3-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 48.3 kB

Release files / semantify3-0.1.0.tar.gz

Download URL semantify3-0.1.0.tar.gz
Size 29.9 kB
Tags Source
SHA-256 checksum
How to use checksums
137aeecf543ec4bb50d94b69bdbe7039f3003a895c45bc67784dddde5db392cd
BLAKE2b-256 checksum
How to use checksums
9aaba3099c48a083242d550537b9b091e65d0e41238ecb173230ca11dbae9774
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release files / semantify3-0.1.0-py3-none-any.whl

Download URL semantify3-0.1.0-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e89c3da048542214700b1264a3f3425475a760c90a4acae3ab685719f9621b38
BLAKE2b-256 checksum
How to use checksums
43d95e67c28daee4646f9bc2cb9d895a7c3c59cb72eb9fcd970e7fe31205751a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page