Skip to content

Step 3: Terms

4 min · step 3 of 8

Introduction#

Write down every noun and phrase people use when they talk about your subject. Don’t sort them yet.

A messy list now saves you from missing a kind of thing later. It’s much easier to throw a term away in step 4 than to notice a gap in step 7. You can read the full guide to this step in Method.

What you’ll make#

A list of 22 terms, all marked “undecided”. In step 4 you’ll decide which ones become classes, the kinds of thing in your ontology.

Run the commands#

Add every term in one command. Put quotes around any term that has a space in it:

okb term add wine grape winery location color body flavor sugar "tannin level" "red wine" "white wine" "rosé wine" "dessert wine" port bordeaux beaujolais food seafood "red meat" "goes well with" "vintage year" "label paper"
22 term(s) on the list.

Then look at the list:

okb term list
undecided     wine · grape · winery · location · color · body · flavor · sugar · tannin level · red wine · white wine · rosé wine · dessert wine · port · bordeaux · beaujolais · food · seafood · red meat · goes well with · vintage year · label paper

Read the output#

  • The list mixes different sorts of things. wine and winery are things. color and body describe a wine. goes well with is a link between two things. vintage year and label paper are details this tutorial will leave out.
  • You don’t need to sort them now. Step 4 will turn the things into classes and step 5 will turn the descriptions into slots, the facts you can state about a class.
  • The terms came from the competency questions and from thinking about the restaurant. Both are good sources.

Check your work#

okb status
Wine and Food  · 0 classes · 0 slots · 0 instances · 6 questions

✓ 1. Determine the domain and scope
✓ 2. Consider reusing existing ontologies
✓ 3. Enumerate important terms ◀ you are here
     ✓ At least 10 terms listed
○ 4. Define the classes and the class hierarchy
○ 5. Define the properties of classes (slots)
○ 6. Define the facets of the slots
○ 7. Create instances
○ 8. Review against your questions, and iterate

Validator (steps 1–3): ✗ 0  ! 0  i 0   okb validate for details

Step 3 looks done. When you're happy with it: okb step next

Step 3 needs at least one term. When it has a tick, move on:

okb step next
Now on step 4. (To read a step's guide without moving: okb explain 4)

Step 4 of 8: Define the classes and the class hierarchy

  Goal: Pick the terms that name things with independent existence, make them classes, and
  arrange them by 'is a kind of'.
  Why it matters: The hierarchy is the backbone: slots are inherited down it and instances hang
  off it. Most modeling mistakes are hierarchy mistakes.

Questions to answer
  • Which terms name things that exist on their own (not descriptions of other things)?
  • Where does your head naturally start: general, specific, or somewhere in the middle?
  • For each pair: is every X necessarily (by definition) a Y?
  • Do any siblings overlap? Can something be both? If not, they're disjoint.

You're done when
  ○ A naming convention is set
  ○ At least two classes, organized with at least one is-a link
  ○ The class hierarchy has no known mistakes
  ? You've stood back and looked at the whole tree, checking each is-a link against the "Is this really a subclass?" guide

Tips
  • Steps 4 and 5 are intertwined. It's normal to add a few classes, then a few slots, then go
  back.
  • Say each is-a link out loud: 'Every Pinot Noir is a Red Wine.' If it sounds wrong, it is.
  • Use singular names consistently (Wine, not Wines).
  • Mark 'grouping only' classes as abstract.

In Ontology 101's wine example
  • Wine → Red Wine, White Wine, Rosé Wine
  • Red Wine → Bordeaux, Burgundy, and so on
  • Bordeaux → Médoc → Pauillac, Margaux
  • Port has two parents: Red Wine and Dessert Wine

Decision guides for this step  (okb explain <id>)
  decision.approach            Top-down, bottom-up, or combination?
  decision.is-a                Is this really a subclass?
  decision.new-class           Should I introduce a new subclass here?
  decision.class-or-value      New class, or just a slot value?
  decision.instance-or-class   Instance or class?
  decision.disjoint            Are these classes disjoint?
  decision.naming              Choosing a naming convention

Commands
  okb convention   okb class add   okb class disjoint   okb tree   okb term set

Common mistakes

  • Sorting while you brainstorm. Write first. Sort in step 4.
  • Only listing nouns. Add the describing words and the “goes with” phrases too.

Next step#

You collected 22 terms without sorting them. Next, you’ll turn the things on the list into classes and arrange them in a tree.

View page source