How to save Jess rules in Protege KB

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

How to save Jess rules in Protege KB

Flavia-2

Hi list,

  I'm using JessTab and Protege 3.2 beta. I'm trying to save my Jess rules
in Protégé knowledge base.
  I tried the following commands

  (set-kb-save defrule * TRUE) --> It seems to work but when I load the
.pprj the rules are not there. The (load-kb-definitions) returns an
error (Nested exception is: null)


  (set-kb-save defrule myRuleName TRUE) --> This command returns an error
message (Unknown defrule: myRuleName). I don't know what is wrong. The
same happens to (get-kb-save defrule myRuleName TRUE)

  I also want to know where the checkbox “Save definition in knowledge
base” is located (I searched all the JessTab subtabs).

  I appreciate any help,

   Flávia.

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: How to save Jess rules in Protege KB

Tania Tudorache

Flavia,

[hidden email] wrote:

>Hi list,
>
>  I'm using JessTab and Protege 3.2 beta. I'm trying to save my Jess rules
>in Protégé knowledge base.
>  I tried the following commands
>
>  (set-kb-save defrule * TRUE) --> It seems to work but when I load the
>.pprj the rules are not there. The (load-kb-definitions) returns an
>error (Nested exception is: null)
>
>
>  (set-kb-save defrule myRuleName TRUE) --> This command returns an error
>message (Unknown defrule: myRuleName). I don't know what is wrong. The
>same happens to (get-kb-save defrule myRuleName TRUE)
>
>  I also want to know where the checkbox “Save definition in knowledge
>base” is located (I searched all the JessTab subtabs).
>
>  
>
If you define a rule in the Console window, then it will appear in the
"Rules" Tab. If you select the rule in the Rules Tab, you will see on
rule form a checkbox "Save definition in knowledge base". If you enable
the checkbox and save the project, the next time you open the project,
you will get a message if you want to load the predefined rules into the
Jess engine.

Tania

>  I appreciate any help,
>
>   Flávia.
>
>-------------------------------------------------------------------------
>To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
>
>  
>

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: How to save Jess rules in Protege KB

Flavia Linhalis
Hi Tania,

   I followed your instructions but I don't know if I did it correctly
because the checkbox did not appear.
   Please, take a look at the .gif attached and tell me if you think
there's something wrong.
  Thanks,

     Flávia.

On 5/30/06, Tania Tudorache <[hidden email]> wrote:

>
> Flavia,
>
> [hidden email] wrote:
>
> >Hi list,
> >
> >  I'm using JessTab and Protege 3.2 beta. I'm trying to save my Jess rules
> >in Protégé knowledge base.
> >  I tried the following commands
> >
> >  (set-kb-save defrule * TRUE) --> It seems to work but when I load the
> >.pprj the rules are not there. The (load-kb-definitions) returns an
> >error (Nested exception is: null)
> >
> >
> >  (set-kb-save defrule myRuleName TRUE) --> This command returns an error
> >message (Unknown defrule: myRuleName). I don't know what is wrong. The
> >same happens to (get-kb-save defrule myRuleName TRUE)
> >
> >  I also want to know where the checkbox "Save definition in knowledge
> >base" is located (I searched all the JessTab subtabs).
> >
> >
> >
> If you define a rule in the Console window, then it will appear in the
> "Rules" Tab. If you select the rule in the Rules Tab, you will see on
> rule form a checkbox "Save definition in knowledge base". If you enable
> the checkbox and save the project, the next time you open the project,
> you will get a message if you want to load the predefined rules into the
> Jess engine.
>
> Tania
>
> >  I appreciate any help,
> >
> >   Flávia.
> >
> >-------------------------------------------------------------------------
> >To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
> >
> >
> >
> >
>
> -------------------------------------------------------------------------
> To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
>

-- Attached file removed by Ecartis and put at URL below --
-- Type: image/gif
-- Size: 42k (43227 bytes)
-- URL : http://protege.stanford.edu/mail_archive/attachments/JessTab.GIF


