API4KP Ontology of Languages
type: Ontology
abstract: This ontology focuses on the definition of languages and grammars relevant to API4KP, including but not limited to natural languages.
contributor: Elisa Kendall (ekendall at thematix.com)
creator: Davide Sottara (sottara.davide at mayo.edu)
license: http://opensource.org/licenses/MIT
imports: api4kp-series
imports: api4kp
imports: AnnotationVocabulary
imports: Collections
imports: DOL-terms
imports: LanguageRepresentation
version IRI: api4kp-lang
change note: The https://www.omg.org/spec/API4KP/20210201/api4kp-lang.rdf version of this ontology was modified to leverage the Commons Ontology Library (API4KP-22), including replacement of references to Specification Metadata and references to LCC with the Commons Annotation Vocabulary and other Commons ontologies, to reduce the dependency on DOL as appropriate, and to address inconsistencies in the representation of linguistic entities (API4KP-29).
copyright: Copyright (c) 2014-2023 Athan Services
copyright: Copyright (c) 2014-2023 Fraunhofer Gesellschaft
copyright: Copyright (c) 2014-2023 Freie Universität Berlin
copyright: Copyright (c) 2014-2023 Mayo Foundation for Medical Education and Research (MFMER)
copyright: Copyright (c) 2014-2023 Raytheon Technologies
copyright: Copyright (c) 2014-2023 Thematix Partners LLC
copyright: Copyright (c) 2015-2023 Object Management Group, Inc.
copyright: Copyright (c) 2019-2023 Universität Leipzig
copyright: Copyright (c) 2020-2023 Micro Focus

formal language
type: Class
subclass of: constructed language
equivalent class: Class
  intersection of: constructed language
  intersection of: Restriction
    on property: specifiedBy
    some values from: formal grammar

abstract semantic graph
type: Class
subclass of: Graph
subclass of: parsing structure
subclass of: Restriction
  on property: conveysFormalStructure
  some values from: KnowledgeAsset
definition: graph-based parsing structure that formalizes an expression based on the semantics of its information content
scope note: ASGs are the expressions that are closest to a knowledge asset, which otherwise cannot be shared without involving some language
synonym: ASG

abstract syntax
type: Class
subclass of: formal grammar
source: https://www.omg.org/spec/ASTM/About-ASTM/
disjoint with: serialization
definition: a formal grammar that includes some and only rules that have a direct impact on the semantics of the conformant sentences
note: In computer science, abstract syntaxes are used to construct Parsers
scope note: DOL's 'abstract syntax' is an alias of api4kp's machine-interpretable language, i.e. a language that is specified by some expression of an abstract syntax in the api4kp's sense

abstract syntax tree
type: Class
subclass of: parsing structure
subclass of: Restriction
  on property: formalizes
  some values from: AbstractKnowledgeExpression
subclass of: Restriction
  on property: dependsOn
  some values from: abstract syntax
synonym: AST
synonym: tree-based parsing structure that formalizes an expression according to the rules of an abstract syntax

alphabet
type: Class
subclass of: Arrangement
subclass of: Collection
definition: set of graphemes used to construct symbols, terms and sentences in a language
scope note: not limited to written languages - in fact, includes musical alphabets and pictorial alphabets

annotation language
type: Class
subclass of: dedicated language
subclass of: machine-readable language
definition: formal language dedicated to the expression of annotation

binary stream
type: Class
subclass of: symbol sequence
subclass of: Restriction
  on property: formalizes
  some values from: EncodedKnowledgeExpression
definition: sequence of symbols such that the only symbols are '0' and '1'

concrete syntax tree
type: Class
subclass of: parsing structure
subclass of: Restriction
  on property: formalizes
  some values from: ConcreteKnowledgeExpression
subclass of: Restriction
  on property: dependsOn
  some values from: serialization
definition: tree-based parsing structure that formalizes a concrete expression according to the rules of a concrete syntax
synonym: parse tree

constructed language
type: Class
subclass of: Language
subclass of: Restriction
  on property: has grammar
  some values from: prescriptive grammar
note: constructed languages are the product of explcit design, rather than natural evolution

controlled natural language
type: Class
subclass of: constructed language
definition: constructed language that approximates some natural language while reducing and/or eliminating complexities and ambiguities

