Metadata-Version: 2.5
Name: pyCEURsemantify
Version: 0.0.1
Summary: Semantification of the CEUR-WS publication workflow
Project-URL: Home, https://github.com/ceurws/semantify
Project-URL: Documentation, https://github.com/ceurws/semantify
Project-URL: Source, https://github.com/ceurws/semantify
Author-email: Wolfgang Fahl <wf@bitplan.com>
Maintainer-email: Wolfgang Fahl <wf@bitplan.com>
License: Apache-2.0
License-File: LICENSE
Keywords: CEUR-WS,JSON-LD,metadata,proceedings,semantification
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: beautifulsoup4>=4.12.0
Requires-Dist: pybasemkit>=0.2.0
Requires-Dist: pylodstorage[endpoint]>=0.19.9
Requires-Dist: pyyaml>=6.0
Requires-Dist: rdflib>=7.0.0
Requires-Dist: requests>=2.31.0
Requires-Dist: semantify3>=0.1.0
Requires-Dist: tqdm>=4.66.0
Provides-Extra: dev
Requires-Dist: black>=25.1.0; extra == 'dev'
Requires-Dist: isort>=6.0.1; extra == 'dev'
Provides-Extra: test
Requires-Dist: green>=3.3.0; extra == 'test'
Requires-Dist: pytest>=8.4.0; extra == 'test'
Requires-Dist: tox>=4.15.0; extra == 'test'
Description-Content-Type: text/markdown

# semantify
Semantification of the CEUR-WS publication workflow