-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: How to save Jess rules in Protege KB

samsontu

Jess rules are instances of the :JESS-RULE class. One of the properties
of :JESS-RULE is :KB-SAVE (Boolean type). It's the :KB-SAVE property of
a rule that gives you a checkbox. If you don't see a checkbox, maybe you
need to go to the Forms tab to associate a checkbox widget with the
:KB-SAVE.

I don't use the save-in-kb feature of JessTab and can't comment on
JessTab's behavior.

Samson

Flavia Linhalis wrote:

> Hi Tania,
>
>    I followed your instructions but I don't know if I did it correctly
> because the checkbox did not appear.
>    Please, take a look at the .gif attached and tell me if you think
> there's something wrong.
>   Thanks,
>
>      Flávia.
>
> On 5/30/06, Tania Tudorache <[hidden email]> wrote:
>
>>Flavia,
>>
>>[hidden email] wrote:
>>
>>
>>>Hi list,
>>>
>>> I'm using JessTab and Protege 3.2 beta. I'm trying to save my Jess rules
>>>in Protégé knowledge base.
>>> I tried the following commands
>>>
>>> (set-kb-save defrule * TRUE) --> It seems to work but when I load the
>>>.pprj the rules are not there. The (load-kb-definitions) returns an
>>>error (Nested exception is: null)
>>>
>>>
>>> (set-kb-save defrule myRuleName TRUE) --> This command returns an error
>>>message (Unknown defrule: myRuleName). I don't know what is wrong. The
>>>same happens to (get-kb-save defrule myRuleName TRUE)
>>>
>>> I also want to know where the checkbox "Save definition in knowledge
>>>base" is located (I searched all the JessTab subtabs).
>>>
>>>
>>>
>>
>>If you define a rule in the Console window, then it will appear in the
>>"Rules" Tab. If you select the rule in the Rules Tab, you will see on
>>rule form a checkbox "Save definition in knowledge base". If you enable
>>the checkbox and save the project, the next time you open the project,
>>you will get a message if you want to load the predefined rules into the
>>Jess engine.
>>
>>Tania
>>
>>
>>> I appreciate any help,
>>>
>>>  Flávia.
>>>
>>>-------------------------------------------------------------------------
>>>To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>>>
>>>
>>>
>>>
>>
>>-------------------------------------------------------------------------
>>To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>>
>>
>
>
> -- Attached file removed by Ecartis and put at URL below --
> -- Type: image/gif
> -- Size: 42k (43227 bytes)
> -- URL : http://protege.stanford.edu/mail_archive/attachments/JessTab.GIF
>
>
> -------------------------------------------------------------------------
> To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
>


--
Samson Tu                    email: [hidden email]
Senior Research Scientist    web: www.stanford.edu/~swt/
Stanford Medical Informatics phone: 1-650-725-3391
Stanford University          fax: 1-650-725-7944

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: How to save Jess rules in Protege KB

Tania Tudorache

Flavia,

it seems that saving the rules in the kb works only in Protege frames. I
have seen from your screenshot, that you have an OWL ontology.
As Samson said, the rules are saved as instances of a :JESS-RULE class,
that seems to be missing in ProtegeOWL.

As an alternative solution, you can store the rules in a separate text
file and load them through the batch command in the Jess engine. The
syntax is: (batch myRules.clp)

Also, copy-and-paste of the rules in the command line works.

I know this is not a perfect solution, but it works :)

Tania

Samson Tu wrote:

