{"id":13781224,"url":"https://github.com/SPARQL-Anything/sparql.anything","last_synced_at":"2025-05-11T14:35:00.255Z","repository":{"id":37740221,"uuid":"303967701","full_name":"SPARQL-Anything/sparql.anything","owner":"SPARQL-Anything","description":"SPARQL Anything is a system for Semantic Web re-engineering that allows users to ... query anything with SPARQL.","archived":false,"fork":false,"pushed_at":"2025-03-26T12:41:05.000Z","size":52835,"stargazers_count":238,"open_issues_count":44,"forks_count":13,"subscribers_count":13,"default_branch":"v1.0-DEV","last_synced_at":"2025-03-26T13:31:13.105Z","etag":null,"topics":["csv","json","knowledge-graph-construction","linked-data","rdf","semantic-web","sparql","xml"],"latest_commit_sha":null,"homepage":"https://sparql-anything.cc/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SPARQL-Anything.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"patreon":"SPARQLAnything"}},"created_at":"2020-10-14T09:36:24.000Z","updated_at":"2025-03-26T12:41:09.000Z","dependencies_parsed_at":"2023-10-16T23:55:36.468Z","dependency_job_id":"cc34d1e6-3cb3-48eb-8e2b-4459f931662f","html_url":"https://github.com/SPARQL-Anything/sparql.anything","commit_stats":null,"previous_names":["spice-h2020/sparql.anything"],"tags_count":51,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SPARQL-Anything%2Fsparql.anything","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SPARQL-Anything%2Fsparql.anything/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SPARQL-Anything%2Fsparql.anything/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SPARQL-Anything%2Fsparql.anything/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SPARQL-Anything","download_url":"https://codeload.github.com/SPARQL-Anything/sparql.anything/tar.gz/refs/heads/v1.0-DEV","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253580362,"owners_count":21930931,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["csv","json","knowledge-graph-construction","linked-data","rdf","semantic-web","sparql","xml"],"created_at":"2024-08-03T18:01:24.002Z","updated_at":"2025-05-11T14:35:00.242Z","avatar_url":"https://github.com/SPARQL-Anything.png","language":"Java","readme":"[![DOI](https://zenodo.org/badge/303967701.svg)](https://zenodo.org/badge/latestdoi/303967701)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Java 17](https://github.com/sparql-anything/sparql.anything/actions/workflows/maven_Java17.yml/badge.svg?branch=v1.0-DEV)](https://github.com/sparql-anything/sparql.anything/actions/workflows/maven_Java17.yml)\n[![CodeQL](https://github.com/SPARQL-Anything/sparql.anything/actions/workflows/codeql-analysis.yml/badge.svg?branch=v1.0-DEV)](https://github.com/SPARQL-Anything/sparql.anything/actions/workflows/codeql-analysis.yml)\n[![How to](https://img.shields.io/badge/How%20to-use-green.svg)](#usage)\n[![How to](https://img.shields.io/badge/How%20to-join-blue.svg)](https://forms.gle/t1paTLz7jVu3RYnu8)\n\n# SPARQL Anything\n\nSPARQL Anything is a system for Semantic Web re-engineering that allows users to ... query anything with SPARQL.\n\n## Quickstart\n\nOne of the most common uses of SPARQL Anything is to start with some structured data (e.g. csv) and produce RDF using a particular ontology (e.g. [gist](https://github.com/semanticarts/gist)).\nHere is how that can be done.\n\n```bash\n# have java and curl installed\n$ curl -L -O 'https://github.com/SPARQL-Anything/sparql.anything/releases/download/0.9.0/sparql-anything-0.9.0.jar'\n```\n\n```csv\n$ cat some.csv\nid,name,height_inches\n5,alice,66\n2,fred,67\n9,william,73\n```\n\n```sparql\n# first let's write a simple query that just shows us the Facade-X representaion of the csv\n$ cat some.rq \nPREFIX  xyz:  \u003chttp://sparql.xyz/facade-x/data/\u003e\nPREFIX  fx:   \u003chttp://sparql.xyz/facade-x/ns/\u003e\nCONSTRUCT { ?s ?p ?o  }\nWHERE\n  { SERVICE \u003cx-sparql-anything:\u003e\n      { fx:properties\n                  fx:location     \"some.csv\" ;\n                  fx:csv.headers  \"true\" .\n        ?s        ?p              ?o\n      }\n  }\n```\n\n```turtle\n$ java -jar sparql-anything-0.9.0.jar --query some.rq \n[main] INFO com.github.sparqlanything.cli.SPARQLAnything - SPARQL anything\n@prefix fx:  \u003chttp://sparql.xyz/facade-x/ns/\u003e .\n@prefix xyz: \u003chttp://sparql.xyz/facade-x/data/\u003e .\n\n[ a       fx:root ;\n  \u003chttp://www.w3.org/1999/02/22-rdf-syntax-ns#_1\u003e\n          [ xyz:height_inches  \"66\" ;\n            xyz:id             \"5\" ;\n            xyz:name           \"alice\"\n          ] ;\n  \u003chttp://www.w3.org/1999/02/22-rdf-syntax-ns#_2\u003e\n          [ xyz:height_inches  \"67\" ;\n            xyz:id             \"2\" ;\n            xyz:name           \"fred\"\n          ] ;\n  \u003chttp://www.w3.org/1999/02/22-rdf-syntax-ns#_3\u003e\n          [ xyz:height_inches  \"73\" ;\n            xyz:id             \"9\" ;\n            xyz:name           \"william\"\n          ]\n] .\n```\n\n```sparql\n# and now you can use everything you know about SPARQL to construct the RDF you want\n# by transforming the Facade-X representation into the desired RDF\n$ cat some.rq\nPREFIX  xyz:  \u003chttp://sparql.xyz/facade-x/data/\u003e\nPREFIX  fx:   \u003chttp://sparql.xyz/facade-x/ns/\u003e\nPREFIX  ex:   \u003chttp://example.com/\u003e\nPREFIX  xsd:  \u003chttp://www.w3.org/2001/XMLSchema#\u003e\nPREFIX  gist: \u003chttps://w3id.org/semanticarts/ns/ontology/gist/\u003e\nCONSTRUCT {\n?person a gist:Person ;\n  gist:name ?name ;\n  gist:hasMagnitude ?height_magnitude .\n?height_magnitude a gist:Extent ;\n  gist:hasUnitOfMeasure gist:_inch ;\n  gist:numericValue ?height .\n}\nWHERE\n  { SERVICE \u003cx-sparql-anything:\u003e\n      { fx:properties\n                  fx:location     \"some.csv\" ;\n                  fx:csv.headers  \"true\" .\n        ?row xyz:height_inches ?height_string .\n        ?row xyz:id ?id_string .\n        ?row xyz:name ?name .\n        bind(bnode() as ?height_magnitude)\n        bind(xsd:float(?height_string) as ?height)\n        bind(iri(concat(str(ex:),\"Person/\",?id_string)) as ?person)\n      }\n  }\n```\n\n```turtle\n$ java -jar sparql-anything-0.9.0.jar --query some.rq\n@prefix ex:   \u003chttp://example.com/\u003e .\n@prefix fx:   \u003chttp://sparql.xyz/facade-x/ns/\u003e .\n@prefix gist: \u003chttps://w3id.org/semanticarts/ns/ontology/gist/\u003e .\n@prefix xsd:  \u003chttp://www.w3.org/2001/XMLSchema#\u003e .\n@prefix xyz:  \u003chttp://sparql.xyz/facade-x/data/\u003e .\n\n\u003chttp://example.com/Person/9\u003e\n        a                  gist:Person ;\n        gist:hasMagnitude  [ a                      gist:Extent ;\n                             gist:hasUnitOfMeasure  gist:_inch ;\n                             gist:numericValue      \"73\"^^xsd:float\n                           ] ;\n        gist:name          \"william\" .\n\n\u003chttp://example.com/Person/2\u003e\n        a                  gist:Person ;\n        gist:hasMagnitude  [ a                      gist:Extent ;\n                             gist:hasUnitOfMeasure  gist:_inch ;\n                             gist:numericValue      \"67\"^^xsd:float\n                           ] ;\n        gist:name          \"fred\" .\n\n\u003chttp://example.com/Person/5\u003e\n        a                  gist:Person ;\n        gist:hasMagnitude  [ a                      gist:Extent ;\n                             gist:hasUnitOfMeasure  gist:_inch ;\n                             gist:numericValue      \"66\"^^xsd:float\n                           ] ;\n        gist:name          \"alice\" .\n```\n\n## Main features\n\n- Provides a homogeneous view over heterogeneous  data sources, thanks to the Facade-X meta-model (see [Facade-X specification](Facade-X.md) and [System overview](SystemOverview.md) )\n- Query files in plain SPARQL 1.1, via the `SERVICE \u003cx-sparql-anything:\u003e` (see [configuration](#Configuration)) and\n  build knowledge graphs with `CONSTRUCT` queries\n- [Supported formats](#supported-formats): XML, JSON, CSV, HTML, Excel, Text, Binary, EXIF, File System, Zip/Tar,\n  Markdown, YAML, Bibtex, DOCx, PPTX (see [pages dedicated to single formats](#supported-formats))\n- Transforms [files, inline content, or the output of an external command](#general-purpose-options)\n- Generates RDF, RDF-Star, and tabular data (thanks to SPARQL)\n- Full-fledged [HTTP client](Configuration.md#http-options) to query Web APIs (headers, authentication, all methods\n  supported)\n- [Functions library](#functions-and-magic-properties) for RDF sequences, strings, hashes, easy entity building, ...\n- Combine multiple SERVICE clauses into complex data integration queries (thanks to SPARQL)\n- Query templates (using [BASIL variables](#query-templates-and-variable-bindings))\n- Save and reuse SPARQL `Results Sets` as input for [parametric queries](#query-templates-and-variable-bindings)\n- Slice large CSV, JSON and XML files with an iterator-like execution style (\n  see [#202](https://github.com/SPARQL-Anything/sparql.anything/issues/202)\n  and [#203](https://github.com/SPARQL-Anything/sparql.anything/issues/203))\n- Supports an [on-disk option](#Configuration) (with Apache Jena TDB2)\n\n## Introduction\n\nSPARQL Anything uses a single generic abstraction for all data source formats called Facade-X.\n\n### Facade-X\n\nFacade-X is a simplistic meta-model used by SPARQL Anything transformers to generate RDF data from diverse data sources.\nIntuitively, Facade-X uses a subset of RDF as a general approach to represent the source content *as-it-is* but in RDF.\nThe model combines two types of elements: containers and literals.\nFacade-X always has a single root container.\nContainer members are a combination of key-value pairs, where keys are either RDF properties or container membership\nproperties.\nInstead, values can be either RDF literals or other containers.\nThis is a generic example of a Facade-X data object (more examples below):\n\n```turtle\n@prefix fx: \u003chttp://sparql.xyz/facade-x/ns/\u003e .\n@prefix xyz: \u003chttp://sparql.xyz/facade-x/data/\u003e .\n@prefix rdf: \u003chttp://www.w3.org/1999/02/22-rdf-syntax-ns#\u003e .\n[] a fx:root ; rdf:_1 [\n    xyz:someKey \"some value\" ;\n    rdf:_1 \"another value with unspecified key\" ;\n    rdf:_2 [\n        rdf:type xyz:MyType ;\n        rdf:_1 \"another value\"\n    ]\n] .\n```\n\nMore details on the Facade-X metamodel can be found [here](Facade-X.md).\n\n### Querying anything\n\nSPARQL Anything extends the Apache Jena ARQ processors by *overloading* the SERVICE operator, as in the following\nexample:\n\nSuppose having this JSON file as input (also available at ``https://sparql-anything.cc/example1.json``)\n\n```json\n[\n  {\n    \"name\": \"Friends\",\n    \"genres\": [\n      \"Comedy\",\n      \"Romance\"\n    ],\n    \"language\": \"English\",\n    \"status\": \"Ended\",\n    \"premiered\": \"1994-09-22\",\n    \"summary\": \"Follows the personal and professional lives of six twenty to thirty-something-year-old friends living in Manhattan.\",\n    \"stars\": [\n      \"Jennifer Aniston\",\n      \"Courteney Cox\",\n      \"Lisa Kudrow\",\n      \"Matt LeBlanc\",\n      \"Matthew Perry\",\n      \"David Schwimmer\"\n    ]\n  },\n  {\n    \"name\": \"Cougar Town\",\n    \"genres\": [\n      \"Comedy\",\n      \"Romance\"\n    ],\n    \"language\": \"English\",\n    \"status\": \"Ended\",\n    \"premiered\": \"2009-09-23\",\n    \"summary\": \"Jules is a recently divorced mother who has to face the unkind realities of dating in a world obsessed with beauty and youth. As she becomes older, she starts discovering herself.\",\n    \"stars\": [\n      \"Courteney Cox\",\n      \"David Arquette\",\n      \"Bill Lawrence\",\n      \"Linda Videtti Figueiredo\",\n      \"Blake McCormick\"\n    ]\n  }\n]\n```\n\nWith SPARQL Anything you can select the TV series starring \"Courteney Cox\" with the SPARQL query\n\n```sparql\nPREFIX xyz: \u003chttp://sparql.xyz/facade-x/data/\u003e\nPREFIX rdf: \u003chttp://www.w3.org/1999/02/22-rdf-syntax-ns#\u003e\nPREFIX fx: \u003chttp://sparql.xyz/facade-x/ns/\u003e\n\nSELECT ?seriesName\nWHERE {\n\n    SERVICE \u003cx-sparql-anything:https://sparql-anything.cc/example1.json\u003e {\n        ?tvSeries xyz:name ?seriesName .\n        ?tvSeries xyz:stars ?star .\n        ?star fx:anySlot \"Courteney Cox\" .\n    }\n\n}\n```\n\nand get this result without caring of transforming JSON to RDF.\n\n| seriesName    |\n|---------------|\n| \"Cougar Town\" |\n| \"Friends\"     |\n\n### Using the Command Line Interface\n\nSPARQL Anything requires `Java \u003e= 17` to be installed in your operating system.\nDownload the latest version of the SPARQL Anything command line from\nthe [releases page](https://github.com/SPARQL-Anything/sparql.anything/releases).\nThe command line is a file named `sparql-anything-\u003cversion\u003e.jar`.\nPrepare a file with the query above and name it, for example `query.sparql`.\nThe query can be executed as follows:\n\n```bash\njava -jar sparql-anything-\u003cversion\u003e.jar -q query.sparql\n```\n\nSee the [usage section](#Usage) for details on the command line interface.\n\n### Using the server\n\nSPARQL Anything is also released as a server, embedded into an instance of the Apache Jena Fuseki server.\nThe server requires `Java \u003e= 17` to be installed in your operating system.\nDownload the latest version of the SPARQL Anything server from\nthe [releases page](https://github.com/SPARQL-Anything/sparql.anything/releases).\nThe command line is a file named `sparql-anything-server-\u003cversion\u003e.jar`.\n\nRun the server as follows:\n\n```bash\n$ java -jar sparql-anything-server-\u003cversion\u003e.jar \n[main] INFO io.github.sparqlanything.fuseki.Endpoint - sparql.anything endpoint\n[main] INFO io.github.sparqlanything.fuseki.Endpoint - Starting sparql.anything endpoint..\n[main] INFO io.github.sparqlanything.fuseki.Endpoint - The server will be listening on http://localhost:3000/sparql.anything\n[main] INFO io.github.sparqlanything.fuseki.Endpoint - The server will be available on http://localhost:3000/sparql\n[main] INFO org.eclipse.jetty.server.Server - jetty-10.0.6; built: 2021-06-29T15:28:56.259Z; git: 37e7731b4b142a882d73974ff3bec78d621bd674; jvm 11.0.10+9\n[main] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@782a4fff{org.apache.jena.fuseki.Servlet,/,null,AVAILABLE}\n[main] INFO org.eclipse.jetty.server.AbstractConnector - Started ServerConnector@c7a975a{HTTP/1.1, (http/1.1)}{0.0.0.0:3000}\n[main] INFO org.eclipse.jetty.server.Server - Started Server@35beb15e{STARTING}[10.0.6,sto=0] @889ms\n[main] INFO org.apache.jena.fuseki.Server - Start Fuseki (http=3000)\n\n```\n\nAccess the SPARQL UI at the address `http://localhost:3000/sparql`, where you can copy the query above and execute it.\nSee the [usage section](#Usage) for details on the SPARQL Anything Fuseki server.\n\n## Supported Formats\n\nCurrently, SPARQL Anything supports the following list of formats but the possibilities are limitless!\nThe data is interpreted as in the following examples (using default settings).\n\nA detailed description of the interpretation can be found in the following pages:\n\n- [JSON](formats/JSON.md)\n- [HTML](formats/HTML.md)\n- [CSV](formats/CSV.md)\n- [XML](formats/XML.md)\n- [Binary](formats/Binary.md)\n- [Text](formats/Text.md)\n- [Markdown](formats/Markdown.md)\n- [File system and archives (ZIP, Tar)](formats/Archive.md)\n- [Spreadsheets: XLS, XLSx](formats/Spreadsheet.md)\n- [Documents: DOCx](formats/Docs.md)\n- [EXIF Metadata](formats/Metadata.md)\n- [Bibliography](formats/Bibliography.md)\n- [YAML](formats/YAML.md)\n- [Slides](formats/Slides.md)\n\n... and, of course, the triples generated from the these formats can be integrated with the content of\nany [RDF Static file](formats/RDF.md)\n\n## Configuration\n\nSPARQL Anything behaves as a standard SPARQL query engine.\nFor example, the SPARQL Anything server will act as a virtual endpoint that can be queried exactly as a remote SPARQL\nendpoint.\nIn addition, SPARQL Anything provides a rich Command Line Interface (CLI).\nFor information for how to run SPARQL Anything, please see the [quickstart](README.md#Quickstart)\nand [usage](README.md#usage) sections of the documentation.\n\n### Passing triplification options via SERVICE IRI\n\nIn order to instruct the query processor to delegate the execution to SPARQL Anything, you can use the following\nIRI-schema within SERVICE clauses.\nA minimal URI that uses only the resource locator is also possible.\nIn this case SPARQL Anything guesses the data source type from the file extension.\n\n![SERVICE IRI grammar](Grammar.jpg)\n\n**Note:** Use the `file://` protocol to reference local files\n\n### Passing triplification options via Basic Graph Pattern\n\nAlternatively, options can be provided as basic graph pattern inside the SERVICE clause as follows\n\n```sparql\nPREFIX xyz: \u003chttp://sparql.xyz/facade-x/data/\u003e\nPREFIX rdf: \u003chttp://www.w3.org/1999/02/22-rdf-syntax-ns#\u003e\nPREFIX fx: \u003chttp://sparql.xyz/facade-x/ns/\u003e\n\nSELECT ?seriesName\nWHERE {\n\n    SERVICE \u003cx-sparql-anything:\u003e {\n        fx:properties fx:location \"https://sparql-anything.cc/example1.json\" .\n        ?tvSeries xyz:name ?seriesName .\n        ?tvSeries xyz:stars ?star .\n        ?star fx:anySlot \"Courteney Cox\" .\n    }\n\n}\n```\n\nNote that\n\n1. The SERVICE IRI scheme must be ``x-sparql-anything:``.\n2. Each triplification option to pass to the engine corresponds to a triple of the Basic Graph Pattern inside the\n   SERVICE clause.\n3. Such triples must have ``fx:properties`` as subject, ``fx:[OPTION-NAME]`` as predicate, and a literal or a variable\n   as object.\n\nYou can also mix the two modalities as follows.\n\n```sparql\nPREFIX xyz: \u003chttp://sparql.xyz/facade-x/data/\u003e\nPREFIX rdf: \u003chttp://www.w3.org/1999/02/22-rdf-syntax-ns#\u003e\nPREFIX fx: \u003chttp://sparql.xyz/facade-x/ns/\u003e\n\nSELECT ?seriesName\nWHERE {\n\n    SERVICE \u003cx-sparql-anything:blank-nodes=false\u003e {\n        fx:properties fx:location \"https://sparql-anything.cc/example1.json\" .\n        ?tvSeries xyz:name ?seriesName .\n        ?tvSeries xyz:stars ?star .\n        ?star fx:anySlot \"Courteney Cox\" .\n    }\n\n}\n```\n\n### General purpose options\n\n| Option name                                                                         | Description                                                                                                                                                                                                                                                                                                                                   | Valid Values                                                                                                                                                                          | Default Value                                                                                                                                                                                                                                                               |\n|-------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [location](Configuration.md#location)*                                              | The URL of the data source.                                                                                                                                                                                                                                                                                                                   | Any valid URL or (absolute or relative) path of the file system.                                                                                                                      | \\*                                                                                                                                                                                                                                                                          |\n| [content](Configuration.md#content)*                                                | The content to be transformed.                                                                                                                                                                                                                                                                                                                | Any valid literal.                                                                                                                                                                    | \\*                                                                                                                                                                                                                                                                          |\n| [command](Configuration.md#command)*                                                | An external command line to be executed. The output is handled according to the option 'media-type'                                                                                                                                                                                                                                           | Any valid literal.                                                                                                                                                                    | \\*                                                                                                                                                                                                                                                                          |\n| [read-from-std-in](Configuration.md#read-from-std-in)*                              | It tells SPARQL Anything to read the content to be transformed from standard input (see issue [#244](https://github.com/SPARQL-Anything/sparql.anything/issues/244))                                                                                                                                                                          | true/false                                                                                                                                                                            | false                                                                                                                                                                                                                                                                       |\n| [from-archive](Configuration.md#from-archive)                                       | The filename of the resource to be triplified within an archive.                                                                                                                                                                                                                                                                              | Any filename.                                                                                                                                                                         | No value                                                                                                                                                                                                                                                                    |\n| [root](Configuration.md#root)                                                       | The IRI of generated root resource. The root will be used as a namespace for the graphs and containers that will be generated.                                                                                                                                                                                                                | Any valid IRI.                                                                                                                                                                        | location  (in the case of location argument  set) \u003cbr/\u003e **or** \u003cbr/\u003e 'http://sparql.xyz/facade-x/data/' + md5Hex(content) (in the case of content argument set) \u003cbr/\u003e**or**\u003cbr/\u003e 'http://sparql.xyz/facade-x/data/' + md5Hex(command) (in the case of command argument set) |\n| [media-type](Configuration.md#media-type)                                           | The media-type of the data source.                                                                                                                                                                                                                                                                                                            | Any valid [Media-Type](https://en.wikipedia.org/wiki/Media_type).  Supported media types are specified in the [pages dedicated to the supported formats](README.md#supported-formats) | No value (the media-type will be guessed from the the file extension)                                                                                                                                                                                                       |\n| [namespace](Configuration.md#namespace)                                             | The namespace prefix for the properties and classes that will be generated.                                                                                                                                                                                                                                                                   | Any valid namespace prefix.                                                                                                                                                           | http://sparql.xyz/facade-x/data/                                                                                                                                                                                                                                            |\n| [blank-nodes](Configuration.md#blank-nodes)                                         | It tells SPARQL Anything to generate blank nodes or not.                                                                                                                                                                                                                                                                                      | true/false                                                                                                                                                                            | true                                                                                                                                                                                                                                                                        |\n| [trim-strings](Configuration.md#trim-strings)                                       | Trim all string literals.                                                                                                                                                                                                                                                                                                                     | true/false                                                                                                                                                                            | false                                                                                                                                                                                                                                                                       |\n| [null-string](Configuration.md#null-string)                                         | Do not produce triples where the specified string would be in the object position of the triple.                                                                                                                                                                                                                                              | Any string                                                                                                                                                                            | No value                                                                                                                                                                                                                                                                    |\n| [http.*](Configuration.md#http-options)                                             | A set of options for customising HTTP request method, headers, querystring, and others. [More details on the HTTP request configuration](Configuration.md#http-options)                                                                                                                                                                       | No value                                                                                                                                                                              |\n| [triplifier](Configuration.md#triplifier)                                           | It forces SPARQL Anything to use a specific triplifier for transforming the data source                                                                                                                                                                                                                                                       | A canonical name of a Java class                                                                                                                                                      | No value                                                                                                                                                                                                                                                                    |\n| [charset](Configuration.md#charset)                                                 | The charset of the data source.                                                                                                                                                                                                                                                                                                               | Any charset.                                                                                                                                                                          | UTF-8                                                                                                                                                                                                                                                                       |\n| [metadata](formats/Metadata.md)                                                     | It tells SPARQL Anything to extract metadata from the data source and to store it in the named graph with URI \u0026lt;http://sparql.xyz/facade-x/data/metadata\u0026gt; [More details](formats/Metadata.md)                                                                                                                                            | true/false                                                                                                                                                                            | false                                                                                                                                                                                                                                                                       |\n| [ondisk](Configuration.md#ondisk)                                                   | It tells SPARQL Anything to use an on disk graph (instead of the default in memory graph). The string should be a path to a directory where the on disk graph will be stored. Using an on disk graph is almost always slower (than using the default in memory graph) but with it you can triplify large files without running out of memory. | A path to a directory                                                                                                                                                                 | No value                                                                                                                                                                                                                                                                    |\n| [ondisk.reuse](Configuration.md#ondisk.reuse)                                       | When using an on disk graph, it tells SPARQL Anything to reuse the previous on disk graph.                                                                                                                                                                                                                                                    | true/false                                                                                                                                                                            | true                                                                                                                                                                                                                                                                        |\n| [strategy](Configuration.md#strategy)                                               | The execution strategy. 0 = in memory, all triples; 1 = in memory, only triples matching any of the triple patterns in the where clause                                                                                                                                                                                                       | 0,1                                                                                                                                                                                   | 1                                                                                                                                                                                                                                                                           |\n| [slice](Configuration.md#slice)                                                     | The resources is sliced and the SPARQL query executed on each one of the parts. Supported by: CSV (row by row); JSON (when array slice by item, when json object requires `json.path`); XML (requires `xml.path`)                                                                                                                             | true/false                                                                                                                                                                            | false                                                                                                                                                                                                                                                                       |\n| [use-rdfs-member](Configuration.md#use-rdfs-member)                                 | It tells SPARQL Anything to use the (super)property rdfs:member instead of container membership properties (rdf:_1, rdf:_2 ...)                                                                                                                                                                                                               | true/false                                                                                                                                                                            | false                                                                                                                                                                                                                                                                       |\n| [annotate-triples-with-slot-keys](Configuration.md#annotate-triples-with-slot-keys) | It tells SPARQL Anything to annotate slot statements with slot keys (see issue [#378](https://github.com/SPARQL-Anything/sparql.anything/issues/378))                                                                                                                                                                                         | true/false                                                                                                                                                                            | false                                                                                                                                                                                                                                                                       |\n| [generate-predicate-labels](Configuration.md#generate-predicate-labels)             | It tells SPARQL Anything to create labels for extracted predicates and classes (see issue [#462](https://github.com/SPARQL-Anything/sparql.anything/issues/462))                                                                                                                                                                              | true/false                                                                                                                                                                            | false                                                                                                                                                                                                                                                                       |\n| [audit](Configuration.md#audit)                                                     | It tells SPARQL Anything to generate an additional graph containing information for auditing the result of the triplification. The audit graph has the URI \u0026lt;http://sparql.xyz/facade-x/data/audit\u0026gt;                                                                                                                                      | true/false                                                                                                                                                                            | false                                                                                                                                                                                                                                                                       |\n| [use-cache](Configuration.md#use-cache)                                             | When set to true, the result of the triplification is cached in memory and used to answer the same query again.                                                                                                                                                                                                                               | true/false                                                                                                                                                                            | false                                                                                                                                                                                                                                                                       |\n\n\\* If `read-from-std-in` is set to false, it is mandatory to provide either `location`, `content`, or `command`.\n\n[More details on configuration](Configuration.md)\n\n## Query templates and variable bindings (CLI only)\n\nThe SPARQL Anything CLI supports parametrised queries.\nSPARQL Anything uses\nthe [BASIL convention for variable names in queries](https://github.com/basilapi/basil/wiki/SPARQL-variable-name-convention-for-WEB-API-parameters-mapping)\n.\n\nThe syntax is based on the underscore character: '_', and can be easily learned by examples:\n\n- `?_name` The variable specifies the API mandatory parameter _name_. The value is incorporated in the query as plain\n  literal.\n- `?__name` The parameter _name_ is optional.\n- `?_name_iri` The variable is substituted with the parameter value as a IRI.\n- `?_name_en` The parameter value is considered as literal with the language 'en' (e.g., en,it,es, etc.).\n- `?_name_integer` The parameter value is considered as literal and the XSD datatype 'integer' is added during\n  substitution.\n- `?_name_prefix_datatype` The parameter value is considered as literal and the datatype 'prefix:datatype' is added\n  during substitution. The prefix must be specified according to the SPARQL syntax.\n\nVariable bindings can be passed in two ways via the CLI argument `-v|--values`:\n\n- Inline arguments, e.g.: `-v paramName=value1 -v paramName=value2 -v paramName2=other`\n- Passing an SPARQL Result Set file, e.g.: `-v selectResult.xml`\n\nIn the first case, the engine computes the cardinal product of all the variables bindings included and execute the query\nfor each one of the resulting set of bindings.\n\nIn the second case, the query is executed for each set of bindings in the result set.\n\nThe following is an example of how parameter can be used in a query:\n\n```sparql\nPREFIX xyz: \u003chttp://sparql.xyz/facade-x/data/\u003e\nPREFIX rdf: \u003chttp://www.w3.org/1999/02/22-rdf-syntax-ns#\u003e\nPREFIX fx: \u003chttp://sparql.xyz/facade-x/ns/\u003e\n\nSELECT ?seriesName\nWHERE {\n    SERVICE \u003cx-sparql-anything:https://sparql-anything.cc/example1.json\u003e {\n        ?tvSeries xyz:name ?seriesName .\n        ?tvSeries xyz:stars ?star .\n        ?star fx:anySlot ?_starName .\n    }\n\n}\n```\n\nThe value of `?_starName` can be passed via the CLI as follows:\n\n```bash\njava -jar sparql-anything-\u003cversion\u003e.jar -q query.sparql -v starName=\"Courteney Cox\"\n```\n\n## Functions and magic properties\n\nSPARQL Anything provides a number of magical functions and properties to facilitate the users in querying the sources\nand constructing knowledge graphs.\n\n**NOTE**: SPARQL Anything is built on Apache Jena, see a list of supported functions on\nthe [Apache Jena documentation](https://jena.apache.org/documentation/query/library-function.html).\n\nMoreover, if you run the geosparql distribution of the CLI or the server, you can also use the [GeoSPARQL functions provided by Apache Jena](https://jena.apache.org/documentation/geosparql/index.html). \n\n| Name                                                                                                                  | Function/Magic Property | Input                                  | Output                        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |\n|-----------------------------------------------------------------------------------------------------------------------|-------------------------|----------------------------------------|-------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [fx:anySlot](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxanyslot)                                                             | Magic Property          | -                                      | -                             | This property matches the RDF container membership properties (e.g. ``rdf:_1``, ``rdf:_2`` ...).                                                                                                                                                                                                                                                                                                                                                                              | \n| [fx:cardinal(?a)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxcardinal)                                                       | Function                | Container membership property          | Integer                       | `fx:cardinal(?a)` returns the corresponding cardinal integer from `?a` (`rdf:_24` -\u003e `24`)                                                                                                                                                                                                                                                                                                                                                                                    |\n| [fx:isContainerMembershipProperty(?p)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxiscontainermembershipproperty)             | Function                | Container membership property          | Boolean                       | `fx:isContainerMembershipProperty(?p)` returns true if the node passed as parameter is a container membership property (`rdf:_24` -\u003e `true`)                                                                                                                                                                                                                                                                                                                                  |\n| [fx:before(?a, ?b)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxbefore)                                                       | Function                | Container membership properties        | Boolean                       | `fx:before(?a, ?b)` returns `true` if `?a` and `?b` are container membership properties and `?a` is lower than `?b`, `false` otherwise                                                                                                                                                                                                                                                                                                                                        |\n| [fx:after(?a, ?b)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxafter)                                                         | Function                | Container membership properties        | Boolean                       | `fx:after(?a, ?b)`  returns `true` if `?a` and `?b` are container membership properties and `?a` is higher than `?b`, `false` otherwise                                                                                                                                                                                                                                                                                                                                       |\n| [fx:previous(?a)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxprevious)                                                       | Function                | Container membership property          | Container membership property | `fx:previous(?a)` returns the container membership property that preceeds `?a` (`rdf:_2` -\u003e `rdf:_1`)                                                                                                                                                                                                                                                                                                                                                                         |\n| [fx:next(?b)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxnext)                                                               | Function                | Container membership property          | Container membership property | `fx:next(?b)` returns the container membership property that succeedes `?b` (`rdf:_1` -\u003e `rdf:_2`)                                                                                                                                                                                                                                                                                                                                                                            |\n| [fx:forward(?a, ?b)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxforward)                                                     | Function                | Container membership property, Integer | Container membership property | `fx:forward(?a, ?b)` returns the container membership property that follows `?a` of `?b` steps (`rdf:_2, 5` -\u003e `rdf:_7`)                                                                                                                                                                                                                                                                                                                                                      |\n| [fx:backward(?a, ?b)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxbackward)                                                   | Function                | Container membership property, Integer | Container membership property | `fx:backward(?a, ?b)` returns the container membership property that preceeds `?a` of `?b` steps (`rdf:_24, 4` -\u003e `rdf:_20`)                                                                                                                                                                                                                                                                                                                                                  |\n| [fx:String.startsWith(?stringA, ?stringB)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxstringstartswith)                      | Function                | String, String                         | Boolean                       | `fx:String.startsWith` wraps [`java.lang.String.startsWith`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html)                                                                                                                                                                                                                                                                                                                              |\n| [fx:String.endsWith(?stringA, ?stringB)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxstringendswith)                          | Function                | String, String                         | Boolean                       | `fx:String.endsWith` wraps [`java.lang.String.endsWith`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html)                                                                                                                                                                                                                                                                                                                                  |\n| [fx:String.indexOf(?stringA, ?stringB)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxstringindexof)                            | Function                | String, String                         | Integer                       | `fx:String.indexOf` wraps [`java.lang.String.indexOf`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html)                                                                                                                                                                                                                                                                                                                                    |\n| [fx:String.substring(?string)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxstringsubstring)                                   | Function                | String, Integer, (Integer?)            | String                        | `fx:String.substring` wraps [`java.lang.String.substring`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html)                                                                                                                                                                                                                                                                                                                                |\n| [fx:String.toLowerCase(?string)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxstringtolowercase)                               | Function                | String                                 | String                        | `fx:String.toLowerCase` wraps [`java.lang.String.toLowerCase`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html)                                                                                                                                                                                                                                                                                                                            |\n| [fx:String.toUpperCase](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxstringtouppercase)                                        | Function                | String                                 | String                        | `fx:String.toUpperCase` wraps [`java.lang.String.toUpperCase`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html)                                                                                                                                                                                                                                                                                                                            |\n| [fx:String.replace(?string, ?characterA, ?characterB)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxstringreplace)             | Function                | String, Character, Character           | String                        | `fx:String.replace` wraps [`java.lang.String.replace`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html#replace(java.lang.CharSequence,java.lang.CharSequence))                                                                                                                                                                                                                                                                             |\n| [fx:String.trim(?string)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxstringtrim)                                             | Function                | String                                 | String                        | `fx:String.trim` wraps [`java.lang.String.trim`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html)                                                                                                                                                                                                                                                                                                                                          |\n| [fx:String.stripLeading(?string)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxstringstripleading)                             | Function                | String                                 | String                        | `fx:String.stripLeading` wraps [`java.lang.String.stripLeading`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html#stripLeading())                                                                                                                                                                                                                                                                                                           |\n| [fx:String.stripTrailing(?string)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxstringstriptrailing)                           | Function                | String                                 | String                        | `fx:String.stripTrailing` wraps [`java.lang.String.stripTrailing`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html#stripTrailing())                                                                                                                                                                                                                                                                                                        |\n| [fx:String.removeTags(?string)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxstringremovetags)                                 | Function                | String                                 | String                        | `fx:String.removeTags`  removes the XML tags from the input string                                                                                                                                                                                                                                                                                                                                                                                                            |\n| [fxWordUtils.capitalize(?string)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxwordutilscapitalize)                            | Function                | String                                 | String                        | `WordUtils.capitalize` wraps [`org.apache.commons.text.WordUtils.capitalize`](https://commons.apache.org/proper/commons-text/javadocs/api-release/org/apache/commons/text/WordUtils.html#capitalize(java.lang.String))                                                                                                                                                                                                                                                        |\n| [fxWordUtils.capitalizeFully(?string)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxwordutilscapitalizefully)                  | Function                | String                                 | String                        | `fx:WordUtils.capitalizeFully` wraps [`org.apache.commons.text.WordUtils.capitalizeFully`](https://commons.apache.org/proper/commons-text/javadocs/api-release/org/apache/commons/text/WordUtils.html#capitalizeFully(java.lang.String))                                                                                                                                                                                                                                      |\n| [fx:WordUtils.initials(?string)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxwordutilsinitials)                               | Function                | String                                 | String                        | `fx:WordUtils.initials` wraps [`org.apache.commons.text.WordUtils.initials`](https://commons.apache.org/proper/commons-text/javadocs/api-release/org/apache/commons/text/WordUtils.html#initials(java.lang.String))                                                                                                                                                                                                                                                           |\n| [fx:WordUtils.swapCase(?string)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxwordutilsswapcase)                               | Function                | String                                 | String                        | `fx:WordUtils.swapCase` wraps [`org.apache.commons.text.WordUtils.swapCase`](https://commons.apache.org/proper/commons-text/javadocs/api-release/org/apache/commons/text/WordUtils.html#swapCase(java.lang.String))                                                                                                                                                                                                                                                           |\n| [fx:WordUtils.uncapitalize(?string)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxwordutilsuncapitalize)                       | Function                | String                                 | String                        | `fx:WordUtils.uncapitalize` wraps [`org.apache.commons.text.WordUtils.uncapitalize`](https://commons.apache.org/proper/commons-text/javadocs/api-release/org/apache/commons/text/WordUtils.html#uncapitalize(java.lang.String))                                                                                                                                                                                                                                               |\n| [fx:DigestUtils.md2Hex(?string)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxdigestutilsmd2hex)                               | Function                | String                                 | String                        | `fx:DigestUtils.md2Hex` wraps [`org.apache.commons.codec.digest.DigestUtils.md2Hex`](https://www.javadoc.io/doc/commons-codec/commons-codec/1.15/org/apache/commons/codec/digest/DigestUtils.html#md2Hex-java.lang.String-)                                                                                                                                                                                                                                                   |\n| [fx:DigestUtils.md5Hex(?string)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxdigestutilsmd5hex)                               | Function                | String                                 | String                        | `fx:DigestUtils.md5Hex` wraps [`org.apache.commons.codec.digest.DigestUtils.md5Hex`](https://www.javadoc.io/doc/commons-codec/commons-codec/1.15/org/apache/commons/codec/digest/DigestUtils.html#md5Hex-java.lang.String-)                                                                                                                                                                                                                                                   |\n| [fx:DigestUtils.sha1Hex(?string)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxdigestutilssha1hex)                             | Function                | String                                 | String                        | `fx:DigestUtils.sha1Hex` wraps [`org.apache.commons.codec.digest.DigestUtils.sha1Hex`](https://www.javadoc.io/doc/commons-codec/commons-codec/1.15/org/apache/commons/codec/digest/DigestUtils.html#sha1Hex-java.lang.String-)                                                                                                                                                                                                                                                |\n| [fx:DigestUtils.sha256Hex(?string)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxdigestutilssha256hex)                         | Function                | String                                 | String                        | `fx:DigestUtils.sha256Hex` wraps [`org.apache.commons.codec.digest.DigestUtils.sha256Hex`](https://www.javadoc.io/doc/commons-codec/commons-codec/1.15/org/apache/commons/codec/digest/DigestUtils.html#sha256Hex-java.lang.String-)                                                                                                                                                                                                                                          |\n| [fx:DigestUtils.sha384Hex(?string)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxdigestutilssha384hex)                         | Function                | String                                 | String                        | `fx:DigestUtils.sha384Hex` wraps [`org.apache.commons.codec.digest.DigestUtils.sha384Hex`](https://www.javadoc.io/doc/commons-codec/commons-codec/1.15/org/apache/commons/codec/digest/DigestUtils.html#sha384Hex-java.lang.String-)                                                                                                                                                                                                                                          |\n| [fx:DigestUtils.sha512Hex(?string)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxdigestutilssha512hex)                         | Function                | String                                 | String                        | `fx:DigestUtils.sha512Hex` wraps [`org.apache.commons.codec.digest.DigestUtils.sha512Hex`](https://www.javadoc.io/doc/commons-codec/commons-codec/1.15/org/apache/commons/codec/digest/DigestUtils.html#sha512Hex-java.lang.String-)                                                                                                                                                                                                                                          |\n| [fx:URLEncoder.encode(?string)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxurlencoderencode)                                 | Function                | String, String                         | String                        | `fx:URLEncoder.encode` wraps [`java.net.URLEncoder.encode`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/net/URLEncoder.html#encode(java.lang.String,java.lang.String))                                                                                                                                                                                                                                                                                  |\n| [fx:URLDecoder.decode(?string)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxurldecoderdecode)                                 | Function                | String, String                         | String                        | `fx:URLDecoder.decode` wraps [`java.net.URLDecoder.decode`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/net/URLDecoder.html#decode(java.lang.String,java.lang.String))                                                                                                                                                                                                                                                                                  |\n| [fx:serial(?a ... ?n)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxserial)                                                    | Function                | Any sequence of nodes                  | Integer                       | The function `fx:serial (?a ... ?n)` generates an incremental number using the arguments as reference counters. For example, calling `fx:serial(\"x\")` two times will generate `1` and then `2`. Instead, calling `fx:serial(?x)` multiple times will generate sequential numbers for each value of `?x`.                                                                                                                                                                      |\n| [fx:entity(?a ... ?n)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxentity)                                                    | Function                | Any sequence of node                   | URI node                      | The function `fx:entity (?a ... ?n)` accepts a list of arguments and performs concatenation and automatic casting to string. Container membership properties (`rdf:_1`,`rdf:_2`,...) are cast to numbers and then to strings (`\"1\",\"2\"`).                                                                                                                                                                                                                                     |\n| [fx:literal(?a, ?b)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxliteral)                                                     | Function                | String, (URI or language code)         | Literal node                  | The function `fx:literal( ?a , ?b )` builds a literal from the string representation of `?a`, using `?b` either as a typed literal (if a IRI is given) or a lang code (if a string of length of two is given).                                                                                                                                                                                                                                                                |\n| [fx:bnode(?a)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxbnode)                                                             | Function                | Any node                               | Blank node                    | The function `fx:bnode( ?a) ` builds a blank node enforcing the node value as local identifier. This is useful when multiple construct templates are populated with bnode generated on different query solutions but we want them to be joined in the output RDF graph. Apparently, the standard function `BNODE` does generate a new node for each query solution (see issue [#273](https://github.com/SPARQL-Anything/sparql.anything/issues/273) for an explanatory case). |\n| [fx:LevenshteinDistance(?n1, ?n2)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxlevenshteindistance)                           | Function                | String, String                         | Integer                       | The function `fx:LevenshteinDistance(?n1, ?n2) `  computes the Levenshtein Distance between ?n1 and ?n2 (see #182).                                                                                                                                                                                                                                                                                                                                                           |\n| [fx:CosineDistance(?n1, ?n2)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxcosinedistance)                                     | Function                | String, String                         | Double                        | The function `fx:CosineDistance(?n1, ?n2) `  computes the Cosine Distance between ?n1 and ?n2 (see #182).                                                                                                                                                                                                                                                                                                                                                                     |\n| [fx:JaccardDistance(?n1, ?n2)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxjaccarddistance)                                   | Function                | String, String                         | Double                        | The function `fx:JaccardDistance(?n1, ?n2) `  computes the Jaccard Distance between ?n1 and ?n2 (see #182).                                                                                                                                                                                                                                                                                                                                                                   |\n| [fx:JaroWinklerDistance(?n1, ?n2)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxjarowinklerdistance)                           | Function                | String, String                         | Double                        | The function `fx:JaroWinklerDistance(?n1, ?n2) `  computes the Jaro-Winkler Distance between ?n1 and ?n2 (see #182).                                                                                                                                                                                                                                                                                                                                                          |\n| [fx:LongestCommonSubsequenceDistance(?n1, ?n2)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxlongestcommonsubsequencedistance) | Function                | Any pair of IRIs or Literals           | Integer                       | The function `fx:LongestCommonSubsequenceDistance(?n1, ?n2) `  computes the Longest Common Subsequence Distance between ?n1 and ?n2 (see #182).                                                                                                                                                                                                                                                                                                                               |\n| [fx:HammingDistance(?n1, ?n2)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxhammingdistance)                                   | Function                | String, String                         | Integer                       | The function `fx:HammingDistance(?n1, ?n2) `  computes the Hamming Distance between ?n1 and ?n2 (see #182).                                                                                                                                                                                                                                                                                                                                                                   |\n| [fx:QGramDistance(?n1, ?n2)](FUNCTIONS_AND_MAGIC_PROPERTIES.md#fxqgramdistance)                                       | Function                | String, String                         | Double                        | The function `fx:QGramDistance(?n1, ?n2) `  computes the QGram Distance between ?n1 and ?n2 (see #394).                                                                                                                                                                                                                                                                                                                                                                       |\n\n\n## Usage\n\nSPARQL Anything is available as Java Library, Command Line Interface, Web Application Server, and also Python library.\n\n*Note*: as of version 1.0.0, SPARQL Anything requires Java 17+.\n\n### Command Line Interface (CLI)\n\nAn executable JAR can be obtained from the [Releases](https://github.com/spice-h2020/sparql.anything/releases) page.\n\nThe jar can be executed as follows:\n\n```\nusage: java -jar sparql.anything-\u003cversion\u003e  -q query [-f \u003coutput format\u003e]\n            [-v \u003cfilepath | name=value\u003e ... ] [-c option=value] [-l\n            filepath] [-o filepath] [-j filepath]\n -q,--query \u003cquery or URL or filepath\u003e   The path or the URL to the file\n                                         storing the query to execute or\n                                         the query itself.\n -o,--output \u003cfilepath\u003e                  OPTIONAL - The path to the output\n                                         file. [Default: STDOUT]\n -a,--append                             OPTIONAL - Should output to file\n                                         be appended? WARNING: this option\n                                         does not ensure that the whole\n                                         file is valid -- that is up to\n                                         the user to set up the conditions\n                                         (such as using NQ serialization\n                                         and not using blank nodes)\n -e,--explain                            OPTIONAL - Explain query\n                                         execution\n -l,--load \u003cURL or filepath\u003e             OPTIONAL - The path or the URL to\n                                         one RDF file or a filepath to a\n                                         folder including a set of files\n                                         to be loaded. When present, the\n                                         data is loaded in memory and the\n                                         query executed against it.\n -f,--format \u003cstring\u003e                    OPTIONAL -  Format of the output\n                                         file. Supported values: JSON,\n                                         XML, CSV, TEXT, TTL, NT, NQ.\n                                         [Default: CSV (for SELECT\n                                         queries) or TEXT (for ASK\n                                         queries) or TTL (for CONSTRUCT\n                                         queries)]\n -s,--strategy \u003cstrategy\u003e                OPTIONAL - Strategy for query\n                                         evaluation. Possible values: '1'\n                                         - triple filtering (default), '0'\n                                         - triplify all data. The system\n                                         fallbacks to '0' when the\n                                         strategy is not implemented yet\n                                         for the given resource type.\n -p,--output-pattern \u003coutputPattern\u003e     OPTIONAL - Output filename\n                                         pattern, e.g.\n                                         'my-file-?friendName.json'.\n                                         Variables should start with '?'\n                                         and refer to bindings from the\n                                         input file. This option can only\n                                         be used in combination with\n                                         'input' and is ignored otherwise.\n                                         This option overrides 'output'.\n -v,--values \u003cvalues\u003e                    OPTIONAL - Values passed as input\n                                         parameter to a query template.\n                                         When present, the query is\n                                         pre-processed by substituting\n                                         variable names with the values\n                                         provided. The argument can be\n                                         used in two ways. (1) Providing a\n                                         single SPARQL ResultSet file. In\n                                         this case, the query is executed\n                                         for each set of bindings in the\n                                         input result set. Only 1 file is\n                                         allowed. (2) Named variable\n                                         bindings: the argument value must\n                                         follow the syntax:\n                                         var_name=var_value. The argument\n                                         can be passed multiple times and\n                                         the query repeated for each set\n                                         of values.\n -c,--configuration \u003coption=value\u003e       OPTIONAL - Configuration to be\n                                         passed to the SPARQL Anything\n                                         engine (this is equivalent to\n                                         define them in the SERVICE IRI).\n                                         The argument can be passed\n                                         multiple times (one for each\n                                         option to be set).\n -j,--load-jar \u003cfilepath\u003e                OPTIONAL - Filepath to an\n                                         executable JAR to be dynamically\n                                         loaded. The argument can be\n                                         passed multiple times (one for\n                                         each JAR file to be loaded).\n```\n\nLogging can be configured adding the following option (SLF4J).\n\nTo enable the default logger for SPARQL anything and its dependencies:\n```\n-Dorg.slf4j.simpleLogger.defaultLogLevel=trace\n```\n\nTo enable the default logger for SPARQL anything only:\n\n```\n-Dorg.slf4j.simpleLogger.log.io.github.sparqlanything=trace\n```\n\n\n### Fuseki\n\nAn executable JAR of a SPARQL-Anything-powered Fuseki endpoint can be obtained from\nthe [Releases](https://github.com/spice-h2020/sparql.anything/releases) page.\n\nThe jar can be executed as follows:\n\n```\nusage: java -jar sparql-anything-fuseki-\u003cversion\u003e.jar [-p port] [-e\n            sparql-endpoint-path] [-g endpoint-gui-path]\n -e,--path \u003cpath\u003e           The path where the server will be running on\n                            (Default /sparql.anything).\n -g,--gui \u003cgui\u003e             The path of the SPARQL endpoint GUI (Default\n                            /sparql).\n -j,--load-jar \u003cfilepath\u003e   OPTIONAL - Filepath to an executable JAR to be\n                            dynamically included. The argument can be\n                            passed multiple times (one for each JAR file\n                            to be included).\n -p,--port \u003cport\u003e           The port where the server will be running on\n                            (Default 3000 ).\n```\n\nAlso, a docker image can be used by following the instructions [here](BROWSER.md).\n\n### Java Library\n\nSPARQL Anything is available on [Maven Central](https://central.sonatype.com/search?namespace=io.github.sparql-anything).\nTo use it as a Java library please follow the instructions [here](JAVA_LIBRARY.md)\n\n#### Extension Mechanisms\n\nYou can extend SPARQL Anything by including new triplifiers, more details can be found [here](EXTENSION_MECHANISMS.md).\n\n\n### Python Library\n\nYou can use SPARQL Anything as a Python library, see\nthe [PySPARQL-Anything project](https://pypi.org/project/pysparql-anything/).\n\n### Compiling\n\nYou can generate executable files of the command line interface and server with maven\n\n```\nmvn clean install -Dgenerate-cli-jar=true -Dgenerate-server-jar=true\n```\n\nYou can generate the executable files of the SPARQL Anything geosparql distribution featuring the [Apache Jena's GeoSPARQL functions](https://jena.apache.org/documentation/geosparql/index.html).\n\n```\nmvn clean install -Dgenerate-cli-jar-geosparql=true -Dgenerate-server-jar-geosparql=true\n```\n\n## Licence\n\nSPARQL Anything is distributed under [Apache 2.0 License](LICENSE)\n\n## How to cite our work\n\n**For citing SPARQL Anything in academic papers please use:**\n\nLuigi Asprino, Enrico Daga, Aldo Gangemi, and Paul Mulholland. \"Knowledge Graph Construction with a façade: a\nunified method to access heterogeneous data sources on the Web\". ACM Transactions on Internet Technology, Volume 23, Issue 1\nArticle No.: 6, Pages 1 - 31 (2023). https://doi.org/10.1145/3555312\n\n```bibtex\n@article{10.1145/3555312,\n    author = {Asprino, Luigi and Daga, Enrico and Gangemi, Aldo and Mulholland, Paul},\n    title = {Knowledge Graph Construction with a Fa\\c{c}ade: A Unified Method to Access Heterogeneous Data Sources on the Web},\n    year = {2023},\n    publisher = {Association for Computing Machinery},\n    address = {New York, NY, USA},\n    issn = {1533-5399},\n    url = {https://doi.org/10.1145/3555312},\n    doi = {10.1145/3555312},\n    journal = {ACM Transactions on Internet Technology},\n    volume = 23, \n    number = 1,\n    pages = {{1-31}},\n    keywords = {RDF, SPARQL, Meta-model, Re-engineering}\n}\n```\n\n### Scientific Publications\n\nPaul Warren, Paul Mulholland, Enrico Daga, and Luigi Asprino. \"Path-based and triplification approaches to mapping data into RDF: user behaviours and recommendations\". In:  Semantic Web, vol. 15, no. 6, pp. 2479-2505 (2024) http://doi.org/10.3233/SW-243585\n\n```bibtex\n@article{Warren2024,\n  title={Path-based and triplification approaches to mapping data into RDF: User behaviours and recommendations},\n  author={Warren, Paul and Mulholland, Paul and Daga, Enrico and Asprino, Luigi},\n  journal={Semantic Web},\n  volume = 15,\n  pages = {{2479-2505}},\n  number = 6,\n  year={{2025}},\n  publisher={IOS Press}\n}\n```\n\nEnrico Daga, Luigi Asprino, Paul Mulholland, and Aldo Gangemi. \"Facade-X: An Opinionated Approach to SPARQL Anything\". In: Alam, Mehwish; Groth, Paul; de Boer, Victor; Pellegrini, Tassilo and Pandit, Harshvardhan J. eds. Volume 53: Further with Knowledge Graphs, Volume 53. IOS Press, pp. 58–73.\nhttps://doi.org/10.3233/ssw210035\n\n```bibtex\n@incollection{oro78973,\n          volume = {53},\n           month = {August},\n          author = {Enrico Daga and Luigi Asprino and Paul Mulholland and Aldo Gangemi},\n       booktitle = {Volume 53: Further with Knowledge Graphs},\n          editor = {Mehwish Alam and Paul Groth and Victor de Boer and Tassilo Pellegrini and Harshvardhan J. Pandit},\n           title = {Facade-X: An Opinionated Approach to SPARQL Anything},\n       publisher = {IOS Press},\n            year = {2021},\n         journal = {Studies on the Semantic Web},\n           pages = {58--73},\n        keywords = {SPARQL; meta-model; re-engineering},\n             url = {http://oro.open.ac.uk/78973/},\n        abstract = {The Semantic Web research community understood since its beginning how crucial it is to equip practitioners with methods to transform non-RDF resources into RDF. Proposals focus on either engineering content transformations or accessing non-RDF resources with SPARQL. Existing solutions require users to learn specific mapping languages (e.g. RML), to know how to query and manipulate a variety of source formats (e.g. XPATH, JSON-Path), or to combine multiple languages (e.g. SPARQL Generate). In this paper, we explore an alternative solution and contribute a general-purpose meta-model for converting non-RDF resources into RDF: {\\ensuremath{\u003c}}i{\\ensuremath{\u003e}}Facade-X{\\ensuremath{\u003c}}/i{\\ensuremath{\u003e}}. Our approach can be implemented by overriding the SERVICE operator and does not require to extend the SPARQL syntax. We compare our approach with the state of art methods RML and SPARQL Generate and show how our solution has lower learning demands and cognitive complexity, and it is cheaper to implement and maintain, while having comparable extensibility and efficiency.}\n}\n```\n\n### Technical report\n\nAsprino, Luigi, Enrico Daga, Justin Dowdy, Paul Mulholland, Aldo Gangemi, and Marco Ratta. \"Streamlining Knowledge Graph Construction with a fa\\c {c} ade: The SPARQL Anything project.\" arXiv preprint arXiv:2310.16700 (2023).\n\n```bibtex\n@article{asprino2023streamlining,\n  title={Streamlining Knowledge Graph Construction with a fa$\\backslash$c $\\{$c$\\}$ ade: The SPARQL Anything project},\n  author={Asprino, Luigi and Daga, Enrico and Dowdy, Justin and Mulholland, Paul and Gangemi, Aldo and Ratta, Marco},\n  journal={arXiv preprint arXiv:2310.16700},\n  year={2023}\n}\n```","funding_links":["https://patreon.com/SPARQLAnything"],"categories":["KGC Materializers","Java","json","Mapping"],"sub_categories":["XML"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSPARQL-Anything%2Fsparql.anything","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSPARQL-Anything%2Fsparql.anything","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSPARQL-Anything%2Fsparql.anything/lists"}