codidact / qpixel

Q&A-based community knowledge-sharing software
https://codidact.com
GNU Affero General Public License v3.0
382 stars 69 forks source link

Tag synonyms #276

Closed cellio closed 1 year ago

cellio commented 3 years ago

https://judaism.codidact.com/questions/276821

Sometimes there's more than one way to describe a concept and the words are very different -- even more so when a community uses more than one language, like Judaism where there are both Hebrew and English terms for things. It would be helpful to be able to create tag synonyms so all those posts get tagged the same way regardless of how the author thinks of the concept.

MoshiKoi commented 3 years ago

Related: https://meta.codidact.com/questions/276918

How would this be implemented? One main tag searchable by synonyms, or multiple synonymous tags?

cellio commented 3 years ago

I was thinking of one tag, not two different tags that happen to include each other in search results, for clarity. A tag that is a synonym would show up in the list as, e.g., "tefillah (prayer)" and then "prayer" would be the tag on the post when you submit it. The tag description for "prayer" would list "tefillah" as a synonym, maybe right after or as part of the short description (should be visible in the tags list too).

I'm open to other approaches. I'd be concerned by having what look like two different tags (in the tags field on a post, the tags list, and wherever else tags might show up), even if they both lead you to the same list of posts, because before you get to that list you'll see two different things. Maybe that'd be ok if synonyms have some special styling, but it's still a thing for people to learn.

MoshiKoi commented 3 years ago

@cellio The main advantage of the multiple tag approach is that it is easy to implement - we'd just need to add another relationship between tags. The "many to one" name mapping is preferable to me, but I'm not sure Select2 supports it (we'd have to write our own plugin).

ArtOfCode- commented 3 years ago

Your first approach is workable, @MoshiKoi, just needs to be done server-side rather than in Select2.

cellio commented 2 years ago

@ArtOfCode- you said option 1 is workable. How would it affect search? (Moshi brought up that issue in an earlier comment.)

Taeir commented 1 year ago

Seems doable to implement, I can give this one a try.