Archive for August, 2011

An Ontology of Heraldry

August 22, 2011

BFOites often use unicorns as a stick with which to beat those that question the particular sect of realism portrayed in BFO. The argument goes something along the line of “well if you don’t wish to model only universals then you’re prepared to model “unicorn””.

Just so that I can say I’ve built an ontology that has the notion of “Unicorn” I’ve built an ontology of heraldry. As an ontology it is not really up to much, except (as with any ontology) building it has thrown up some modelling issues. Of course, I have to say now, that I suppose everything in this ontology is some kind of information, so I’m not really claiming I havbe an ontology with a “real” unicorn in it; nevertheless, I have an ontology that describes unicorns and other mythical creatures… Also, I’m not describing anything that wouldn’t be captured somewhere in a BFO compliant ontology.

In heraldry, almost anything (a charge) can be placed upon a field. these can be animals (real and mythical), animal parts, man made objects, geometrical symbols, and so on. A field may also be uncharged, that is, plain. With some twiddly bits, the field plus the optional charge is an escutcheon.

the field and charge have a tincture. The tinctures (colours) are traditionally more restricted and divided into “colours” and “metals”. the rule of tincture stipulates that metal should not be placed on metal and vice versa. This stops an argent (white) horse being charged on a field of Or (yellow). There is an exception where the natural tincture of the charge is placed on a field of the same tincture –“a horse argent proper”; I’ve not attempted this at the moment.

We can capture the rule of tincture in OWL, but it is a bit convoluted. there are three options:

  1. disjointness of two axioms for field with metal tincture and one for charge with metal tincture.
  2. Making owl:nothing equivalent to field hasTincture metal and charge hasTincture metal
  3. adding some restrictions such as hasField hasTincture Metal hasCharge some (charge that hastincture only Colour) — getting the some and only right!

My Heraldry Ontology (The HO) captures the ruel of tincture. I’ve done it using option three in the following way:

  • Added defined classes for plain escutcheon, coloured escutcheon with metal charge and metal field with coloured escutcheon.
  • I then make the class escutcheon be covered by these three defined classes.
  • Any of my individuals that are actual escutchia should be one of these three classes.
  • Breaking the rule of tincture will cause an inconsistency.

The four classes involved are:

1.

Class: Escutcheon

    Annotations: [in heraldry]
        comment "A shield; can have a shield with a field but no charge."^^string,
        label "Escutcheon"^^string

    EquivalentTo: [in heraldry]
        * Escutcheon,
        'Plain escutcheon'
         or 'Coloured Escutcheon and metal charge'
         or 'Metal escutcheon and coloured charge'

    SubClassOf: [in heraldry]
        hasPart only Field

2.

Class: 'Plain escutcheon'

    Annotations: [in heraldry]
        label "Plain escutcheon"^^string,
        comment "A tinctured field with no charges."^^string

    EquivalentTo: [in heraldry]
        * 'Plain escutcheon',
        Escutcheon
         and (hasPart some
            (Field
             and (not ('is charged with' some Charge))
             and ('has tincture' some Tincture)))

Here we need an individual representing a plain escutcheon to have a tincture, and only that tincture, and to be known to have no charge. With the open world assumption just not saying there is a charge doesn’t mean there isn’t one. Our individual will have to say there isn’t a charge on this escutcheon.

3.

 Class: 'Metal escutcheon and coloured charge'

    Annotations: [in heraldry]
        label "Metal escutcheon and coloured charge"^^string

    EquivalentTo: [in heraldry]
        * 'Metal escutcheon and coloured charge',
        Escutcheon
         and (hasPart some
            (Field
             and ('is charged with' some
                (Charge
                 and ('has tincture' some Colour)
                 and ('has tincture' only Colour)))
             and ('has tincture' some Metal)
             and ('is charged with' only
                (Charge
                 and ('has tincture' some Colour)
                 and ('has tincture' only Colour)))
             and ('has tincture' only Metal)))

