Random Thought - Tagging Bot

Cirrus Light
Economist -
Condensed Milk - State-Approved Compensation
Friendship, Art, and Magic (2018) - Celebrated Derpibooru's six year anniversary with friends.
Helpful Owl - Drew someone's OC for the 2018 Community Collab
Birthday Cake - Celebrated MLP's 7th birthday
Best Artist - Providing quality, Derpibooru-exclusive artwork
Magical Inkwell - Wrote MLP fanfiction consisting of at least around 1.5k words, and has a verified link to the platform of their choice
Not a Llama - Happy April Fools Day!
Friendship, Art, and Magic (2017) - Celebrated Derpibooru's five year anniversary with friends.
An Artist Who Rocks - 100+ images under his artist tag

Sciencepone of Science!
Title: “Random Thought - Tagging Bot”
 
So, not for every tag, but one particular application came to mind - character tags have a different color, and oc tags have oc:[oc name]. What about a bot that could systematically run through the index of images, check the tags, and add the right implications?
 
Like, I’m not saying just to add an implication because I don’t think those effect old images unless their tags are updated?
 
But also because it could involve just a little bit of logic.
 
So, on each image, just run a little loop over the tags and check for any that have whatever property makes them have the “character tag” color, or any that begin with “oc:”, and add up the number of each. And if there’s 1 character tag or oc tag, then add the “solo” tag to the image. If there’s 2, add the “duo” tag, and 3, add “trio”. Then other things - like if it finds all of the mane 6, add the “mane 6 tag”. If it finds all the CMC’s character tags, add the “cmc” tag.
 
I guess it might miss a little if there’s a plush adding the character tag, but you could just add a condition to not add any of the “quantity tags” (solo, duo, or trio) if there already is one - that would still leave a few, but then it could just make a gallery of all the images it added the “solo” tag to, another gallery for all the images it added the “duo” tag to, and another for all the images it added the “trio” tag to, and those could quickly be sorted through from the thumbnails.
 
 
Just kind of a thought that struck me as I wondered why a certain image I’m looking for didn’t come up when I searched for it with all the tags it should have. Of course, this could apply for more than just the “quantity tags” - as I mentioned, this could also be used for things like the CMC and Mane 6 and other such  
[logical conditions] -> [tag]  
implications.
Dragonpone
Unamused - Derpi Supporter
Pixel Perfection - I still call her Lightning Bolt
Solar Guardian - Refused to surrender in the face of the Lunar rebellion and showed utmost loyalty to the Solar Empire (April Fools 2023).
Flower Trio - Helped others get their OC into the 2023 Derpibooru Collab.
Crystal Roseluck - Had their OC in the 2023 Derpibooru Collab.
King Sombra - Celebrated the 10th anniversary of The Crystal Empire!
A Lovely Nightmare Night - Celebrated the 12th anniversary of MLP:FIM!
Elements of Harmony -
Non-Fungible Trixie -
Philomena - For helping others attend the 2021 community collab

Moderator
Badge Dragon
I think there are too many exceptions in implications to have something like that. It might only be a couple of images under each tag, but on the scale of something large it adds up to a lot of errors quickly.
Cirrus Light
Economist -
Condensed Milk - State-Approved Compensation
Friendship, Art, and Magic (2018) - Celebrated Derpibooru's six year anniversary with friends.
Helpful Owl - Drew someone's OC for the 2018 Community Collab
Birthday Cake - Celebrated MLP's 7th birthday
Best Artist - Providing quality, Derpibooru-exclusive artwork
Magical Inkwell - Wrote MLP fanfiction consisting of at least around 1.5k words, and has a verified link to the platform of their choice
Not a Llama - Happy April Fools Day!
Friendship, Art, and Magic (2017) - Celebrated Derpibooru's five year anniversary with friends.
An Artist Who Rocks - 100+ images under his artist tag

Sciencepone of Science!
@Zeb  
Checks flair? What does that mean?
 
And oh, so we can suggest implications that are logic-based rather than simple tag -> tag?
 
