تخطَّ إلى المحتوى
TakoAPI
العودة إلى المهارات

query-wikidata

بواسطة kidehen

Web & Frontend Development
—لم يُقيَّم بعد
تقييمك

موجز

Transform natural language questions into SPARQL queries for Wikidata and generate beautiful HTML results pages.

الوصف

ما الذي تفعله هذه المهارة

Converts natural language questions into SPARQL queries and runs them against the Wikidata knowledge base. Returns results as JSON, Markdown tables, or styled HTML pages. Handles entity lookup, property mapping, and label resolution automatically.

Wikidata's structured Q/P identifier system and multilingual label service enable more precise, property-rich queries than DBpedia or plain web search.

متى تستخدمها

  • Finding all films directed by a specific person
  • Listing books by an author with publication dates
  • Querying capitals and populations of countries in a region
  • Retrieving Nobel Prize winners by category and year
  • Looking up birthplaces and dates for people in a given occupation

مثال على سير العمل

الإدخال

User asks: List all films directed by Christopher Nolan with release dates and budgets

الوكيل
  1. 1

    Searches Wikidata to resolve Christopher Nolan's Q-number (wd:Q25191)

  2. 2

    Maps natural language fields to Wikidata properties: director P57, release date P577, budget P2130

  3. 3

    Constructs SPARQL query with label service and OPTIONAL clauses for missing properties

  4. 4

    Executes HTTP GET against https://query.wikidata.org/sparql with required User-Agent header

  5. 5

    Formats results into a styled HTML page with Wikidata branding and linked entity names

الإخراج

HTML file saved locally listing 12 films with available release dates and budget figures, plus the executed SPARQL query displayed inline

التثبيت

clawhub install kidehen/query-wikidata

شغّل أمر واجهة سطر الأوامر، أو الصق النص في Claude Code أو Cursor أو Codex أو أي وكيل برمجة تستخدمه.

الروابط