Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make it easier to get going #42

Open
bblfish opened this issue Jun 16, 2022 · 5 comments
Open

make it easier to get going #42

bblfish opened this issue Jun 16, 2022 · 5 comments
Assignees

Comments

@bblfish
Copy link

bblfish commented Jun 16, 2022

Some ideas:

  • releasing eye on https://brew.sh to make it easy to install so that it installs swi-prolog would make it much more accessible to people on macs.
  • a little better documentation on how to get going.

One thing I used Cwm for was just so that I could use the nice n3 syntax to write things that were not possible to do in n3. So I have a foaf file that used the = shortcut so that one could name blank nodes, see the use below...

I then have a little script that translates it to rdf/xml and turtle and from there to ntriples even.
I can use rapper to do translations from turtle. But I think there should be a way to extract at least
NQuads from a tool such as eye.

# @base <http://bblfish.net/people/henry/> .

@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
@prefix contact: <http://www.w3.org/2000/10/swap/pim/contact#> .
@prefix awol: <https://bblfish.net/work/atom-owl/2006-06-06/#> .
@prefix iana: <http://www.iana.org/assignments/relation/> .
@prefix cert: <http://www.w3.org/ns/auth/cert#> .
@prefix rsa: <http://www.w3.org/ns/auth/rsa#> .
@prefix wiki: <http://wikipedia.org/wiki/> .
@prefix pingback: <http://purl.org/net/pingback/> .
@prefix space: <http://www.w3.org/ns/pim/space#> .

@prefix : <https://bblfish.net/people/henry/card#> .
   
<https://bblfish.net/people/henry/card>   a foaf:PersonalProfileDocument;
     foaf:maker :me;
     foaf:title "Henry Story's FOAF file";
     foaf:primaryTopic :me ;
     iana:alternate <https://bblfish.net/people/henry/card.rdf>, 
                    <https://bblfish.net/people/henry/card.n3> .

:me    a foaf:Person;
       = <http://bblfish.net/people/henry/card#me>;
       #pingback:to <http://pingback.aksw.org/>;
       pingback:to <https://my-profile.eu/pingback.php>;
       space:storage <https://bblfish.rww.io/cimba/> ;
       foaf:knows [ = <https://www.w3.org/People/Berners-Lee/card#i>; 
                    a foaf:Person;
                    foaf:name "Tim Berners Lee";
                  ],
                  [ = <https://my-profile.eu/people/jwinandy/card#me>;
                    a foaf:Person;
                    foaf:name "Jonathan Winandy";
                  ],
                  [ = <https://my-profile.eu/people/tim/card#me>;
                    a foaf:Person;
                    foaf:name "Tim Boudreau" ],
                  [ = <http://www.turnguard.com/turnguard>;
                    a foaf:Person;
                    foaf:name "jakobitsch jürgen";
                  ] .
@bblfish
Copy link
Author

bblfish commented Jun 16, 2022

So with cwm I would

cwm card.n3 --rdf > card.rdf
rapper -i rdfxml -o ntriples card.rdf  > card.nt
rapper -i rdfxml -o turtle card.rdf  > card.ttl

So I worked out that the equivalent for eye was

$ /opt/eye/bin/eye --nope  ~/Documents/card/card.n3 --pass > out.ttl
$ rapper -i turtle -o turtle out.ttl > card.ttl

that gives me the turtle nicely formatted but I still have the owl:sameAs' everywhere.

@josd
Copy link
Collaborator

josd commented Jun 16, 2022

Could you elaborate on what is wrong or broken in the output of EYE

$ eye --quiet --nope card.n3 --pass 2>/dev/null
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>.
@prefix contact: <http://www.w3.org/2000/10/swap/pim/contact#>.
@prefix awol: <https://bblfish.net/work/atom-owl/2006-06-06/#>.
@prefix iana: <http://www.iana.org/assignments/relation/>.
@prefix cert: <http://www.w3.org/ns/auth/cert#>.
@prefix rsa: <http://www.w3.org/ns/auth/rsa#>.
@prefix wiki: <http://wikipedia.org/wiki/>.
@prefix pingback: <http://purl.org/net/pingback/>.
@prefix space: <http://www.w3.org/ns/pim/space#>.
@prefix : <https://bblfish.net/people/henry/card#>.

