Celfie tutorial: using mm:prepend for rdfs:label

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Celfie tutorial: using mm:prepend for rdfs:label

Michael DeBellis-2
I'm doing the Celfie tutorial here: https://github.com/protegeproject/cellfie-plugin/wiki/Grocery-Tutorial

and I'm a little confused at this part:

Exercise 3: Add a label annotation using the rdfs:label property with the value appeared as "Nutritional Information for x" where x is coming from each cell in column A. Hint: use the mm:prepend function to print the sub-text "Nutritional Information for " before the cell value.

So the rule I came up with is: 

Individual: @A*(mm:hashEncode)
   Types: NutritionalInformation
   Annotations: rdfs:label @A*(mm:prepend(\"Nutritional Information for \"))
   Facts: hasTotalFat @B*(xsd:decimal mm:decimalFormat("##0.00")),
          hasSaturatedFat @C*(xsd:decimal mm:decimalFormat("##0.00")),
          hasSugar @I*(xsd:integer),
          hasSodium @F*(xsd:integer mm:capturing("([0-9]+)"))

But this doesn't seem to be working. When I hit the "Generate Axioms" button it just hangs. But when I delete the one line with the Annotations and just use the following rule: 

Individual: @A*(mm:hashEncode)
   Types: NutritionalInformation
   Facts: hasTotalFat @B*(xsd:decimal mm:decimalFormat("##0.00")),
          hasSaturatedFat @C*(xsd:decimal mm:decimalFormat("##0.00")),
          hasSugar @I*(xsd:integer),
          hasSodium @F*(xsd:integer mm:capturing("([0-9]+)"))

Everything seems to work. I finished the tutorial and it looks like (except for the annotation) everything is working as it is supposed to. 

Michael


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Loading...