Apply set theory to tags (hyperonyms) : linked tags

I think tags are realy usefull, it’s like virtual note to categorize “reel” note.

So tag are concept, note are content.
But there is a problem : a concept can be included by a more fundamental concept : this is called a Hyperonym in linguistic.

Use case or problem

I have some notes specific to #religion (for exemple), so I tag it.
But I have some other note about #belief. It’s not directly about religion, but religion has a hyperonym : “belief”.

So if I search (by search or graph) all notes about belief, all notes just taged #religion will NOT appear !

You can tell me : I just need to add #belief in note talking about religion… but it’s a bad structuring.

Imagine I put note about #christianity and another #islam etc… if for each note, and for each concept/category/tag I have to write all hypernym tag… it will be long, heavy and boring…

Proposed solution

I think it will be a verry verry good new feature to add hyperonym link for tag.

It’s exactly same as link between note, but its for tag only

And now, when we display graph or research, we can add an option “depth hyperonym” (or “depth tag” for more common understanding) to get all notes included in childs concept.

EXEMPLE :

with this structure :

  • #belief => #religion => ( #christianity | #islam )

if I search #belief with

  • depth = 0 : (it’s the current system) get only notes with #belief
  • depth = 1 : get all notes with #belief AND #religion, but NOT #christianity or #islam
  • depth = 2 : get all notes with all this tags : #belief #religion #christianity #islam

what about this idea ? :slight_smile:

3 Likes

Like nested tags?

2 Likes

Cool idea! To take the provided example, with nested tags you might create #religion/belief. But also you might want #belief and/or perhaps, within another context #emotions/belief.

I think there is definitely something to be said for a feature that would automatically return all notes tagged with the word belief occurring at any level in the nested tag structure. This can be accomplished using regex searches with Obsidian native search or Dataview queries (see links below). That being said, if there were something like a “wildcard” mode for the Tags core plugin, that automatically did this, it would make life a lot easier and nested tags more flexible.

Related: Dataview regex query to match all occurrences of a subtag

Also related: Searching for sub-tag

Thanks!

I do not use nested tag because nested tags are not tag in search system… (or I don’t understand how it works?) :
if i have #test/test2 and I search #test2, it will not appear… so I dont understand the utility to this system, because It need to know and to type all expression (#my/super/expression/could/be/long) to find my notes… AND to write it in each new note… (ok there is autocompete, but it’s takes a lots of place for nothing)

If I talking about #labrador why do you have to write #animal/dog/labrador it’s not realy “readable friendly” ^^

And more, if I discover, after long time, there is an intermediate level : I have to rename EACH #test/testX to #test/new_intermediate_level/testX

I think it’s not resilient ! I think it’s better to define structure in metadata for exemple, at only one place. If there is a changement, there is only one place to update.

(sry for my english, I hope you understand my arguments :slight_smile: )

PS : nested tag are not linkind on graph too… it’s a fault for me, it’s could be better to see link between tag itself.

2 Likes

Wow, you’re right! I thought you might have literally searched #test2 instead of tag:test2 or tag:#test2, but those don’t work either. (I don’t use nested tags, as you can see. :sweat_smile:)

(Also, your English is clear enough!)

2 Likes

Not what the OP wants, but as an adjunct to the point about searching nested tags, a simple quotes-restricted search is pretty effective:

"/test2"
1 Like

As an adjunct to the adjunct :stuck_out_tongue:, the tag: operator uses Obsidian’s tag index and so should be faster. But the regular search is pretty fast, so it may not matter unless you have many notes or are very pressed for time.

Also tag: matches tags in YAML frontmatter. With /test2 the plain search will do it, but with #test it won’t because frontmatter tags don’t use #.

1 Like

Adjunct to the adjunct to the adjunct, or something like that, it’s possible to use the line: in combination with other stuff to match related to parts of nested tags:

But it’s more than anything proving that it might be interesting to take another look at how to use tags and how to search for tags related to each other.

This is what I get if I repeat each #tag and #parentTag in each notes :

We have to know and write “OR” reasearch to get it…

now with neasted tag :

we can get just using #belief BUT, there are all disconected…

What I suggest/need to get :

Connexion beetween tags is clearer… no ?

1 Like

I’m not sure if I understand the problem or hyperonyms, but I stole a solution from Roam research and made my concept “tags” pages. So [[+belief]] instead of #belief. I tag [[+belief]] with a #tag tag and group that to show a different color on the graph. Plus I add the “+” prefix to distinguish tags from the notes with content
Then you can link your “tags” together.

sry I realy understand nothing ^^ can you take an exemple?

if you see my screen, I dont understand how cant understand what i said ^^

1 Like

nothing new about this idea? how suggest directly to dev ?