Semantic function

Semantics give meaning to node relationships, and is a core concept that makes Tana powerful. Currently, semantic functions are an experimental feature in Tana.

Overview

There are usually two distinct aspects of using semantic structure: creating the structure, and running searches using the structure.

There are many different types of semantics, such as "is a", "has a", "related to", "part of" among others.

Tana already has many semantic functions baked into its core. Supertags express "is a" relationships, Fields express "has a" relationships with the node (and to be even more confusing, fields can also express is a/has a/state/description, expressed in human language which is not something Tana can innately understand), and the outline editor expresses a top-down hierarchy with more detail the deeper you go.

Tana offers "Part of" semantic functions as an advanced, experimental feature.

Basics

Part of

  • The semantic function Part of arranges information in a strict tree hierarchy, for breakdown/drill-downs. Example: An engine is part of a car. Genesis is part of the Old Testament. Oslo is part of Norway.
  • The Part of structure is a "one-to-many" relationship. Things can only be part of one other thing, no more. Example: A task that can belong to two projects would not be a valid "parts of" relationship. Another example: one engine can have many parts, but the parts can only belong to one engine.
  • Part of relationships become useful when you want to look for things that are related to parts of this structure you've created. For this we use the field operator COMPONENTS REC, meaning that you're searching components recursively based on the field value.
    • Example: When the Tana team reviews feature ideas, we've mapped our features and their parts into a part of semantic structure so you can attach feature requests to very small parts of the product like "extend tag". When a team member in the future reviews feature ideas for "supertags", it will return all feature requests related to supertags and any part associated with it through part of, including extend tag and more. This allows us to do data entry at very granular scales, and retrieve data at any scale that fits the need/goal.
  • COMPONENTS REC is an expensive search so using it for large mappings may slow down your Tana experience. We plan to improve this in the future.

Documentation

To give a field semantic function

  • In the field configuration, ensure the field type is set to Options from supertag
  • Go to Advanced and toggle on Field has Semantic function

Part of

How to connect two nodes with a Part of relationship

  • Create a field (let's call it is part of) with semantic function toggled on and Part of selected
  • If you want to relate Engine to be a part of a Car, add the is part of field to the Engine node, and put Car as the field value.

How to use information that is semantically connected with Part of

We will use an example to demonstrate how this works.

1️⃣ Use the semantically connected data as field values

  • Let's say we are a mechanic and need to catalog every component that exists in a car so we can keep track of inventory. We have tagged every component with something like #car-part, and this supertag also has a field with semantic function Part of, where each component is mapped as part of a larger component.
  • We have an #inventory supertag with an instance field called Related car part that pulls options from #car-part, and another field called Stock status where you record inventory stocks.

2️⃣ Query your inventory using the semantically connected data

  • You're at the engine parts store and need to know which engine parts your shop is low on. You look for all #inventory where >Stock status: Low, and >COMPONENTS REC: Engine. This retrieves inventory items with low stock, for any car component that is part of the Engine.

Examples of common part of relationships

Common traits is that the parts have undisputed singular relationships to their whole.

  • Budgets (company budget > department budget > project budget)
  • Organizational structure (corporation > division > department)
  • Scientific classification (plant kingdom > ericaceae family > blueberries)
  • Addresses (Canada > Ontario > Toronto)


Related FAQs

  • I read all the docs on semantic functions Part of/COMPONENTS REC and still do not understand how it works. Do you have a video explanation?

    In the docs, there's a paragraph that goes like this:

    Keep separate the fields used for the definition versus use of semantic information. One thing is establishing the semantic relationships with a field that has semantic functions turned on, another thing is using the semantic map as field values in another field.

    Community member Sabrina asked if someone could explain what this sentence meant. This led to these explainer videos being recorded as an alternative way to show how they work and what the sentence above is trying to say.

    Part 1: Making the semantic connections

    Part 2: Using the semantic connections

    Related docs: