Topic: How does tag aliasing work?

Posted under Tag/Wiki Projects and Questions

After a couple months in e621 I realized that tag update requests are a thing, and that got me thinking:
If the code for aliasing is easy enough that the developers were willing to let the community make suggestions for them, how does it work?

Is "Create implication" and "->" a variable set to change this to that in the upload page? and in doing so, you are actually having the community write the code for you therefore if it does get accepted, you have to do nothing but copy and paste, Or is it some other genius way the devs thought of that no one else would ever think to do.

funkyy said:
Or is it some other genius way the devs thought of that no one else would ever think to do.

well it's a data-driven algorithm; given the list of alias definitions and implication definitions, it takes a set of tags and applies the aliases/implications to produce a new set.
adding new aliases/implications means just appending them to the list of definitions, which is kept in a database table.

there's many other details to it which i can't fully explain, like avoiding invalid or cyclic aliases, enacting them retrospectively, etc.,
but hopefully this at least gives you a better idea of the basic mechanics

bipface said:
well it's a data-driven algorithm; given the list of alias definitions and implication definitions, it takes a set of tags and applies the aliases/implications to produce a new set.
adding new aliases/implications means just appending them to the list of definitions, which is kept in a database table.

there's many other details to it which i can't fully explain, like avoiding invalid or cyclic aliases, enacting them retrospectively, etc.,
but hopefully this at least gives you a better idea of the basic mechanics

I kind of got that, but let's just say i'm not the sharpest tool in the shed.
mind dumbing it down just a little?

  • 1