Hi Minh Hoang, What types are the annotations depends on several resources.
First the gazetteer matches the objects and creates Lookup annotations. What phrases are filled in the gazetteer's dictionary depends on the query it executes to the semantic repository (Owlim). The default query is: select LA, I, DC from ( {TI} rdf:type {<http://proton.semanticweb.org/2006/05/protons#Trusted>}, {I} <http://proton.semanticweb.org/2006/05/protons#generatedBy> {TI}, {I} rdf:type {<http://proton.semanticweb.org/2006/05/protons#Entity>}, {I} serql:directType {DC}, {I} <http://proton.semanticweb.org/2006/05/protons#hasAlias> {} rdfs:label {LA}; [<http://www.ontotext.com/kim/2006/05/kimlo#ignoredAlias> {IG}] ) UNION ( {I} <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> {<http://www.ontotext.com/kim/2006/05/kimlo#NERLexica>}, {I} serql:directType {DC}, {I} <http://www.w3.org/2000/01/rdf-schema#label> {LA} ) WHERE IG = NULL AND isLiteral(LA) AND DC != <http://proton.semanticweb.org/2006/05/protont#JobPosition> AND NOT LA = "" It can be overwritten by providing a query.txt file containing either a SERQL or SPARQL query in the config/ folder of the KIM installation. Executing this query directly will show you what will be filled in the dictionaries and what ontology class will be associated with the newly created Lookup annotation. This line from the query: {I} serql:directType {DC}, stands to say, that we want only the direct type of the entity, and not the inferred types. If we used rdf:type, then the gazetteer will create additional Lookup for each inferred type also, because they will be in the result of the query. So what type will be associated with the lookup you can control by changing the query and you can check by executing the query. This is the first step. The other is to create a jape rule that actually transforms the Lookup annotation with this class to an annotation of a specific type. Like Lookup with type protont:Person to a Person annotation. An important thing to note is that in order for this annotation to stay, it must be included in the whitelist of entity annotation in KIM/nerc.properties in the property - com.ontotext.kim.KIMConstants.IE_ANN_TYPES . Another thing to have in mind: when the query for the gazetteer is changed, the already generated dictionary should be cleared, in order for it to be generated again. You can check where is the cache by checking the staticDictSerializationPath property of the LKB Gazetteer gate resource. In the default KIM installation it is in KIM/context/default/populated/cache. So deleting this folder and running the server again will cause the dictionaries to be regenerated. Hope this helps, Philip Alexiev Software Engineer, KIM team On 21 Mar 2012, at 4:25 PM, Minh Hoang wrote: > Hi all, > > I'm new to KIM platform. i have folowed KimDocs-3.0-EN to merge my ontology > (euro ontology) with protont. euro ontology has some class that i am not sure > to set subclass with any class in proton. KimDoc said that i should sub-class > with protons:Entity. but i am not sure it right because KIM alway annotate > with wrong class (for example: Rooney->person, but in euro ontology Rooney > must be a player). so this is my question: > What happen if i sub-class to protons:Entity with all of class in euro > ontology?is this a reason to make KIM annotating with wrong class?if not, > tell me how to make it true? > > p/s : sorry for some wrong english :) > _______________________________________________ > Kim-discussion mailing list > Kim-discussion@ontotext.com > http://ontomail.semdata.org/cgi-bin/mailman/listinfo/kim-discussion
_______________________________________________ Kim-discussion mailing list Kim-discussion@ontotext.com http://ontomail.semdata.org/cgi-bin/mailman/listinfo/kim-discussion