>Jess rules are instances of the :JESS-RULE class. One of the properties
>of :JESS-RULE is :KB-SAVE (Boolean type). It's the :KB-SAVE property of
>a rule that gives you a checkbox. If you don't see a checkbox, maybe you
>need to go to the Forms tab to associate a checkbox widget with the
>:KB-SAVE.
>
>I don't use the save-in-kb feature of JessTab and can't comment on
>JessTab's behavior.
>
>Samson
>
>Flavia Linhalis wrote:
>  
>
>>Hi Tania,
>>
>>   I followed your instructions but I don't know if I did it correctly
>>because the checkbox did not appear.
>>   Please, take a look at the .gif attached and tell me if you think
>>there's something wrong.
>>  Thanks,
>>
>>     Flávia.
>>
>>On 5/30/06, Tania Tudorache <[hidden email]> wrote:
>>
>>    
>>
>>>Flavia,
>>>
>>>[hidden email] wrote:
>>>
>>>
>>>      
>>>
>>>>Hi list,
>>>>
>>>>I'm using JessTab and Protege 3.2 beta. I'm trying to save my Jess rules
>>>>in Protégé knowledge base.
>>>>I tried the following commands
>>>>
>>>>(set-kb-save defrule * TRUE) --> It seems to work but when I load the
>>>>.pprj the rules are not there. The (load-kb-definitions) returns an
>>>>error (Nested exception is: null)
>>>>
>>>>
>>>>(set-kb-save defrule myRuleName TRUE) --> This command returns an error
>>>>message (Unknown defrule: myRuleName). I don't know what is wrong. The
>>>>same happens to (get-kb-save defrule myRuleName TRUE)
>>>>
>>>>I also want to know where the checkbox "Save definition in knowledge
>>>>base" is located (I searched all the JessTab subtabs).
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>If you define a rule in the Console window, then it will appear in the
>>>"Rules" Tab. If you select the rule in the Rules Tab, you will see on
>>>rule form a checkbox "Save definition in knowledge base". If you enable
>>>the checkbox and save the project, the next time you open the project,
>>>you will get a message if you want to load the predefined rules into the
>>>Jess engine.
>>>
>>>Tania
>>>
>>>
>>>      
>>>
>>>>I appreciate any help,
>>>>
>>>> Flávia.
>>>>
>>>>-------------------------------------------------------------------------
>>>>To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>>>>
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>-------------------------------------------------------------------------
>>>To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>>>
>>>
>>>      
>>>
>>-- Attached file removed by Ecartis and put at URL below --
>>-- Type: image/gif
>>-- Size: 42k (43227 bytes)
>>-- URL : http://protege.stanford.edu/mail_archive/attachments/JessTab.GIF
>>
>>
>>-------------------------------------------------------------------------
>>To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>>
>>
>>    
>>
>
>
>  
>

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: How to save Jess rules in Protege KB

Flavia Linhalis

Thanks Tania and Samson. In fact, have an OWL ontology and I can't
change to frames. I will try the separete text file solution.
Best,

   Flávia.

On 5/30/06, Tania Tudorache <[hidden email]> wrote:

