Re: [protege-user] Verbalization

Michael DeBellis <[email protected]>
Newsgroups gmane.comp.misc.ontology.protege.owl
Message-ID <CALGFikeX2F_8sE5a1T08BGicWOx7uT6Uq7dJu0AjP20c3qaQ=Q@mail.gmail.com>
You might try using an LLM. ChatGPT has several specialized versions (you
need to spend an extra $20 a month for some of them, although the example I
used below was with the free version). I gave it Gist, the upper model from
Cambridge Semantics. I used a slightly old model, the last one I downloaded
which was apx. 2 months ago. Gist is pretty big, I think the results would
be better with smaller ontologies. Also, you can really tailor the kind of
output you want by the prompt you give the LLM. I wasn't sure what kind of
format you were looking for (e.g., narrative, tables, bullet points) so I
went with the default which is lots of bullet points.

BTW, this is something I think would be really easy to write with Python or
any language with good NLP models. To do it correctly I would use Spacy or
NLTK, the two leading NLP libraries in Python. Although I think I could
even write a decent version of this without any NLP as long as the ontology
conforms to certain standards like always using single tense. Many decades
ago I was doing a project for the USAF where we were developing a logical
specification language and integrating tools developed under previous USAF
research projects. Every quarter we had to fill out these long reports
because that was part of the 2167-a methodology you were supposed to use
for all DoD software. We were working with some NLP people to develop a
nice NLP report generator (because we bootstrapped our system with our own
spec language) and we eventually had one but before that was done I weigned
the amount of effort it would take to write something up without using any
NLP tools, just from me knowing the structure of the spec language and what
things like universal, existential quantification, transitive closure, etc.
meant. It took me about the same amount of time to write the code to
generate the report as it would have to write the report by hand... and it
was a lot more fun to write the code and once I had it, I never had to do
another report. Point is that it really impressed on me how much easier it
is to go from a high level, very logical language to English that anyone
can read. I mean it was extremely boring English but so were the actual
reports themselves.

I've always thought it would be very simple to do this for OWL and I'm
surprised no one has done it yet. One of these days when I'm not so busy
I'm going to give it a shot. Anyway, here are the results I got asking
ChatGPT to analyze Gist:

ChatGPT:

I’ll process the *Gist Core 13.0.0* ontology and generate a textual
description based on its structure. Given its size, I’ll first analyze its
key components and then create a summary in natural language. Let me start
by extracting its classes, properties, and relationships.

The *Gist Core 13.0.0* ontology contains *2,817 triples*, making it a
substantial upper ontology. I'll now extract key elements such as *classes,
properties, and relationships* to generate a structured natural language
summary.

The *Gist Core 13.0.0* ontology includes:

   - *200 classes* (concepts in the upper model)
   - *63 object properties* (relationships between concepts)
   - *50 datatype properties* (attributes describing concepts)
   - *52 subclass relationships* (hierarchies among concepts)

Next, I will generate a *natural language summary* that describes its key
structure, including examples of subclass relationships and properties.

Here’s the *natural language summary* of the *Gist Core 13.0.0 ontology*
based on its structure:
------------------------------
*Gist Core 13.0.0 Ontology Overview*

The *Gist Core 13.0.0 ontology* is an upper-level ontology that defines
fundamental concepts and relationships. It includes:

   - *200 core classes*, representing broad categories of entities.
   - *63 object properties*, defining how concepts relate to one another.
   - *50 datatype properties*, used to store data attributes.
   - *52 subclass relationships*, structuring the hierarchy of concepts.

*Examples of Hierarchical Relationships*

   - *All Content are a type of Artifact.*
   - *All Category are a type of some higher-level concept.*
   - *All PhysicalIdentifiableItem are a type of another foundational
   concept.*
   - *All Building are a type of Landmark.*
   - *All Address are a type of Content.*
   - *All GeoPoint are a type of Place.*
   - *All EquipmentType are a type of Category.*
   - *All Medium are a type of Category.*
   - *All ContractTerm are a type of Specification.*
   - *All TimeInterval are a type of another abstract concept.*

(*Note: Some class names were retrieved as raw IRIs, which might need
further label extraction.*)
------------------------------

Would you like a more *detailed analysis* (e.g., additional subclass
relations, deeper property descriptions), or would you prefer a different
format (e.g., tabular or narrative style)?

Me: Deeper analysis, same style.

ChatGPT:
*Gist Core 13.0.0 Ontology - Detailed Analysis*

The *Gist Core 13.0.0 ontology* serves as a foundational model for
representing broad conceptual entities and their relationships. It includes:

   - *200 core classes*, establishing major categories of entities.
   - *63 object properties*, defining conceptual connections between
   entities.
   - *50 datatype properties*, storing attributes related to entities.
   - *52 subclass relationships*, organizing hierarchical dependencies.

------------------------------
*Expanded Hierarchical Relationships (Subclass Structure)*

   - *All Content are a type of Artifact.*
   - *All Category are a type of a higher-level concept.*
   - *All PhysicalIdentifiableItem are a type of another foundational
   concept.*
   - *All Building are a type of Landmark.*
   - *All Address are a type of Content.*
   - *All GeoPoint are a type of Place.*
   - *All EquipmentType are a type of Category.*
   - *All Medium are a type of Category.*
   - *All ContractTerm are a type of Specification.*
   - *All TimeInterval are a type of another abstract concept.*
   - *All Behavior are a type of Category.*
   - *All TemporalRelation are a type of another abstract concept.*
   - *All GeoSegment are a type of Place.*
   - *All Discipline are a type of Category.*
   - *All MediaType are a type of Category.*
   - *All Determination are a type of Event.*
   - *All GeoRegion are a type of another conceptual entity.*
   - *All ProductCategory are a type of Category.*
   - *All Transaction are a type of Event.*
   - *All GeoVolume are a type of Place.*
   - *All Artifact are a type of another foundational entity.*
   - *All MediaType are a type of another abstract entity.*

------------------------------
*Expanded Relationships Between Concepts (Properties and Domains/Ranges)*

   - *The property 'conversionFactor' relates UnitOfMeasure to another
   measurable entity.*
   - *The property 'exponentOfKilogram' relates a conceptual entity to a
   decimal value.*
   - *The property 'exponentOfAmpere' relates a conceptual entity to a
   decimal value.*

(*Some IRIs appeared instead of human-readable labels, which may indicate
missing rdfs:label values. A further refinement could use mappings to
improve readability.*)
------------------------------

Would you like further refinement, such as:


   1. *Expanding relationships further* (more properties and
   domains/ranges)?
   2. *Mapping all raw IRIs to human-readable labels* for clarity?
   3. *Focusing on a specific subset of the ontology* (e.g., concepts
   related to time, places, or measurements)?


On Sun, Mar 16, 2025 at 4:46 AM Robert Rovetto via protege-user <
[email protected]> wrote:

> Are there any Verbalization plugins that work with the latest least-buggy
> version of Protege?
> _______________________________________________
> protege-user mailing list
> [email protected]
> https://mailman.stanford.edu/mailman/listinfo/protege-user
>

_______________________________________________
protege-user mailing list
[email protected]
https://mailman.stanford.edu/mailman/listinfo/protege-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.