MediaWiki API result

This is the HTML representation of the JSON format. HTML is good for debugging, but is unsuitable for application use.

Specify the format parameter to change the output format. To see the non-HTML representation of the JSON format, set format=json.

See the complete documentation, or the API help for more information.

{
    "batchcomplete": "",
    "warnings": {
        "main": {
            "*": "Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes."
        },
        "revisions": {
            "*": "Because \"rvslots\" was not specified, a legacy format has been used for the output. This format is deprecated, and in the future the new format will always be used."
        }
    },
    "query": {
        "pages": {
            "25361": {
                "pageid": 25361,
                "ns": 0,
                "title": "SPARQL queries",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "Here you find some SPARQL queries that you can use, and also modify or combine. To start a query from scratch, you may use this:\n<sparql tryit=\"1\">\nPREFIX qwb: <https://qichwa.wikibase.cloud/entity/>\nPREFIX qdp: <https://qichwa.wikibase.cloud/prop/direct/>\nPREFIX qp: <https://qichwa.wikibase.cloud/prop/>\nPREFIX qps: <https://qichwa.wikibase.cloud/prop/statement/>\nPREFIX qpq: <https://qichwa.wikibase.cloud/prop/qualifier/>\nPREFIX qpr: <https://qichwa.wikibase.cloud/prop/reference/>\nPREFIX qno: <https://qichwa.wikibase.cloud/prop/novalue/>\n\nSELECT * WHERE {}\n</sparql>\n=Lexical Entries=\n==Puno Quechua Lexical entries ==\n<sparql tryit=\"1\">\n#This is a list of Puno Quechua Lexical entries \nPREFIX qwb: <https://qichwa.wikibase.cloud/entity/>\nPREFIX qdp: <https://qichwa.wikibase.cloud/prop/direct/>\nPREFIX qp: <https://qichwa.wikibase.cloud/prop/>\nPREFIX qps: <https://qichwa.wikibase.cloud/prop/statement/>\nPREFIX qpq: <https://qichwa.wikibase.cloud/prop/qualifier/>\nPREFIX qpr: <https://qichwa.wikibase.cloud/prop/reference/>\nPREFIX qno: <https://qichwa.wikibase.cloud/prop/novalue/>\n\nSELECT ?entry ?lemma ?language ?lexical_category ?lex_cat_wikidata ?described_in \n?form_representation ?spelling_variant \n?sense_gloss_de ?sense_gloss_en ?sense_gloss_es ?sense_gloss_it\nWHERE {\nBIND(\"Q5218\" AS ?language) #assigning Q5218 = Quechua Wikidata as the language\nBIND(\"qu-x-Q7260479\" AS ?spelling_variant) #Assigning the language-code for the form\nBIND(\"Q24905\" AS ?lex_cat_wikidata) #Assignning Q24905 = Verb Wikidata as the lexical category\n?entry a ontolex:LexicalEntry; \n       wikibase:lemma ?lemma;\n       wikibase:lexicalCategory qwb:Q99 ; #Category Q99 = V.tr Qichwabase\n       wikibase:lexicalCategory [rdfs:label ?lexical_category] ;       \n       qp:P16 [qps:P16 ?form_representation;\n               qpq:P17 qwb:Q116; #Q116 = Cusco-Collao (aiu) Qichwabase\n             ]. \nOPTIONAL {\n  ?entry ontolex:lexicalForm ?form1 .\n  ?form1 ontolex:representation ?wform1;\n         wikibase:grammaticalFeature [rdfs:label ?wf1_gram_feature_label] .\n         FILTER(LANG(?featureLabel)=\"es\")\n}\nOPTIONAL {\n  ?entry ontolex:sense ?sense_de .\n  ?sense_de skos:definition ?sense_gloss_de.\n  FILTER(LANG(?sense_gloss_de)=\"de\")\n}\nOPTIONAL {\n  ?entry ontolex:sense ?sense_en .\n  ?sense_en skos:definition ?sense_gloss_en.\n  FILTER(LANG(?sense_gloss_en)=\"en\")\n}\n#OPTIONAL {      # at least contains spanish gloss\n  ?entry ontolex:sense ?sense_es .\n  ?sense_es skos:definition ?sense_gloss_es.\n  FILTER(LANG(?sense_gloss_es)=\"es\")\n#}\nOPTIONAL {\n  ?entry ontolex:sense ?sense_it .\n  ?sense_it skos:definition ?sense_gloss_it.\n  FILTER(LANG(?sense_gloss_it)=\"it\")\n}\n}\nLIMIT 10\n==Lexical entries with lemma and pos==\n<sparql tryit=\"1\">\n# this lists all lexcial entries, with lemma and pos, ordered alphabetically by lemma\nselect ?entry ?lemma ?posLabel \nwhere {?entry a ontolex:LexicalEntry; \n                wikibase:lemma ?lemma;\n                wikibase:lexicalCategory [rdfs:label ?posLabel]. \n                  filter(lang(?posLabel)=\"en\")}\norder by lcase(?lemma)\n</sparql>\n==Problematic lexical entries==\n<sparql tryit=\"1\">\n# this lists all lexical entries with bracket, semicolon, or comma in the lemma sign\nselect ?entry ?lemma ?posLabel \nwhere {?entry a ontolex:LexicalEntry; \n                wikibase:lemma ?lemma;\n                wikibase:lexicalCategory [rdfs:label ?posLabel]. \n                  filter(lang(?posLabel)=\"en\")\n                  filter(regex(?lemma,'[();,]'))}\norder by lcase(?lemma)\n</sparql>\n\n=Senses and sense descriptions=\n<sparql tryit=\"1\">\n#this lists entries that have senses and sense descriptions\nselect ?entry ?lemma ?posLabel (group_concat(concat(str(?sensegloss),\" (\",lang(?sensegloss),\")\");SEPARATOR=\"; \") as ?sense_descriptions)\nwhere {\n\n?entry a ontolex:LexicalEntry; \n       wikibase:lemma ?lemma;\n       wikibase:lexicalCategory [rdfs:label ?posLabel] . filter(lang(?posLabel)=\"en\")\n?entry ontolex:sense [skos:definition ?sensegloss].\n\n} group by ?entry ?lemma ?posLabel ?sense_descriptions\nlimit 100 # remove the limit and get all entries that have sense descriptions\n</sparql>\n\n=Dialectal lemma variants=\n<sparql tryit=\"1\">\n#defaultView:BarChart\n#This shows the distribution of dialectal lemma variants\nPREFIX qp: <https://qichwa.wikibase.cloud/prop/>\nPREFIX qps: <https://qichwa.wikibase.cloud/prop/statement/>\nPREFIX qpq: <https://qichwa.wikibase.cloud/prop/qualifier/>\n\nSELECT ?dialect ?dialectLabel (count (?variant) as ?variants)\nWHERE { ?lemma qp:P16 [ qps:P16 ?variant ; qpq:P17 ?dialect ] .\n        SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". }\n      }\nGROUP BY ?dialect ?dialectLabel ?variants ORDER BY DESC(?variants)\n</sparql>\n=Part of speech (lexical category)=\n==Course-grained (lexical category superclasses)==\n<sparql tryit=\"1\">\n#defaultView:BarChart\nPREFIX qdp: <https://qichwa.wikibase.cloud/prop/direct/>\n\nselect ?pos ?posLabel (count(?entry) as ?count)\nwhere {\n?entry a ontolex:LexicalEntry; \n       wikibase:lemma ?lemma;\n       wikibase:lexicalCategory ?pos_finegrained.\n       ?pos_finegrained qdp:P4 ?pos. ?pos rdfs:label ?posLabel . filter(lang(?posLabel)=\"en\")\n} group by ?pos ?posLabel ?count\norder by desc(?count) \n</sparql>\n==Fine-grained (lexical categories as in Runasimi Dictionary)==\n<sparql tryit=\"1\">\n#defaultView:BarChart\n#this shows pos distribution (fine-grained categories as in Runasimi dictionary)\nselect ?pos ?posLabel (count(?entry) as ?count)\nwhere {\n?entry a ontolex:LexicalEntry; \n       wikibase:lemma ?lemma;\n       wikibase:lexicalCategory ?pos. ?pos rdfs:label ?posLabel . filter(lang(?posLabel)=\"en\")\n} group by ?pos ?posLabel ?count\norder by desc(?count) \n</sparql>"
                    }
                ]
            }
        }
    }
}