>
> Flavia,
>
> it seems that saving the rules in the kb works only in Protege frames. I
> have seen from your screenshot, that you have an OWL ontology.
> As Samson said, the rules are saved as instances of a :JESS-RULE class,
> that seems to be missing in ProtegeOWL.
>
> As an alternative solution, you can store the rules in a separate text
> file and load them through the batch command in the Jess engine. The
> syntax is: (batch myRules.clp)
>
> Also, copy-and-paste of the rules in the command line works.
>
> I know this is not a perfect solution, but it works :)
>
> Tania
>
> Samson Tu wrote:
>
> >Jess rules are instances of the :JESS-RULE class. One of the properties
> >of :JESS-RULE is :KB-SAVE (Boolean type). It's the :KB-SAVE property of
> >a rule that gives you a checkbox. If you don't see a checkbox, maybe you
> >need to go to the Forms tab to associate a checkbox widget with the
> >:KB-SAVE.
> >
> >I don't use the save-in-kb feature of JessTab and can't comment on
> >JessTab's behavior.
> >
> >Samson
> >
> >Flavia Linhalis wrote:
> >
> >
> >>Hi Tania,
> >>
> >>   I followed your instructions but I don't know if I did it correctly
> >>because the checkbox did not appear.
> >>   Please, take a look at the .gif attached and tell me if you think
> >>there's something wrong.
> >>  Thanks,
> >>
> >>     Flávia.
> >>
> >>On 5/30/06, Tania Tudorache <[hidden email]> wrote:
> >>
> >>
> >>
> >>>Flavia,
> >>>
> >>>[hidden email] wrote:
> >>>
> >>>
> >>>
> >>>
> >>>>Hi list,
> >>>>
> >>>>I'm using JessTab and Protege 3.2 beta. I'm trying to save my Jess rules
> >>>>in Protégé knowledge base.
> >>>>I tried the following commands
> >>>>
> >>>>(set-kb-save defrule * TRUE) --> It seems to work but when I load the
> >>>>.pprj the rules are not there. The (load-kb-definitions) returns an
> >>>>error (Nested exception is: null)
> >>>>
> >>>>
> >>>>(set-kb-save defrule myRuleName TRUE) --> This command returns an error
> >>>>message (Unknown defrule: myRuleName). I don't know what is wrong. The
> >>>>same happens to (get-kb-save defrule myRuleName TRUE)
> >>>>
> >>>>I also want to know where the checkbox "Save definition in knowledge
> >>>>base" is located (I searched all the JessTab subtabs).
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>If you define a rule in the Console window, then it will appear in the
> >>>"Rules" Tab. If you select the rule in the Rules Tab, you will see on
> >>>rule form a checkbox "Save definition in knowledge base". If you enable
> >>>the checkbox and save the project, the next time you open the project,
> >>>you will get a message if you want to load the predefined rules into the
> >>>Jess engine.
> >>>
> >>>Tania
> >>>
> >>>
> >>>
> >>>
> >>>>I appreciate any help,
> >>>>
> >>>> Flávia.
> >>>>
> >>>>-------------------------------------------------------------------------
> >>>>To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>-------------------------------------------------------------------------
> >>>To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
> >>>
> >>>
> >>>
> >>>
> >>-- Attached file removed by Ecartis and put at URL below --
> >>-- Type: image/gif
> >>-- Size: 42k (43227 bytes)
> >>-- URL : http://protege.stanford.edu/mail_archive/attachments/JessTab.GIF
> >>
> >>
> >>-------------------------------------------------------------------------
> >>To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
> >>
> >>
> >>
> >>
> >
> >
> >
> >
>
> -------------------------------------------------------------------------
> To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
>
-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: How to save Jess rules in Protege KB

Dona Mommsen

Hi Flávia,

please note that the syntax for batch depends on the version of Jess.
Starting version 7 you have to put the filename in double quotes

(batch "myRules.clp")

You might also try out to use eclipse as a development environment for  
Jess. (The Jess website gives good instructions how to to that.) In  
addition with CVS you get a much better "storage" for you rules than  
saving them in Protege.

HTH

Dona

On May 31, 2006, at 2:15 PM, Flavia Linhalis wrote:

