Labels are very important for entity recognition in text. The KIM data model relies on the use of the properties rdfs:label and protons:mainLabel. Therefore, we advise you to set meaningful values for rdfs:label and protons:mainLabel for each instance.
But first, configure the property ENTITY_DESCR in KIM/config/install.properties.
The ENTITY_DESCR property determines the way the semantic repository stores the entity labels. It can be set to - aliases or labels. Using labels is generally the preferred approach. It is simpler and more efficient. Aliases is used in more complex cases, where you need to also keep metadata for the specific labels. Therefore, make sure this property is set to Labels.
After that, look at dbpedia_instances.nt. You can see that all instance labels are defined with the predicate foaf:name . Create an rdfs:label statement for each foaf:name statement. You can do this in several ways.
- Use inference rules to create the new statements, if you see a pattern. The rule will exist in the OWLIM inference rules definitions in KIM/context/default/kb/KIMRules.pie and this is how it will look like:
- tell OWLIM that foaf:name and rdfs:label are the same:
This will cause OWLIM to create rdfs:label statement for every foaf:name statement and vice versa.
- In general it is recommended to use explicit statements. So create a file with explicit labels definitions called dbpedia_labels.n3 and put it in the dbpedia folder. Update the definitions in KIM/config/owlim.ttl.
Finally what you have to consider is the protons:mainLabel. It serves as a primary representation aspect of an entity in the graphical interface. The protons:mainLabel is actually a sub-property of rdfs:label. Therefore, a property rdfs:label will be added to every protons:mainLabel.
Define the protons:mainLabel for each instance in the ontology:
Put the definitions in the dbpedia folder in a file called dbpedia_main_labels.n3 and add the file to the list of definitions in KIM/config/owlim.ttl.
Now you come to the stage where you incorporate DBpedia in the default KIM IE pipeline, and make the pipeline aware of the knowledge base for this new mapped ontology.