But don’t implications not go back and apply to old images? So it’s a bit different.
 
 
@Dragonpone  
You can have the bot make a gallery for each type of change it makes. Like all it makes a gallery with all the ones where it added “solo”, for example.
 
And the goal isn’t to make it perfect. The goal is to reduce the workload. It’s a lot less work to go through thumbnails and look for exceptions than it is to go through tagging a million images.
 
The exceptions are just that - exceptions. Going through and changing the tags on exceptions is less work than changing tags on the rule.
Cirrus Light
Economist -
Condensed Milk - State-Approved Compensation
Friendship, Art, and Magic (2018) - Celebrated Derpibooru's six year anniversary with friends.
Helpful Owl - Drew someone's OC for the 2018 Community Collab
Birthday Cake - Celebrated MLP's 7th birthday
Best Artist - Providing quality, Derpibooru-exclusive artwork
Magical Inkwell - Wrote MLP fanfiction consisting of at least around 1.5k words, and has a verified link to the platform of their choice
Not a Llama - Happy April Fools Day!
Friendship, Art, and Magic (2017) - Celebrated Derpibooru's five year anniversary with friends.
An Artist Who Rocks - 100+ images under his artist tag

Sciencepone of Science!
@Zeb  
Oooooh.
 
…So you can systematically run through all ~1.5 million images in just a few minutes, tops? Impressive :p
 
Hmm. I don’t know the coding to make a bot interface with the site, but the actual coding for how it checks the tags and such should be pretty a straightforward little function, at least how I imagine it’d look in C____. Declare some variables, run a for loop for the number of tags, and look at each tag and see if they’re equal to any of the conditions, and if any are, redefine one of the variables, and if after the loop some of the variables are defined or a counter reached a certain number, then add a particular tag.
 
That kinda thing.
 
So it shouldn’t be a tremendous amount of work - though much of the work may be in how the bot interfaces with the site? OR even better just have it run on the server that’s hosting the site so it has direct access to the database. I guess that would be the obvious thing to do.
 
But the main thing here is the ability to do logic -> tag and apply that to past images instead of having to have armies go back and do that manually over weeks or months or years (if ever).
Zeb
Praise the Sun! - Derpi Supporter
My Little Pony - 1992 Edition
Friendship, Art, and Magic (2019) - Celebrated Derpibooru's seventh year anniversary with friends.
Economist -
Notoriously Divine Tagger - Consistently uploads images above and beyond the minimum tag requirements. And/or additionally, bringing over the original description from the source if the image has one. Does NOT apply to the uploader adding several to a dozen tags after originally uploading with minimum to bare tagging.
Perfect Pony Plot Provider - Uploader of 10+ images with 350 upvotes or more (Questionable/Explicit)
Equality - In our state, we do not stand out.
Friendship, Art, and Magic (2018) - Celebrated Derpibooru's six year anniversary with friends.
Cool Crow - "Caw!" An awesome tagger
Birthday Cake - Celebrated MLP's 7th birthday

Tag-Bot
@Dragonpone  
“Tag Dragon” There ya go~
 
Anywho, back on the actual topic:  
I don’t fully know what would go into the creation of such a program. Nor how feasible it would be with Derpi’s code. From what I hear, it’s a tangled mess that makes untangling Christmas lights look like child’s play.
 
As for the actual tagging part: A lot of it [searching by combinations of tags and adding the tag that goes with them] is what we already do with mass-tagging. And that can get through about 1,000 images per 3 minutes. Only slow part is figuring out an accurate search and also feeling up to doing the repetitive task.  
Example: Currently 24,946 images tagged “straight, -male, -female, -solo” I could probably do that in a couple of hours. I’d just need to feel like doing it for that long.
 
