Tags as synonyms?

Hello dearest tiddlywikists! I have tried to search for this, but I haven’t found anything, so this might simply not be possible. Is there a way of defining tags as synonyms of each other?
For example, I’d like to have DMing (“Dungeon Mastering”) as synonym for GMing (“Game Mastering”)? This would help with having consistent tags and not using another tag (with the same functional meaning) by accident. As I am multilingual, it would also help in cases where I use tags for the same term in another language.

Thanks for any clues!

I am not sure, if my “alias” uni-link plugin would do what you need. It works well with tagging. The plugin adds some filter operators like

is[alias] all[aliases] ... and more.

Since you mentioned tagging, I am not sure if uni-link is what you need.


You could use a GMing tiddler that can be used for tagging. It could contain some text that describes what’s going on.

-m

I don’t think there’s anything close to making true synonyms, so that, for instance, when you filter for [tag[DMing]] you will also get anything tagged GMing. But you could add templates to your Tag Tiddlers to list everything in their aliases list field. With a little care we could also list any tiddlers than have the current tiddler in their aliases field. We could extend this to show the synonyms for any of the tags for a given tiddler. Carried out far enough, we should be able to list every tiddler than has a shared tag with the current tiddler, or which has a tag which is an alias of one of the tags of the current tiddler.

Here is an attempt to do all but the last of those. Download the following and drag the resulting file onto tiddlywiki.com:

Aliases.json (3.2 KB)

We create two templates, or for Tag Tiddlers, and one for all tiddlers. The Tag Tiddler one collects all titles in the tag’s aliases field and all tiddlers that include the current title in their aliases field and displays a simple list of them in a footer.

The other template looks at every tag for the current tiddler and collects all of its aliases, and again, all the titles for which it is an alias, and puts them in a footer.

We update the tag tiddler Concepts to include

aliases: Idea Notion [[Brain Wave]]

and we update Reference to include

aliases: Documentation

We also add Tiddler A - Tiddler D, which each have one of the aliases of Concepts. You can look at their footers to see what’s happening. More interesting to my mind is to look at WikiText, which has both Concepts and Reference tags. You can see the results in the footer here:

We don’t try the harder chore of linking a tiddler to others which have a tag that is an alias of one of our tags. We also don’t try to recurse through aliases of aliases of aliases. While that could be done, it might well get ugly. (Imagine trying to figure out why decline and autumn are listed as synonyms, and ones further than one step away (fall) could well be impossible.)

Finally, we also don’t try to create pretty templates that tie to the Tags area. That’s left as an exercise for the reader. :wink:

Hi Scott, It would be nice if you would use the synonyms field instead of aliases. So your concept does not cause name clashes in the future.

I use aliases for the uni-link plugin, but aliases are a completely different concept. They are case insensitive.

Your concept seems to use tiddler titles.

Here’s a version with that change:

Synonyms.json (3.2 KB)

One problem we can get into with flat field-name structure of TW is that any sort of extensions from different sources can conflict. I don’t mind changing the name I use here; it’s simply a POC anyway. But there’s no good way for any one tool to claim specific field/procedure/macro/function/tiddler names for themselves. I don’t own synonym and you don’t own alias.

The only solution I know of is the enterprise-y technique: namespacing everything. We already do that for plugin tiddler names, and I think that’s reasonable. But I don’t think it would be a comfortable approach for field names. I just don’t think users would be happy with using field names like wikilab.uni-link.alias or crosseye.poc.synonym. For things that are meant to stick around, I suppose tool creators could always use indirection through a configuration tiddler, such as $:/plugins/wikilabs/uni-link/config/alias-field-name, but for little one-offs like mine, or for things in userland, that doesn’t help.

Unfortunately, I don’t think there’s a good solution. Someone who has built a wiki about the Mafia, full of alias fields, would have a hard time using uni-link. There’s simply no good way around that.

I’m sure they’re different from uni-link, but the words mean very similar things to me, at least here in the realm of naming things. I’d say they’re synonyms. Or aliases. :wink:

Ok, I’m not sure how much that has to do with anything though. I’m sure we could work out a version of mine that didn’t depend on case sensitivity.

Well, it uses tag names, and offers a field on tag tiddlers as a way to make the association between aliases/synonyms. But it is for a different scenario than uni-link.

1 Like