[00:46:59] Dreamy_Jazz: may I pm? [00:48:39] Sure [00:50:37] 👀 [00:52:01] TheresNoTime: should I pm you too? :D [00:52:16] What did I do.. [00:52:20] D: [00:53:22] tbh I'm upset that by the time I wake up to review Dreamy_Jazz's patches you've already merged them [00:53:38] :D [00:54:12] I've only done a few :p I set myself a couple of hours a week to do reviews [00:55:29] (oof what did you do?? /j) [17:09:50] Sorry if it's the wrong chat, feel free to redirect me if needed: Using the api to query images from Commons: how do you filter out images from certain categories? For example: I don't want pictures of people to show up in my query [19:35:31] Thibaultmol1: depending on what exact API call you happen to use. if it's `action=query&list=allimages`, you can pass `aiprop=extmetadata` and use `extmetadata[Categories]`to filter by category on client side [19:37:34] depending on what's your goal, querying Commons structured data or database replicas might be potentially a better fit [19:40:50] [[Tech]]; Ptpare; /* Lua errors in the references in the nso Wikipedia */ new section; https://meta.wikimedia.org/w/index.php?diff=23423303&oldid=23406486&rcid=24283358 [19:41:55] [[Tech]]; Ptpare; who --> how; https://meta.wikimedia.org/w/index.php?diff=23423304&oldid=23423303&rcid=24283360 [19:42:00] "Thibaultmol: depending on what..." <- It's a certain library that's pulling images from Commons (and other sources). This is the repo where he has his api url https://framagit.org/Pic4Carto/Pic4Carto.js/-/blob/master/src/ctrl/fetchers/WikiCommons.js#L94 [19:42:01] I'll forward him what you said [19:44:19] Thibaultmol1: to be honest, I'm not sure using categories will let you to remove ie. people easily. there are a lot of categories that'd match "people", and it's not always easy to use them to determine what's on the image. [19:44:48] structured data work well on conceptual level, but are not always filled (and I'm not sure if they can be easily queried from a library) [19:44:56] anyway, hope this info help :) [19:46:02] I see, for context: this library pulls images from nearby locations. For example in project like 'pic4review' where it will pull streetviewimagery(mapillary) and commons imagery with geo coordinates near the point that needs to be verified. But I noticed at one point that it started showing me actor images. Which obv happened to be in the 'actors' category [19:46:09] but I guess that was a happy coincidence [19:46:43] well they will probably be in a matching category. the issue is what's the category named :) [19:46:44] (Mapcomplete also uses the same library which is where I noticed the problem first https://github.com/pietervdvn/MapComplete/issues/878 ) [19:47:34] it can have the words male, female, people, portrait, actor, swimmer, politician, etc. in it. not always easy for a machine to tell :) [19:49:08] I see, the example was this https://commons.wikimedia.org/wiki/File:Gregory_caers-1565019227.jpg [19:49:39] which has the category "Male actors from Belgium" which can then be parented up to just being 'people' I guess? [19:54:27] Thibaultmol1: indeed. not within a single api call though. i wouldn't recommend building such a parenting up software though, it will likely give really inaccurate results. for example, "Flight computer" is an indirect child of "People" (through "Aviator personal equipment", which is more people related) [19:55:15] I wonder: how close is wikidata connected to Commons? (could it somehow help with this?) [19:56:51] indeed, that's basically what structured data is about: adding claims to commons files, using Wikidata's definition of properties and items. it's not always available in the file though, but it should help with being able to tell what a photo depicts [19:57:28] https://commons.wikimedia.org/wiki/Commons:Structured_data [20:02:53] Aight, well thx for the help already. i've forwarded it to the developer, see what he thinks [20:03:42] any time Thibaultmol1. let me know if i can help more. [20:13:40] Is that how my username is showing up? (sorry, had some weird things happen when i tried to join the room via my matrix client) [20:19:47] yes, this is how the conversation looks on my end https://usercontent.irccloud-cdn.com/file/7XWXClul/image.png [20:25:08] Any different now? [20:34:20] nope, still Thibaultmol1 for me [20:34:37] (you disconnected and then reconnected though)