Here we say that the field must have a metal tincture and can only have a metal tincture, and vice versa for the charge. Note the care with which everything is closed off.

4.

Class: 'Coloured Escutcheon and metal charge'

    Annotations: [in heraldry]
        label "Coloured Escutcheon and metal charge"^^string

    EquivalentTo: [in heraldry]
        * 'Coloured Escutcheon and metal charge',
        Escutcheon
         and (hasPart some
            (Field
             and ('is charged with' some
                (Charge
                 and ('has tincture' some Metal)
                 and ('has tincture' only Metal)))
             and ('has tincture' some Colour)
             and ('is charged with' only
                (Charge
                 and ('has tincture' some Metal)
                 and ('has tincture' only Metal)))
             and ('has tincture' only Colour)))

we can add various individuals with fields and charges and the HO captures them well enough (it is a limited part of blazon that I’ve implemented). If we add an individual for “Argent with latin cross Or” like this:

Individual: 'Argent with latin cross Argent'

    Annotations: [in heraldry]
        comment "Should break rule of tincture"^^string,
        label "Argent with latin cross Argent"^^string

    Types: [in heraldry]
        (hasPart some
            (Field
             and (('is charged with' some
                ('Latin cross'
                 and ('has tincture' some Argent)
                 and ('has tincture' only Argent)))
             and ('is charged with' only
                ('Latin cross'
                 and ('has tincture' some Argent)
                 and ('has tincture' only Argent))))
             and ('has tincture' some Argent)
             and ('has tincture' only Argent)))
         and (hasPart only
            (Field
             and (('is charged with' some
                ('Latin cross'
                 and ('has tincture' some Argent)
                 and ('has tincture' only Argent)))
             and ('is charged with' only
                ('Latin cross'
                 and ('has tincture' some Argent)
                 and ('has tincture' only Argent))))
             and ('has tincture' some Argent)
             and (              'has tincture' only Argent))),
        Escutcheon

Note that everything on this individual is a type assertion to anonymous individuals for charges and their tinctures. Note that this lets me be very closed about what I say; I’ve used universal quantification to help me close this down. I’ve used some functional properties for other qualities of things. Being this closed is really hard, largely from a syntactic point of view. It is just hard plugging all the gaps. Uli Sattler had to help me out after I’d stared at a mass of parentheses for too long and not seen the problem of an “openness gap” that I knew was there.

With this individual, the HO becomes inconsistent. That is, this instance cannot exist in this ontology. this is because it breaks the rule of tincture by having a white cross on a white background; though the reasoner doesn’t say this. I have to use Matt Horridge’s wonderful explanation gadgets. The explanation for this inconsistency is (as a not very beautiful table):

1
Escutcheon EquivalentTo Plain escutcheon or Coloured Escutcheon and metal charge or Metal escutcheon and coloured charge
2
2
Plain escutcheon EquivalentTo Escutcheon and (hasPart some (Field and (not (is charged with some Charge)) and (has tincture some Tincture)))
2
3
Argent with latin cross argent Type (hasPart some (Field and ((is charged with some (Latin cross and (has tincture some Argent) and (has tincture only Argent))) and (is charged with only (Latin cross and (has tincture some Argent) and (has tincture only Argent)))) and (has tincture some Argent) and (has tincture only Argent))) and (hasPart only (Field and ((is charged with some (Latin cross and (has tincture some Argent) and (has tincture only Argent))) and (is charged with only (Latin cross and (has tincture some Argent) and (has tincture only Argent)))) and (has tincture some Argent) and (has tincture only Argent)))
2
4
Argent with latin cross argent Type Escutcheon
2
5
Argent SubClassOf Metal
2
6
Coloured Escutcheon and metal charge EquivalentTo Escutcheon and (hasPart some (Field and (is charged with some (Charge and (has tincture some Metal) and (has tincture only Metal))) and (has tincture some Colour) and (is charged with only (Charge and (has tincture some Metal) and (has tincture only Metal))) and (has tincture only Colour)))
2
7
Metal escutcheon and coloured charge EquivalentTo Escutcheon and (hasPart some (Field and (is charged with some (Charge and (has tincture some Colour) and (has tincture only Colour))) and (has tincture some Metal) and (is charged with only (Charge and (has tincture some Colour) and (has tincture only Colour))) and (has tincture only Metal)))
2
8
Light tincture EquivalentTo Metal
2
9
is charged with Range Charge
1
10
Light tincture DisjointWith Dark tincture
2
11
Dark tincture EquivalentTo Colour
2