dedicated language
type: Class
subclass of: formal language
definition: formal language designed to have language aspects used to express specific kinds of knowledge assets

descriptive grammar
type: Class
subclass of: grammar
source: https://en.wikipedia.org/wiki/Linguistic_description
definition: grammar that describes how a language is actually used

descriptive markup language
type: Class
subclass of: markup language
definition: markup language used to (re)assert the semantics of sentences in the embedded language

encoding
type: Class
subclass of: Arrangement
definition: system for the encoding elements of an alphabet using a second alphabet
example: a ZIP compression
example: the ASCII encoding of basic western alphabet characters using 7 bit binary symbols
example: the trivial encoding that preserves the original symbols

expression language
type: Class
subclass of: dedicated language
subclass of: knowledge representation and reasoning language
definition: formal language designed to express functions
note: several machine executable languages either have or embed a sub-language that is an expression language

formal grammar
type: Class
subclass of: prescriptive grammar
subclass of: ConstructiveDefinition
subclass of: Restriction
  on property: defines
  some values from: Language
definition: prescriptive grammar that consists in a collection of (production) rules that define, intensionally, all and only the possible sentences of a language
scope note: one may distinguish between formal grammar - grammars that allow to recognize if a sentence is part of the language - and generative grammars - grammars with rules that allow to construct new sentences
synonym: generative grammar

grammar
type: Class
subclass of: KnowledgeAsset
definition: set of rules and constraints that allow to recognize and/or construct the valid sentences of a language

grammar specification
type: Class
subclass of: Specification
subclass of: Restriction
  on property: expresses
  some values from: grammar
equivalent class: Class
  intersection of: Specification
  intersection of: Restriction
    on property: specifies
    some values from: grammar
definition: specification of a grammar, itself expressed in some (meta)language
example: The Java 1.8 grammar, expressed using the ANTLRv4 metalanguage, available at https://github.com/antlr/grammars-v4/tree/master/java/java8
note: Syntaxes are 'reconstructed' from natural languages, but 'designed' in the case of constructed languages

island grammar
type: Class
subclass of: grammar
definition: grammar that is proper part of another grammar
note: island grammars define languages embedded in other languages

knowledge representation and reasoning language
type: Class
subclass of: machine-executable language
subclass of: Restriction
  on property:
    inverse of: usesLanguage
  some values from: KnowledgeExpression
definition: machine executable language used in knowledge expressions, to express works of knowledge
example: Prolog

language schema
type: Class
subclass of: grammar specification
subclass of: Restriction
  on property: usesLanguage
  some values from: schema language
definition: grammar specification that is expressed using a schema language
example: The schema of the "Decision Modeling and Notation Language v1.2", available at https://www.omg.org/spec/DMN/20180521/DMN12.xsd, expressed using the XML Schema Definition Language

lexical entry
type: Class
subclass of: KnowledgeExpression
definition: unit of analysis of a lexicon that consists of a set of forms that are grammatically related and a set of base meanings that are associated with all of these forms
note: A lexical entry is a word, multiword expression or affix with a single part-of-speech, morphological pattern, etymology and set of senses.

lexicon
type: Class
subclass of: Arrangement
subclass of: Collection
source: https://en.wikipedia.org/wiki/Lexicon
equivalent class: Class
  intersection of: Arrangement
  intersection of: Restriction
    on property: hasMember
    some values from: lexical entry
definition: complete set of the meaningful atomic signs that are or can be used in a language
scope note: TODO: In DOL, signatures are 'set of symbols', but are treated as 'mathematical' rather than 'linguistic' entities (i.e. concepts vs terms).

machine-executable language
type: Class
subclass of: machine-readable language
definition: machine-readable language equipped with semantics that allows to drive the behavior of a software agent
note: (expressions in) languages of this kind can be interpreted or compiled into the native language of the underlying machine - virtual or physical

machine-readable language
type: Class
equivalent class: Class
  intersection of: formal language
  intersection of: Restriction
    on property: has grammar
    some values from: serialization
definition: formal language that has a concrete syntax which allows a software agent to parse and serialize expressions in that language

markup language
type: Class
subclass of: machine-readable language
subclass of: Restriction
  on property: supports embedded language
  some values from: Language
