WorldModelers / Ontologies

Ontologies for the World Modelers system
Creative Commons Attribution 4.0 International
6 stars 11 forks source link

Ontology files can use a format update #146

Closed kwalcock closed 2 years ago

kwalcock commented 3 years ago

Justification and suggestions will follow in not too long.

kwalcock commented 3 years ago

The need to update the format was discussed a couple of months ago. Some of the justifications were

The format was discussed at UAz and our top choice looked like this:

- node:
    name: wm
    examples:
        - crime
    definition:
    polarity: -1
    semantic type: event
    children: 
        - node:
            name: concept
            examples:
                - crime
            definition:
kwalcock commented 3 years ago

At a recent meeting we discussed these points which are related to the ontology format:

The format might account for adding information to specific compositions.

bgyori commented 3 years ago

I think the new proposed format should work well!

johnhungerford commented 3 years ago

The proposed format looks good to me. Is there any reason why nodes are structured in a list rather than a dict? Is there an imaginable case of multiple nodes in the same branch having the same name? Why not:

wm:
    examples:
        - crime
    definition:
    polarity: -1
    semantic type: event
    children: 
        concept:
            examples:
                - crime
            definition:

Just curious -- lists are fine with me.

kwalcock commented 3 years ago

It was my (false?) impression that the open vocabulary keys was a complication. wm has examples, definition, polarity, semantic type, and children that can be known and listed in advance. Children has a bunch of things whose names need to be collected in a very different way. It's probably not a big deal but it seems like it would complicate the code (and I'll be checking on that shortly). There are probably not naming conflicts among siblings, but I think there are cases in which the name of some great aunt is reused in some grand niece and if nodes get moved around there could be a problem. However, using the key "name" but having the values conflict would probably be just as bad. If that check is not already in the unit tests, I should add it.

johnhungerford commented 3 years ago

Yeah I think with the way we parse the yml file it would be simpler to deal with lists than dicts.

kwalcock commented 3 years ago

FWIW it looks like the definition field should be called descriptions.

There are old ontologies that use descriptions and new ones that use definition. Eidos doesn't know about definition and ignores it. Is it there just for human consumption?

kwalcock commented 3 years ago

For that matter, it's probably a good time to change pattern to patterns.

It turns out that in the compositional ontology, there is only pattern. In the flat ontology, there are both pattern and patterns. The plan is to change them all to the plural. I may submit an intermediate PR for the flat to change everything to the singular first,

kwalcock commented 3 years ago

I'm going to have to find out about this take_args that I see in the flat ontology. Can anyone tell me about it?

kwalcock commented 3 years ago

We have not yet used it in production, but at one time there was also a request for negative examples and there is an old prototype for it. If we do need these, I suggestion adding counterexamples and counterpatterns.