Re: Exporting the Annotations field

Timothy Redmond <[email protected]> Thu, 26 Dec 2013 17:24:39 -0800
Newsgroups gmane.comp.misc.ontology.protege.general
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============5943379790389962099==
Content-Type: multipart/alternative;
 boundary="------------010103010304060502060602"

This is a multi-part message in MIME format.
--------------010103010304060502060602
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable


It might be possible.

> I'd like to export only the Annotations fields in a relatively large=20
> ontology=20

This is possible though it appears that the current mechanisms are a bit=20
awkward.  There is at least one bug report that I need to write against=20
this functionality. The following steps worked for me (I tested with the=20
pizza ontology):

 1. Open the ontology in Protege 4.
 2. Create a new empty ontology (File->New) and say yes to put it in the
    current window.  (This step is needed to work around a bug in the
    refactor menus).
 3. Give the new ontology any prefixes that it needs so that the final
    output is pretty.  By default, the "Ontology Prefixes" view appears
    in the "Active Ontology" tab (near the bottom). For the pizza
    ontology I added one mapping
    (pizza->http://www.co-ode.org/ontologies/pizza/pizza.owl#).
 4. Switch back to the original open ontology.
 5. Now use the Refactor->Copy/Move/Delete axioms menu to pull up a
    wizard.  As you work through the wizard you will choose Axioms by
    type, the AnnotationAssertion axiom type, Copy axioms, "Existing
    ontology" and finally select the new empty ontology as the place to
    put the axioms.
 6. Don't panic.  At this point things look very bad.  If you go to the
    Class hierarchy view for instance, none of your classes will be
    visible.  But the annotation assertion axioms are there.  They just
    aren't annotating declared entities that Protege knows how to display=
.
 7. Save the ontology.  I tried a couple of formats but I am guessing
    that the best one is the OWL functional syntax format.


When I did the above steps, I saw assertions that looked like this:

    AnnotationAssertion(rdfs:label pizza:Caprina "Caprina"@pt)
    AnnotationAssertion(rdfs:label pizza:PrinceCarlo "CoberturaPrinceCarl=
o"@pt)
    AnnotationAssertion(rdfs:label pizza:ChickenTopping "CoberturaDeFrang=
o"@pt)
    AnnotationAssertion(rdfs:label pizza:SweetPepperTopping "CoberturaDeP=
imentaoDoce"@pt)


When I saved in the LaTeX mode, the result was the empty ontology. =20
Again, I suspect that this is because LaTeX uses a frame like display of=20
the annotations by entity type and this ontology has no entities, only=20
annotations.

> without loosing their classes or properties references.

I am not sure what this means.  If you are referring to the declarations=20
of the entities, then I think it would be good if the steps above=20
included the declarations.  But such is life.


-Timothy



On 12/26/2013 02:35 PM, Andr=E9 Luiz Tietb=F6hl Ramos wrote:
> Hello,
>
> I'd like to export only the Annotations fields in a relatively large=20
> ontology without loosing their classes or properties references. If=20
> possible in a ASCII text file for I'll use them in a LaTeX document? =20
> Can it be done?
>
> TIA,
>
> Andre Luiz
>
>
> _______________________________________________
> protege-discussion mailing list
> [email protected]
> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.htm=
l#01a.03


--------------010103010304060502060602
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix"><br>
      It might be possible.<br>
      <br>
      <blockquote type="cite">I'd like to export only the Annotations
        fields in a relatively large ontology </blockquote>
      <br>
      This is possible though it appears that the current mechanisms are
      a bit awkward.&nbsp; There is at least one bug report that I need to
      write against this functionality. The following steps worked for
      me (I tested with the pizza ontology):<br>
      <ol>
        <li>Open the ontology in Protege 4.</li>
        <li>Create a new empty ontology (File-&gt;New) and say yes to
          put it in the current window.&nbsp; (This step is needed to work
          around a bug in the refactor menus).</li>
        <li>Give the new ontology any prefixes that it needs so that the
          final output is pretty.&nbsp; By default, the "Ontology Prefixes"
          view appears in the "Active Ontology" tab (near the bottom).&nbsp;
          For the pizza ontology I added one mapping
          (pizza-&gt;<a class="moz-txt-link-freetext" href="http://www.co-ode.org/ontologies/pizza/pizza.owl#">http://www.co-ode.org/ontologies/pizza/pizza.owl#</a>).</li>
        <li>Switch back to the original open ontology.</li>
        <li>Now use the Refactor-&gt;Copy/Move/Delete axioms menu to
          pull up a wizard.&nbsp; As you work through the wizard you will
          choose Axioms by type, the AnnotationAssertion axiom type,
          Copy axioms, "Existing ontology" and finally select the new
          empty ontology as the place to put the axioms.</li>
        <li>Don't panic.&nbsp; At this point things look very bad.&nbsp; If you go
          to the Class hierarchy view for instance, none of your classes
          will be visible.&nbsp; But the annotation assertion axioms are
          there.&nbsp; They just aren't annotating declared entities that
          Protege knows how to display.</li>
        <li>Save the ontology.&nbsp; I tried a couple of formats but I am
          guessing that the best one is the OWL functional syntax
          format.</li>
      </ol>
      <p><br>
        When I did the above steps, I saw assertions that looked like
        this:<br>
      </p>
      <blockquote>
        <pre>AnnotationAssertion(rdfs:label pizza:Caprina "Caprina"@pt)
AnnotationAssertion(rdfs:label pizza:PrinceCarlo "CoberturaPrinceCarlo"@pt)
AnnotationAssertion(rdfs:label pizza:ChickenTopping "CoberturaDeFrango"@pt)
AnnotationAssertion(rdfs:label pizza:SweetPepperTopping "CoberturaDePimentaoDoce"@pt)
</pre>
      </blockquote>
      <br>
      When I saved in the LaTeX mode, the result was the empty
      ontology.&nbsp; Again, I suspect that this is because LaTeX uses a
      frame like display of the annotations by entity type and this
      ontology has no entities, only annotations.<br>
      <br>
      <blockquote type="cite">without loosing their classes or
        properties references.</blockquote>
      <br>
      I am not sure what this means.&nbsp; If you are referring to the
      declarations of the entities, then I think it would be good if the
      steps above included the declarations.&nbsp; But such is life.<br>
      <br>
      <br>
      -Timothy<br>
      <br>
      <br>
      <br>
      On 12/26/2013 02:35 PM, Andr&eacute; Luiz Tietb&ouml;hl Ramos wrote:<br>
    </div>
    <blockquote cite="mid:1388097328.2842.4.camel@sigmatech" type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="GENERATOR" content="GtkHTML/4.6.6">
      Hello,<br>
      <br>
      I'd like to export only the Annotations fields in a relatively
      large ontology without loosing their classes or properties
      references. If possible in a ASCII text file for I'll use them in
      a LaTeX document?&nbsp; Can it be done?<br>
      <br>
      TIA,<br>
      <br>
      Andre Luiz
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
protege-discussion mailing list
<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>
<a class="moz-txt-link-freetext" href="https://mailman.stanford.edu/mailman/listinfo/protege-discussion">https://mailman.stanford.edu/mailman/listinfo/protege-discussion</a>

Instructions for unsubscribing: <a class="moz-txt-link-freetext" href="http://protege.stanford.edu/doc/faq.html#01a.03">http://protege.stanford.edu/doc/faq.html#01a.03</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>

--------------010103010304060502060602--

--===============5943379790389962099==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
protege-discussion mailing list
[email protected]
https://mailman.stanford.edu/mailman/listinfo/protege-discussion

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03

--===============5943379790389962099==--