source: https://www.merriam-webster.com/dictionary/markup%20language
definition: machine-readable language that embeds another language, impacting the processing but not the semantics of that language

metaformat
type: Class
subclass of: serialization
definition: concrete syntax that consists primarily of structural rules

meta-format serializable language
type: Class
subclass of: machine-readable language
equivalent class: Class
  intersection of: machine-readable language
  intersection of: Restriction
    on property: has grammar
    some values from: Class
      intersection of: serialization
      intersection of: Restriction
        on property: dependsOn
        some values from: metaformat
definition: machine readable, serializable language that has at least one concrete syntax that is based on a meta-format
example: any language that supports an XML based serialization, such as BPMN or RuleML

meta-syntax
type: Class
subclass of: formal grammar
source: https://en.wikipedia.org/wiki/Metasyntax
definition: formal grammar used to define languages that are used in the expression of formal grammars
example: The ANTLR meta-grammar
example: The Backus Naur Form

ontology language
type: Class
subclass of: OMSLanguage
subclass of: dedicated language
definition: formal language dedicated to the expression of ontologies and assertional knowledge bases

parsing structure
type: Class
subclass of: LinguisticEntity
subclass of: Restriction
  on property: conveysFormalStructure
  some values from: LinguisticEntity
subclass of: Restriction
  on property: dependsOn
  some values from: formal grammar
definition: an internal representation that formalizes an agent's perception of the structure of some expression, according to the rules of some grammar
note: parsing structures are the (intermediary) product of lifting operations
scope note: being mainly used for internal computation, parsing structures themselves are most often ASGs whose edges and nodes represent the structure of the target expression according to the grammatical rules. Nevertheless, parsing structures themselves could be materialized using an appropriate meta-language

prescriptive grammar
type: Class
subclass of: grammar
source: https://en.wikipedia.org/wiki/Linguistic_prescription
definition: grammar that specificies how a language should be used correctly

presentational markup language
type: Class
subclass of: markup language
definition: markup language that drives the manifestation of expressions in the embedded language

procedural markup language
type: Class
subclass of: markup language
definition: markup language that is imperative in nature

programming language
type: Class
subclass of: dedicated language
subclass of: machine-executable language
definition: formal, executable language used in the specification of information processing tasks
note: from a knowledge representation perspective, programming languages are designed to express algorithms
note: programming languages are usually imperative

rule language
type: Class
subclass of: OMSLanguage
subclass of: dedicated language
definition: formal language dedicated to the expression of rules, norms and policies
note: rule languages can be further categorized depending on the nature of the rules they can express (e.g. production, vs inference, vs deontic, etc...)

schema language
type: Class
subclass of: dedicated language
subclass of: knowledge representation and reasoning language
definition: formal language used in the specification of (formal) grammars, schemas and metamodels
scope note: the term is broader than the common denotation of '(XML) schema language'

serialization
type: Class
subclass of: formal grammar
subclass of: Restriction
  on property: concretizes
  some values from: abstract syntax
definition: formal grammar that includes at least one rule that impacts the structural aspects of the conformant sentences, but not the semantics
note: In computer science, abstract syntaxes are used to construct Parsers and Lexers
synonym: concrete syntax

structural markup language
type: Class
subclass of: markup language
definition: markup language used to define the structure of expressions in the embedded language, making them decomposable

symbol sequence
type: Class
subclass of: parsing structure
definition: sequence of symbols reconstructed from the inscriptions on an artifact

token sequence
type: Class
subclass of: symbol sequence
subclass of: Restriction
  on property: formalizes
  some values from: SerializedKnowledgeExpression
definition: sequence of characters that can be segmented into atomic groups with recognizable type, function and/or interpretation (lexemes or tokens)

concretizes
type: ObjectProperty
sub property of: isLinguisticallyRelatedTo
domain: serialization
range: abstract syntax
definition: provides the rules to serialize ASTs of a given language into forms that can be engraved on carrier artifacts

has delegate sublanguage
type: ObjectProperty
sub property of: has sublanguage
definition: has a sublanguage that supports aspects that would not otherwise be supported by this language

has grammar
type: ObjectProperty
sub property of: hasArrangement
domain: Language
range: grammar
definition: has an extension set of valid sentences that is defined by the rule of the target grammar