<https://bblfish.net/people/henry/card> a foaf:PersonalProfileDocument.
:me a foaf:Person.
_:bn_1 a foaf:Person.
_:bn_2 a foaf:Person.
_:bn_3 a foaf:Person.
_:bn_4 a foaf:Person.
<https://bblfish.net/people/henry/card> foaf:maker :me.
<https://bblfish.net/people/henry/card> foaf:title "Henry Story's FOAF file".
<https://bblfish.net/people/henry/card> foaf:primaryTopic :me.
<https://bblfish.net/people/henry/card> iana:alternate <https://bblfish.net/people/henry/card.rdf>.
<https://bblfish.net/people/henry/card> iana:alternate <https://bblfish.net/people/henry/card.n3>.
:me <http://www.w3.org/2002/07/owl#sameAs> <http://bblfish.net/people/henry/card#me>.
_:bn_1 <http://www.w3.org/2002/07/owl#sameAs> <https://www.w3.org/People/Berners-Lee/card#i>.
_:bn_2 <http://www.w3.org/2002/07/owl#sameAs> <https://my-profile.eu/people/jwinandy/card#me>.
_:bn_3 <http://www.w3.org/2002/07/owl#sameAs> <https://my-profile.eu/people/tim/card#me>.
_:bn_4 <http://www.w3.org/2002/07/owl#sameAs> <http://www.turnguard.com/turnguard>.
:me pingback:to <https://my-profile.eu/pingback.php>.
:me space:storage <https://bblfish.rww.io/cimba/>.
:me foaf:knows _:bn_1.
:me foaf:knows _:bn_2.
:me foaf:knows _:bn_3.
:me foaf:knows _:bn_4.
_:bn_1 foaf:name "Tim Berners Lee".
_:bn_2 foaf:name "Jonathan Winandy".
_:bn_3 foaf:name "Tim Boudreau".
_:bn_4 foaf:name "jakobitsch jürgen".

@josd
Copy link
Collaborator

josd commented Jun 16, 2022

You can always use the following rule

$ cat rule.n3
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>.

{   ?S ?P ?O.
    ?O e:label ?L.
    ?O = ?A.
    ?O ?B ?C.
    ?B log:notEqualTo owl:sameAs.
} => {
    ?S ?P ?A.
    ?A ?B ?C.
}.

to get the extra triples

$ eye --quiet --nope card.n3 rule.n3 --pass-only-new 2>/dev/null
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>.
@prefix contact: <http://www.w3.org/2000/10/swap/pim/contact#>.
@prefix awol: <https://bblfish.net/work/atom-owl/2006-06-06/#>.
@prefix iana: <http://www.iana.org/assignments/relation/>.
@prefix cert: <http://www.w3.org/ns/auth/cert#>.
@prefix rsa: <http://www.w3.org/ns/auth/rsa#>.
@prefix wiki: <http://wikipedia.org/wiki/>.
@prefix pingback: <http://purl.org/net/pingback/>.
@prefix space: <http://www.w3.org/ns/pim/space#>.
@prefix : <https://bblfish.net/people/henry/card#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>.

:me foaf:knows <https://www.w3.org/People/Berners-Lee/card#i>.
<https://www.w3.org/People/Berners-Lee/card#i> a foaf:Person.
<https://www.w3.org/People/Berners-Lee/card#i> foaf:name "Tim Berners Lee".
:me foaf:knows <https://my-profile.eu/people/jwinandy/card#me>.
<https://my-profile.eu/people/jwinandy/card#me> a foaf:Person.
<https://my-profile.eu/people/jwinandy/card#me> foaf:name "Jonathan Winandy".
:me foaf:knows <https://my-profile.eu/people/tim/card#me>.
<https://my-profile.eu/people/tim/card#me> a foaf:Person.
<https://my-profile.eu/people/tim/card#me> foaf:name "Tim Boudreau".
:me foaf:knows <http://www.turnguard.com/turnguard>.
<http://www.turnguard.com/turnguard> a foaf:Person.
<http://www.turnguard.com/turnguard> foaf:name "jakobitsch jürgen".

@bblfish
Copy link
Author

bblfish commented Jun 24, 2022

One should continue the [ = discussion in #43 .

Then this issue can be just about making the release of eye easier, by publishing it on brew. (That would fit the title better :-)

@josd
Copy link
Collaborator

josd commented Jun 24, 2022

If I do it, I also have to test it on MacOSX but I don't have that.
For easy installation you could use https://hub.docker.com/r/bdevloed/eye/ which is up to date.
Maybe someone could do a similar project for brew?

@jeswr jeswr self-assigned this Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants