Lorenz, any alternative way? I mean if there is any other rule where we can accomplish things like this?
On Tue, Sep 27, 2016 at 2:56 AM, Lorenz B. < [email protected]> wrote: > > > > If we want to get the maximum score student got among three subjects > > (Robotics, Semantic Web, Research Methods) using Jena rules. > > > > ?x rdf:type std:Student + ?x std:RoboticsScore ?Rscore + ?x > > std:SemanticWebScore ?SMscore + ?x ResearchMethodScore ?RMscore > > + max(Rscore,SMscore,RMscore,maximun) THEN ???? > > > > I have two questions here: > > > > 1) Is the max(Rscore,SMscore,RMscore,maximun) calculate max and assign > it > > to the (fourth)maximum variable? > Documentation is here: > https://jena.apache.org/documentation/inference/#builtin-primitives > > max(?a, ?b, ?c) takes two arguments ?a,?b and assigns the value to ?c > > 2) How would the THEN part be? *If these values give me max, then how > can I > > know that this maximum value belongs to Robotic, Semantic web or Research > > methods?* > Not possible, as max only assigns the maximum value to the variable as > you already know. > > *I want to determine "Favorite subject" of student so if a student got > max > > score in a subject, that will be his/her favorite subject. * > > > -- > Lorenz Bühmann > AKSW group, University of Leipzig > Group: http://aksw.org - semantic web research center > >
