Hi Mehnaz,
How familiar you are with JAPE development? If you know how to do write JAPE rules, i would suggest the following:
1. create a new jape grammar phase (as the example below)
2. edit the main.jape of your KIM deployment and insert the name of the phase there (e.g. in the end)

Note: please have in mind i've considered that you have the annotations of your instances initially as Lookups (generated by the gazetteer). If you transform them to another annotation type - it is even simpler. Description of the example: get all lookups of abbreviation which contain a token of Part of Speech category different from NNP - for all such delete the lookup annotation.
Example:

Phase: NounAbreviationsOnly
Input: Token Lookup
Options: control = Appelt

Rule: OnlyNouns
(
        {
Lookup.class=="http://proton.semanticweb.org/2006/05/protont#MedicalAbbreviation " , Lookup contains {Token.category!=NNP}
        }
): lookup
-->
{
gate.AnnotationSet lookupSet = (gate.AnnotationSet)bindings.get("lookup");
        annotations.removeAll(lookupSet);       
}


take care
borislav




On Jul 20, 2009, at 1:46 AM, Mehnaz Adnan wrote:

Hi

I have extended protont.owl and added two classes with the following namspaces.

 <http://proton.semanticweb.org/2006/05/protont#MedicalAbbreviation>
<http://proton.semanticweb.org/2006/05/protont#CHVTerm>

I have also populated wkb.nt with their instances. Now it is annotating perfectly instances of "MedicalAbbreviation" and "CHVTerm". Now I want to annotate instances of "MedicalAbbreviation" in Nouns only but instances of "CHVTerm" from all of the text.Can I do some thing by changing in default jape or extending KIM Client PR ?? I am stuck on this please help. Any clue please .....


I am using KIM-2.3-RC1 on wondows vista and using KIM WebUI as well as Gate GUI for viewing annotations.

Thanks

--
Mehnaz
_______________________________________________
Kim-discussion mailing list
[email protected]
http://ontotext.com/mailman/listinfo/kim-discussion

_______________________________________________
Kim-discussion mailing list
[email protected]
http://ontotext.com/mailman/listinfo/kim-discussion

Reply via email to