In the default configuration, KIM comes with a working gazetteer, which loads its dictionaries using a SPARQL query over our RDF data. In the general case, making the gazetteer use the new entities is just a matter of changing the query, contained in KIM/config/query.txt . The DBpedia case, however, is a little bit more complex, due to the complexity of the ontology (rich vertical structure). Therefore, we suggest that you setup a new gazetteer for each major class of objects you want to recognize.
First, construct the query to load the gazetteer lists:
It will return a list of all instances of class protont:Person and its subclasses. The dbpedia:Person is its subclass, so it will be included in the results. The only requirement for the query is to return the label, the instance URI and the class URI, in this order.
When you create the query, you can use some tools to see the actual results that will be loaded in the gazetteer dictionary. Such tools are JVisualVM with the JConsole extension. Or a simple web service call like the one we describe in the documentation:
http://www.ontotext.com/kim/getting-started/documentation (WSAPI section)
Create the folder }KIM/context/default/resources/gazetteer/dbpedia-person and put the query in a file named query.txt there.
Clear the caches.
Whenever you make some changes that concern the ontology, you should remove the OWLIM image by deleting KIM/context/default/populated. When you start KIM again, it will generate a fresh image.