{"id":50416224,"url":"https://github.com/scdh/selene","last_synced_at":"2026-05-31T06:02:19.599Z","repository":{"id":349990932,"uuid":"1202314657","full_name":"SCDH/selene","owner":"SCDH","description":"Normalize and transform OpenAnnotation selectors ","archived":false,"fork":false,"pushed_at":"2026-05-17T18:48:43.000Z","size":577,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-17T20:49:57.625Z","etag":null,"topics":["annotation-processing","annotations","open-annotations","tei","tei-xml","wadm","webannotation","xml","xslt"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SCDH.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-05T22:04:35.000Z","updated_at":"2026-05-17T18:48:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/SCDH/selene","commit_stats":null,"previous_names":["scdh/selene"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/SCDH/selene","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SCDH%2Fselene","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SCDH%2Fselene/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SCDH%2Fselene/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SCDH%2Fselene/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SCDH","download_url":"https://codeload.github.com/SCDH/selene/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SCDH%2Fselene/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33720897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["annotation-processing","annotations","open-annotations","tei","tei-xml","wadm","webannotation","xml","xslt"],"created_at":"2026-05-31T06:02:18.448Z","updated_at":"2026-05-31T06:02:19.595Z","avatar_url":"https://github.com/SCDH.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Tests](https://github.com/SCDH/selene/actions/workflows/test.yaml/badge.svg)](https://github.com/SCDH/selene/actions/workflows/test.yaml)\n\n# Selene Selection Engine\n\n*Selene* is a tool of processing **references to portions** of\nresources like used in stand-off annotations. The [Web Annotation Data\nModel](https://www.w3.org/TR/annotation-model/#selectors) (WADM) calls\nthe mechanisms for referencing a portion of a textual, pictorial\netc. resource **selectors**. Other standards may call them\n**pointers**. The purpose of *Selene* is processing of selectors and\npointers respectively, not the rest of stand-off annotations.\n\n*Selene* offers commands for\n\n- [normalizing selectors](#normalizing-selectors)\n- [transforming selectors](#transforming-selectors)\n- [converting selector serializations](#converting-selector-serializations)\n\n### Normalizing Selectors\n\nA selection of the same portion of a resource may be expressed in\ndifferent ways. Normalizing selectors is important for storing them in\na uniform way and key for testing equality without applying them to\nthe resource.\n\n### Transforming Selectors\n\nDeriving different representations (**images**) from a resource\n(**preimage**) is a common task, e.g. transforming an XML encoded text\nto HTML or plain text. *Selene* can transform *pointers into the\npreimage* to *pointers into the image* (**forward** transformation of\nselectors) and vice versa (**backward** transformation of selectors)\nwith the same transformation that is used for deriving a\nrepresentation of the resource. Transforming selectors is important\nfor making standoff annotations interoperable when they were\naggregated for a particular representation of a resource; it is thus a\ncorner stone of generating and processing FAIR research\ndata.\n\n| preimage | image      | Transformation Techn. | forward selector transformation    | backward selector transformation   |\n|:---------|------------|-----------------------|------------------------------------|------------------------------------|\n| XML      | XML        | arbitrary XSLT        | ✅ (XML selector to XML selector)  | ✅ (XML selector to XML selector)  |\n| XML      | XHTML      | arbitrary XSLT        | ✅ (XML selector to HTML selector) | ✅ (HTML selector to XML selector) |\n| XML      | HTML       | arbitrary XSLT        | ❓ (XML selector to HTML selector) | ❓ (HTML selector to XML selector) |\n| XML      | plain text | arbitrary XSLT        | ✅ (XML selector to text selector) | ✅ (text selector to XML selector) |\n\nCurrently, selector transformations forward and backward are only\nsupported alongside XSLT transformations of preimage to image. Why?\nBecause XSLT is a formidable technology based on a truly declarative\nprogramming paradigm. And *Selene*'s selector transformation exploits\nthe possibilities only a declarative language can provide. Lern more\nabout the preconditions to the XSLT in the [project's Wiki](wiki/XSLT).\n\nYes, as you can see in the table, *Selene* is capable of rewriting\npointers into plain text (inter-glyph character positions) to pointers\ninto XML (XPath selectors refined by inter-glyph character positions)\nif the plain text was derived from XML with XSLT.\n\n### Converting Selector Serializations\n\nConverting between different selector serialization formats.\n\n## Roadmap\n\n- Fall 2025: core library with transformation of pointers and unit\n  tests, minimal CLI\n- Winter 2025/6: implement distributed text service (other project) as\n  a deployment platform for Selene\n- Spring 2026: add REST API endpoints for normalizing and transforming\n  pointers as an extension to distributed text services\n- Sommer 2026: Introduce the technology on conferences or workshops\n\n\n## Getting Started\n\nJava version required: OpenJDK 17+\n\nTesing and building:\n\n```{shell}\n./mvnw clean test package\n```\n\nAfter building with Maven, there is a command line interface in\n`cli/target/bin/oasel`.\n\nGenerating Java Docs, which will be in `target/site/apidocs`:\n\n```{shell}\n./mvnw javadoc:aggregate\n```\n\n[Javadocs are online](https://scdh.zivgitlabpages.uni-muenster.de/selectors/selection-engine/apidocs/) for the latest release.\n\nUsage Examples (Linux):\n\n```shell\ncli/target/bin/oasel normalize test/gesang.annot1.json -l jsonld -f ttl\n```\n\n```shell\ncli/target/bin/oasel normalize test/gesang.annot1.json -l jsonld  -x \"path(root(.))\" -f ntriples\n```\n\nBuilding native executable:\n\n1. set up graalvm\n\n```shell\ntar -zxf graalvm.tgz\nexport GRAALVM_HOMT=graalvm-...\n```\n\n2. build native executable\n\n```shell\n./mvnw package -Pnative\n```\n\n\n```shell\ncli/target/bin/selwr transforms --xpath='//*:head[1]/text()[1]' --character=5 --xsl=test/text-with-toc-pkg.xsl test/Gesang.tei.xml --normalizer-xpath=\"path(.)\" --config=saxon-config.xml\n```\n\n\n\n## Further Reading\n\n- [JSON-LD compact in RIOT](https://github.com/apache/jena/issues/2031)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscdh%2Fselene","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscdh%2Fselene","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscdh%2Fselene/lists"}