The table has the axiom number, the axiom itself, and the final column indicates in how many explanations the axiom is involved. Basically, what this says is that this individual has broken the rule of tincture. The axioms say that there is a field that has a metal tincture and only has a metal tincture. There is a charge that has a metal tincture and only a metal tincture. Escutcheon is covered by 3 escutcheon types, and due to the tinctures of this individual’s charge and field, there is an inconsistency; the two types of tinctyure are disjoint, so Argent must come from one and not the other (as Argent is a kind of “Metal”).

Getting all of this to work is conceptually easy enough, but actually hard to implement. it is all about closing down the open worldness in both the TBox and ABox.

Note that the escutcheon Or with lion regardant passant coward vert has classified just under escutcheon and not under one of the three escutcheon types that cover “Escutcheon”. This is because the individual for this escutcheon is under-constrained. I’ve left it open as to whether either the field or charge can have another tincture to that already specified. As we know it is an escutcheon, but not which of the three types that cover Escutcheon, this individual is, it doesn’t break the constraint of the covering axiom. Only after we’ve ruled out that it can’t be any one of the three covering types wil the covering axiom come into effect and the ontology becomes inconsistent.

The things left to do on the HO (if I choose to) include:

  1. Sorting out positions on the escutcheon. There are implicit rules within blazon for where The trick with gettng things are positioned – “Azure with Gauntlet argent and sword or” implies positions for the gauntlet and sword. Without the ordering of blazon, this has to be made explicit.
  2. Marshalling of several fields and charges on to one escutcheon and how these are arranged.
  3. Indicating whether charges are arranged sinister or dexter.
  4. Dealing with “proper” tinctures.
  5. Lots of other heraldic nonsense.
Advertisements

Capturing Variation in Plant form

August 21, 2011

Returning to my flower anatomy ontology. the variation, even within one kind of plant, is large. The variations cause problems for making descriptions of plants. this becomes a particular problem when making the kind of precise descriptions I’ve tried to do in the flower anatomy. For example, when trying to describe a particular plant I’ve found with an aim to classify the thing against my ontology, I find different kinds of leaves (some ovate, some obovate, etc); I thind different numbers of branches and leaf segments etc. of course, one usually takes some normative view of a plant (a cnceptualisation of some cannonical plant), but it would be good to be able to capture the range and variety within a kind of plant in the TBox description.

We can exemplify this with a fairly randomly picked entry from Stace’s New Flora of the British Isles. The entry is:

“CFOSMOS Cav. Mexican Aster

Annuals; leaves all opposite, 2-3-pinnate with linear to filiform segments; phyllaries in 2 dissimilar rows, the outer narrower, herbaceous with membranous border, the inner membranous; capitula radiate; receptacle flat, with scales; pappus of (0)2(-3) bristles with usually backward-directed barbs; ligules numerous, pinkish-purple, rarely white; disc flowers yellow.”

A New flora of the British Isles 1997 page: 755. New York
— Clive Stace

