[Wikidata] (no subject)

2019-11-15 Thread Sharon Jennings
-- 
Kimberly
"+a+"");return(new 
DOMParser).parseFromString(Uc(a),"text/html").body.children[0]} function 
Ig(a,b){if(!a)return xc;var 
c=document.createElement("div").style,d=Lg(a);lb(d,function(e){var f=td& in 
Fg?e:e.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/i,"");Vb(f,"--")||Vb(f,"var")||(e=Cg(a,e),e=bg(f,e,b),null!=e&(c,f,e))});return
 cd(c.cssText||"")} function Mg(a){var 
b=Array.from(ug(jg,a,"getElementsByTagName",["STYLE"])),c=wb(b,function(e){return
 
ub(yg(e).cssRules)});c=Hg(c);c.sort(function(e,f){e=Vf(e.selectorText);a:{f=Vf(f.selectorText);for(var
 g=Math.min(e.length,f.length),h=0;h"+c+"
"),Mg(c),c=c.innerHTML);c=bd(Ib("Never attached to DOM."),c);var 
d=document.createElement("template");if(Tg&&"content"in 
d)ed(d,c),d=d.content;else{var 
e=document.implementation.createHTMLDocument("x");d=e.body;ed(e.body,c)}c=document.createTreeWalker(d,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,null,!1);for(d=Pg?new
 WeakMap:new Rg;e=c.nextNode();){c:{var f=a;var g=e;switch(Ag(g)){case 
3:f=oh(f,g);break c;case 1:if("TEMPLATE"==zg(g).toUpperCase())f=null;else{var 
h=zg(g).toUpperCase();if(h in f.ma)var l=null;else 
f.ha[h]?l=document.createElement(h):(l=Ye("SPAN"),f.va&(l,"data-sanitizer-original-tag",h.toLowerCase()));if(l){var
 m=l,p=vg(g);if(null!=p)for(var y=0;h=p[y];y++)if(h.specified){var u= f;var 
v=g,J=h,Q=J.name;if(Vb(Q,"data-sanitizer-"))u=null;else{var 
S=zg(v);J=J.value;var 
V={tagName:Xb(S).toLowerCase(),attributeName:Xb(Q).toLowerCase()},ca={Tf:void 
0};"style"==V.attributeName&&(ca.Tf=xg(v));v=lh(S,Q);v in 
u.o?(u=u.o[v],u=u(J,V,ca)):(Q=lh(null,Q),Q in 
u.o?(u=u.o[Q],u=u(J,V,ca)):u=null)}null!==u&(m,h.name,u)}f=l}else 
f=null}break 
c;default:f=null}}if(f){if(1==Ag(f)&(e,f),e=Bg(e),g=!1,e)h=Ag(e),l=zg(e).toLowerCase(),m=Bg(e),11!=h||m?"body"==l&&&(h=Bg(m))&&!Bg(h)&&(g=!0):g=!0,h=null,g||!e?h=b:1==Ag(e)&&(h=d.get(e)),h.content&&(h=h.content),h.appendChild(f)}else
 cf(e)}d.clear&();a=b}else 
a=Ye("SPAN");0")+1,a.lastIndexOf(">>0);a={requestId:c,ek:Ch(a,b,c),onLoad:b.onLoad,onError:b.onError||k(),tg:b.tg||k(),$m:b.$m||k(),nk:b.nk,Tk:b.pageType,Dg:b.Dg};b.Sb&&("IFRAME"==b.Sb.nodeName?(a.window=b.Sb.contentWindow,a.Sb=a.window.document.body):(a.window=window,a.Sb=b.Sb));return
 a} function Ch(a,b,c){var 
d=Dh(a)+"/apis/render?",e=a.wa,f=a.Da,g=b.helpcenter,h=a.Ba,l=a.Aa,m=a.Ia,p=a.Ha,y=a.Ca,u=b.pageType,v=b.pageId,J=b.sf,Q=b.To;c=["js_request_id."+c];if(b.extraParams)for(var
 S in 
b.extraParams)c.push(S+"."+b.extraParams[S]);a={v:1,key:e,request_source:f,helpcenter:g,hl:h,authuser:l,visit_id:m,view_id:p,psd:y,page_type:u,id:v,components:J,exclude_components:Q,extra_params:c,mendel_ids:a.va,service_configuration:a.Ga,scdeb:a.ua};b="";for(var
 V in a)e=a[V],void 0!=e&&(Array.isArray(e)&& 
(e=e.join()),b&&(b+="&"),b+=V+"="+encodeURIComponent(e.toString()));return d+b} 
function 
Bh(a,b,c){b.window.sc_scope=b.Sb;b.onLoad&&(b.window[b.requestId]=function(d){b.onLoad(d.getChild(b.requestId))});b.Sb.innerHTML=c;c=Array.from(b.Sb.getElementsByTagName("script"));a.ta(b,c)}
 
xh.prototype.ta=function(a,b){for(;0=a.keyCode)a.keyCode=-1}catch(b){}};function
 
Nh(a,b,c,d,e){this.listener=a;this.proxy=null;this.src=b;this.type=c;this.capture=!!d;this.rf=e;this.key=++Ih;this.Td=this.Ue=!1}
 function Oh(a){a.Td=!0;a.listener=null;a.proxy=null;a.src=null;a.rf=null} 
;function Ph(a){this.src=a;this.o={};this.w=0} 
Ph.prototype.add=function(a,b,c,d,e){var 
f=a.toString();a=this.o[f];a||(a=this.o[f]=[],this.w++);var 
g=Qh(a,b,d,e);-1c.keyCode||void 0!=c.returnValue)){a:{var 
e=!1;if(0==c.keyCode)try{c.keyCode=-1;break a}catch(g){e=!0}if(e||void 
0==c.returnValue)c.returnValue=!0}c=[];for(e=b.o;e;e=e.parentNode)c.push(e);a=a.type;for(e=c.length-1;!b.w&&0>>0);function
 Xh(a){if(ab(a))return a;a[gi]||(a[gi]=function(b){return 
a.handleEvent(b)});return a[gi]} ;function hi(){Jh.call(this);this.ka=new 
Ph(this);this.Ua=this;this.La=null} 
C(hi,Jh);hi.prototype[Hh]=!0;r=hi.prototype;r.ag=q("La");r.addEventListener=function(a,b,c,d){Vh(this,a,b,c,d)};r.removeEventListener=function(a,b,c,d){ci(this,a,b,c,d)};r.Pb=function(a){var
 b=this.ag();if(b){var c=[];for(var 
d=1;b;b=b.ag())c.push(b),++d}b=this.Ua;d=a.type||a;if("string"===typeof a)a=new 
Kh(a,b);else if(a instanceof Kh)a.target=a.target||b;else{var e=a;a=new 
Kh(d,b);Db(a,e)}e=!0;if(c)for(var 
f=c.length-1;!a.w&&0a.w&&(a.w++,b.next=a.o,a.o=b)} ;function 
ki(a){A.setTimeout(function(){throw a;},0)} var li;function mi(){var 
a=A.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof 
window!D("Presto")&&(a=function(){var
 
e=Ye("IFRAME");e.style.display="none";hd(e);document.documentElement.appendChild(e);var
 f=e.contentWindow;e=f.document;e.open();e.write(Uc(Yc));e.close();var 

[Wikidata] (no subject)

2019-04-07 Thread Your Time will come and it will be your last

___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


Re: [Wikidata] Get "subject links" via Wikidata API

2017-04-12 Thread James Heald
One further alternative is the "Linked Data Fragments" (LDF) interface, 
which is supposed to be a bit lighter on the server than SPARQL -- but 
only returns a set of triples, so further actions would be needed if you 
wanted to get labels for them as well.


For example:

https://query.wikidata.org/bigdata/ldf?subject==wdt:P50=wd:Q35610

-- James.


On 12/04/2017 18:37, f...@imm.dtu.dk wrote:



On 04/12/2017 05:57 PM, Magnus Manske wrote:

Just say "wd:Q12345" (the author) instead of "?author" ?


Yes, that is what we do all over in Scholia, e.g.,
https://tools.wmflabs.org/scholia/author/Q13520818


The backlinks thing works, but is tedious. You'll need to load the items
via action=wbgetentities to check if that link actually means "author",
or some other property.


We got a question from a reviewer asking why we used SPARQL in Scholia
and not just MediaWiki API. My initial thought was that it was not
possible with MediaWiki API, but then I thought of list=backlinks and
followed by (as Magnus points out) action=wbgetentities.

I was afraid that some place hidden in the MediaWiki API would be a
query functionality so you could get Wikidata property-filtered
backlinks, but since Magnus don't point to them, I am pretty sure now
that no such functionality exists. :)


/Finn




___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


Re: [Wikidata] Get "subject links" via Wikidata API

2017-04-12 Thread fn



On 04/12/2017 05:57 PM, Magnus Manske wrote:

Just say "wd:Q12345" (the author) instead of "?author" ?


Yes, that is what we do all over in Scholia, e.g.,
https://tools.wmflabs.org/scholia/author/Q13520818


The backlinks thing works, but is tedious. You'll need to load the items
via action=wbgetentities to check if that link actually means "author",
or some other property.


We got a question from a reviewer asking why we used SPARQL in Scholia 
and not just MediaWiki API. My initial thought was that it was not 
possible with MediaWiki API, but then I thought of list=backlinks and 
followed by (as Magnus points out) action=wbgetentities.


I was afraid that some place hidden in the MediaWiki API would be a 
query functionality so you could get Wikidata property-filtered 
backlinks, but since Magnus don't point to them, I am pretty sure now 
that no such functionality exists. :)



/Finn


On Wed, Apr 12, 2017 at 4:52 PM >
wrote:


To get the works that an person has written It would use SPARQL with
something link "SELECT * WHERE { ?work wdt:P50 ?author }".

I could also get the authors of a work via Wikidata MediaWiki API.

My question is whether it is possible to get the works of an author
given the author. With my knowledge of the API, I would say it is not
possible, except if you do something "Special:WhatLinksHere"
(list=backlinks) and process/filter all the results.


Finn Årup Nielsen
http://people.compute.dtu.dk/faan/

___
Wikidata mailing list
Wikidata@lists.wikimedia.org 
https://lists.wikimedia.org/mailman/listinfo/wikidata



___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata



___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


Re: [Wikidata] Get "subject links" via Wikidata API

2017-04-12 Thread Magnus Manske
Just say "wd:Q12345" (the author) instead of "?author" ?

The backlinks thing works, but is tedious. You'll need to load the items
via action=wbgetentities to check if that link actually means "author", or
some other property.

On Wed, Apr 12, 2017 at 4:52 PM  wrote:

>
> To get the works that an person has written It would use SPARQL with
> something link "SELECT * WHERE { ?work wdt:P50 ?author }".
>
> I could also get the authors of a work via Wikidata MediaWiki API.
>
> My question is whether it is possible to get the works of an author
> given the author. With my knowledge of the API, I would say it is not
> possible, except if you do something "Special:WhatLinksHere"
> (list=backlinks) and process/filter all the results.
>
>
> Finn Årup Nielsen
> http://people.compute.dtu.dk/faan/
>
> ___
> Wikidata mailing list
> Wikidata@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikidata
>
___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


[Wikidata] Get "subject links" via Wikidata API

2017-04-12 Thread fn


To get the works that an person has written It would use SPARQL with 
something link "SELECT * WHERE { ?work wdt:P50 ?author }".


I could also get the authors of a work via Wikidata MediaWiki API.

My question is whether it is possible to get the works of an author 
given the author. With my knowledge of the API, I would say it is not 
possible, except if you do something "Special:WhatLinksHere" 
(list=backlinks) and process/filter all the results.



Finn Årup Nielsen
http://people.compute.dtu.dk/faan/

___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


[Wikidata] (no subject)

2016-08-23 Thread Ananth Subray
P___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


[Wikidata] (no subject)

2015-08-10 Thread Emir Mujadzic
Emir Mujadzic___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata