Search Docs…

Search Docs…

Orpheus API Reference

Nl to Sparql

POST NL to SPARQL

https://api.wisecube.ai/orpheus/graphql

This API converts text to sparql.

BODY graphql

QUERY

query executeNl2Sparql($question: String!) {
  executeNl2Sparql(question: $question) 
}

GRAPHQL VARIABLES

{
    "question" : "What are the symptoms of influenza?"
}

Example Request: Search Entities

POST /orpheus/graphql HTTP/1.1 
Host: api.wisecube.ai 
Content-Type: application/json 
Content-Length: 381 

{\"query\":\"query executeNl2Sparql($question: String!) {\\n  executeNl2Sparql(question: $question) \\n}\",\"variables\":{\"question\":\"What are the symptoms of influenza?\"}}

Example response

{
    "data": {
        "executeNl2Sparql": {
            "SPARQL": "SELECT DISTINCT ?item ?itemLabel \nWHERE {\nwd:Q2840 wdt:P780 ?item .\n?item rdfs:label ?itemLabel . \nFILTER( LANG (?itemLabel) = 'en')\n}"
        }
    }
}


Wisecube AI

© 2024