We can dissect such a description, bearing in mind the universality of OWL’s class level restrictions; that is, each and every instance of class x holds some relationship to at least one instance of some other class.

  • “Annuals”; this is OK; all the plants grow and die within one year.
  • “leaves all opposite”; Again this is OK; all the leaves are “opposite”, that is,at each node there are leaves that are opposite each other – as opposed to alternating from side to side of a twig at each node.
  • “2-3-pinnate with linear to filiform segments”; Here it gets interesting. The leaves are “2 to 3 pinnate”; that is, a single leaf is made of leaflets and these leaflets are themselves made of leaflets (or with another rlevel of nesting). a classic example in britain would bve the mountain ash or rowan. Also that the leaves are in “linear to filiform segments” is difficult. There are a space of leaf shapes that botanists have partitioned into discrete named shapes. Sometimes a leaf shape wil be in between two or more named shapes. In this case, the leaf shape is in between linear to filiform, that is, thinner than linear but longer than hair-like. A similar case is “obovate to ovate”, which implies “elliptical”.
  • “phyllaries in 2 dissimilar rows, the outer narrower, herbaceous with membranous border, the inner membranous”; Not much variation here, but we would need to capture that the inner and outer rows are dissimilar.
  • “capitula radiate; receptacle flat, with scales”; again, a fairly straight-forward “all” description.
  • “pappus of (0)2(-3) bristles with usually backward-directed barbs”; “Pappous” are modified calyx that are bristly or feathery. The notation (0)2(-3) is standard in floras and means “Usually 2 exceptionally 0 and up to 3”. The notions of “usually”, “rarely” and “exceptionally” are just hard. “Up to” could be done with a “max” cardinality constraint…
  • “ligules numerous, pinkish-purple, rarely white”; this statement contains a lot. we need to describe “pinkish – purple”, we have to capture the notion of “numerous” and “rarely”. Exact numbers are rather easy in OWL with qualified cardinality constraints, but bvague numbers present more of a problem. Just creating some class of “numerous” seems like a real cop-out, but in a sense it is just another compromise like value partitions – we have a continuous spectrum that wwe just patition into convenient chunks. this would be just like dividing up a number line into convenient chunks: 1, 2, 3, 4,…. numerous. and “rarely” and “often”. this is so vile…
  • “disc flowers yellow”; this is OK, except for the usual turmoil of describing colour.

Lots to explore in all this; for now, I’l ljust choose “2-3-pinnate with linear to filiform segments”.

  1. the leaf as a whole is divided into parts that are “leaflets”. We could either have two classes “Leaf” and “Leaflet”, with the restriction that all leaflets are part of leaves (but not vice versa) or we just stick with the class of “Leaf” and have a subclass of “Divided leaf” that has parts that are “Leaf”. If we establish the “isPartOf” going in the other direction, we could have a defined class of “Leaflet” THAT IS equivalent to any leaf that is part of a leaf.
  2. A Pinnate leaf can then be defined as either a Leaf that hasPart some Leaflet or as Leaf that hasPart some Leaf. The latter is more economical, but the former more in-line with domain vocabulary.
  3. Sticking with the former, then my 2 pinnate leaf might be Leaf that hasPart some (Leaflet that hasPart some Leaflet)).
  4. My 3 pinnate leaf might be Leaf that hasPart some (Leaflet that hasPart some (Leaflet that hasPart some Leaflet))).
  5. Being 2 – 3 pinnate then becomes a disjunction of these two class expressions. Clumsy, but not totally horrid.
  6. The problem, of course, comes with larger amounts of variability. If I had 2 – 4 pinnate, my class expression becomes increasingly clumsy.

One could model the “pinnateness” of a leaf and model a range of pinnateness with max and min cardinalities. this, however, doesn’t capture the physical nature of the sub-divided leaves — especially if I wished to say something about the subm-divisions. For instance, in the mountain ash, I want to say that the final division is arranged “herring-bone” fashion.

At the moment, the clumsy pattern I’ve outlined is the best I’ve come up with. At some point I’ll actually try and do it, then put the ontology up for inspection. meanwhile I wil think more and write more on the other aspects of describing the variation in plant descriptions.