has sublanguage
type: ObjectProperty
sub property of: isLinguisticallyRelatedTo
sub property of: hasPart
domain: Language
range: Language
definition: has a grammar with an identifiable, closed subset of rules that define the target sub-language

has wordstock
type: ObjectProperty
domain: Language
range: lexicon
definition: has a set of linguistic elements that can be formed into valid sentences of the language according to the language's grammar

serializes
type: ObjectProperty
sub property of: isLinguisticallyRelatedTo
domain: serialization
range: Language
definition: provides syntactical rules to manifest sentences of the target language in forms that can be engraved on a carrier

supports embedded language
type: ObjectProperty
sub property of: isLinguisticallyRelatedTo
domain: Language
range: Language
definition: allows expressions in the target language to be part of expressions in this language

supports format
type: ObjectProperty
sub property of: isLinguisticallyRelatedTo
sub property of: has grammar
domain: Language
range: metaformat
definition: supports a serialization that 'relies on the rules of' (=uses) the given meta-format to arrange its terms

supports serialization
type: ObjectProperty
sub property of: has grammar
domain: Language
range: serialization
definition: comprises expressions that can be arranged according to the given concrete syntax

supports syntax
type: ObjectProperty
sub property of: has grammar
domain: Language
range: abstract syntax
definition: can be formalized according to the rules of the target abstract syntax
note: it is quite rare, but not impossible, for a language to have two distinct but isomorphic (abstract) grammars
scope note: if a language L supports a syntax S, and S is concretized by a concrete syntax C, then L supports serialization C

syntactically conforms
type: ObjectProperty
sub property of: isLinguisticallyRelatedTo
range: grammar
definition: follows the rules of, and thus is valid according to, some grammar

uses alphabet
type: ObjectProperty
sub property of: isLinguisticallyRelatedTo
range: alphabet
definition: contains symbols drawn from a given alphabet
synonym: uses character set

uses as annotation language
type: ObjectProperty
sub property of: usesLanguage
domain: KnowledgeExpression
range: Language
definition: contains expression fragments that are annotations, and use an annotation language as primary language

uses encoding
type: ObjectProperty
sub property of: isLinguisticallyRelatedTo
range: encoding
definition: contains symbols encoded using a given encoding scheme

uses format
type: ObjectProperty
sub property of: isLinguisticallyRelatedTo
definition: uses a serialization that depends on the target meta-format

uses lexicon
type: ObjectProperty
sub property of: isLinguisticallyRelatedTo
range: lexicon
property chain axiom: usesLanguage
property chain axiom: has wordstock
definition: uses terms that are defined (linguistically and semantically) in the target lexicon

uses as primary language
type: ObjectProperty
sub property of: usesLanguage
domain: KnowledgeExpression
range: Language
definition: is or contains an expression that, when parsed, results in a (forest of) AST, and (at least one of) the AST is structured according to the syntax of the target language
scope note: the primary language of an expression E can be a named language L, or a refinement/extension of a named language that embeds some other language S, in which case E uses S as a sub-language

uses profile
type: ObjectProperty
sub property of: usesLanguage
definition: is or contains an expression that is valid according to the rules of a given language profile

uses serialization
type: ObjectProperty
sub property of: syntactically conforms
definition: is or contains a concrete expression that is concretized according to the rules of a given concrete syntax
note: if a resource uses a serialization of a given language, that resource must be consistent with using that language

uses as sub-language
type: ObjectProperty
sub property of: usesLanguage
domain: KnowledgeExpression
range: Language
definition: contains an expression in the target language that is proper part of an expression in a different language
scope note: If a language L embeds another language S, every expression in L can potentially contain fragments in S (e.g. DMN vs FEEL). In other words, if an expression in L embeds a fragment in S, there exist at least one expression in L that uses S as a sub-language.

Language
type: Class
subclass of: Restriction
  on property: has grammar
  some values from: grammar
subclass of: Restriction
  on property: has wordstock
  some values from: lexicon
example: Contemporary Italian, as of 2017, as established by the Italian 'Accademia della Crusca'
example: The 2nd officially released version of the Ontology Web Language
note: The extension of a language is the class of sentences that is defined by the grammar of the language, using the supported lexicon/a
scope note: in API4KP languages are knowledge, to the extent that they can be learned and used by agents