Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[p4-feedback] excel to owl import plugins

Martin O'Connor martin.oconnor at stanford.edu
Tue Jan 10 11:45:52 PST 2012


The Facts clause works only with individuals. If you want to annotate a class, you can use an annotation property, e.g.,

Class: @A*(rdf:ID=(@D*) rdfs:label=("TH:", at A*))
  SubClassOf: @B*(rdf:ID=(@B*) rdfs:label=("ABA:", at A5))
  Annotations: hasSynonym @D*

Pulling out an unlimited number of items from a cell is not currently supported. You could use capturing expressions [1] 
to deal with a limited number of ;-separated terms.

Class: @A*(rdf:ID=(@D*) rdfs:label=("TH:", at A*))
   SubClassOf: @B*(rdf:ID=(@B*) rdfs:label=("ABA:", at A5))
   Annotations:
     hasSynonym @D*(["(\S+)[;]"]), -- 1st ;-separated item
     hasSynonym @D*(["\S+;(\S+)[;]"]), -- 2nd ;-separated item
     hasSynonym @D*(["\S+;\S+;(\S+)[;]"]) -- 3rd ;-separated item, etc.

MM will conservatively drop subclauses that reference empty cells so the entire expression will not be dropped if some 
subclauses are skipped because of empty cells.

Make sure you are using the latest 3.4.7 release of Protege-OWL.

Martin

[1] http://protege.cim3.net/cgi-bin/wiki.pl?MappingMasterDSL#nidBPE
> Hi Martin,
>
> I got the labels and IRIs assigned over a range of cells. But, I am wondering if we can add annotation properties for 
> the class entity also!?
>
> This rule is adding subclasses:
> Class: @A*(rdf:ID=(@D*) rdfs:label=("TH:", at A*)) SubClassOf: @B*(rdf:ID=(@B*) rdfs:label=("ABA:", at A5))
>
> But I want to add hasSynonym as property to each class concept. I tried adding
> Facts: hasSynonym @D* to the end for the above rule, but it is throwing null pointer exception.
>
> My column D has values like "layer; stratum", there might be null values or only single values too. I want to add 
> hasSynonym rules for as many as ';' separated values. Will you be able to help me with this!
> Thanks
> Sridevi
>
>
>
>
> On Tue, Jan 10, 2012 at 11:14 AM, Martin O'Connor <martin.oconnor at stanford.edu <mailto:martin.oconnor at stanford.edu>> 
> wrote:
>
>
>     On 1/9/2012 10:41 PM, sridevi polavaram wrote:
>     > - How to add annotation property?  I have tried using AnnotationProperty:@A1, but it is not working.
>
>     cf. http://protege.cim3.net/cgi-__bin/wiki.pl?MappingMasterDSL#__nidBQG
>     <http://protege.cim3.net/cgi-bin/wiki.pl?MappingMasterDSL#nidBQG>
>
>     e.g., Individual: @D2 Facts: hasStateName "California" Annotations: hasSource @A4
>
>
>     - How to iterate over cells? This is not working: Class:@A* SubClassOf:B*, where the column A has classes and
>     column B has parent labels.
>
>     Iteration is explained here:
>
>     http://protege.cim3.net/cgi-__bin/wiki.pl?MappingMasterGUI#__nidBIQ
>     <http://protege.cim3.net/cgi-bin/wiki.pl?MappingMasterGUI#nidBIQ>
>
>
>     > - How to assign IRIs? I need both full IRI and abbreviated IRI. The only syntax I was able to get to work is
>     Class:@A1(rdf:label) where the label is being assigned. But I need both label and IRIs.
>
>     cf. http://protege.cim3.net/cgi-__bin/wiki.pl?MappingMasterDSL#__nidBRV
>     <http://protege.cim3.net/cgi-bin/wiki.pl?MappingMasterDSL#nidBRV>
>
>
>     > Are there more examples that I can refer to for adding the rules?
>
>     The language is fully documented here:
>
>     http://protege.cim3.net/cgi-__bin/wiki.pl?MappingMasterDSL <http://protege.cim3.net/cgi-bin/wiki.pl?MappingMasterDSL>
>
>     Martin
>
>
>     _________________________________________________
>     p4-feedback mailing list
>     p4-feedback at lists.stanford.edu <mailto:p4-feedback at lists.stanford.edu>
>     https://mailman.stanford.edu/__mailman/listinfo/p4-feedback
>     <https://mailman.stanford.edu/mailman/listinfo/p4-feedback>
>
>
>
> _______________________________________________
> p4-feedback mailing list
> p4-feedback at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/p4-feedback



More information about the p4-feedback mailing list