| | |
| :--- | :--- |
| **PyPi** | [![PyPI Status](https://img.shields.io/pypi/v/pyCEURsemantify.svg)](https://pypi.python.org/pypi/pyCEURsemantify/) [![License](https://img.shields.io/github/license/ceurws/semantify.svg)](https://www.apache.org/licenses/LICENSE-2.0) [![pypi](https://img.shields.io/pypi/pyversions/pyCEURsemantify)](https://pypi.org/project/pyCEURsemantify/) [![format](https://img.shields.io/pypi/format/pyCEURsemantify)](https://pypi.org/project/pyCEURsemantify/) [![downloads](https://img.shields.io/pypi/dd/pyCEURsemantify)](https://pypi.org/project/pyCEURsemantify/) |
| **GitHub** | [![Github Actions Build](https://github.com/ceurws/semantify/actions/workflows/build.yml/badge.svg)](https://github.com/ceurws/semantify/actions/workflows/build.yml) [![Release](https://img.shields.io/github/v/release/ceurws/semantify)](https://github.com/ceurws/semantify/releases) [![Contributors](https://img.shields.io/github/contributors/ceurws/semantify)](https://github.com/ceurws/semantify/graphs/contributors) [![Last Commit](https://img.shields.io/github/last-commit/ceurws/semantify)](https://github.com/ceurws/semantify/commits/) [![GitHub issues](https://img.shields.io/github/issues/ceurws/semantify.svg)](https://github.com/ceurws/semantify/issues) [![GitHub closed issues](https://img.shields.io/github/issues-closed/ceurws/semantify.svg)](https://github.com/ceurws/semantify/issues/?q=is%3Aissue+is%3Aclosed) |
| **Code** | [![style-black](https://img.shields.io/badge/%20style-black-000000.svg)](https://github.com/psf/black) [![imports-isort](https://img.shields.io/badge/%20imports-isort-%231674b1)](https://pycqa.github.io/isort/) |
| **Docs** | [![API Docs](https://img.shields.io/badge/API-Documentation-blue)](https://ceurws.github.io/semantify/) [![formatter-docformatter](https://img.shields.io/badge/%20formatter-docformatter-fedcba.svg)](https://github.com/PyCQA/docformatter) [![style-google](https://img.shields.io/badge/%20style-google-3666d6.svg)](https://google.github.io/styleguide/pyguide.html#s3.8-comments-and-docstrings) |

See [Issue #1: Semantify CEUR-WS](https://github.com/ceurws/semantify/issues/1) for the project vision and definition of done.

## Generator
`ceursemantify` generates year, volume and paper pages for volume numbers and ranges, see [#24](https://github.com/ceurws/semantify/issues/24).
The JSON-LD of each volume is fetched from [ceur-spt](https://github.com/ceurws/ceur-spt) and mapped to the research model of
[cr.bitplan.com](https://cr.bitplan.com/index.php/CoreEntities). The year of a volume is the year of the start date of its event.

```bash
# generate volumes into the year of their event
ceursemantify 3649-4202 -o /tmp/ceur-ws-yyyy --progress
# rebuild the page of a year from the volumes present
ceursemantify --year 2024 -o /tmp/ceur-ws-yyyy
# fetch and write the volumes of a year again and rebuild its page
ceursemantify --year 2024 --regenerate -o /tmp/ceur-ws-yyyy --progress
# load all JSON-LD files into memory and serve them as SPARQL endpoint, see #18
ceursemantify --serve -o /tmp/ceur-ws-yyyy
```

Written are `yyyy/index.html`, `yyyy/Vol-N/index.html` and `yyyy/Vol-N/paperK/index.html`, each volume and paper page with an
`index.jsonld` beside it and the same JSON-LD as a `json-ld` fence in an HTML comment that
[semantify3](https://github.com/BITPlan/semantify3) extracts again.

## Embedding
For a volume published on ceur-ws.org the page of the proceedings chair stays as it is; `--embed` parses it, maps it to the
research model and embeds the JSON-LD into it, see [#28](https://github.com/ceurws/semantify/issues/28).

```bash
# embed the JSON-LD into the volume pages of the chairs and write index.jsonld next to them
ceursemantify --embed /path/to/Vol-4280 /path/to/Vol-4281/index.html
```

The page gets a `CEURSTATE=embedded` comment, the alternate link and the fence in its head; the page is only rewritten if the
embedded page parses to the same proceedings as the original one. Embedding again replaces the embedded parts.

| File | Role |
|------|------|
| `ceursemantify/model.py` | research model: Proceedings, Paper, Event, Scholar, Publisher, City, Country |
| `ceursemantify/resources/ceurspt_mapping.yaml` | the one input mapping: ceur-spt JSON-LD to the research model |
| `ceursemantify/resources/context.yaml` | JSON-LD context of the research model, with the terms the ontology does not have yet |
| `ceursemantify/resources/site.yaml` | site configuration |

Prototype: [2023](https://ceur-ws.wikidata.dbis.rwth-aachen.de/2023/), [2024](https://ceur-ws.wikidata.dbis.rwth-aachen.de/2024/),
[2025](https://ceur-ws.wikidata.dbis.rwth-aachen.de/2025/), [2026](https://ceur-ws.wikidata.dbis.rwth-aachen.de/2026/)

## Related Projects

| Project | Role |
|---------|------|
| [pyCEURmake](https://github.com/WolfgangFahl/pyCEURmake) | CEUR-WS metadata extraction and Volume Browser |
| [ceur-spt](https://github.com/ceurws/ceur-spt) | Single Point of Truth server — content negotiation (FastAPI) |
| [SemPubFlow](https://github.com/WolfgangFahl/SemPubFlow) | Metadata-first publishing workflow (nicegui) |
| [pyLoDStorage](https://github.com/WolfgangFahl/pyLoDStorage) | List-of-Dict storage with named query support |
| [geograpy3](https://github.com/somnathrakshit/geograpy3) | Location NER/NEL with Wikidata linking |
| [semantify3](https://github.com/BITPlan/semantify3) | YAML-to-triples — syntax matters |
| [snapquery](https://github.com/WolfgangFahl/snapquery) | Named parameterized query middleware |

## Papers

| Paper | Venue | Status |
|-------|-------|--------|
| [Semantification of CEUR-WS with Wikidata as a target Knowledge Graph](https://ceur-ws.org/Vol-3447/Text2KG_Paper_13.pdf) | text2kg 2023 | [accepted](https://www.wikidata.org/wiki/Q118799188) |
| [SemPubFlow: a novel Scientific Publishing Workflow using Knowledge Graphs, Wikidata and LLMs](https://www.semantic-web-journal.net/system/files/swj3657.pdf) | Semantic Web Journal | rejected |
| [Semantify CEUR-WS](https://github.com/WolfgangFahl/CEURWS_Semantification_ISWC2026) | [ISWC 2026 In-Use Track](https://iswc2026.semanticweb.org/call-for-in-use-track-papers/) | to be submitted |

## License

Apache 2.0 (under discussion)