>
> Thanks Tania and Samson. In fact, have an OWL ontology and I can't
> change to frames. I will try the separete text file solution.
> Best,
>
>    Flávia.
>
> On 5/30/06, Tania Tudorache <[hidden email]> wrote:
>>
>> Flavia,
>>
>> it seems that saving the rules in the kb works only in Protege  
>> frames. I
>> have seen from your screenshot, that you have an OWL ontology.
>> As Samson said, the rules are saved as instances of a :JESS-RULE  
>> class,
>> that seems to be missing in ProtegeOWL.
>>
>> As an alternative solution, you can store the rules in a separate text
>> file and load them through the batch command in the Jess engine. The
>> syntax is: (batch myRules.clp)
>>
>> Also, copy-and-paste of the rules in the command line works.
>>
>> I know this is not a perfect solution, but it works :)
>>
>> Tania
>>
>> Samson Tu wrote:
>>
>>> Jess rules are instances of the :JESS-RULE class. One of the  
>>> properties
>>> of :JESS-RULE is :KB-SAVE (Boolean type). It's the :KB-SAVE property  
>>> of
>>> a rule that gives you a checkbox. If you don't see a checkbox, maybe  
>>> you
>>> need to go to the Forms tab to associate a checkbox widget with the
>>> :KB-SAVE.
>>>
>>> I don't use the save-in-kb feature of JessTab and can't comment on
>>> JessTab's behavior.
>>>
>>> Samson
>>>
>>> Flavia Linhalis wrote:
>>>
>>>
>>>> Hi Tania,
>>>>
>>>>   I followed your instructions but I don't know if I did it  
>>>> correctly
>>>> because the checkbox did not appear.
>>>>   Please, take a look at the .gif attached and tell me if you think
>>>> there's something wrong.
>>>>  Thanks,
>>>>
>>>>     Flávia.
>>>>
>>>> On 5/30/06, Tania Tudorache <[hidden email]> wrote:
>>>>
>>>>
>>>>
>>>>> Flavia,
>>>>>
>>>>> [hidden email] wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Hi list,
>>>>>>
>>>>>> I'm using JessTab and Protege 3.2 beta. I'm trying to save my  
>>>>>> Jess rules
>>>>>> in Protégé knowledge base.
>>>>>> I tried the following commands
>>>>>>
>>>>>> (set-kb-save defrule * TRUE) --> It seems to work but when I load  
>>>>>> the
>>>>>> .pprj the rules are not there. The (load-kb-definitions) returns  
>>>>>> an
>>>>>> error (Nested exception is: null)
>>>>>>
>>>>>>
>>>>>> (set-kb-save defrule myRuleName TRUE) --> This command returns an  
>>>>>> error
>>>>>> message (Unknown defrule: myRuleName). I don't know what is  
>>>>>> wrong. The
>>>>>> same happens to (get-kb-save defrule myRuleName TRUE)
>>>>>>
>>>>>> I also want to know where the checkbox "Save definition in  
>>>>>> knowledge
>>>>>> base" is located (I searched all the JessTab subtabs).
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> If you define a rule in the Console window, then it will appear in  
>>>>> the
>>>>> "Rules" Tab. If you select the rule in the Rules Tab, you will see  
>>>>> on
>>>>> rule form a checkbox "Save definition in knowledge base". If you  
>>>>> enable
>>>>> the checkbox and save the project, the next time you open the  
>>>>> project,
>>>>> you will get a message if you want to load the predefined rules  
>>>>> into the
>>>>> Jess engine.
>>>>>
>>>>> Tania
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> I appreciate any help,
>>>>>>
>>>>>> Flávia.
>>>>>>
>>>>>> ------------------------------------------------------------------
>>>>>> -------
>>>>>> To unsubscribe go to  
>>>>>> http://protege.stanford.edu/community/subscribe.html
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> -------------------------------------------------------------------
>>>>> ------
>>>>> To unsubscribe go to  
>>>>> http://protege.stanford.edu/community/subscribe.html
>>>>>
>>>>>
>>>>>
>>>>>
>>>> -- Attached file removed by Ecartis and put at URL below --
>>>> -- Type: image/gif
>>>> -- Size: 42k (43227 bytes)
>>>> -- URL :  
>>>> http://protege.stanford.edu/mail_archive/attachments/JessTab.GIF
>>>>
>>>>
>>>> --------------------------------------------------------------------
>>>> -----
>>>> To unsubscribe go to  
>>>> http://protege.stanford.edu/community/subscribe.html
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>
>> ----------------------------------------------------------------------
>> ---
>> To unsubscribe go to  
>> http://protege.stanford.edu/community/subscribe.html
>>
>>
> -----------------------------------------------------------------------
> --
> To unsubscribe go to  
> http://protege.stanford.edu/community/subscribe.html
>

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html