Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*.~vsd*
*_webDownload/
.DS_Store
*.orig
**/*venv
catalog-v001.xml

83 changes: 81 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,81 @@
# gistBFO
A BFO compatible version of Gist
gistBFO
===

![gistBFO log](./gistBFO.png)

<br>

gistBFO contains a set of mappings from [gist](https://github.com/semanticarts/gist) to the [Basic Formal Ontology (BFO)](https://github.com/BFO-ontology/BFO-2020).

With gistBFO, you can get all the benefits of ontology development with gist while maintaining BFO-compliance.


Content
---

gistBFO contains:

- ~40 `rdfs:subClassOf` assertions between high-level classes of gist and their most specific superclasses in BFO
- A core set of `rdfs:subPropertyOf` assertions between properties in gist and BFO

Annotations are included to provide reasoning behind the assertions.

<br>

Import Structure
---

gistBFO imports gist and BFO. gistBFO itself can then be imported into a client-specific ontology.

```mermaid
graph BT
CSO[Client-Specific Ontology]
GBFO[gistBFO]
GCORE[gistCore]
BFO[BFO]

CSO -->|imports| GBFO
GBFO -->|imports| GCORE
GBFO -->|imports| BFO
CSO -.->|optionally imports| GCORE

style CSO fill:#4A235A,stroke:#B39DDB,stroke-width:2px,color:#fff
style GBFO fill:#1A237E,stroke:#B39DDB,stroke-width:2px,color:#fff
style GCORE fill:#263238,stroke:#B39DDB,stroke-width:2px,color:#fff
style BFO fill:#263238,stroke:#B39DDB,stroke-width:2px,color:#fff
```

<br>

Methodology
---

In creating gistBFO, we have attempted to balance a number of things:

1. **Genuine Compliance with BFO:** This would not be an interesting or useful mapping if all gist classes were mapped to BFO's top-level class 'entity'. For this reason, we have tried to map top-level gist classes with their most specific possible superclass in BFO.
2. **Logical Consistency:** The mapping does not generate any logical inconsistencies or contain unsatisfiable classes.
3. **Respecting the Spirit of gist and BFO:** Even if the mappings are logically consistent, they should meet a higher bar of respecting the spirit of the concepts in gist and BFO. This requires an understanding of the intent behind the definitions, much of which is contained in the ontologies' annotations.
4. **Anticipation of Alignment with CCO:** In some cases, if a gist class has a counterpart in the Common Core Ontologies (CCO) and that counterpart is aligned to a certain BFO class, then we considered placing the gist class under that BFO class as well. (See, e.g., `gist:Organization`.)

For more background, read our [whitepaper](https://www.semanticarts.com/wp-content/uploads/2025/01/20241024-BFO-and-gist-Article.pdf).

<br>

Contributing
---

gistBFO is in active development. We hope to refine the mappings over time in accordance with the methodological considerations above. We invite feedback and suggestions in the form of GitHub issues.

<br>

Setting Up the Local Repository
---

- Clone this repository
- Run the script `./tools/setup.cmd`. This script will work on Windows, Linux, and Mac. It copies the `./tools/pre-commit` hook into `.git/hooks`, which means it will run before every commit you make to the repository.

The pre-commit hook does several things when you run `git commit`:

- Prevents commits to the branches `develop` and `main`.
- Runs the serializer. This converts files into a standard Turtle format in order to remove noise in the diffs. As the comments in the file indicate, you should use the pre-approved version of `rdf-toolkit.jar` in this directory, rather than another version that you may have elsewhere on your local drive.
- Note: Any PR containing unserialized commits will be returned for correction.
119 changes: 119 additions & 0 deletions bundle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
bundle: gistBFO
variables:
name: "gistBFO"
version: "X.x.x"
input: "."
rdf-toolkit: "{input}/tools/serializer/rdf-toolkit.jar"
output: "{name}{version}_release"
tools:
- name: "serializer"
type: "Java"
jar: "{rdf-toolkit}"
arguments:
- "-sfmt"
- "turtle"
- "-tfmt"
- "turtle"
- "-sdt"
- "explicit"
- "-dtd"
- "-sni"
- "-ibn"
- "-s"
- "{inputFile}"
- "-t"
- "{outputFile}"
# - name: "xml-serializer"
# type: "Java"
# jar: "{rdf-toolkit}"
# arguments:
# - "-sfmt"
# - "turtle"
# - "-tfmt"
# - "rdf-xml"
# - "-sdt"
# - "explicit"
# - "-dtd"
# - "-sni"
# - "-ibn"
# - "-s"
# - "{inputFile}"
# - "-t"
# - "{outputFile}"
# - name: "json-serializer"
# type: "Java"
# jar: "{rdf-toolkit}"
# arguments:
# - "-sfmt"
# - "turtle"
# - "-tfmt"
# - "json-ld"
# - "-sdt"
# - "explicit"
# - "-dtd"
# - "-sni"
# - "-ibn"
# - "-s"
# - "{inputFile}"
# - "-t"
# - "{outputFile}"
actions:
- action: "mkdir"
directory: "{output}"
- action: "copy"
message: "Substituting version numbers."
source: "{input}"
target: "{output}"
replace:
from: "X.x.x"
to: "{version}"
rename:
from: "(.*)\\.ttl"
to: "\\g<1>{version}.ttl"
includes:
- "*.ttl"
- action: "definedBy"
message: "Adding rdfs:isDefinedBy."
source: "{output}"
target: "{output}"
includes:
- "*.ttl"
- action: "transform"
message: "Turtle serialization."
tool: "serializer"
source: "{output}"
target: "{output}"
includes:
- "*.ttl"
rename:
from: "(.*)\\.ttl"
to: "formatted_\\g<1>.ttl"
- action: "move"
source: "{output}"
target: "{output}"
includes:
- "formatted_*.ttl"
rename:
from: "formatted_(.*)\\.ttl"
to: "\\g<1>.ttl"
- action: "copy"
message: "Copying examples."
source: "{input}/examples"
target: "{output}/examples"
- action: "copy"
message: "Copying queries."
source: "{input}/queries"
target: "{output}/queries"
- action: "copy"
message: "Copying license text."
source: "LICENSE.txt"
target: "{output}/LICENSE.txt"
- action: "copy"
message: "Copying readme."
source: "README.md"
target: "{output}/README.md"
- action: "markdown"
message: "Formatting readme."
source: "{output}/README.md"
target: "{output}/README.html"

Binary file added gistBFO.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading