query-3c1da875898ec218135f5b309d278deb
nuage de mots-clés/wordcloud
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
#title:wordcloud articles without statements MyLang Wikipedia (switch to "Table" view to list, at left border of screen)
#defaultView:BubbleChart
SELECT
?word
(COUNT(*) as ?count)
(URI(CONCAT("https://www.wikidata.org/w/index.php?search=inlabel%3A",?word,"%40[AUTO_LANGUAGE]+-haswbstatement%3A%2A&profile=advanced&fulltext=1&ns=1")) as ?search)
WHERE
{
{
SELECT (str(?nv-1) as ?ord) { [] wdt:P5176 ?i ; wdt:P1181 ?nv . FILTER( ?nv < 8) }
}
{
SELECT ?item (CONCAT(?n, " 1 1 1 1 1 1 1 1 ") as ?string)
{
?item wikibase:statements 0 .
[] schema:about ?item ; schema:name ?n ; schema:isPartOf <https://[AUTO_LANGUAGE].wikipedia.org/>
}
LIMIT 20000
} BIND( CONCAT("^([^ ]+ ){",?ord,"}([^ ]+) .+$") as ?re)
BIND( REPLACE(?string, ?re, "$2") as ?word)
# FILTER( ?word != "1" && )
FILTER( strlen(?word) > 4)
}
GROUP BY ?word
ORDER BY DESC(?count)
LIMIT 100