Re: [Kim-discussion] Extend proton ontology
Hi Srecko, The best way to check what will be filled in the gazetteer dictionary is to run the KIM server and use JVisualVM to execute the gazetteer query against it. If you give more context, I can provide some more concrete guidelines. What is the ontology you are using. What are the concepts you want to recognize. All the best Philip On 2 Jul 2011, at 2:27 PM, Srecko Joksimovic wrote: I’m sorry, I forgot to attach screenshot in last email. Just in case, I’m sending it again. Hi Philip! I was out of work for few days, but now I have new question. I'm reading Customizing KIM3.pdf, step by step. As a result, I got this: image001.png As you can see, everything is there. Even Topic. Topic is class that I added. But, looks like there is no annotations for Topic. Could it maybe be because of query? prefix rdfs: http://www.w3.org/2000/01/rdf- -schema# prefix protont: http://proton.semanticweb.org/2006/05/protont# PREFIX protons: http://proton.semanticweb.org/2006/05/protons# SELECT ?entity ?cl WHERE { ?entity a ?cl ; protons:generatedBy http://www.lornet.org/acm-ccs/proton#TrustedSrc . ?cl rdfs:subClassOf protont:Topic . OPTIONAL { ?sc rdfs:subClassOf ?cl. ?entity a ?sc . filter(?cl != ?sc) } filter (!bound(?sc) isURI (?cl)) } I know that it could be anything. But I created Large KB Gazetter (TopicLKBGazetter), added to pipeline, and as you can see, it is there. If you have any idea, please let me know. I will try few more things. Best, Srecko Screenshot.pngquery.txt___ Kim-discussion mailing list Kim-discussion@ontotext.com http://ontotext.com/mailman/listinfo/kim-discussion ___ Kim-discussion mailing list Kim-discussion@ontotext.com http://ontotext.com/mailman/listinfo/kim-discussion
Re: [Kim-discussion] Extend proton ontology
Hi Srecko, Have you run the KIM server? Is it on your local machine? Are you accessing it through a proxy ? best, philip On 28 Jun 2011, at 5:18 PM, Srecko Joksimovic wrote: Hi Philip, Yes I have. It is exactly same as in your screenshot. When I select MBeans, all I see is this message: Data not available because JMX connection to the JMX agent could not be established. Maybe I should do something to enable this JMX agent? Best, Srecko -Original Message- From: Philip Alexiev @ Ontotext [mailto:philip.alex...@gmail.com] Sent: Tuesday, June 28, 2011 12:32 To: srecko joksimovic Cc: kim-discussion@ontotext.com mailing-list Subject: Re: [Kim-discussion] Extend proton ontology Hi Srecko Have you activated the MBeans extension in JVisualVM ? Once you do it, when you select the KIM server process, you will be able to see the list of registered MBeans and choose from them as you see in my screenshot. Hth, Philip On 28 Jun 2011, at 1:22 PM, srecko joksimovic wrote: Hi Philip, I hope that you are still wiling to help me :) I finished the first part - started KIM and installed JVisualVM. I didn't have any problem to get it up and running, but I couldn't get MBeans because of: Data not available because JMX connection to the JMX agent could not be established. I tried Add JMX Connection... and I got this message: Cannot connect to localhost:8080 using service:jmx:rmi://jndi/rmi://localhost:8080/jmxrmi I probably missed something again... could you please tell me what? ___ Kim-discussion mailing list Kim-discussion@ontotext.com http://ontotext.com/mailman/listinfo/kim-discussion ___ Kim-discussion mailing list Kim-discussion@ontotext.com http://ontotext.com/mailman/listinfo/kim-discussion ___ Kim-discussion mailing list Kim-discussion@ontotext.com http://ontotext.com/mailman/listinfo/kim-discussion
Re: [Kim-discussion] Extend proton ontology
Hello Philip, I think that I could send you a part of this file. This is what I have defined: http://www.lornet.org/acm-ccs/proton#K.7.0 a protont:Topic ; protons:generatedBy http://www.lornet.org/acm-ccs/proton#TrustedSrc ; protons:hasMainAlias http://www.lornet.org/acm-ccs/proton#Alias_756db3b5-b66b-41fe-a82e-1012f18a6672 . http://www.lornet.org/acm-ccs/proton#Alias_877dc2e2-c7cf-4188-a523-6ee9b7cbdd24 a protons:Alias ; http://www.w3.org/2000/01/rdf-schema#label Optimization@en . http://www.lornet.org/acm-ccs/proton#Alias_62107227-8c21-4ed8-99e0-bb2e4e1cb810 a protons:Alias ; http://www.w3.org/2000/01/rdf-schema#label Assistive Technologies For Persons With Disabilities@en . http://www.lornet.org/acm-ccs/proton#G.3.12 a protont:Topic ; protons:generatedBy http://www.lornet.org/acm-ccs/proton#TrustedSrc ; protons:hasMainAlias http://www.lornet.org/acm-ccs/proton#Alias_ff0e0512-f2e8-4b14-9a37-71a675dcd2eb . and many others... Could you please tell me what to do next? Best, Srecko On Wed, Jun 22, 2011 at 5:01 PM, Philip Alexiev @ Ontotext philip.alex...@gmail.com wrote: Hello Srecko, The steps are described in this guide: http://www.ontotext.com/sites/default/files/Customizing%20KIM3.pdf . Depending on the specifics of your ontology, you could map it to proton or not. If you can create a complete mapping to the proton classes, then recognizing the new concepts in the texts will be a little easier. You just need to create a statement for each new concept that it is generated by a trusted source and also point its labels. If you decide not to map to proton, then some additional steps are required . Create a new gazetteer with the query to get your concepts and their type and label. Then use a Jape Transducer and create your custom jape rules to convert the resulting Lookup annotations to some of the annotation types in KIM's whitelist. This is also described in the guide. Hope this helps. philip On 22 Jun 2011, at 5:39 PM, Srecko Joksimovic wrote: Hello everyone! ** ** I have extended Proton ontology, and created acm_proton.ttl file. This file contains my Concepts. When I annotate document, I want to see only these Concepts. I saw tutorial, I have read few posts, but I could not find the solution. I have edited kim/config/owlim.ttl file, and added new line in import section. And I also added new namespace. But when I run annotator, I do not see my Concepts. ** ** Please, I need quick help on this one. ** ** Best, - Lucky ** ** ___ Kim-discussion mailing list Kim-discussion@ontotext.com http://ontotext.com/mailman/listinfo/kim-discussion ___ Kim-discussion mailing list Kim-discussion@ontotext.com http://ontotext.com/mailman/listinfo/kim-discussion
Re: [Kim-discussion] Extend proton ontology
Hi, 1. First make sure http://www.lornet.org/acm-ccs/proton#TrustedSrc is declared as trusted. This is a statement from KIM's knowledge base: http://www.ontotext.com/kim/2006/05/wkb#Gazetteer http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://proton.semanticweb.org/2006/05/protons#Trusted . You can either use some of the existing trusted sources, or declare yours as trusted. 2. Then create a jape rule to match the Lookup annotations with class feature http://proton.semanticweb.org/2006/05/protont#Topic; and to create a Topic annotation. 3. Ad the Topic annotation type to the whitelist of annotations of KIM in KIM/config/nerc.properties in feature com.ontotext.kim.KIMConstants.IE_ANN_TYPES . 4. Delete the cache by removing the KIM/context/default/populated folder and start KIM again. You can start it with the Gate interface to check if your annotations are created. To do that run KIM/bin/kim gate . Hope this helps Philip On 22 Jun 2011, at 6:29 PM, srecko joksimovic wrote: Hello Philip, I think that I could send you a part of this file. This is what I have defined: http://www.lornet.org/acm-ccs/proton#K.7.0 a protont:Topic ; protons:generatedBy http://www.lornet.org/acm-ccs/proton#TrustedSrc ; protons:hasMainAlias http://www.lornet.org/acm-ccs/proton#Alias_756db3b5-b66b-41fe-a82e-1012f18a6672 . http://www.lornet.org/acm-ccs/proton#Alias_877dc2e2-c7cf-4188-a523-6ee9b7cbdd24 a protons:Alias ; http://www.w3.org/2000/01/rdf-schema#label Optimization@en . http://www.lornet.org/acm-ccs/proton#Alias_62107227-8c21-4ed8-99e0-bb2e4e1cb810 a protons:Alias ; http://www.w3.org/2000/01/rdf-schema#label Assistive Technologies For Persons With Disabilities@en . http://www.lornet.org/acm-ccs/proton#G.3.12 a protont:Topic ; protons:generatedBy http://www.lornet.org/acm-ccs/proton#TrustedSrc ; protons:hasMainAlias http://www.lornet.org/acm-ccs/proton#Alias_ff0e0512-f2e8-4b14-9a37-71a675dcd2eb . and many others... Could you please tell me what to do next? Best, Srecko On Wed, Jun 22, 2011 at 5:01 PM, Philip Alexiev @ Ontotext philip.alex...@gmail.com wrote: Hello Srecko, The steps are described in this guide: http://www.ontotext.com/sites/default/files/Customizing%20KIM3.pdf . Depending on the specifics of your ontology, you could map it to proton or not. If you can create a complete mapping to the proton classes, then recognizing the new concepts in the texts will be a little easier. You just need to create a statement for each new concept that it is generated by a trusted source and also point its labels. If you decide not to map to proton, then some additional steps are required . Create a new gazetteer with the query to get your concepts and their type and label. Then use a Jape Transducer and create your custom jape rules to convert the resulting Lookup annotations to some of the annotation types in KIM's whitelist. This is also described in the guide. Hope this helps. philip On 22 Jun 2011, at 5:39 PM, Srecko Joksimovic wrote: Hello everyone! I have extended Proton ontology, and created acm_proton.ttl file. This file contains my Concepts. When I annotate document, I want to see only these Concepts. I saw tutorial, I have read few posts, but I could not find the solution. I have edited kim/config/owlim.ttl file, and added new line in import section. And I also added new namespace. But when I run annotator, I do not see my Concepts. Please, I need quick help on this one. Best, - Lucky ___ Kim-discussion mailing list Kim-discussion@ontotext.com http://ontotext.com/mailman/listinfo/kim-discussion ___ Kim-discussion mailing list Kim-discussion@ontotext.com http://ontotext.com/mailman/listinfo/kim-discussion ___ Kim-discussion mailing list Kim-discussion@ontotext.com http://ontotext.com/mailman/listinfo/kim-discussion
Re: [Kim-discussion] Extend proton ontology
Hi Srecko, You state that a source is trusted by importing a statement like this in owlim: http://www.lornet.org/acm-ccs/proton#TrustedSrc http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://proton.semanticweb.org/2006/05/protons#Trusted . You can either add this to your custom RDF or you can use the already predefined trusted sources (they are defined with similar statements in KIM/context/default/kb/wkb.nt ) . You can read about JAPE in the official GATE documentation. The documentation is very comprehensive and helpful: http://gate.ac.uk/sale/tao/splitch8.html#chap:jape GATE is the semantic annotation platform KIM uses. If you want to customize the default KIM information extraction process, getting familiar with GATE will be very helpful. HTH Philip On 22 Jun 2011, at 7:32 PM, Srecko Joksimovic wrote: Hi Philip, I have one more question for now... I am beginning to doubt if I know, but let’s assume that I know how to do what you said in your last answer (point 3 and 4). I know what should JAPE rule be, and I will probably be able to do that. But how to make sure that http://www.lornet.org/acm-ccs/proton#TrustedSrc is declared as trusted? This could be funny question, but I am not sure what to do. Best, Srecko From: Srecko Joksimovic [mailto:sreckojoksimo...@gmail.com] Sent: Wednesday, June 22, 2011 5:47 PM To: 'Philip Alexiev @ Ontotext' Cc: 'kim-discussion@ontotext.com' Subject: RE: [Kim-discussion] Extend proton ontology Thank you Philip! This was a really brief answer. I will try to do what you said. Thank you again. Best, Srecko From: Philip Alexiev @ Ontotext [mailto:philip.alex...@ontotext.com] Sent: Wednesday, June 22, 2011 5:44 PM To: srecko joksimovic Cc: kim-discussion@ontotext.com Subject: Re: [Kim-discussion] Extend proton ontology Hi, 1. First make sure http://www.lornet.org/acm-ccs/proton#TrustedSrc is declared as trusted. This is a statement from KIM's knowledge base: http://www.ontotext.com/kim/2006/05/wkb#Gazetteer http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://proton.semanticweb.org/2006/05/protons#Trusted . You can either use some of the existing trusted sources, or declare yours as trusted. 2. Then create a jape rule to match the Lookup annotations with class feature http://proton.semanticweb.org/2006/05/protont#Topic; and to create a Topic annotation. 3. Ad the Topic annotation type to the whitelist of annotations of KIM in KIM/config/nerc.properties in feature com.ontotext.kim.KIMConstants.IE_ANN_TYPES . 4. Delete the cache by removing the KIM/context/default/populated folder and start KIM again. You can start it with the Gate interface to check if your annotations are created. To do that run KIM/bin/kim gate . Hope this helps Philip On 22 Jun 2011, at 6:29 PM, srecko joksimovic wrote: Hello Philip, I think that I could send you a part of this file. This is what I have defined: http://www.lornet.org/acm-ccs/proton#K.7.0 a protont:Topic ; protons:generatedBy http://www.lornet.org/acm-ccs/proton#TrustedSrc ; protons:hasMainAlias http://www.lornet.org/acm-ccs/proton#Alias_756db3b5-b66b-41fe-a82e-1012f18a6672 . http://www.lornet.org/acm-ccs/proton#Alias_877dc2e2-c7cf-4188-a523-6ee9b7cbdd24 a protons:Alias ; http://www.w3.org/2000/01/rdf-schema#label Optimization@en . http://www.lornet.org/acm-ccs/proton#Alias_62107227-8c21-4ed8-99e0-bb2e4e1cb810 a protons:Alias ; http://www.w3.org/2000/01/rdf-schema#label Assistive Technologies For Persons With Disabilities@en . http://www.lornet.org/acm-ccs/proton#G.3.12 a protont:Topic ; protons:generatedBy http://www.lornet.org/acm-ccs/proton#TrustedSrc ; protons:hasMainAlias http://www.lornet.org/acm-ccs/proton#Alias_ff0e0512-f2e8-4b14-9a37-71a675dcd2eb . and many others... Could you please tell me what to do next? Best, Srecko On Wed, Jun 22, 2011 at 5:01 PM, Philip Alexiev @ Ontotext philip.alex...@gmail.com wrote: Hello Srecko, The steps are described in this guide: http://www.ontotext.com/sites/default/files/Customizing%20KIM3.pdf . Depending on the specifics of your ontology, you could map it to proton or not. If you can create a complete mapping to the proton classes, then recognizing the new concepts in the texts will be a little easier. You just need to create a statement for each new concept that it is generated by a trusted source and also point its labels. If you decide not to map to proton, then some additional steps are required . Create a new gazetteer with the query to get your concepts and their type and label. Then use a Jape Transducer and create your custom jape rules to convert the resulting Lookup annotations to some of the annotation types
Re: [Kim-discussion] Extend proton ontology
For step 2, you can take a look at the already existing grammars, who transform Lookup annotations to meaningful annotations. One such is KIM/context/default/resources/grammar/main/gazrules.jape . Your grammar for Topic will look like this: Phase: GazTopic Input: Lookup Options: control = appelt Rule: GazTopic ( {Lookup.class == http://proton.semanticweb.org/2006/05/protont#Topic} ):topic -- :topic.Topic = { inst = :topic.Lookup.inst , class = :topic.Lookup.class } You can add such a rule for each class you are interested in. Just remember to add Topic to KIM's annotation types whitelist. best philip On 22 Jun 2011, at 9:54 PM, Srecko Joksimovic wrote: Thank you Philip. I know something about GATE, but I have to learn more. Ok, this means that I have step 2. to solve... Best, Srecko From: Philip Alexiev @ Ontotext [mailto:philip.alex...@ontotext.com] Sent: Wednesday, June 22, 2011 8:17 PM To: Srecko Joksimovic Cc: kim-discussion@ontotext.com Subject: Re: [Kim-discussion] Extend proton ontology Hi Srecko, You state that a source is trusted by importing a statement like this in owlim: http://www.lornet.org/acm-ccs/proton#TrustedSrc http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://proton.semanticweb.org/2006/05/protons#Trusted . You can either add this to your custom RDF or you can use the already predefined trusted sources (they are defined with similar statements in KIM/context/default/kb/wkb.nt ) . You can read about JAPE in the official GATE documentation. The documentation is very comprehensive and helpful: http://gate.ac.uk/sale/tao/splitch8.html#chap:jape GATE is the semantic annotation platform KIM uses. If you want to customize the default KIM information extraction process, getting familiar with GATE will be very helpful. HTH Philip On 22 Jun 2011, at 7:32 PM, Srecko Joksimovic wrote: Hi Philip, I have one more question for now... I am beginning to doubt if I know, but let’s assume that I know how to do what you said in your last answer (point 3 and 4). I know what should JAPE rule be, and I will probably be able to do that. But how to make sure that http://www.lornet.org/acm-ccs/proton#TrustedSrc is declared as trusted? This could be funny question, but I am not sure what to do. Best, Srecko From: Srecko Joksimovic [mailto:sreckojoksimo...@gmail.com] Sent: Wednesday, June 22, 2011 5:47 PM To: 'Philip Alexiev @ Ontotext' Cc: 'kim-discussion@ontotext.com' Subject: RE: [Kim-discussion] Extend proton ontology Thank you Philip! This was a really brief answer. I will try to do what you said. Thank you again. Best, Srecko From: Philip Alexiev @ Ontotext [mailto:philip.alex...@ontotext.com] Sent: Wednesday, June 22, 2011 5:44 PM To: srecko joksimovic Cc: kim-discussion@ontotext.com Subject: Re: [Kim-discussion] Extend proton ontology Hi, 1. First make sure http://www.lornet.org/acm-ccs/proton#TrustedSrc is declared as trusted. This is a statement from KIM's knowledge base: http://www.ontotext.com/kim/2006/05/wkb#Gazetteer http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://proton.semanticweb.org/2006/05/protons#Trusted . You can either use some of the existing trusted sources, or declare yours as trusted. 2. Then create a jape rule to match the Lookup annotations with class feature http://proton.semanticweb.org/2006/05/protont#Topic; and to create a Topic annotation. 3. Ad the Topic annotation type to the whitelist of annotations of KIM in KIM/config/nerc.properties in feature com.ontotext.kim.KIMConstants.IE_ANN_TYPES . 4. Delete the cache by removing the KIM/context/default/populated folder and start KIM again. You can start it with the Gate interface to check if your annotations are created. To do that run KIM/bin/kim gate . Hope this helps Philip On 22 Jun 2011, at 6:29 PM, srecko joksimovic wrote: Hello Philip, I think that I could send you a part of this file. This is what I have defined: http://www.lornet.org/acm-ccs/proton#K.7.0 a protont:Topic ; protons:generatedBy http://www.lornet.org/acm-ccs/proton#TrustedSrc ; protons:hasMainAlias http://www.lornet.org/acm-ccs/proton#Alias_756db3b5-b66b-41fe-a82e-1012f18a6672 . http://www.lornet.org/acm-ccs/proton#Alias_877dc2e2-c7cf-4188-a523-6ee9b7cbdd24 a protons:Alias ; http://www.w3.org/2000/01/rdf-schema#label Optimization@en . http://www.lornet.org/acm-ccs/proton#Alias_62107227-8c21-4ed8-99e0-bb2e4e1cb810 a protons:Alias ; http://www.w3.org/2000/01/rdf-schema#label Assistive Technologies For Persons With Disabilities@en . http://www.lornet.org/acm-ccs/proton#G.3.12 a protont:Topic ; protons:generatedBy http://www.lornet.org/acm-ccs/proton#TrustedSrc ; protons:hasMainAlias