[Pellet-users] Detection and extraction of patterns from axioms in pellet

Evren Sirin evren at clarkparsia.com
Mon May 14 16:39:11 UTC 2007


On 5/13/07 8:51 PM, Prakash Kadel wrote:
>
> Hi,
>
>         I am new to pellet. I am having a problem with extraction of 
> certain terms form the axioms.
>
> For example:
>
>         Collection collection = tbox.getAxioms();
>
>                * for* (Iterator it = collection.iterator(); 
> it.hasNext();) {
>
>                         Object axiom = it.next();
>
>                         }
>
> Here the axiom seems to be of  ATermAppl , So if x is 
>
>         sub(http://700.owl#C,or( 
> <http://700.owl#C,or%28>[http://700.owl#D,http://700.owl#E]))
>
> how can I detect  and extract the term with 
> or([http://700.owl#D,http://700.owl#E]) only.  I hope you understood.
>
The axioms are ATermAppl objects and you can retrieve the arguments of a 
term with the function call ATermAppl.getArgument(int index). In this 
case, sub class is argument 0 and super class is argument 1. Note that, 
the axioms in TBox can also be equivalent class axioms so you might need 
to distinguish between two axiom types as in the following call:

boolean isSubClassAxiom = axiom.getName().equals( ATermUtils.SUB );

Cheers,
Evren
>
> Here what I am trying to do is to  find terms such as (D U E) from 
> axioms like  “C subsumes (D U E)”
>
> It would be of great help.
>
> Thanks in advance
>
> Prakash Kadel
>
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.467 / Virus Database: 269.6.6/794 - Release Date: 
> 5/8/2007 2:23 PM
>  
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Pellet-users mailing list
> Pellet-users at lists.owldl.com
> http://lists.owldl.com/mailman/listinfo/pellet-users
> _______________________________________________
>
> Sponsored by Clark & Parsia, LLC http://clarkparsia.com/



More information about the Pellet-users mailing list