「利用者:Suisui/整備」の版間の差分

削除された内容 追加された内容
an
 
42行目:
これでwikipediaの言語版数を出すことができるが、2021/10現在では検索結果が一つ以上あるとタイムアウトしてしまう。すでにあることがわかっていない限り意味がない。
 
ヒントの追加で動作することが判明
<pre>
SELECT ?item ?label ?w (count(?article) as ?lw_count) WHERE{
?item wikibase:sitelinks ?linkcount . hint:Prior hint:runFirst true.
#values ?linkcount {80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100}
values ?linkcount {45}
?item rdfs:label ?label.
FILTER(lang(?label)="en")
FILTER(!strstarts(?label, "Category:"))
FILTER(!strstarts(?label, "Wikipedia:"))
FILTER(!strstarts(?label, "Template:"))
FILTER(!strstarts(?label, "Module:"))
FILTER(!strstarts(?label, "Help:"))
FILTER NOT EXISTS{?sc schema:about ?item; schema:isPartOf <https://ja.wikipedia.org/> . }
?article schema:about ?item ;
schema:isPartOf [wikibase:wikiGroup "wikipedia" ].
OPTIONAL{?item wdt:P31 ?what.?what rdfs:label ?w. FILTER(lang(?w)="ja")}
} group by ?item ?label ?w</pre>
 
45前後以下だとやはりタイムアウトしてしまうがないより全然いいと思う。
 
=== 自動化検討 ===