diff --git a/doc/emmodoc/.gitignore b/doc/emmodoc/.gitignore deleted file mode 100644 index 7cd3a014..00000000 --- a/doc/emmodoc/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -genfigs -genfigs2 -emmo.pdf -emmo.html -emmo-simple.html -auto -old -catalog-v001.xml -emmo2.aux -emmo2.log -emmo2.out -emmo2.pdf -emmo2.toc diff --git a/doc/emmodoc/README.md b/doc/emmodoc/README.md deleted file mode 100644 index a090f15e..00000000 --- a/doc/emmodoc/README.md +++ /dev/null @@ -1,79 +0,0 @@ -Generate documentation for EMMO -=============================== -This directory contains the needed templates, introductory text and -figures for generating the full EMMO documentation using `ontodoc`. -Since the introduction is written in markdown, pandoc is required for -both pdf and html generation. - -For a standalone html documentation including all inferred relations, -enter this directory and run - - ontodoc --template=emmo.md --format=html emmo-inferred emmo.html - -Pandoc options may be adjusted with the files -[pandoc-args.yaml](pandoc-args.yaml) and -[pandoc-html-args.yaml](pandoc-html-args.yaml). - -Similarly, for generating pdf documentation, enter this directory and run - - ontodoc --template=emmo.md emmo-inferred emmo.pdf - -By default, we have configured pandoc to use xelatex for better unicode -support. It is possible to change these settings in -[pandoc-args.yaml](pandoc-args.yaml) and -[pandoc-pdf-args.yaml](pandoc-pdf-args.yaml). - - -Content of this directory -------------------------- -### `ontodoc` templates with introductory text and document layout - * [emmo.md](emmo.md): Main template for EMMO. It includes the other - templates. - * [introduction.md](introduction.md): Introductory text. - * [relations.md](relations.md): Introduction and sections for Relations - chapter. - * [classes.md](classes.md): Introduction and sections for Classes - * [figs](figs): Figures used in the introduction. - -### `pandoc` configuration files - * [emmodoc-meta.yaml](emmodoc-meta.yaml): Metadata for EMMO, like title, - authers, abstract, etc. - * [pandoc-args.yaml](pandoc-args.yaml): General pandoc options. - * [pandoc-html-args.yaml](pandoc-html-args.yaml): Additional pandoc options - for html generation. - * [pandoc-pdf-args.yaml](pandoc-pdf-args.yaml): Additional pandoc options - for pdf generation. - * [pandoc-html.css](pandoc-html.css): css file used for html generation. - * [pandoc-template.html](pandoc-template.html): Modified copy of the - standard pandoc html template with a small adjustment for the author list. - * [pandoc-template.tex](pandoc-template.tex): Modified copy of the - standard pandoc latex template with a small adjustment for the author list. - - -Using this example as a starting point for documenting your own ontology ------------------------------------------------------------------------- -For simple html documentation, you can skip all input files and simply -run `ontodoc` as - - ontodoc --format=simple-html YOUR_ONTO.owl YOUR_ONTO.html - -It is also possible to include ontodoc templates using the --template -option for adding additional information and structure the document. -In this case the template may only contain `ontodoc` pre-processer -directives and inline html, but not markdown. - -In order to produce output in pdf (or any other output format supported -by pandoc), you can write your `ontodoc` template in markdown (with -`ontodoc` pre-processer directives) and follow these steps to get started: - - * Copy all the files starting with `pandoc-` to a new directory. - * Create a metadata yaml file for your ontology. You can use - [emmodoc-meta.yaml](emmodoc-meta.yaml) as a template. - * Update [pandoc-args.yaml](pandoc-args.yaml). Especially change: - - `input-files` to the name of your new yaml metadata file - - `logo` to the path of your logo (or remove it) - - `titlegraphic` to the path of your title figure (or remove it) - * Optionally add `ontodoc` template files with additional information - about your ontology and document layout. - -That should be it. Good luck! diff --git a/doc/emmodoc/classes.md b/doc/emmodoc/classes.md deleted file mode 100644 index c9c9f843..00000000 --- a/doc/emmodoc/classes.md +++ /dev/null @@ -1,129 +0,0 @@ -%% -%% This file -%% This is Markdown file, except of lines starting with %% will -%% be stripped off. -%% - -%HEADER "EMMO Classes" level=1 - -*emmo* is a class representing the collection of all the individuals -(signs) that are used in the ontology. Individuals are declared by the -EMMO users when they want to apply the EMMO to represent the world. - - -%BRANCHHEAD EMMO -The root of all classes used to represent the world. It has two children; -*collection* and *item*. - -*collection* is the class representing the collection of all the -individuals (signs) that represents a collection of non-connected real world -objects. - -*item* Is the class that collects all the individuals that are members -of a set (it's the most comprehensive set individual). It is the -branch of mereotopology. - -%% - based on *has_part* mereological relation that can be axiomatically defined -%% - a fusion is the sum of its parts (e.g. a car is made of several -%% mechanical parts, an molecule is made of nuclei and electrons) -%% - a fusion is of the same entity type as its parts (e.g. a physical -%% entity is made of physical entities parts) -%% - a fusion can be partitioned in more than one way -%BRANCH EMMO - - -%BRANCHDOC Elementary -%BRANCHDOC Perspective - - -%BRANCHDOC Data -%BRANCHDOC NonEncodedData -%BRANCHDOC EncodedData -%BRANCHDOC Information -%BRANCHDOC DigitalData -%BRANCHDOC Symbolic -%BRANCHDOC MathematicalModel - - -%BRANCHDOC Holistic -%BRANCHDOC Whole -%BRANCHDOC Role -%BRANCHDOC Fundamental -%BRANCHDOC Redundant -%BRANCHDOC IntentionalProcess -%BRANCHDOC HolisticSystem - - -%BRANCHDOC Perceptual -%BRANCHDOC Graphical -%BRANCHDOC Geometrical - -%BRANCHDOC Chemical -%BRANCHDOC ChemicalComposition -%BRANCHDOC ChemicalFormula -%BRANCHDOC Mathematical -%BRANCHDOC Equation -%BRANCHDOC ProgrammingLanguage -%BRANCHDOC Metrological - -%BRANCHDOC Symbol -%BRANCHDOC MathematicalSymbol -%BRANCHDOC MetrologicalSymbol -%BRANCHDOC ChemicalElement - - - - -%% %BRANCHDOC PhysicalDimension rankdir=RL -%BRANCHDOC PhysicalQuantity -%BRANCHDOC StandardizedPhysicalQuantity -%BRANCHDOC CategorizedPhysicalQuantity -%BRANCHDOC MeasurementUnit -%BRANCHDOC PrefixedUnit -%BRANCHDOC MetricPrefix rankdir=RL -%BRANCHDOC Quantity -%BRANCHDOC BaseQuantity -%BRANCHDOC DerivedQuantity rankdir=RL -%BRANCHDOC PhysicalConstant rankdir=RL - - -%BRANCHDOC Persistence -%BRANCHDOC Object -%BRANCHDOC Process - - -%% %BRANCHDOC Physicalistic -%BRANCHDOC ElementaryParticle -%BRANCHDOC Matter -%BRANCHDOC Fluid -%BRANCHDOC Mixture -%BRANCHDOC StateOfMatter -%BRANCHDOC Material -%BRANCHDOC MolecularEntity -%BRANCHDOC ChemicalSubstance -%BRANCHDOC Atom - -%BRANCHDOC GasMixture -%BRANCHDOC SolidMixture -%BRANCHDOC Suspension -%BRANCHDOC Solution -%BRANCHDOC Colloid - - -%BRANCHDOC Reductionistic - - -%BRANCHDOC Semiotics -%BRANCHDOC Semiosis - -%BRANCHDOC Interpreter -%BRANCHDOC SemioticObject -%BRANCHDOC Sign - -%BRANCHDOC Conventional -%BRANCHDOC Subjective -%BRANCHDOC Objective -%BRANCHDOC Icon - -%BRANCHDOC Simulation -%BRANCHDOC Declared rankdir=RL diff --git a/doc/emmodoc/emmo.md b/doc/emmodoc/emmo.md deleted file mode 100644 index 8a350537..00000000 --- a/doc/emmodoc/emmo.md +++ /dev/null @@ -1,24 +0,0 @@ -%% -%% This is the main Markdown input file for the EMMO documentation. -%% -%% Lines starting with a % are pre-processor directives. -%% - -%% %INCLUDE introduction.md - -%INCLUDE relations.md - -%INCLUDE classes.md - - -%HEADER Individuals level=1 -%ALL individuals - - -%HEADER Appendix level=1 - -%HEADER "The complete taxonomy of EMMO relations" level=2 -%BRANCHFIG EMMORelation caption='The complete taxonomy of EMMO relations.' terminated=0 relations=all edgelabels=0 - -%% %HEADER "The taxonomy of EMMO classes" level=2 -%% %BRANCHFIG EMMO caption='The almost complete taxonomy of EMMO classes. Only physical quantities and constants are left out.' terminated=0 relations=isA edgelabels=0 leafs=PhysicalDimension,BaseQuantity,DerivedQuantity,ExactConstant,MeasuredConstant,SIBaseUnit,SISpecialUnit,MetricPrefix,UTF8 diff --git a/doc/emmodoc/emmodoc-meta.yaml b/doc/emmodoc/emmodoc-meta.yaml deleted file mode 100644 index 6f5afb69..00000000 --- a/doc/emmodoc/emmodoc-meta.yaml +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: 'Elementary Multiperspective Material Ontology (EMMO)' -version: 1.0.0-rc1 -author: -- name: Emanuele Ghedini - affiliation: University of Bologne -- name: Gerhard Goldbeck - affiliation: Goldbeck Consulting -- name: Jesper Friis - affiliation: SINTEF -- name: Adham Hashibon - affiliation: Fraunhofer IWM -- name: Georg Schmitz - affiliation: ACCESS -institute: 'European Materials Modelling Council (EMMC)' -keywords: [EMMO, 'materials science', modelling, characterisation, materials, ontology] -abstract: | - EMMO is an ontology that is created by the - European Materials Modelling Council - (EMMC) to provide a formal way to describe the fundamental - concepts of physics, chemistry and materials science. EMMO is - designed to pave the road for semantic interoperability providing a - generic common ground for describing materials, models and data that - can be adapted by all domains. - - It is a representational framework of predefined classes and axioms - (ontology) provided by experts (EMMC) that enables end users - (industry, research, academy) to represent real life physical - entities (materials, devices), models and properties using - ontological signs (individuals) in a standard way to facilitate - interactions and exchanges (data, software, knowledge) between all - involved material modelling and characterization communities and - stakeholders. -... diff --git a/doc/emmodoc/figs/.gitignore b/doc/emmodoc/figs/.gitignore deleted file mode 100644 index 3367afdb..00000000 --- a/doc/emmodoc/figs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -old diff --git a/doc/emmodoc/figs/Perspectives.png b/doc/emmodoc/figs/Perspectives.png deleted file mode 100644 index 07de129f..00000000 Binary files a/doc/emmodoc/figs/Perspectives.png and /dev/null differ diff --git a/doc/emmodoc/figs/Semiotic.png b/doc/emmodoc/figs/Semiotic.png deleted file mode 100644 index 000cd2a7..00000000 Binary files a/doc/emmodoc/figs/Semiotic.png and /dev/null differ diff --git a/doc/emmodoc/figs/animal.dot b/doc/emmodoc/figs/animal.dot deleted file mode 100644 index b6e38d59..00000000 --- a/doc/emmodoc/figs/animal.dot +++ /dev/null @@ -1,7 +0,0 @@ -# Usage: dot -Tpng -oanimal.png animal.dot -digraph D { - rankdir="RL"; - terrier -> dog [label="is_a", arrowhead=empty]; - dog -> animal [label="is_a", arrowhead=empty]; - cat -> animal [label="is_a", arrowhead=empty]; -} diff --git a/doc/emmodoc/figs/animal.png b/doc/emmodoc/figs/animal.png deleted file mode 100644 index 9950cce7..00000000 Binary files a/doc/emmodoc/figs/animal.png and /dev/null differ diff --git a/doc/emmodoc/figs/emmc-logo.png b/doc/emmodoc/figs/emmc-logo.png deleted file mode 100644 index c88e5c7d..00000000 Binary files a/doc/emmodoc/figs/emmc-logo.png and /dev/null differ diff --git a/doc/emmodoc/figs/emmo-direct_part.png b/doc/emmodoc/figs/emmo-direct_part.png deleted file mode 100644 index 519cf543..00000000 Binary files a/doc/emmodoc/figs/emmo-direct_part.png and /dev/null differ diff --git a/doc/emmodoc/figs/emmo-elementary.png b/doc/emmodoc/figs/emmo-elementary.png deleted file mode 100644 index d1dc40d6..00000000 Binary files a/doc/emmodoc/figs/emmo-elementary.png and /dev/null differ diff --git a/doc/emmodoc/figs/emmo-granularity.png b/doc/emmodoc/figs/emmo-granularity.png deleted file mode 100644 index ae0bb9b9..00000000 Binary files a/doc/emmodoc/figs/emmo-granularity.png and /dev/null differ diff --git a/doc/emmodoc/figs/emmo-granularity2.png b/doc/emmodoc/figs/emmo-granularity2.png deleted file mode 100644 index 4398ddfe..00000000 Binary files a/doc/emmodoc/figs/emmo-granularity2.png and /dev/null differ diff --git a/doc/emmodoc/figs/emmo-matter.png b/doc/emmodoc/figs/emmo-matter.png deleted file mode 100644 index 7ce4626a..00000000 Binary files a/doc/emmodoc/figs/emmo-matter.png and /dev/null differ diff --git a/doc/emmodoc/figs/emmo-multidisciplinary.png b/doc/emmodoc/figs/emmo-multidisciplinary.png deleted file mode 100644 index e1a6f715..00000000 Binary files a/doc/emmodoc/figs/emmo-multidisciplinary.png and /dev/null differ diff --git a/doc/emmodoc/figs/emmo-primitives.png b/doc/emmodoc/figs/emmo-primitives.png deleted file mode 100644 index 74b4dd46..00000000 Binary files a/doc/emmodoc/figs/emmo-primitives.png and /dev/null differ diff --git a/doc/emmodoc/figs/emmo-scope.png b/doc/emmodoc/figs/emmo-scope.png deleted file mode 100644 index b2884f45..00000000 Binary files a/doc/emmodoc/figs/emmo-scope.png and /dev/null differ diff --git a/doc/emmodoc/figs/emmo-state.png b/doc/emmodoc/figs/emmo-state.png deleted file mode 100644 index 6722f6e5..00000000 Binary files a/doc/emmodoc/figs/emmo-state.png and /dev/null differ diff --git a/doc/emmodoc/figs/emmo-three_worlds.png b/doc/emmodoc/figs/emmo-three_worlds.png deleted file mode 100644 index cfa75781..00000000 Binary files a/doc/emmodoc/figs/emmo-three_worlds.png and /dev/null differ diff --git a/doc/emmodoc/figs/physical.png b/doc/emmodoc/figs/physical.png deleted file mode 100644 index 8688561d..00000000 Binary files a/doc/emmodoc/figs/physical.png and /dev/null differ diff --git a/doc/emmodoc/figs/top.png b/doc/emmodoc/figs/top.png deleted file mode 100644 index 3310b8e7..00000000 Binary files a/doc/emmodoc/figs/top.png and /dev/null differ diff --git a/doc/emmodoc/important_concepts.md b/doc/emmodoc/important_concepts.md deleted file mode 100644 index 2a3976f8..00000000 --- a/doc/emmodoc/important_concepts.md +++ /dev/null @@ -1,155 +0,0 @@ -## Important concepts - - -### Mereotopological composition - - - -#### Substrate - -A `substrate` represents the place (in general sense) in which every -real world item exists. It provides the dimensions of existence for -real world entities. This follows from the fact that everything that -exists is placed somewhere in space and time. Hence, its space and -time coordinates can be used to identify it. - -Substrates are always **topologically connected spaces** (a topological -space X is said to be disconnected if it is the union of two disjoint -non-empty open sets. Otherwise, X is said to be connected). - -`substrate` is the superclass of `space`, `time` and their combinations, -like `spacetime`. - -*Following Kant, space and time are a priori forms of intuition, -i.e. they are the substrate upon which we place our intuitions, -assigning space and time coordinates to them.* - - -#### Hybrid -A `hybrid` is the combination of `space` and `time`. It has the subclasses -`world_line` (0D space + 1D time), `world_sheet` (1D space + 1D time), -`world_volume` (2D space + 1D time) and `spacetime` (3D space + 1D time). - - -#### Spacetime -EMMO represents real world entities as subclasses of `spacetime`. -A `spacetime` is valid for all reference systems (as required by the -theory of relativity). - - -#### Matter -`matter` is used to represent a group of `elementary` in an enclosing -`spacetime`. As illustrated in the figure, a `matter` is an `elementary` -or a composition of other `matter` and `vacuum`. - -![Matter.](html_files/emmo-matter.png){ width=540px } - -In EMMO `matter` is always a 4D spacetime. This is a fundamental difference -between EMMO and most other ontologies. - -In order to describe the real world, we must also take into account -the vacuum between the elementaries that composes higher granularity -level entity (e.g. an atom). - -In EMMO `vacuum` is defined as a `spacetime` that has no `elementary` parts. - - -#### Existent -An `existent` is defined as a `matter` that unfolds in time as a -succession of states. It is used to represent the whole life of a -complex but structured state-changing `matter` entity, like e.g. an -atom that becomes ionised and then recombines with an electron. - -On the contrary, a `matter and not existent` entity is something -"amorphous", randomly collected and not classifiable by common terms -or definitions. That is a heterogeneous heap of `elementary`, -appearing and disappearing in time. - - -#### State -A `state` is matter in a particular configurational state. It is -defined as having spatial direct parts that persist (do not change) -throughout the lifetime of the `state`. Hence, a `state` is like a -snapshot of a physical in a finite time interval. - -![A physical can always be decomposed into a sequence of finite `state`s.](html_files/emmo-state.png){ width=440px } - -The use of spatial direct parthood in the definition of `state` means that -a `state` cannot overlap in space with another `state`. - -An important feature of states, that follows from the fact that they are -`spacetime`, is that they constitute a finite time interval. - - -#### Elementary -The basic assumption of decomposition in EMMO, is that the most basic -manifestation of `matter` is represented by a subclass of `spacetime` -called `elementary`. - -The `elementary` class defines the "atomic" (undividable) level in EMMO. -A generic `matter` can always be decomposed in proper parts down to the -`elementary` level using proper parthood. An `elementary` can -still be decomposed in temporal parts, that are themselves `elementary`. - -Example of elementaries are electrons, photons and quarks. - -![Elementary.](html_files/emmo-elementary.png){ width=320px } - - -### Granularity - direct parthood -Granularity is a central concept of EMMO, which allows the user to -percieve the world at different levels of detail (granularity) that -follow physics and materials science perspectives. - -![Different levels of granularity.](html_files/emmo-granularity2.png){ width=660px } - -Every material in EMMO is placed on a granularity level and the -ontology gives information about the direct upper and direct lower -level classes. This is done with the non-transitive `is_direct_part_of` -relation. - -![Direct parthood.](html_files/emmo-direct_part.png){ width=220px } - -Granularity is a defined class and is useful sine a reasoner -automatically can put the individuals defined by the user under a -generic class that clearly expresses the types of its compositional -parts. - - -### Mathematical entities -The class `mathematical_entity` represents fundamental elements of -mathematical expressions, like numbers, variables, unknowns and -equations. Mathematical entities are pure mathematical and have no -physical unit. - - -### Natural law -A `natural_law` is an abstraction for a series of experiments that -tries to define a common cause and effect of the time evolution of a -set of interacting participants. It is (by definition) a -pre-mathematical entity. - -The `natural_law` class is defined as - - is_abstraction_for some experiment - -It can be represented e.g. as a thought in the mind of the -experimentalist, a sketch and textual description in a book of -science. - -`physical_law` and `material_law` are, according to the [RoMM][RoMM] -and [CWA][CWA], the laws behind physical equations and material -relations, respectively. - - -### Properties -Properties are abstracts that are related to a specific material -entity with the relation *has_property*, but that depend on a -**specific observation process**, participated by a **specific -observer**, who catch the physical entity behaviour that is abstracted -as a property. - -Properties enable us to connect a measured property to the measurement -process and the measurement instrument. diff --git a/doc/emmodoc/introduction.md b/doc/emmodoc/introduction.md deleted file mode 100644 index fa7321be..00000000 --- a/doc/emmodoc/introduction.md +++ /dev/null @@ -1,680 +0,0 @@ -# Introduction - -EMMO is a multidisciplinary effort to develop a standard -representational framework (the ontology) based on current materials -modelling knowledge, including physical sciences, analytical -philosophy and information and communication technologies. -This multidisciplinarity is illustrated by the figure on the title page. -It provides the connection between the physical world, materials -characterisation world and materials modelling world. - -![EMMO provides the connection between the physical world, materials -characterisation world and materials modelling world.](figs/emmo-three_worlds.png){ width=620px } - -EMMO is based on and is consistent with the [Review of Materials -Modelling][RoMM], [CEN Workshop Agreement][CWA] and [MODA -template][MODA]. However, while these efforts are written for humans, -EMMO is defined using the [Web Ontology Language (OWL)][OWL], which is -machine readable and allows for machine reasoning. In terms of -semantic representation, EMMO brings everything to a much higher level -than these foundations. - -As illustrated in the figure below, EMMO covers all aspects of -materials modelling and characterisation, including: - - - the **material** itself, which must be described in a rigorous way - - the **observation process** involving an observer that perceives the - real world (characterisation) - - the **properties** that are measured or modelled - - the **physics laws** that describe the material behaviour - - the **physical models** that approximate the physics laws - - the **solver** including the numerical discretisation method that - leads to a solvable mathematical representation under certain - simplifying assumptions - - the **numerical solver** that performs the calculations - - the **post processing** of experimental or simulated data - -![The aspects of materials modelling and characterisation covered by EMMO.](figs/emmo-scope.png){ width=360px } - - -EMMO is released under the [Creative Commons license][CC] and is -available at [emmo.info/][EMMO]. The OWL2-DL sources are available in -RDF/XML format. - - - -## What is an ontology -In short, an ontology is a specification of a conceptualization. The -word *ontology* has a long history in philosophy, in which it refers -to the subject of existence. The so-called [ontological -argument][ontological_argument] for the existence of God was proposed -by Anselm of Canterbury in 1078. He defined God as *"that than which -nothing greater can be thought"*, and argued that *"if the greatest -possible being exists in the mind, it must also exist in reality. If -it only exists in the mind, then an even greater being must be -possible -- one which exists both in the mind and in reality"*. Even -though this example has little to do with todays use of ontologies -in e.g. computer science, it illustrates the basic idea; the ontology -defines some basic premises (concepts and relations between them) from -which it is possible reason to gain new knowledge. - -For a more elaborated and modern definition of the ontology we refer -the reader to the one provided by [Tom Gruber (2009)][Gruber2009]. -Another useful introduction to ontologies is the paper [Ontology -Development 101: A Guide to Creating Your First Ontology][Ontology101] -by Noy and McGuinness (2001), which is based on the [Protege][Protege] -software, with which EMMO has been developed. - -A taxonomy is a hierarchical representation of classes and subclasses -connected via `is_a` relations. Hence, it is a subset of the ontology -excluding all but the `is_a` relations. The main use of taxonomies is -for the organisation of classifications. The figure shows a simple -example of a taxonomy illustrating a categorisation of four classes -into a hierarchy of more higher of levels of generality. - -![Example of a taxonomy.](figs/animal.png){ width=300px } - -In EMMO, the taxonomy is a rooted directed acyclic graph (DAG). This -is important since many classification methods relies on this -property, see e.g. [Valentini (2014)][Valentini2014] and [Robison et -al (2015)][Robison2015]. Note, that EMMO is a DAG does not prevent -some classes from having more than one parent. A `Variable` is for -instance both a `Mathematical` and a `Symbol`. See -[appendix][Appendix] for the full EMMO taxonomy. - - -## Primitive elements in EMMO - -![The primitive building blocks of EMMO.](figs/emmo-primitives.png){ width=620px } - -### Individuals -Individuals are the basic, "ground level" components of EMMO. They -may include concrete objects such as cars, flowers, stars, persons and -molecules, as well as abstract individuals such as a measured height, -a specific equation and software programs. - -Individuals possess attributes in form of axioms that are defined by -the user (interpreter) upon declaration. - - -### Classes -Classes represent concepts. They are the building blocks that we use -to create an ontology as a representation of knowledge. We distinguish -between *defined* and *non-defined* classes. - -Defined classes are defined by the requirements for being a member -of the class. In the graphical representations of EMMO, defined -classes are orange. For instance, in the graph of the top-level -entity branch below, The root `EMMO` and a defined class (defined to be -the disjoint union of `Item` and `Collection`). - -Non-defined classes are defined as an abstract group of objects, -whose members are defined as belonging to the class. They are yellow -in the graphical representations. - -%BRANCHFIG EMMO leafs=Perspective,Elementary caption='Example of the top-level branch of EMMO showing some classes and relationships between them.' width=460 - - -### Axioms -Axioms are propositions in a logical framework that define the -relations between the individuals and classes. They are used to -categorise individuals in classes and to define the *defined* classes. - - -#### Class axioms -The simplest form of a class axiom is a class description that just -states the existence of the class and gives it an unique identifier. -In order to provide more knowledge about the class, class axioms -typically contain additional components that state necessary -and/or sufficient characteristics of the class. OWL contains three -language constructs for combining class descriptions into class -axioms: - -* _Subclass_ (`rdfs:subClassOf`) allows one to say that the class - extension of a class description is a subset of the class extension - of another class description. - -* _Equivalence_ (`owl:equivalentClass`) allows one to say that a class - description has exactly the same class extension (i.e. the - individuals associated with the class) as another class description. - -* _Distjointness_ (`owl:disjointWith`) allows one to say that the class - extension of a class description has no members in common with the - class extension of another class description. - -See the section about [Description logic](#description-logic) for more -information about these language constructs. Axioms are also used to -define relations between relations. These are further detailed in the -chapter on [Relations](#emmo-relations). - -#### Object property axioms -Object properties express relationships between classes or -individuals. There exists a range of axioms for object properties, -here is an incomplete list: - -* _subproperty_; is used to defined a hierarchy of properties. - -* _domain_; is the class that a property applies to (the - individuals that can be a subject in a (subject, property, - object) relation). - -* _range_; is the class that a property relates to (the - individuals that can be an object in a (subject, property, - object) relation). - -* _equivalence_; allows to declare equivalent properties. - -* _disjointness_; two properties are disjoint if there are no - two individuals that are interlinked by both properties. - -* _inverse_; when one property can be obtained by changing the - direction of another property, i.e. inverting it. E.g. `hasParent` - is the inverse of `hasChild`. - -* _functional_; means that a property links every individual in its - domain to at most one other individual. Ex. `hasBiologicalFather`. - -* _inverse functional_; means that the inverse of a property is - functional. Ex. `isBiologicalFatherOf`. - -* _transitive_; a property is transitive if it connects A to B and B - to C, implies that it connects A to C. Ex. `hasAncestor`. - -* _symmetric_; when a property coincides with its inverse, i.e. if it - connects A with B also means that it connects B with A. - Ex. `hasSpouse`. - -* _asymmetric_; means that a property that connects A with B, never - connects B with A. Ex. `hasChild`. - -* _reflexive_; means that a property can relate everything (it applies - to) to itself, i.e. that its domain is a subclass of its range. - Ex. `hasRelative` (given that everybody has themselves as relative). - -* _irreflexive_; means that a property cannot relate any individual to - itself. Ex. `hasParent` (nobody can be their own parent). - -#### Data property axioms -Data properties express relations between individuals and literals. -Axioms for data properties include _subproperty_, _domain_, _range_ -_equivalence_, _disjointness_ and _functional_ with the same meaning -as for object properties. - - - -## Theoretical foundations -EMMO build upon several theoretical frameworks. - -### Semiotics -Semiotics is the study of meaning-making. It is the discipline -of formulating something that possibly can exist in a defined -space and time in the real world. - -%%It is introduced in EMMO via the -%%`semion` class and used as a way to reduce the complexity of a -%%physical to a simple sign (symbol). A `Sign` is a physical -%%entity that can represent another object. -%% -%%### Set theory -%%Set theory is the theory of membership. This is introduced via -%%the `set` class, representing the collection of all individuals -%%(signs) that represent a collection of items. Sets are defined -%%via the `hasMember` relations. - - -### Mereotopology -Mereotopology is the combination of __mereology__ (science of -parthood) and __topology__ (mathematical study of the geometrical -properties and conservation through deformations). It is introduced -via the [`Item`](#item) class and based on the -[`mereotopological`](#mereotopological) relations. Items in EMMO are -always topologically connected in space and time. -EMMO makes a strong distinction between membership and parthood -relations. In contrast to collections, items can only have parts that -are themselves items. For further information, see [Casati and Varzi -"Parts and Places" (1999)][Casati1999]. - - -### Physics -EMMO is strongly based on physics, with the aim of being able to -describe all aspects and all domains of physics, from quantum -mechanics to continuum, engineering, chemistry, etc. EMMO is -compatible with both the De Broglie - Bohm and the Copenhagen -interpretation of quantum mechanics (see [`Physical`](#physical) for -more comments). - -EMMO defines a physics-based parthood hierarchy under `Physical` by -introducing the following concepts (illustrated in the figure below): - - * [`Elementary`](#elementary) is the fundamental, non-divisible - constituent of entities. In EMMO, elementaries are based on the - standard model of physics. - - * [`State`](#state) is a `Physical` whose parts does not change - during its life time (at the chosen level of granularity). This is - consistent with a state within e.g. thermodynamics. - - * [`Existent`](#existent) is a succession of states. - -![Parthood hierarchy under `Physical`.](figs/physical.png){ width=600px } - - -### Metrology -Metrology is the science of measurements. It introduces units and -links them to properties. The description of metrology in EMMO -is based on the standards of -[International System of Quantities (ISQ)](https://en.wikipedia.org/wiki/International_System_of_Quantities) -and -[International System of Units (SI)](https://en.wikipedia.org/wiki/International_System_of_Units). - - -### Description logic -[Description logic (DL)][DL] is a formal knowledge representation language -in which the *axioms* are expressed. It is less expressive than -[first-order logic (FOL)][FOL], but commonly used for providing the -logical formalism for ontologies and semantic web. EMMO is expressed -in the [Web Ontology Language (OWL)][OWL], which in turn is based -on DL. This brings along features like reasoning. - -Since it is essential to have a basic notion of OWL and DL, we -include here a very brief overview. For a proper introduction to OWL -and DL, we refer the reader to sources like [Grau et.al. (2008)][Grau2008], -[OWL2 Primer][OWL2_Primer] and [OWL Reference][OWL_Reference]. - -OWL distinguishes between six types of class descriptions: - - 1. a class identifier (a IRI reference) - 2. an exhaustive enumeration of individuals that together form the instances - of a class (`owl:oneOf`) - 3. a property restriction (`owl:someValuesFrom`, `owl:allValuesFrom`, - `owl:hasValue`, `owl:cardinality`, `owl:minCardinality`, - `owl:maxCardinality`) - 4. the intersection of two or more class descriptions (`owl:intersectionOf`) - 5. the union of two or more class descriptions (`owl:unionOf`) - 6. the complement of a class description (`owl:complementOf`) - -Except for the first, all of these refer to *defined classes*. The -table below shows the notation in OWL, DL and the [Manchester OWL -syntax][Manchester_OWL], all commonly used for the definitions. The -Manchester syntax is used by [Protege][Protege] and is designed to not -use DL symbols and to be easy and quick to read and write. Several -other syntaxes exist for DL. An interesting example is the pure -Python syntax proposed by [Lamy (2017)][Lamy2017], which is used in -the open source [Owlready2][Owlready2] Python package. The [Python API -for EMMO][EMMO-python] is also based on Owlready2. - - - ---------------------------------------------------------------------------------------------------------------------------------------------------------------- -DL RDF Manchester [Python + Owlready2 Read Meaning - ][Owlready2] ---------------- -------------------- ----------------- ------------------- ------------------- -------------------- -**Constants** - -$\top$ owl:Thing Thing top A special class with every individual as an instance - -$\bot$ owl:Nothing Nothing bottom The empty class - -**Axioms** - -$A\doteq B$ A is defined to be Class *definition* - equal to B - -$A\sqsubseteq B$ A rdf:subclassOf B A subclass_of B class A(B): ... all A are B Class *inclusion* - - issubclass(A, B) Test for *inclusion* - -$A\equiv B$ A owl:equivalentTo B A equivalent_to B A.equivalent_to.append(B) A is equivalent to B Class *equivalence* - - B in A.equivalent_to Test for equivalence - -$a:A$ a rdf:type A a is_a A a = A() a is a A Class *assertion* (*instantiation*) - - isinstance(a, A) Test for instance of - -$(a,b):R$ a R b a object property a.R.append(b) a is R-related to b Property *assertion* - assertion b - -$(a,n):R$ a R n a data property a.R.append(n) a is R-related to n Data *assertion* - assertion n - -**Constructions** - -$A\sqcap B$ owl:intersectionOf A and B A & B A and B Class *intersection* (*conjunction*) - -$A\sqcup B$ owl:unionOf A or B A | B A or B Class *union* (*disjunction*) - -$\lnot A$ owl:complementOf not A Not(A) not A Class *complement* (*negation*) - -$\{a, b, ...\}$ owl:oneOf {a, b, ...} OneOf([a, b, ...]) one of a, b, ... Class *enumeration* - -$S\equiv R^-$ owl:inverseOf S inverse_of R Inverse(R) S is inverse of R Property *inverse* - - S.inverse == R Test for *inverse* - -$\forall R.A$ owl:allValuesFrom R only A R.only(A) all A with R [*Universal restriction*][universal_restriction] - -$\exists R.A$ owl:someValuesFrom R some A R.some(A) some A with R [*Existential restriction*][existential_restriction] - -$=n R.A$ owl:Cardinality R exactly n A R.exactly(n, A) *Cardinality restriction* - -$\leq n R.A$ owl:minCardinality R min n A R.min(n, A) *Minimum cardinality restriction* - -$\geq n R.A$ owl:maxCardinality R max n A R.max(n, A) *Maximum cardinality restriction* - -$\exists R\{a\}$ owl:hasValue R value a R.value(a) *Value restriction* - -**Decompositions** - -$A\sqcup B A owl:disjointWith B A disjoint with B AllDisjoint([A, B]) A disjoint with B Disjoint -\sqsubseteq\bot$ - - B in A.disjoints() Test for disjointness - -$\exists R.\top R rdfs:domain A R domain A R.domain = [A] Classes that the restriction applies to -\sqsubseteq A$ - -$\top\sqsubseteq R rdfs:range B R range B R.range = [B] All classes that can be the value of the restriction -\forall R.B$ - ---------------------------------------------------------------------------------------------------------------------------------------------------------------- - -Table: Notation for DL and Protege. _A_ and _B_ are classes, _R_ is an active -relation, _S_ is an passive relation, _a_ and _b_ are individuals and _n_ is a -literal. Inspired by the [Great table of Description Logics][Great_table_of_DL]. - - - -#### Examples -Here are some examples of different class descriptions using both -the DL and Manchester notation. - -##### Equivalence (`owl:equivalentTo`) -Equivalence ($\equiv$) defines necessary and sufficient conditions. - -Parent is equivalent to mother or father - - **DL:** `parent` $\equiv$ `mother` $\lor$ `father` - - **Manchester:** `parent equivalent_to mother or father` - -##### Inclusion (`rdf:subclassOf`) -Inclusion ($\sqsubseteq$) defines necessary conditions. - -An employee is a person. - - **DL:** `employee` $\sqsubseteq$ `person` - - **Manchester:** `employee is_a person` - -##### Enumeration (`owl:oneOf`) -The color of a wine is either white, rose or red: - - **DL:** `wine_color` $\equiv$ {`white`, `rose`, `red`} - - **Manchester:** `wine_color equivalent_to {white, rose, red}` - -##### Existential restriction (`owl:someValuesFrom`) -A mother is a woman that has a child (some person): - - **DL:** `mother` $\equiv$ `woman` $\sqcap$ $\exists$`has_child`.`person` - - **Manchester:** `mother equivalent_to woman and has_child some person` - -##### Universal restriction (`owl:allValuesFrom`) -All parents that only have daughters: - - **DL:** `parents_with_only_daughters` $\equiv$ `person` $\sqcap$ $\forall$`has_child`.`woman` - - **Manchester:** `parents_with_only_daughters equivalent_to person and has_child only woman` - -##### Value restriction (`owl:hasValue`) -The owl:hasValue restriction allows to define classes based on the -existence of particular property values. There must be at least one -matching property value. - -All children of Mary: - - **DL:** `Marys_children` $\equiv$ `person` $\sqcap$ $\exists$`has_parent`.{`Mary`} - - **Manchester:** `Marys_children equivalent_to person and has_parent value Mary` - -##### Property cardinality (`owl:cardinality`) -The owl:cardinality restrictions ($\geq$, $\leq$ or $\equiv$) allow to -define classes based on the maximum (owl:maxCardinality), minimum -(owl:minCardinality) or exact (owl:cardinality) number of occurrences. - -A person with one parent: - - **DL:** `half_orphant` $\equiv$ `person` and =1`has_parent`.`person` - - **Manchester:** `half_orphant equivalent_to person and has_parent exactly 1 person` - -##### Intersection (`owl:intersectionOf`) -Individuals of the intersection ($\sqcap$) of two classes, are -simultaneously instances of both classes. - -A man is a person that is male: - - **DL:** `man` $\equiv$ `person` $\sqcap$ `male` - - **Manchester:** `man equivalent_to person and male` - -##### Union (`owl:unionOf`) -Individuals of the union ($\sqcup$) of two classes, are either instances -of one or both classes. - -A person is a man or woman: - - **DL:** `person` $\equiv$ `man` $\sqcup$ `woman` - - **Manchester:** `person equivalent_to man or woman` - -##### Complement (`owl:complementOf`) -Individuals of the complement ($\lnot$) of a class, are all -individuals that are not member of the class. - -Not a man: - - **DL:** `female` $\equiv$ $\lnot$ `male` - - **Manchester:** `female equivalent_to not male` - - - -## The structure of EMMO - -The EMMO ontology is structured in shells, expressed by specific ontology fragments, that extends from fundamental concepts to the application domains, following the dependency flow. - - -### Top Level -The [EMMO top level](top.owl) is the group of fundamental axioms that constitute the philosophical foundation of the EMMO. Adopting a physicalistic/nominalistic perspective, the EMMO defines real world objects as 4D objects that are always extended in space and time (i.e. real world objects cannot be spaceless nor timeless). For this reason abstract objects, i.e. objects that does not extend in space and time, are forbidden in the EMMO. - -EMMO is strongly based on the analytical philosophy discipline semiotic. -The role of abstract objects are in EMMO fulfilled by semiotic objects, i.e. real world objects (e.g. symbol or sign) that stand for other real world objects that are to be interpreted by an agent. These symbols appear in actions (semiotic processes) meant to communicate meaning by establishing relationships between symbols (signs). - -Another important building block of from analytical philosophy is atomistic mereology applied to 4D objects. The EMMO calls it 'quantum mereology', since there is a epistemological limit to how fine we can resolve space and time due to the uncertainty principles. - -The [mereotopology](top/mereotopology.owl) module introduces the fundamental mereotopological concepts and their relations with the real world objects that they represent. The EMMO uses mereotopology as the ground for all the subsequent ontology modules. The concept of topological connection is used to define the first distinction between ontology entities namely the *Item* and *Collection* classes. Items are causally self-connected objects, while collections are causally disconnected. Quantum mereology is represented by the *Quantum* class. This module introduces also the fundamental mereotopological relations used to distinguish between space and time dimensions. - -The [physical](top/physical.owl) module, defines the *Physical* objects and the concept of *Void* that plays a fundamental role in the description of multiscale objects and quantum systems. It also define the *Elementary* class, that restricts mereological atomism in space. - -![The EMMO top level.](figs/top.png){ width=440px } - -In EMMO, the only univocally defined real world object is the *Item* individual called **Universe** that stands for the universe. Every other real world object is a composition of elementaries up to the most comprehensive object; the **Universe**. Intermediate objects are not univocally defined, but their definition is provided according to some specific philosophical perspectives. This is an expression of reductionism (i.e. objects are made of sub-objects) and epistemological pluralism (i.e. objects are always defined according to the perspective of an interpreter, or a class of interpreters). - -The *Perspective* class collects the different ways to represent the objects that populate the conceptual region between the elementary and universe levels. - - -### Middle Level -The middle level ontologies act as roots for extending the EMMO towards specific application domains. - -![The EMMO perspectives.](figs/Perspectives.png) - -The *Reductionistic* perspective class uses the fundamental non-transitive parthood relation, called direct parthood, to provide a powerful granularity description of multiscale real world objects. The EMMO can in principle represents the **Universe** with direct parthood relations as a direct rooted tree up to its elementary constituents. - -The *Phenomenic* perspective class introduces the concept of real world objects that express of a recognisable pattern in space or time that impress the user. Under this class the EMMO categorises e.g. formal languages, pictures, geometry, mathematics and sounds. Phenomenic objects can be used in a semiotic process as signs. - -The *Physicalistic* perspective class introduces the concept of real world objects that have a meaning for the under applied physics perspective. - -The *Holistic* perspective class introduces the concept of real world objects that unfold in time in a way that has a meaning for the EMMO user, through the definition of the classes *Process* and *Participant*. -The [semiotics](top/semiotics.owl) module introduces the concepts of -semiotics and the *Semiosis* process that has a *Sign*, an *Object* -and an *Interpreter* as participants. This forms the basis in EMMO to -represent e.g. models, formal languages, theories, information and -properties. - -![The semiotic level, showing both the taxonomy (open black arrows) and -other relations as listed in the caption. The inverted arrows corresponds to inverse relations.](figs/Semiotic.png){ width=540px } - -### EMMO relations -All EMMO relations are subrelations of the relations found in the two roots: *mereotopological* and *semiotical*. The relation hierarchy extends more vertically (i.e. more subrelations) than horizontally (i.e. less sibling relations), facilitating the categorisation and inferencing of individuals. -See also the chapter [EMMO Relations](#emmo-relations). - -Imposing all relations to fall under mereotopology or semiotics is how the EMMO force the developers to respect its perspectives. Two entities are related only by contact or parthood (mereotopology) or by standing one for another (semiosis): no other types of relation are possible within the EMMO. - -A unique feature in EMMO, is the introduction of _direct parthood_. -As illustrated in the figure below, it is a mereological relation -that lacks transitivity. This makes it possible to entities made of -parts at different levels of granularity and to go between granularity -levels in a well-defined manner. This is paramount for cross -scale interoperability. Every material in EMMO is placed on a -granularity level and the ontology gives information about the direct -upper and direct lower level classes using the non-transitive direct -parthood relations. - -![Direct parthood.](figs/emmo-direct_part.png){ width=220px } - - - -### Annotations -All entities and relations in EMMO have some attributes, called -*annotations*. In some cases, only the required *International -Resource Identifier* (IRI) and *relations* are provided. However, -descriptive annotations, like *elucidation* and *comment*, are planned -to be added for all classes and relations. Possible annotations are: - -* __Elucidation__ is a human readable explanation and clarification - of the documented class or relation. -* __Example__ clarifies the elucidation through an example. A class may - have several examples, each addressing different aspects. -* __Comment__ is a clarifying note complementing the definition and - elucidation. A class may have several comments, each clarifying - different aspects. -* __IRI__ stands for *international resource identifier*. It is an - identifier that uniquely identifies the class or relation. IRIs are - similar to URIs, but are not restricted to the ASCII character set. - In EMMO, the IRIs are now valid URLs pointing to the stable version of - EMMO. -* __Relations__ is a list of relations applying to the current class - or relation. The relations for relations are special and will be - elaborated on in the introduction to chapter [Relations]. Some of - the listed relations are defined in the OWL sources, while other are - inferred by the reasoner. The relations are expressed using the Manchester - OWL syntax introduced in section [Description logic](#description-logic). - - -%%### Graphs -%%The generated graphs borrow some syntax from the [Unified Modelling -%%Language (UML)][UML], which is a general purpose language for software -%%design and modelling. The table below shows the style used for the -%%different types of relations and the concept they correspond to in -%%UML. -%% -%%Relation UML arrow UML concept -%%------------- ----------- ----------- -%%is-a ![img][isa] inheritance -%%disjoint_with ![img][djw] association -%%equivalent_to ![img][eqt] association -%%encloses ![img][rel] aggregation -%%has_abstract_part ![img][rel] aggregation -%%has_abstraction ![img][rel] aggregation -%%has_representation ![img][rel] aggregation -%%has_member ![img][rel] aggregation -%%has_property ![img][rel] aggregation -%% -%%Table: Notation for arrow styles used in the graphs. Only active -%%relations are listed. Corresponding passive relations use the same -%%style. -%% -%%[isa]: figs/arrow-is_a.png "inheritance" -%%[djw]: figs/arrow-disjoint_with.png "association" -%%[eqt]: figs/arrow-equivalent_to.png "association" -%%[rel]: figs/arrow-relation.png "aggregation" - - -%%All relationships have a direction. In the graphical visualisations, -%%the relationships are represented with an arrow pointing from the -%%subject to the object. In order to reduce clutter and limit the size -%%of the graphs, the relations are abbreviated according to the -%%following table: -%% -%%Relation Abbreviation -%%-------- ------------ -%%has_part only hp-o -%%is_part_of only ipo-o -%%has_member some hm-s -%%is_member_of some imo-s -%%has_abstraction some ha-s -%%is_abstraction_of some iao-s -%%has_abstract_part only pap-o -%%is_abstract_part_of only iapo-o -%%has_space_slice some hss-s -%%is_space_slice_of some isso-s -%%has_time_slice some hts-s -%%is_time_slice_of some itso-s -%%has_projection some hp-s -%%is_projection_of some ipo-s -%%has_proper_part some hpp-s -%%is_proper_part_of some ippo-s -%%has_proper_part_of some hppo-s -%%has_spatial_direct_part min hsdp-m -%%has_spatial_direct_part some hsdp-s -%%has_spatial_direct_part exactly hsdp-e -%% -%%Table: Abbreviations of relations used in the graphical representation -%%of the different subbranches. -%% -%% -%%UML represents classes as a box with three compartments; names, attributes -%%and operators. However, since the classes in EMMO have no operators and -%%since it gives little meaning to include the OWL annotations as attributes, -%%we simply represent the classes as boxes by a name. -%% -%%As already mentioned, defined classes are coloured orange, while -%%undefined classes are yellow. -%% -%% -%% - - - -[CC]: http://emmo.info/blob/v1.0.0/LICENSE.md -[EMMO]: https://github.com/emmo-repo/EMMO/ -[RoMM]: https://publications.europa.eu/en/publication-detail/-/publication/ec1455c3-d7ca-11e6-ad7c-01aa75ed71a1 -[CWA]: https://www.cen.eu/news/workshops/Pages/WS_2016-013.aspx -[MODA]: https://emmc.info/moda-workflow-templates/ -[ontological_argument]: https://en.wikipedia.org/wiki/Ontological_argument -[Valentini2014]: https://arxiv.org/abs/1406.4472 -[Robison2015]: https://www.google.no/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0ahUKEwi_2vv-8tXbAhUFiiwKHVRdD4EQFgg1MAE&url=https%3A%2F%2Fwww.springer.com%2Fcda%2Fcontent%2Fdocument%2Fcda_downloaddocument%2F9783319202471-c2.pdf%3FSGWID%3D0-0-45-1510685-p177420182&usg=AOvVaw39c3v4a5PfVMEYDulWpF3w -[Gruber2009]: http://tomgruber.org/writing/ontology-definition-2007.htm -[Ontology101]: http://www.ksl.stanford.edu/people/dlm/papers/ontology-tutorial-noy-mcguinness-abstract.html -[DL]: https://en.wikipedia.org/wiki/Description_logic -[OWL]: https://en.wikipedia.org/wiki/Web_Ontology_Language -[FOL]: https://en.wikipedia.org/wiki/First-order_logic -[Casati1999]: https://mitpress.mit.edu/books/parts-and-places -[Grau2008]: http://www.cs.ox.ac.uk/boris.motik/pubs/ghmppss08next-steps.pdf -[OWL2_Primer]: https://www.w3.org/TR/owl2-primer/ -[OWL_Reference]: https://www.w3.org/TR/owl-ref/ -[Manchester_OWL]: http://ceur-ws.org/Vol-216/submission_9.pdf -[Owlready2]: https://pythonhosted.org/Owlready2/ -[Lamy2017]: http://www.lesfleursdunormal.fr/_downloads/article_owlready_aim_2017.pdf -[EMMO-python]: https://github.com/emmo-repo/EMMO-python -[Great_table_of_DL]: http://www.lesfleursdunormal.fr/static/_downloads/great_ontology_table.pdf -[universal_restriction]: https://en.wikipedia.org/wiki/Universal_quantifier -[existential_restriction]: https://en.wikipedia.org/wiki/Universal_quantifier -[Protege]: https://protege.stanford.edu/ -[UML]: http://www.uml.org/ diff --git a/doc/emmodoc/mkdoc.sh b/doc/emmodoc/mkdoc.sh deleted file mode 100755 index b4baedec..00000000 --- a/doc/emmodoc/mkdoc.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# Bash script for generating documentation -set -e -set -x - -python3 mkfigs.py - -ontodoc --template=emmo.md --format=html emmo-inferred emmo.html -ontodoc --template=emmo.md emmo-inferred emmo.pdf diff --git a/doc/emmodoc/mkfigs.py b/doc/emmodoc/mkfigs.py deleted file mode 100755 index 3fd72f93..00000000 --- a/doc/emmodoc/mkfigs.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python3 -# Script for generating figures -import sys -import os - -from emmo import get_ontology -from emmo.graph import (plot_modules, get_module_dependencies, - check_module_dependencies) - - -# Plot module dependencies -iri = 'https://w3id.org/emmo/1.0.0-rc1' -emmo = get_ontology(iri) -emmo.load() -modules = get_module_dependencies(emmo) -plot_modules(src=modules, filename='genfigs2/modules.png') -check_module_dependencies(modules) - - -# diff --git a/doc/emmodoc/pandoc-html-options.yaml b/doc/emmodoc/pandoc-html-options.yaml deleted file mode 100644 index be5b755d..00000000 --- a/doc/emmodoc/pandoc-html-options.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# -# Additional pandoc arguments for html output -# -to: html5 -css: pandoc-html.css -template: pandoc-template.html diff --git a/doc/emmodoc/pandoc-html.css b/doc/emmodoc/pandoc-html.css deleted file mode 100644 index fe9d3062..00000000 --- a/doc/emmodoc/pandoc-html.css +++ /dev/null @@ -1,444 +0,0 @@ -/*** Font Definitions ***/ -@font-face { - font-family: "Hoefler Text"; -} -@font-face { - font-family: "Consolas"; -} - -/*** Style Definitions ***/ -html { - font-size: 100%; - padding-left: 4rem; - padding-right: 4rem; - margin-left: auto; - margin-right: auto; -} -body, div, p { - -webkit-font-smoothing: antialiased; - color: #111; - font-family: "Hoefler Text"; - hyphens: auto; - margin: 0in; - text-align: justify; - text-indent: .25in; - line-height: 200%; - pagination: widow-orphan; - font-size: 12pt; -} -code { - background-color: #fbfbfb; - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - border: 1px solid #BCBEC0; - padding: 2px; - font-size: 0.95em; - /* - font: Monaco,Consolas,"Andale Mono","DejaVu Sans Mono",monospace - */ - /* - font-family: Monospace; - display: inline-block; - background-color: #f4f4f4; - border: 1px solid lightgray; - border-radius: 3px; - */ -} -/* Headers */ -h1, h2, h3, h4, h5, h6 { - color: #111; - margin-top: 20.0pt; - margin-right: 0in; - margin-bottom: 10.0pt; - margin-left: 0in; - text-indent: 0; - line-height: 100%; -} -h1, h2, h3 { - font-size: 12pt; -} -h4, h5, h6 { - font-size: 11pt; -} -h1 { - font-weight: bold; - font-size: 24pt; -} -h2 { - font-variant: small-caps; - font-weight: bold; - font-size: 16pt; - color: #0d6ea1; - border-bottom: 3px solid #0d6ea1; -} -h3 { - font-weight: bold; - font-size: 14pt; -/* - font-style: italic; - color: #0d6ea1; -*/ -} -h4 { - font-weight: bold; -} -h5 { - font-weight: normal; - font-style: italic; -} -h6 { - font-variant: small-caps; -} - - -/* Metadata */ -.title { - margin-top: 12.0pt; - margin-right: 0in; - margin-bottom: 12.0pt; - margin-left: 0in; - text-align: center; - font-weight: bold; - font-size: 32.0pt; -} -.version, .institute, .date { - font-size: 24pt; - font-weight: normal; - font-style: normal; -} -.version { - margin-bottom: 2cm; -} -.logo { - display: block; - margin-left: auto; - margin-right: auto; - margin-bottom: 2cm; -} -.titlegraphic { - display: block; - margin-left: auto; - margin-right: auto; - margin-top: 2cm; - margin-bottom: 4cm; -} -.authors { - margin-top: 1cm; - margin-bottom: 2cm; - text-align: right; -} -.content { - font-size: 24pt; - font-weight: bold; - margin-top: 2cm; -} -.subtitle, .author, .caption, .affiliation { - margin-top:0in; - margin-right:0in; - margin-bottom:10.0pt; - margin-left:0in; - text-align:center; - font-size:12.0pt; -} -/* Footnotes */ -.footnotes { - margin-top: 0in; - margin-right: 0in; - margin-bottom: 0in; - margin-left: 0in; -} -.footnotes ol li { - font-size: 10pt; -} -.footnotes ol li p { - text-indent: 0; - line-height: 100%; - font-size: 10pt; - margin-bottom: 2rem; -} -/* Blockquotes */ -blockquote p { - margin-top: 12.0pt; - margin-right: 1.0in; - margin-bottom: 12.0pt; - margin-left: 1.0in; - text-align: justify; - text-indent: 0; - line-height: 120%; -} -/* Lists */ -li { - font-size: 100%; - text-indent: 0; - line-height: 150%; -} -li li { - font-size: 100%; -} -li p { - font-size: 100%; - margin: .5em 0; -} -li > p:first-child { - margin: 0; } - -ul ul, ul ol { - margin-bottom: .2em; -} -ul > li { - position: relative; -} - -ol > li { - position: relative; -} -/* Code */ -.poetry, pre, code { - font-family: Consolas; - text-indent: 0; -} -.poetry, pre { - display: block; - margin-left: 1em; -} -/* Hyperlinks */ -a { - -webkit-transition: color .2s ease-in-out; - -moz-transition: color .2s ease-in-out; - -o-transition: color .2s ease-in-out; - -ms-transition: color .2s ease-in-out; - transition: color .2s ease-in-out; - color: #0d6ea1; - text-decoration: none; -} -a:hover { - color: #3593d9; -} -.footnote, .footnoteRef { - color: #0d6ea1; - font-size: 12pt; - vertical-align: super; -} - -#wrapper img { - max-width: 100%; - height: auto; -} - -dd { - margin-bottom: 1em; -} - -img { - padding-bottom: 30pt; -} - -caption,col,colgroup,table,tbody,td,tfoot,th,thead,tr { - border-spacing: 0; -} - -table { - border: 1px solid rgba(0,0,0,0.25); - border-collapse: collapse; - display: table; - empty-cells: hide; - margin: -1px 0 23px; - padding: 0; - table-layout: fixed; -} - -caption { - display: table-caption; - font-weight: 700; -} - -col { - display: table-column; -} - -colgroup { - display: table-column-group; -} - -tbody { - display: table-row-group; -} - -tfoot { - display: table-footer-group; -} - -thead { - display: table-header-group; -} - -td,th { - display: table-cell; -} - -tr { - display: table-row; -} - -table th,table td { - font-size: 1.1em; - line-height: 23px; - padding: 0 1em; -} - -table thead { - background: rgba(0,0,0,0.15); - border: 1px solid rgba(0,0,0,0.15); - border-bottom: 1px solid rgba(0,0,0,0.2); -} - -table tbody { - background: rgba(0,0,0,0.05); -} - -table tfoot { - background: rgba(0,0,0,0.15); - border: 1px solid rgba(0,0,0,0.15); - border-top: 1px solid rgba(0,0,0,0.2); -} - -figure { - display: inline-block; - position: relative; - margin: 1em 0 2em; -} - -figcaption { - font-style: italic; - text-align: center; - background: white; - color: #666; - position: absolute; - left: 0; - bottom: -24px; - width: 98%; - padding: 1%; - -webkit-transition: all .2s ease-in-out; - -moz-transition: all .2s ease-in-out; - -o-transition: all .2s ease-in-out; - -ms-transition: all .2s ease-in-out; - transition: all .2s ease-in-out; -} - -figure:hover>figcaption { - /* background: rgba(0,0,0,1) */ -} - - - - -sup,sub,a.footnote { - font-size: 1.4ex; - height: 0; - line-height: 1; - position: relative; - vertical-align: super; -} - -sub { - vertical-align: sub; - top: -1px; -} - - - -dt,th { - font-weight: 700; -} - -table tr:nth-child(odd),table th:nth-child(odd),table td:nth-child(odd) { - background: rgba(255,255,255,0.06); -} - -table tr:nth-child(even),table td:nth-child(even) { - background: rgba(200,200,200,0.25); -} - -@media print { - body { - overflow: auto; - } - - img,pre,blockquote,table,figure,p { - page-break-inside: avoid; - } - - #wrapper { - background: #fff; - color: #303030; - font-size: 85%; - padding: 10px; - position: relative; - text-indent: 0; - } -} - -@media screen { - .inverted #wrapper,.inverted { - background: rgba(37, 42, 42, 1); - } - - .inverted hr { - border-color: rgba(51, 63, 64, 1) !important; - } - - .inverted p,.inverted td,.inverted li,.inverted h1,.inverted h2,.inverted h3,.inverted h4,.inverted h5,.inverted h6,.inverted pre,.inverted code,.inverted th,.inverted .math,.inverted caption,.inverted dd,.inverted dt { - color: #eee !important; - } - - .inverted table tr:nth-child(odd),.inverted table th:nth-child(odd),.inverted table td:nth-child(odd) { - background: none; - } - - .inverted a { - color: rgba(172, 209, 213, 1); - } - - #wrapper { - padding: 20px; - } - - ::selection { - background: rgba(157, 193, 200,.5); - } - - h1::selection { - background-color: rgba(45, 156, 208, .3); - } - - h2::selection { - background-color: rgba(90, 182, 224, .3); - } - - h3::selection,h4::selection,h5::selection,h6::selection,li::selection,ol::selection { - background-color: rgba(133, 201, 232, .3); - } - - code::selection { - background-color: rgba(0,0,0,.7); - color: #eee; - } - - code span::selection { - background-color: rgba(0,0,0,.7) !important; - color: #eee !important; - } - - a::selection { - background-color: rgba(255, 230, 102,.2); - } - - .inverted a::selection { - background-color: rgba(255, 230, 102,.6); - } - - td::selection,th::selection,caption::selection { - background-color: rgba(180, 237, 95, .5); - } -} diff --git a/doc/emmodoc/pandoc-options.yaml b/doc/emmodoc/pandoc-options.yaml deleted file mode 100644 index 87648619..00000000 --- a/doc/emmodoc/pandoc-options.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# -# Provide pandoc arguments/options via this file -# -input-files: - - emmodoc-meta.yaml - -standalone: False -self-contained: True -toc: True -toc-depth: 2 -variables: - date: now - logo: figs/emmc-logo.png - titlegraphic: figs/emmo-multidisciplinary.png diff --git a/doc/emmodoc/pandoc-pdf-options.yaml b/doc/emmodoc/pandoc-pdf-options.yaml deleted file mode 100644 index dae25611..00000000 --- a/doc/emmodoc/pandoc-pdf-options.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# -# Additional pandoc arguments for latex and pdf output -# -from: markdown+auto_identifiers -template: pandoc-template.tex -pdf-engine: xelatex -variables: - urlcolor: blue - tocolor: blue - geometry: margin=2cm - papersize: a4 - documentclass: report - header-includes: \usepackage{upgreek} diff --git a/doc/emmodoc/pandoc-template.html b/doc/emmodoc/pandoc-template.html deleted file mode 100644 index b79678c6..00000000 --- a/doc/emmodoc/pandoc-template.html +++ /dev/null @@ -1,117 +0,0 @@ - - -
- - -$for(author)$ - -$endfor$ -$if(date)$ - -$endif$ -$if(keywords)$ - -$endif$ -$if(date)$ - -$endif$ -$author.affiliation$
- $endfor$ -Abstract:$abstract$
-$endif$ - -$if(author)$ - -$endif$ - - -$if(toc)$ -Content - -
-$endif$ - - -$body$ - - - - - diff --git a/doc/emmodoc/pandoc-template.tex b/doc/emmodoc/pandoc-template.tex deleted file mode 100644 index 6e317138..00000000 --- a/doc/emmodoc/pandoc-template.tex +++ /dev/null @@ -1,488 +0,0 @@ -%%% Start: -\PassOptionsToPackage{unicode=true}{hyperref} % options for packages loaded elsewhere -\PassOptionsToPackage{hyphens}{url} -$if(colorlinks)$ -\PassOptionsToPackage{dvipsnames,svgnames*,x11names*}{xcolor} -$endif$$if(dir)$$if(latex-dir-rtl)$ -\PassOptionsToPackage{RTLdocument}{bidi} -$endif$$endif$% -\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$endif$$if(beamer)$ignorenonframetext,$if(handout)$handout,$endif$$if(aspectratio)$aspectratio=$aspectratio$,$endif$$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} -\usepackage{graphicx} - -$if(beamer)$ -$if(background-image)$ -\usebackgroundtemplate{% -\includegraphics[width=\paperwidth]{$background-image$}% -} -$endif$ -\usepackage{pgfpages} -\setbeamertemplate{caption}[numbered] -\setbeamertemplate{caption label separator}{: } -\setbeamercolor{caption name}{fg=normal text.fg} -\beamertemplatenavigationsymbols$if(navigation)$$navigation$$else$empty$endif$ -$for(beameroption)$ -\setbeameroption{$beameroption$} -$endfor$ -% Prevent slide breaks in the middle of a paragraph: -\widowpenalties 1 10000 -\raggedbottom -$if(section-titles)$ -\setbeamertemplate{part page}{ -\centering -\begin{beamercolorbox}[sep=16pt,center]{part title} - \usebeamerfont{part title}\insertpart\par -\end{beamercolorbox} -} -\setbeamertemplate{section page}{ -\centering -\begin{beamercolorbox}[sep=12pt,center]{part title} - \usebeamerfont{section title}\insertsection\par -\end{beamercolorbox} -} -\setbeamertemplate{subsection page}{ -\centering -\begin{beamercolorbox}[sep=8pt,center]{part title} - \usebeamerfont{subsection title}\insertsubsection\par -\end{beamercolorbox} -} -\AtBeginPart{ - \frame{\partpage} -} -\AtBeginSection{ - \ifbibliography - \else - \frame{\sectionpage} - \fi -} -\AtBeginSubsection{ - \frame{\subsectionpage} -} -$endif$ -$endif$ -$if(beamerarticle)$ -\usepackage{beamerarticle} % needs to be loaded first -$endif$ -$if(fontfamily)$ -\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$} -$else$ -\usepackage{lmodern} -$endif$ -$if(linestretch)$ -\usepackage{setspace} -\setstretch{$linestretch$} -$endif$ -\usepackage{amssymb,amsmath} -\usepackage{ifxetex,ifluatex} -\usepackage{fixltx2e} % provides \textsubscript -\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex - \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} - \usepackage[utf8]{inputenc} - \usepackage{textcomp} % provides euro and other symbols -\else % if luatex or xelatex -$if(mathspec)$ - \ifxetex - \usepackage{mathspec} - \else - \usepackage{unicode-math} - \fi -$else$ - \usepackage{unicode-math} -$endif$ - \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} -$for(fontfamilies)$ - \newfontfamily{$fontfamilies.name$}[$fontfamilies.options$]{$fontfamilies.font$} -$endfor$ -$if(mainfont)$ - \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$} -$endif$ -$if(sansfont)$ - \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$} -$endif$ -$if(monofont)$ - \setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$} -$endif$ -$if(mathfont)$ -$if(mathspec)$ - \ifxetex - \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} - \else - \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} - \fi -$else$ - \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} -$endif$ -$endif$ -$if(CJKmainfont)$ - \ifxetex - \usepackage{xeCJK} - \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} - \fi -$endif$ -$if(luatexjapresetoptions)$ - \ifluatex - \usepackage[$for(luatexjapresetoptions)$$luatexjapresetoptions$$sep$,$endfor$]{luatexja-preset} - \fi -$endif$ -$if(CJKmainfont)$ - \ifluatex - \usepackage[$for(luatexjafontspecoptions)$$luatexjafontspecoptions$$sep$,$endfor$]{luatexja-fontspec} - \setmainjfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} - \fi -$endif$ -\fi -$if(beamer)$ -$if(theme)$ -\usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$} -$endif$ -$if(colortheme)$ -\usecolortheme{$colortheme$} -$endif$ -$if(fonttheme)$ -\usefonttheme{$fonttheme$} -$endif$ -$if(mainfont)$ -\usefonttheme{serif} % use mainfont rather than sansfont for slide text -$endif$ -$if(innertheme)$ -\useinnertheme{$innertheme$} -$endif$ -$if(outertheme)$ -\useoutertheme{$outertheme$} -$endif$ -$endif$ -% use upquote if available, for straight quotes in verbatim environments -\IfFileExists{upquote.sty}{\usepackage{upquote}}{} -% use microtype if available -\IfFileExists{microtype.sty}{% -\usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype} -\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts -}{} -$if(indent)$ -$else$ -\IfFileExists{parskip.sty}{% -\usepackage{parskip} -}{% else -\setlength{\parindent}{0pt} -\setlength{\parskip}{6pt plus 2pt minus 1pt} -} -$endif$ -$if(verbatim-in-note)$ -\usepackage{fancyvrb} -$endif$ -$if(colorlinks)$ -\usepackage{xcolor} -$endif$ -\usepackage{hyperref} -\hypersetup{ -$if(title-meta)$ - pdftitle={$title-meta$}, -$endif$ -$if(subject-meta)$ - pdfsubject={$subject-meta$}, -$endif$ -$if(author)$ - pdfauthor={$for(author)$$author.name$$sep$, $endfor$}, -$endif$ -$if(keywords)$ - pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$}, -$endif$ -$if(colorlinks)$ - colorlinks=true, - linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$, - filecolor=$if(filecolor)$$filecolor$$else$Maroon$endif$, - citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$, - urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$, -$else$ - pdfborder={0 0 0}, -$endif$ - breaklinks=true} -\urlstyle{same} % don't use monospace font for urls -$if(verbatim-in-note)$ -\VerbatimFootnotes % allows verbatim text in footnotes -$endif$ -$if(geometry)$ -\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} -$endif$ -$if(beamer)$ -\newif\ifbibliography -$endif$ -$if(listings)$ -\usepackage{listings} -\newcommand{\passthrough}[1]{#1} -$endif$ -$if(lhs)$ -\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} -$endif$ -$if(highlighting-macros)$ -$highlighting-macros$ -$endif$ -$if(tables)$ -\usepackage{longtable,booktabs} -$if(beamer)$ -\usepackage{caption} -% These lines are needed to make table captions work with longtable: -\makeatletter -\def\fnum@table{\tablename~\thetable} -\makeatother -$else$ -% Fix footnotes in tables (requires footnote package) -\IfFileExists{footnote.sty}{\usepackage{footnote}\makesavenoteenv{longtable}}{} -$endif$ -$endif$ -$if(graphics)$ -\usepackage{graphicx,grffile} -\makeatletter -\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} -\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} -\makeatother -% Scale images if necessary, so that they will not overflow the page -% margins by default, and it is still possible to overwrite the defaults -% using explicit options in \includegraphics[width, height, ...]{} -\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} -$endif$ -$if(links-as-notes)$ -% Make links footnotes instead of hotlinks: -\DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}} -$endif$ -$if(strikeout)$ -\usepackage[normalem]{ulem} -% avoid problems with \sout in headers with hyperref: -\pdfstringdefDisableCommands{\renewcommand{\sout}{}} -$endif$ -\setlength{\emergencystretch}{3em} % prevent overfull lines -\providecommand{\tightlist}{% - \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} -$if(numbersections)$ -\setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$} -$else$ -\setcounter{secnumdepth}{0} -$endif$ -$if(beamer)$ -$else$ -$if(subparagraph)$ -$else$ -% Redefines (sub)paragraphs to behave more like sections -\ifx\paragraph\undefined\else -\let\oldparagraph\paragraph -\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} -\fi -\ifx\subparagraph\undefined\else -\let\oldsubparagraph\subparagraph -\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} -\fi -$endif$ -$endif$ -$if(pagestyle)$ -\pagestyle{$pagestyle$} -$endif$ - -% set default figure placement to htbp -\makeatletter -\def\fps@figure{htbp} -\makeatother - -$for(header-includes)$ -$header-includes$ -$endfor$ -$if(lang)$ -\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex - \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel} -$if(babel-newcommands)$ - $babel-newcommands$ -$endif$ -\else - % load polyglossia as late as possible as it *could* call bidi if RTL lang (e.g. Hebrew or Arabic) - \usepackage{polyglossia} - \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$} -$for(polyglossia-otherlangs)$ - \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$} -$endfor$ -\fi -$endif$ -$if(dir)$ -\ifxetex - % load bidi as late as possible as it modifies e.g. graphicx - \usepackage{bidi} -\fi -\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex - \TeXXeTstate=1 - \newcommand{\RL}[1]{\beginR #1\endR} - \newcommand{\LR}[1]{\beginL #1\endL} - \newenvironment{RTL}{\beginR}{\endR} - \newenvironment{LTR}{\beginL}{\endL} -\fi -$endif$ -$if(natbib)$ -\usepackage[$natbiboptions$]{natbib} -\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} -$endif$ -$if(biblatex)$ -\usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex} -$for(bibliography)$ -\addbibresource{$bibliography$} -$endfor$ -$endif$ - -$if(subject)$ -\providecommand{\subject}[1]{} -\subject{$subject$} -$endif$ -$if(title)$ -\title{$title$$if(thanks)$\thanks{$thanks$}$endif$} -$endif$ -$if(subtitle)$ -\providecommand{\subtitle}[1]{} -\subtitle{$subtitle$} -$endif$ -$if(author)$ -\author{$for(author)$$author.name$$sep$ \and $endfor$} -$endif$ -$if(institute)$ -\providecommand{\institute}[1]{} -\institute{$for(institute)$$institute$$sep$ \and $endfor$} -$endif$ -\date{$date$} -$if(beamer)$ -$if(titlegraphic)$ -\titlegraphic{\includegraphics{$titlegraphic$}} -$endif$ -$if(logo)$ -\logo{\includegraphics{$logo$}} -$endif$ -$endif$ - -\begin{document} -$if(title)$ -$if(beamer)$ -\frame{\titlepage} -$else$ -%\maketitle -% Create our custom title page -\begin{titlepage} - \centering - $if(subject)$ - {\scshape $subject$\par}\vspace{0.5cm} - $endif$ - $if(title)$ - {\huge\bfseries $title$\par}\vspace{0.4cm} - $endif$ - $if(subtitle)$ - {\scshape\LARGE $subtitle$\par}\vspace{2cm} - $endif$ - $if(version)$ - {\scshape\LARGE Version $version$\par}\vspace{1cm} - $endif$ - \par - $if(institute)$ - {\Large $for(institute)$$institute$$sep$, $endfor$\par}\vspace{0.2cm} - $endif$ - \par - $if(logo)$ - \includegraphics[width=0.12\textwidth]{$logo$}\par\vspace{1cm} - $endif$ - $if(date)$ - {\large $date$\par}\vspace{2cm} - $endif$ - $if(titlegraphic)$ - \includegraphics[width=\linewidth]{$titlegraphic$}\par\vspace{0.5cm} - $endif$ -\end{titlepage} -\thispagestyle{empty} -$endif$ -$if(abstract)$ -\begin{abstract} -$abstract$ -$if(keywords)$ -{% - \par\vspace{1cm} - {\bf Keywords:} $for(keywords)$$keywords$$sep$, $endfor$ -} -$endif$ - -$if(author)$ -{ - \par\vspace{4cm} - \raggedleft - Authors:\par - \itshape - $for(author)$$author.name$, $author.affiliation$\par $endfor$ -} -$endif$ -\end{abstract} -$endif$ -$endif$ - -$for(include-before)$ -$include-before$ - -$endfor$ -$if(toc)$ -$if(toc-title)$ -\renewcommand*\contentsname{$toc-title$} -$endif$ -$if(beamer)$ -\begin{frame} -$if(toc-title)$ -\frametitle{$toc-title$} -$endif$ -\tableofcontents[hideallsubsections] -\end{frame} -$else$ -{ -$if(colorlinks)$ -\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$$endif$} -$endif$ -\setcounter{tocdepth}{$toc-depth$} -\tableofcontents -} -$endif$ -$endif$ -$if(lot)$ -\listoftables -$endif$ -$if(lof)$ -\listoffigures -$endif$ -$body$ - -$if(natbib)$ -$if(bibliography)$ -$if(biblio-title)$ -$if(book-class)$ -\renewcommand\bibname{$biblio-title$} -$else$ -\renewcommand\refname{$biblio-title$} -$endif$ -$endif$ -$if(beamer)$ -\begin{frame}[allowframebreaks]{$biblio-title$} -\bibliographytrue -$endif$ -\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} -$if(beamer)$ -\end{frame} -$endif$ - -$endif$ -$endif$ -$if(biblatex)$ -$if(beamer)$ -\begin{frame}[allowframebreaks]{$biblio-title$} -\bibliographytrue -\printbibliography[heading=none] -\end{frame} -$else$ -\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ -$endif$ - -$endif$ -$for(include-after)$ -$include-after$ - -$endfor$ -\end{document} - -%%% Local Variables: -%%% mode: latex -%%% TeX-master: t -%%% End: diff --git a/doc/emmodoc/relations.md b/doc/emmodoc/relations.md deleted file mode 100644 index 15f08c20..00000000 --- a/doc/emmodoc/relations.md +++ /dev/null @@ -1,104 +0,0 @@ -%% -%% This file -%% This is Markdown file, except of lines starting with %% will -%% be stripped off. -%% - -%HEADER "EMMO Relations" level=1 - -In the language of OWL, relations are called *properties*. However, -since relations describe relations between classes and individuals and -since [properties](#Properties) has an other meaning in EMMO, we only call -them *relations*. - -[Resource Description Framework (RDF)][RDF] is a W3C standard that is -widely used for describing information on the web and is one of the -standards that OWL builds on. RDF expresses information in form of -*subject-predicate-object* triplets. The subject and object are -resources (aka items to describe) and the predicate expresses a -relationship between the subject and the object. - -In OWL the subject and object are classes or individuals (or data) -while the predicate is a relation. An example of a relationship is -the statement *dog is_a animal*. Here `dog` is the subject, `is_a` -the predicate and `animal` the object. - -%%We distinguish between -%%`active relations` where the subject is acting on the object and -%%`passive relations` where the subject is acted on by the object. - -OWL distinguishes between *object properties*, that link classes or -individuals to classes or individuals, and *data properties* that link -individuals to data values. Since EMMO only deals with classes, we -will only be discussing object properties. However, -in actual simulations or characterisation applications build on EMMO, -datatype properties will be important. - -The characteristics of the different properties are described by -the following *property axioms*: - -- `rdf:subPropertyOf` is used to define that a property is a - subproperty of some other property. For instance, in the figure - below showing the relation branch, we see that `active_relation` is - a subproperty or `relation`. - The `rdf:subPropertyOf` axioms forms a taxonomy-like tree for relations. - -- `owl:equivalentProperty` states that two properties have the same - property extension. - -- `owl:inverseOf` axioms relate active relations to their corresponding - passive relations, and vice versa. The root relation `relation` is its - own inverse. - -- `owl:FunctionalProperty` is a property that can have only one - (unique) value y for each instance x, i.e. there cannot be two - distinct values y1 and y2 such that the pairs (x,y1) and (x,y2) are - both instances of this property. Both object properties and datatype - properties can be declared as "functional". - -- `owl:InverseFunctionalProperty` - -- `owl:TransitiveProperty` states that if a pair (x,y) is an instance - of P, and the pair (y,z) is instance of P, then we can infer that - the pair (x,z) is also an instance of P. - -- `owl:SymmetricProperty` states that if the pair (x,y) is an instance of P, - then the pair (y,x) is also an instance of P. - A popular example of a symmetric property is the `siblingOf` relation. - -- `rdfs:domain` specifies which classes the property applies to. Or - said differently, the valid values of the *subject* in a - *subject-predicate-object* triplet. - -- `rdfs:range` specifies the property extension, i.e. the valid values - of the *object* in a *subject-predicate-object* triplet. - - - - -%HEADER "Root of EMMO relations" level=2 -%BRANCHFIG EMMORelation caption="Top-level of the EMMO relation hierarchy." -%ENTITY EMMORelation - - -%%BRANCHDOC causal -%BRANCHHEAD causal -%BRANCH causal - -%BRANCHDOC mereological - -%BRANCHDOC semiotical - - -%BRANCHDOC hasPart -%BRANCHDOC hasDirectPart -%BRANCHDOC hasHolisticPart -%BRANCHDOC hasTemporalPart - - - - - - - -[RDF]: https://en.wikipedia.org/wiki/Resource_Description_Framework diff --git a/scripts/emmoutils.py b/scripts/emmoutils.py deleted file mode 100644 index c7760d8a..00000000 --- a/scripts/emmoutils.py +++ /dev/null @@ -1,354 +0,0 @@ -"""Module with utility functions. -""" -# pylint: disable=invalid-name -import re - -import owlready2 - - -def en(s): - """Returns `s` as an English location string.""" - return owlready2.locstr(s, lang='en') - - -def as_preflabel(s): - """Return dimensional string `s` as a valid prefLabel.""" - table = str.maketrans("()-", "___") - table.update((ord(c), None) for c in " ^?.\xa0") - preflabel = s.title().translate(table).replace( - "\xc3\xa5Ngstr\xe3\xb6M", "Angstrom" - ) - if not preflabel.isidentifier(): - raise ValueError(f"Cannot convert '{s}' to preflabel.") - return preflabel - - -def dimension_string(dimvec): - """Convert QUDT dimension vection to EMMO dimension string.""" - d = dict(re.findall("([A-Z])(-?[0-9]+)", dimvec)) - return " ".join(f"{e}{int(d[q]):+}" for e, q in zip( - "TLMI\u0398NJ", "TLMEHAI")).replace("+0", "0") - - -def get_symbol(unit): - """Return the symbol string for `unit` or None if `unit` has no symbol.""" - onto = unit.namespace.ontology - if unit.unitSymbol: - return unit.unitSymbol.first() - for r in unit.is_a: - if (isinstance(r, owlready2.Restriction) and - r.property == onto.hasUnitSymbol): - return r.value - return None - - -def fix_preflabel(label, onto, prefixes, corrected_preflabels=None): - """Convert `label` to a valid prefLabel. - Each component will start with a big case. - Trailing "s"'s after a prefixed unit are removed. - - Arguments: - label: Label to convert. - onto: Ontology to look for unit components in. - prefixes: Dict mapping prefix names to corresponding symbol. - Ex: {"Kilo": "k", ...} - corrected_preflabels: Optional dict for handling special cases. - It should map `label` to correct preflabel. - - Returns: - Valid prefLabel. - """ - if corrected_preflabels and label in corrected_preflabels: - return corrected_preflabels[label] - newlabel = [] - for s in re.findall("[A-ZÅ][a-zö0-9_]*", label): - for prefix in prefixes.keys(): - if s.startswith(prefix): - newlabel.append(prefix) - s = s[len(prefix):].title() - break - if s in onto: - newlabel.append(onto[s].prefLabel.first()) - elif s.endswith("s") and s[:-1] in onto: - newlabel.append(onto[s[:-1]].prefLabel.first()) - else: - newlabel.append(s) - return "".join(newlabel) - - -def latex2text(latex): - """Convert LaTeX to UTF-8.""" - - def fscript(m): - """Convert superscripts and subscripts from regex match object `m`.""" - op, _, _, exp1, exp2 = m.groups() - exp = exp1 or exp2 - assert op in "^_" - table = str.maketrans( - "0123456789+-", - "\u2070\u00b9\u00b2\u00b3\u2074\u2075\u2076\u2077" - "\u2078\u2079\u207a\u207b" if op == "^" else - "\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087" - "\u2088\u2089\u208a\u208b" - ) - return exp.translate(table) - - subs = { - r"\,": " ", - r'\"': r'\"', - r"\'": "'", - r"\pm": "\u00b1", - r"\cdot": "\u00b7", - r"\times": "\u00d7", - r"\div": "\u00f7", - r"\neg": "\u00ac", - r"\ast": "\u2217", - r"\star": "\u22c6", - r"\sqrt": "\u221a", - r"\cuberoot": "\u221b", - r"\forthroot": "\u221c", - r"\infty": "\u221e", - r"\sum": "\u2211", - r"\prod": "\u220f", - r"\int": "\u222b", - r"\vedge": "\u2227", - r"\vee": "\u2228", - r"\cap": "\u2229", - r"\cup": "\u222a", - r"\prime": "\u2032", - r"\dprime": "\u2033", - r"\tprime": "\u2034", - r"\forall": "\u2200", - r"\complement": "\u2201", - r"\exists": "\u2203", - r"\nexists": "\u2204", - r"\nothing": "\u2205", - r"\varnothing": "\u2205", - r"\top": "\u22a4", - r"\bot": "\u22a5", - r"\in": "\u2208", - r"\notin": "\u2209", - r"\ni": "\u220b", - r"\nni": "\u220c", - r"\subset": "\u2282", - r"\supset": "\u2283", - r"\nsubset": "\u2284", - r"\nsupset": "\u2285", - r"\diameter": "\u2300", - r"\propto": "\u221d", - r"\mid": "\u2223", - r"\sim": "\u223c", - r"\approx": "\u2248", - r"\equiv": "\u2261", - r"\nequiv": "\u2262", - r"\leq": "\u2264", - r"\geq": "\u2265", - r"\ll": "\u226a", - r"\gg": "\u226b", - r"\leftarrow": "\u2190", - r"\rightarrow": "\u2192", - r"\leftrightarrow": "\u2194", - r"\Leftarrow": "\u21d0", - r"\Rightarrow": "\u21d2", - r"\Leftrightarrow": "\u21d4", - r"\hslash": "\u210f", - r"\alpha": "\u03b1", - r"\beta": "\u03b2", - r"\gamma": "\u03b3", - r"\delta": "\u03b4", - r"\epsilon": "\u03b5", - r"\zeta": "\u03b6", - r"\eta": "\u03b7", - r"\theta": "\u03b8", - r"\iota": "\u03b9", - r"\kappa": "\u03ba", - r"\lambda": "\u03bb", - r"\mu": "\u03bc", - r"\nu": "\u03bd", - r"\xi": "\u03be", - r"\omicron": "\u03bf", - r"\pi": "\u03c0", - r"\rho": "\u03c1", - r"\sigma": "\u03c3", - r"\tau": "\u03c4", - r"\upsilon": "\u03c5", - r"\phi": "\u03c6", - r"\chi": "\u03c7", - r"\psi": "\u03c8", - r"\omega": "\u03c9", - r"\Gamma": "\u0393", - r"\Delta": "\u0394", - r"\Theta": "\u0398", - r"\Lambda": "\u039b", - r"\Xi": "\u039e", - r"\Pi": "\u03a0", - r"\Sigma": "\u03a3", - r"\Upsilon": "\u03a5", - r"\Phi": "\u03a6", - r"\Psi": "\u03a8", - r"\Omega": "\u03a9", - r"\AA{}": "\u00c5", - r"\euro": "\u20ac", - } - # Strip of inline equations - sub1 = re.sub(r"\\?\\\((.*?)\\?\\\)", r"\1", latex) - # Convert subscripts and superscripts - sub2 = re.sub(r"([_^])((\{([-+]?[0-9]+)\})|([-+]?[0-9]+))", fscript, sub1) - # Convert latex symbols - for k, v in subs.items(): - sub2 = sub2.replace(rf"\{k}", v) - sub2 = sub2.replace(k, v) - # Strip off \frac - sub3 = re.sub(r"\\frac\{([^}]*)\}\{([^}]*)\}", r"(\1)/(\2)", sub2) - # Strip off remaining latex macros - sub4 = re.sub(r"\\[a-zA-Z]+\{['`]?([^}]+?)['`]?\}", r"`\1`", sub3) - return sub4.replace(r"\'", "'").replace(r" \\; ", " ").replace(r"\\(", "").replace(r"^\\circ", "\u00b0") - - -def htmlstrip(s): - """Strip off html tags in string `s`.""" - return re.sub("<[^>]+>", "", s).replace(""", '"') - - -def remove_python_name(onto): - """Strip off all uses of owlr:python_name from ontology.""" - storid = onto._abbreviate( - "http://www.lesfleursdunormal.fr/static/_downloads/" - "owlready_ontology.owl#python_name" - ) - for s, p, o, d in onto._get_triples_spod_spod(None, 2, None): - if d is None: - onto._del_obj_triple_spo(s, p, o) - else: - onto._del_data_triple_spod(s, p, o, d) - - -def set_turtle_prefix(filename, prefix, base=None): - """Set/overwrite @prefix in top of a turtle file. Optionally, also set @base.""" - with open(filename, "rt", encoding="utf-8") as f: - lines = f.readlines() - - prefix1 = base1 = None - for i in range(len(lines)): # pylint: disable=consider-using-enumerate - line = lines[i] - if not line.startswith("@"): - break - match = re.match(r"^@prefix\s*:\s*<(.*)>", line) - if match: - prefix1 = match.groups()[0] - lines.pop(i) - if base is not None: - match = re.match(r"^@base\s*<(.*)>", line) - if match: - base1 = match.groups()[0] - lines.pop(i) - - with open(filename, "wt", encoding="utf-8") as f: - if prefix: - f.write(f"@prefix : <{prefix}> .\n") - elif prefix is None and prefix1: - f.write(f"@prefix : <{prefix1}> .\n") - for line in lines: - if not line.startswith("@"): - break - f.write(line) - if base: - f.write(f"@base <{base}> .\n") - elif base is None and base1: - f.write(f"@base <{base1}> .\n") - for line in lines[i:]: - f.write(line) - - -def replace(filename, replacements): - """For the given filename, replace each occurence of `replacements` - keys with corresponding values. - - """ - with open(filename, "rt", encoding="utf-8") as f: - lines = f.readlines() - - with open(filename, "wt", encoding="utf-8") as f: - for line in lines: - for k, v in replacements.items(): - line = re.sub(k, v, line) - f.write(line) - - -def get_metricprefix_value(prefix): - """Returns the numerical value of a metric prefix.""" - onto = prefix.namespace.ontology - for r in prefix.is_a: - if (isinstance(r, owlready2.Restriction) and - r.property == onto.hasNumericalValue): - return r.value - raise TypeError(f"not a metric prefix: {prefix}") - - -def get_siconversion_multiplier(unit): - """Returns the SI conversion multiplier of the given unit.""" - onto = unit.namespace.ontology - for r in unit.is_a: - if (isinstance(r, owlready2.Restriction) and - r.property == onto.hasSIConversionMultiplier): - return r.value - if unit in onto.SIBaseUnit.disjoint_unions[0] + onto.SISpecialUnit.disjoint_unions[0]: - return 1.0 - raise TypeError(f"missing SI conversion multiplier: {unit}") - - -def get_siconversion_offset(unit): - """Returns the SI conversion offset of the given unit.""" - onto = unit.namespace.ontology - for r in unit.is_a: - if (isinstance(r, owlready2.Restriction) and - r.property == onto.hasSIConversionOffset): - return r.value - if unit in onto.SIBaseUnit.disjoint_unions[0] + onto.SISpecialUnit.disjoint_unions[0]: - return 0.0 - raise TypeError(f"missing SI conversion offset: {unit}") - - -def has_siconversion_multiplier(unit): - """Returns whether a a SI conversion multiplier is defined for the unit.""" - onto = unit.namespace.ontology - for r in unit.is_a: - if (isinstance(r, owlready2.Restriction) and - r.property == onto.hasSIConversionMultiplier): - return True - return False - - -def has_siconversion_offset(unit): - """Returns whether a a SI conversion offset is defined for the unit.""" - onto = unit.namespace.ontology - for r in unit.is_a: - if (isinstance(r, owlready2.Restriction) and - r.property == onto.hasSIConversionOffset): - return True - return False - - -def add_is_a(cls, r): - """Add restriction `r` to class `cls` (if it doesn't already exists).""" - if r not in cls.is_a: - cls.is_a.append(r) - - -def has_is_a(cls, r): - """Returns whether given restriction or property is in the is_a list..""" - if isinstance(r, owlready2.Restriction): - return r in cls.is_a - - for t in cls.is_a: - if isinstance(t, owlready2.Restriction): - if t.property == r: - return True - - return False - - -def del_is_a(cls, r): - """Remove restriction `r` from class `cls` (if it exists).""" - while r in cls.is_a: - cls.is_a.remove(r) diff --git a/scripts/fixes.sh b/scripts/fixes.sh deleted file mode 100644 index fc947be2..00000000 --- a/scripts/fixes.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -for i in $(find . -name "*ttl"); -do - # Convert the IRI with the format EMMO_hex-hex-hex-hex-hex. - sed -i -E 's/EMMO_([0-9a-f]+)-([0-9a-f]+)-([0-9a-f]+)-([0-9a-f]+)-([0-9a-f]+)/EMMO_\1_\2_\3_\4_\5/g' "$i"; - # Convert the IRI without the EMMO_ prefix. - sed -i -E 's/:([0-9a-f]+)_([0-9a-f]+)_([0-9a-f]+)_([0-9a-f]+)_([0-9a-f]+)/:EMMO_\1_\2_\3_\4_\5/g' "$i"; - # Convert the IRI with the format