Writing Mappings/Templates: Difference between revisions

From DBpedia Mappings
Jump to navigationJump to search
(Created page with '== Template to Ontology Mapping Language == When mapping a Wikipedia template to an ontology class and mapping template properties to ontology properties for this template, user...')
 
(Redirected page to How to edit DBpedia Mappings)
 
(28 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== Template to Ontology Mapping Language ==
#REDIRECT [[How to edit DBpedia Mappings]]
 
When mapping a Wikipedia template to an ontology class and mapping template properties to ontology properties for this template, users will have to edit the corresponding template documentation page in MediaWiki.
 
The following templates cover the template to ontology schema mapping:
# TemplateMapping Mapping from Wikipedia templates to ontology classes.
# PropertyMapping Mapping from Wikipedia template properties to ontology properties.
# IntermediateNodeMapping For extracting multiple values from a single property it is necessary to introduce an intermediate node. The IntermediateNodeMapping allows to express mappings from Wikipedia template properties to ontology properties on an additional node and to connect the additional node to the mapped instance.
# CustomMapping To cover specific, more complex mapping cases, the DBpedia extraction framework can be extended with custom parsers which have to implement a specific PHP interface. These parsers invoked using custom mappings.
 
 
=== Template Mapping ===
 
The TemplateMapping template offers the following template parameters:
# mapToClass Templates are mapped to ontology classes. The template parameter mapToClass allows one DBpedia ontology class as a value.
# correspondingClass, correspondingProperty In the case that different templates are used on the same page (for instance Automobile and Automobile Generation), the instance resulting from the second grade template (Automobile Generation) can be connected to the instance of the first grade template (Automobile) using a corresponding property. Thus, if an instance of type correspondingClass is found on the same page, it will be connected to the instances of the mapped template by correspondingProperty.
# mappings Mappings map template properties to ontology properties, they have to be defined by using PropertyMapping or IntermediateNodeMapping. Custom, user-defined, mappings like the GeocoordinatesMapping can also be defined.
 
 
=== Property Mapping ===
 
The PropertyMapping template offers the following template parameters:
# ontologyProperty A template property to ontology property mapping should list one ontology property.
# templateProperty A template property to ontology property mapping should list one template property which is to be mapped.
# unit If a template property containing a numerical value and a unit is mapped, the unit has to be defined. If a template property has no default unit defined, e.g. its values can contain different units of the same dimension, the dimension has to be defined for usability as well as validation reasons. Possible dimensions are Length or Mass.
 
 
=== Intermediate Node Mapping ===
 
The IntermediateNodeMapping template offers the following template parameters:
# nodeClass, ontologyProperty Creates an additional node of the type nodeClass, which will be connected to the instance extracted from template by the property provided by ontologyProperty.
# mappings Mappings map template properties to ontology properties, they have to be defined by using PropertyMapping, IntermediateNodeMapping, or a CustomMapping.
 
 
=== Custom Mappings ===
 
For specific tasks, such as extracting durations or calculating a geo-location-ID based on multiple properties, we allow the DBpedia extraction framework to be extended with custom value parsers and allow the definition of DBpedia custom mapping templates. The name of a custom mapping template has to be equal to the name of the corresponding DBpedia parser class.
As examples of custom mapping, we define the DateIntervalMapping and the GeocoordinatesMapping.
 
The DateIntervalMapping template provides an exact mapping from start and end dates of a template property value to ontology properties. It offers the following template parameters:
# templateProperty
# startDateOntologyProperty
# endDateOntologyProperty
 
The GeocoordinatesMapping template offers the following template parameters:
# coordinates
 
# latitude
# longitude
 
# latitudeDirection
# latitudeDegrees
# latitudeMinutes
# latitudeSeconds
# longitudeDirection
# longitudeDegrees
# longitudeMinutes
# longitudeSeconds
 
# ontologyProperty

Latest revision as of 12:09, 7 July 2011