It would be nice to have the ability to search images based on number of character tags. Because then it would just be another simple matter of tagging “solo, etc” on them.
Cirrus Light
Economist -
Condensed Milk - State-Approved Compensation
Friendship, Art, and Magic (2018) - Celebrated Derpibooru's six year anniversary with friends.
Helpful Owl - Drew someone's OC for the 2018 Community Collab
Birthday Cake - Celebrated MLP's 7th birthday
Best Artist - Providing quality, Derpibooru-exclusive artwork
Magical Inkwell - Wrote MLP fanfiction consisting of at least around 1.5k words, and has a verified link to the platform of their choice
Not a Llama - Happy April Fools Day!
Friendship, Art, and Magic (2017) - Celebrated Derpibooru's five year anniversary with friends.
An Artist Who Rocks - 100+ images under his artist tag

Sciencepone of Science!
@Zeb  
A lot of it [searching by combinations of tags and adding the tag that goes with them] is what we already do with mass-tagging. And that can get through about 1,000 images per 3 minutes. Only slow part is figuring out an accurate search and also feeling up to doing the repetitive task.
Repetitive task - So it’s currently done manually?
 
I mean, if this can be done 25k images in a few hours, then it still seems like quite a bit of work, though that is a lot faster than I thought.
 
Still seems like over the course of a few months, the ability to add or remove tags based on [logic] -> tag would save possibly dozens of hours, and make changing tagging conventions a lot more feasible.
 
I mean…
 
int char_tags = 0;  
bool has_trio = FALSE;  
bool has_duo = FALSE;  
bool has_nopony = FALSE;
 
for(int i = 0; i < image.numtags(); i____) {  
`if (image.tag(i).is_char_tag() TRUE) { char_tags ++; }@
@if (image.tag(i) “solo”) { has_solo TRUE; }@
@if (image.tag(i) “duo”) { has_duo TRUE; }@
@if (image.tag(i) “trio”) { has_trio TRUE; }@
@if (image.tag(i) “no pony”) { has_nopony TRUE; }@
@}@
@If(char_tags 3 && has_trio FALSE) {@
@image.addtag(“trio”) }@
@else If(char_tags 2 && has_duo FALSE) {@
@image.addtag(“duo”) }@
@else If(char_tags 1 && has_solo FALSE) {@
@image.addtag(“solo”) }@
@else If(char_tags 0 && has_nopony == FALSE) { image.addtag(“no pony”) }   It's not a particularly hard problem. Of course this is assuming those nice functions already exist and calling the image properties could actually be doable, as if the images are all indexed in a nicely workable array or something.   And even if they don't exist, making the functions to add a string on an array (if that's what tags even are) or return them or any of that would be pretty straightforward..is_char_tag()` might be a little tedious, but that would just mean grabbing whatever list of tags derpi uses to highlight a tag cyan instead of green and seeing if it is any of those tags.
 
Looks like it would even be fun to program.
 
Take maybe 10-20 more minutes and you could make this cover a whole lot of cases, including character implications and such, and do things like remove “trio” if only 2 characters are tagged, etc. etc. Then add all of these to different galleries for review. Like add all the “duo” to a gallery called “duo”, and just go through the thumbnails manually and look for, say, images where a character should’ve had an “implied [character]” tag instead of the character tag directly. Little exceptions like that. All very easy to do.
 
And that’s just the solo, duo, trio thing. It should totally be possible to make a mass-tagging screen that has a box where you put in search terms, another box to put in what tags to add, and another box for what to name the new gallery all the modified images should go to. That should allow an easy [logic] -> tag tagging process. Honestly I don’t know UI code at all, but the search bar already has all the coding functionality you need to return a list of images that match a certain logic - you could use the exact same function, only instead of showing search results, it would go through and add the tag you requested to all of those images that meet that search criteria.
 
Or remove a certain tag, as the case may be.
 
But the whole issue where many people spend many hours going through tags seems a bit, well, odd, given it’s a digital database and this is the exact sort of thing computers are really good at…
 
Heh, here I am wondering what I’m actually going to do with my life, maybe I should give programming more of a shot since I think it’s fun when others consider it work.
Interested in advertising on Derpibooru? Click here for information!
Techy Cutie Pony Collection!

Help fund the $15 daily operational cost of Derpibooru - support us financially!

Syntax quick reference: **bold** *italic* ||hide text|| `code` __underline__ ~~strike~~ ^sup^ %sub%

Detailed syntax guide