Hi Shelly,

One important step, which usually exists in the IE process, is using a list of 
predefined terms, which are meaningful for the specific domain. Such lists are 
used by a Gazetteer. KIM uses a more complex Gazetteer, which extracts its 
lists from the semantic repository underneath. Its default behavior is to get 
all labels of all entities which meet three requirements:
* have at least one alias (label)
KIM uses two models to associate entities with their labels - aliases and 
labels. Aliases are separate objects and allow having some metadata associated 
with a concrete label. Labels are just datatype properties - more simple and 
compact. The model is set via the com.ontotext.kim.KIMConstants.ENTITY_DESCR 
property in KIM/config/install.properties .
* are of type that is subclass of protons:Entity
example:
wkb:Person_Aristotle a protont:Person .
protont:Person rdfs:subClassOf protons:Entity .
* are marked as Trusted
To mark an entity as trusted, there should exist in the semantic repository 
statements, that this entity is generated by a trusted source. An example:
wkb:Gazetteer a protons:Trusted .
wkb:Person_Aristotle protons:generatedBy wkb:Gazetteer .

There are some trusted sources defined in the default KB, but new ones can be 
defined also.


Many approaches exist for adding new entities to KIM's IE. Some of the most 
common are:

* use the existing PROTON classes
The quickest and easiest way. KIM already knows about most of PROTON's classes 
and has grammars to create meaningful annotations over them.  So for example if 
we want to recognize "Aristotle" as a person in the analyzed documents, a new 
person instance has to be defined like this:
customkb:Person_Aristotle a protont:Person ;
                                                protons:hasMainAlias 
customkb:Person_Aristotle.1 .
customkb:Person_Aristotle.1 a protons:Alias;
                                                rdfs:label "Aristotle" .

Note: The format of the URI is not strict. The only requirement is that it is 
unique.
Note: An entity can have multiple aliases and one main alias ( labels 
respectively) .

The gazetteer will create Lookup annotations, which serve as input for other 
resources and rules. That is why we want to transform these into meaningful 
ones. In KIM there are rules that will match a Lookup annotation with class 
feature class=http://proton.semanticweb.org/2006/05/protont#Person and create a 
Person annotation over it. That is why over Aristotle, a new Person annotation 
will be created.

The drawback of this approach is that the new ontology is very closely tied to 
PROTON. It is good for extending the instance base of already existing classes, 
but not that good for extending KIM with a completely new ontology.

* default gazetteer with custom Jape rules
If we have a complete ontology we want to adapt, and for example:
customkb:Person_Aristotle a customkb:Person .
Then we can complete the mentioned requirements for an entity to be included in 
the gazetteer lists:
  * define aliases
    customkb:Person_Aristotle a protont:Person ;
                                                protons:hasMainAlias 
customkb:Person_Aristotle.1 .
    customkb:Person_Aristotle.1 a protons:Alias;
                                                rdfs:label "Aristotle" .

  * make the class subclass directly or indirectly protons:Entity
    customkb:Person rdfs:subClassOf protont:Person .

  * mark the entity as Trusted
    customkb:Person_Aristotle protons:generatedBy wkb:Gazetteer .

These steps will make the gazetteer create Lookup annotations whenever it meets 
"Aristotle" in the text. To make these lookups useful, we can write a Jape 
grammar to create Person annotations. The rules will be similar to this one:
Rule: customkb_person
(
 {Lookup.class == "http://customkb#Person"}
)
:person
-->
 :person.Person = {rule = "customkb_person",
 class = :person.Lookup.class, inst = :person.Lookup.inst, originalName = 
:person.Lookup.originalName }

We can write a rule like this for every class of the custom ontology.

* define a new gazetteer
Another way, if we have a complete ontology, is to create a new gazetteer, 
dedicated to recognizing instances from this ontology. Its query will look like 
this:
select LA, I, DC from
{I} rdf:type customkb:EntitiesRoot ,
{I} serql:directType {DC},
{I} customkb:name {LA}

In this case, the new entities do not need to meet the requirements mentioned 
at the beginning (to have aliases, to be of type protons:Entity, to be 
Trusted).  All the results from the query will be used to fill the gazetteer's 
dictionary.

After the new gazetteer has created lookups, we can use Jape rules like the one 
above.


This is basically how new entities are recognized. There are of course 
alternatives, and which one you use depends on you particular case. But this 
should be enough to give you directions.

Hope this helps,
Philip

On Dec 3, 2010, at 9:06 PM, shelly mangla wrote:

> 
> Hello Alex
>               Thanks for your help and quick response. I have following the 
> steps from the given document (ExtendInformationExtraction.html).  After 
> following all steps, I am unable to get any result (on display and 
> annotation). 
> 
> I am listing down my steps:-
> 
> 1. Creation of ontology file using Protege (4.0). Attaching the owl file in 
> attachment.
>        a. Created Two Classes (Country and State).
>        b. Created object properties between them. (hasState and isStateOf)
>        c. Created Individual of Both Classes (India, USA, China) (Punjab, New 
> York) etc.
>        d. Object Properties Assertion between Individual.
> 2. Added the following entries in (owlim.ttl). Attaching the ttl file in 
> attachment.
>      a.  kb/owl/new.owl;
>      b. http://www.semanticweb.org/ontologies/2010/11/shelly#;
> 3. Added the following entries in visibility.nt (Attaching File)
>     a. <http://www.semanticweb.org/ontologies/2010/11/shelly#country>   
>                 <http://www.ontotext.com/kim/2006/05/kimso#visibilityLevel1> 
> "" .
>      b. <http://www.semanticweb.org/ontologies/2010/11/shelly#states>  
>              <http://www.ontotext.com/kim/2006/05/kimso#visibilityLevel1> "" .
>  
> 
> Please help me how to do it. If Possible, Please reply as soon as possible.
> 
> Regards
> Shelly 
> 
> 
> On Fri, Dec 3, 2010 at 4:35 AM, Philip Alexiev @ Ontotext 
> <[email protected]> wrote:
> Hello Shelly,
> 
> Is this the documentation you are following:
> 
> http://ontotext.com/kim/doc/KimDocs-3.0-EN/ExtendInformationExtraction.html
> 
> Have you made the classes visible? The only way this may be done is to append 
> visibility statements to the file KIM/context/default/kb/visibility.nt .
> 
> Hth
> Philip Alexiev
> Software Engineer, KIM Team
> 
> On Dec 2, 2010, at 2:49 PM, shelly mangla wrote:
> 
> > hello sir..
> > i am trying to add my ontology in KIM, but it is not showing any fruitfil 
> > result.
> > i used the pizza.owl file and made the subclass of entity of proton.owl.
> > also done changes in owlim.ttl.
> > i just now want that my classes should be displayed in ontology tab, but it 
> > is not giving any result.
> > please help me. i had followed the steps given in KIM doc
> > please help me...
> >
> > shelly
> 
> 
> <new.owl><visibility.nt><owlim.ttl>_______________________________________________
> 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