semantify³ - extract knowledge graph ready triples from human readable annotations whereever possible - Syntax matters!
| PyPi | |
| GitHub | |
| Code | |
| Docs |
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)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 nquadssem3 --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
--------------------
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" .