Commons:Bots/Requests/FerdiBot
Operator: Ferdi2005 (talk · contributions · Statistics · Recent activity · block log · User rights log · uploads · Global account information)
Task: it will do a SPARQL query, looking for Wiki Loves Monuments Italy monuments without a category. Then, it’ll search here for photo submitted with that monument’s WLM ID. If it founds one, it’ll create a category and append to that photos the category it has just created. Then it adds the category to wikidata with the property Commons category.
You can find the source code here. Automatic or manually assisted: manually assisted
Edit type (e.g. Continuous, daily, one time run): runs every time the script is launched, once every month
Maximum edit rate (e.g. edits per minute): once every 15 seconda
Bot flag requested: (Y/N): N
Programming language(s): PHP using boz-mw framework. Ferdi2005 (Posta) 07:52, 19 July 2019 (UTC)
Discussion
- please, consider as bot edits only the edits done after the creation of this request, because the script is running now. Before I was just using bot account only semi-automatically.--Ferdi2005 (Posta) 08:00, 19 July 2019 (UTC)
- I can't successfully do test edits because of a captcha! (Because the bot is not autoconfirmed). I'll redo test edits when the bot will be autoconfirmed, please mantain this request on hold until that.--Ferdi2005 (Posta) 13:44, 19 July 2019 (UTC)
- Bot account has confirmed status now. Please make new test run, because older directories were often redirected to existing ones, so probably you need to check Commons categories without Wikidata manually first. Also newly created directories often are not categorized themselves. --EugeneZelenko (talk) 14:13, 19 July 2019 (UTC)
- @EugeneZelenko: See this as an example Category:Temple of Venus in Pompeii. If we need, the bot automatically add town's category as parent category. What do you think about this? — Preceding unsigned comment added by Ferdi2005 (talk • contribs) 18:23, 19 July 2019 (UTC)
- Please take a look on File:MADONNA TRA SAN ROCCO e BEATA PANACEA.JPG. File was over-categorized already and Category:Chiesa di San Rocco is clear duplicate of Category:San Rocco (Ghemme). Looks like list of needed categories for bot must be created manually. --EugeneZelenko (talk) 15:12, 20 July 2019 (UTC)
- But that wasn't in Wikidata. I added that there is a manual confirmation before creation of the category and about the title and it adds automatically city's category in the category. What do you think about this? @EugeneZelenko: --Ferdi2005 (Posta) 18:20, 20 July 2019 (UTC)
- This is exactly my point: some Commons categories may be not connected to Wikidata items yet. It's good idea to check both Wikidata/Commons before creating categories. May be special project should be organized to distribute task across users. --EugeneZelenko (talk) 18:24, 20 July 2019 (UTC)
- @EugeneZelenko: Now, the script looks up for categories with similar names, so if there's a category yet, the user (now it's manual) can abort.--Ferdi2005 (Posta) 19:43, 22 July 2019 (UTC)
- Could you please run only matching part of code without creating/changing categories and add link to results here? Just to see how well algorithm works. --EugeneZelenko (talk) 14:47, 23 July 2019 (UTC)
- @EugeneZelenko: You can find the code itself at this github repo. Script running:
- Could you please run only matching part of code without creating/changing categories and add link to results here? Just to see how well algorithm works. --EugeneZelenko (talk) 14:47, 23 July 2019 (UTC)
- @EugeneZelenko: Now, the script looks up for categories with similar names, so if there's a category yet, the user (now it's manual) can abort.--Ferdi2005 (Posta) 19:43, 22 July 2019 (UTC)
- This is exactly my point: some Commons categories may be not connected to Wikidata items yet. It's good idea to check both Wikidata/Commons before creating categories. May be special project should be organized to distribute task across users. --EugeneZelenko (talk) 18:24, 20 July 2019 (UTC)
- But that wasn't in Wikidata. I added that there is a manual confirmation before creation of the category and about the title and it adds automatically city's category in the category. What do you think about this? @EugeneZelenko: --Ferdi2005 (Posta) 18:20, 20 July 2019 (UTC)
- Please take a look on File:MADONNA TRA SAN ROCCO e BEATA PANACEA.JPG. File was over-categorized already and Category:Chiesa di San Rocco is clear duplicate of Category:San Rocco (Ghemme). Looks like list of needed categories for bot must be created manually. --EugeneZelenko (talk) 15:12, 20 July 2019 (UTC)
- @EugeneZelenko: See this as an example Category:Temple of Venus in Pompeii. If we need, the bot automatically add town's category as parent category. What do you think about this? — Preceding unsigned comment added by Ferdi2005 (talk • contribs) 18:23, 19 July 2019 (UTC)
- Bot account has confirmed status now. Please make new test run, because older directories were often redirected to existing ones, so probably you need to check Commons categories without Wikidata manually first. Also newly created directories often are not categorized themselves. --EugeneZelenko (talk) 14:13, 19 July 2019 (UTC)
- I can't successfully do test edits because of a captcha! (Because the bot is not autoconfirmed). I'll redo test edits when the bot will be autoconfirmed, please mantain this request on hold until that.--Ferdi2005 (Posta) 13:44, 19 July 2019 (UTC)
[2019-07-29 21:15:10][INFO] login with username 'FerdiBot' Inizializzzo connessione con usernameFerdiBot</br> # Initializing connection with username FerdiBot Esecuzione della query SPAQRL # executing SPARQL query SELECT ?item ?itemLabel ?value ?city ?cityLabel ?sitelink ?coords ?citycat WHERE { ?item wdt:P2186 ?value. ?item wdt:P17 wd:Q38. ?city wdt:P373 ?citycat FILTER NOT EXISTS { ?item wdt:P373 ?x. } FILTER NOT EXISTS { ?item wdt:P935 ?y. } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en, it". } ?item wdt:P131 ?city. OPTIONAL { ?item wdt:P625 ?coords.} ?city wdt:P373 ?citycat OPTIONAL {?sitelink schema:isPartOf <https://commons.wikimedia.org/>;schema:about ?item. } } LIMIT 500</div> <br/> <ol><li> Eseguo operazioni sul monumento [http://www.wikidata.org/entity/Q2391849] complesso nuragico di Tamuli (Q2391849) </a> </br> #Executing operations on the monument Cerco foto che abbiano il WLMID di quel monumento salvato #looking for photos with that WLMID Non abbiamo trovato categorie simili.Vuoi che il nome della categoria sia complesso nuragico di Tamuli? Rispondi Y se sì oppure scrivi il nome che la categoria deve avere. Scrivi abort per stoppare ed andare avanti." # We didn't find similar categories. Do you want "complesso nuragico di Tamuli" as category name? Reply Y if yes or write the name the category should have. Write abort to stop and go to the next monument
- string with # are my translations from english--Ferdi2005 (Posta) 21:19, 29 July 2019 (UTC)
- Could you please create report in wiki-text, so participants of this discussion could analyze it? --EugeneZelenko (talk) 14:28, 30 July 2019 (UTC)
- @EugeneZelenko: What do you mean for report in Wikitext?--Ferdi2005 (Posta) 19:40, 30 July 2019 (UTC)
- I meant table with links to Wikidata item, possible match and place category when no match found published in your or bot user space. --EugeneZelenko (talk) 13:52, 31 July 2019 (UTC)
- So, you propose to have the bot writing the created categories on a page? An interesting solution would be create manually assisted categories (manual name and printing of similar name categories) and then add to created categories the "To check - WLMIT" category, so I or another volunteer can check the created categories and see if there's any problem. What do you think about this? @EugeneZelenko: --Ferdi2005 (Posta) 19:31, 7 August 2019 (UTC)
- Goal of this test is to check how well bot detects existed categories not linked to Wikidata. There is no need to create new ones at that stage. --EugeneZelenko (talk) 14:10, 8 August 2019 (UTC)
- @EugeneZelenko: What do you mean for report in Wikitext?--Ferdi2005 (Posta) 19:40, 30 July 2019 (UTC)
- Could you please create report in wiki-text, so participants of this discussion could analyze it? --EugeneZelenko (talk) 14:28, 30 July 2019 (UTC)
- Please put new categories in a new line, as per the standard on commons, see this edit --Schlurcher (talk) 11:53, 13 August 2019 (UTC)
- The bot generates orphan categories (without any connection to the category tree) like this: [1]. Likewise concerning is that there is already an existing category: Category:Steppe Sarde --Schlurcher (talk) 11:53, 13 August 2019 (UTC)
- @Ferdi2005: ? --Krd 08:01, 1 September 2019 (UTC)
- @Ferdi2005: Final call. --Krd 15:20, 13 September 2019 (UTC)
- I modified the bot to be semi-automatic and operated by an human, it adds automatically the category of the city if there's one. @Schlurcher: I will apply your suggestions, if there's consensus about the opportunity to have this bot.--Ferdi2005[Mail]
- Could you please provide results of existing categories detection functionality testing? --EugeneZelenko (talk) 13:55, 14 September 2019 (UTC)
Closing as stale because of missing feedback from the operator. --Krd 15:36, 10 October 2019 (UTC)