Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jervenbolleman/libretranslate-rdf4j

Translate literals inside an RDF4j custom function using libretranslate
https://github.com/jervenbolleman/libretranslate-rdf4j

Last synced: 19 days ago
JSON representation

Translate literals inside an RDF4j custom function using libretranslate

Awesome Lists containing this project

README

        

Conceptual prototype for using a custom [RDF4j](https://rdf4j.eclipse.org/) function and [libretranslate](https://github.com/LibreTranslate/LibreTranslate) on demand to "auto" translate language tagged literals.

```sparql
PREFIX translate :
SELECT ?litJp ?lit
WHERE {
VALUES (?lit) {( "goedemorgen"@nl )}
BIND(translate:translate(?lit, "ja") AS ?litJp)
}
```

This should implement caching and be configured to use a non demo translation endpoint.