Giter VIP home page Giter VIP logo

eyeserver's Introduction

EyeServer is a server for the EYE reasoner.

Reasoning is the powerful mechanism to draw conclusions from facts. The Semantic Web contains vast amounts of data, which makes it an interesting source to use with one of several available reasoners.

Reasoning in your browser is possible with this server, which exposes the EYE N3 reasoner to the Web.

Bringing reasoning to the Web is the initiative with several open source projects (such as this one) that make reasoning accessible.

EyeServer is a counterpart to EyeClient.

EyeClient is a browser widget that communicates with an EYE reasoner server to deliver reasoning results.

The widget (on the client) and the reasoner (on the server) interact.

Run your own EyeServer or use a public one.

Follow the instructions below to set up your own reasoner server, or use our public reasoner server at http://eye.restdesc.org/.

Installing

EyeServer is an npm package for node.js.

First of all, you need to install the EYE reasoner (WindowsOS XLinux).

Then, install the server package as follows:

$ [sudo] npm -g install eyeserver

Running

$ eyeserver 8000

Using

$ curl "http://localhost:8000/?data=https://n3.restdesc.org/n3/friends.n3&data=https://n3.restdesc.org/n3/knows-rule.n3&query=https://n3.restdesc.org/n3/query-all.n3"

Learn more.

The Bringing reasoning to the Web page explains the origins of this project and provides pointers to related resources.

This code is written by Ruben Verborgh and serves as an HTTP interface to the EYE reasoner by Jos De Roo.

eyeserver's People

Contributors

rubenverborgh avatar bdevloed avatar josd avatar myeongjoon avatar pdpotter avatar tomasklapka avatar

Stargazers

Price Smith avatar Julius Tens avatar  avatar  avatar Jonas Bülow avatar Jerin avatar Sander Vanden Hautte avatar crapthings avatar Flug avatar Roger d'Amiens avatar Ben Companjen avatar  avatar Bastian  avatar  avatar Florian Barth avatar  avatar Edan Weis avatar Andrew Shaffer avatar  avatar Sachit avatar echo66 avatar  avatar Samuel Lampa avatar Andrae Muys avatar Markus Kohlhase avatar  avatar node-migrator-bot avatar  avatar Brad Jones avatar Orlin M Bozhinov avatar

Watchers

Samuel MORELLO avatar  avatar  avatar James Cloos avatar  avatar Joachim Van Herwegen avatar Olivier Morere avatar David avatar

eyeserver's Issues

can not read local file

hello I am studying about semantic web with eye.

If I access eye server with data.n3 & query.n3 in cloud
URL : http://localhost:8000/?data=http://104.199.143.230:8080/data.n3&query=http://104.199.143.230:8080/query.n3

I can gain result.

PREFIX log: <http://www.w3.org/2000/10/swap/log#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX : <http://www.agfa.com/w3c/euler/socrates#>
PREFIX q: <http://www.w3.org/2004/ql#>

:hello2 rdfs:subClassOf :helloAPM.
:hello rdfs:subClassOf :helloAPM.
:hello3 rdfs:subClassOf :helloAPM.

But if I access with data.n3(same as cloud file) in local file:///Users/kimmyongjoon/NetBeansProjects/tourAPI/data/data.n3
URL : http://localhost:8000/?data=file:///Users/kimmyongjoon/NetBeansProjects/tourAPI/data/data.n3&query=http://104.199.143.230:8080/query.n3

I can not result : result looks like can not read local file

PREFIX log: <http://www.w3.org/2000/10/swap/log#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX q: <http://www.w3.org/2004/ql#> 
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX : <http://www.agfa.com/w3c/euler/socrates#>

How can I access with local file ?? or i need to upload it to cloud?

Eyeserver doesn't start after eye update

Issue:

$ docker run --name=eye_server -p 8000:8000 bdevloed/eyeserverERROR: Could not start EyeServer
Possibly the eye command could not be found, or /tmp has no write permission.

Error detail:
 gre ** error(process_error(/usr/local/bin/carl,exit(255)),_4250)

Cause:
Since EYE v18.0131.1211 carl is mandatory

Carl follows Turtle and SPARQL instead of the n3 team submission on several points. This includes no longer defaulting the empty prefix to the local namespace of the file.

This leads to an error at initialization, where the test data contains empty prefixes without a prefix declaration.

I'll send a pull request to fix this

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function

BLUF: it appears the eyeserver can not spawn eye and there is only the /opt/eye/bin/eye.sh and no eye executable that I can find (there is the /opt/eye/lib/eye.pvm though)

I have followed the installation instructions here:
http://eulersharp.sourceforge.net/README.MacOSX
to install eye correctly (see version displayed below for eye, swipl, carl, cturtle, node, and npm)
but when I run: eyeserver 8000 I get this error:

wnm3MacBook:bin wnm3$ eyeserver 8000
events.js:167
throw er; // Unhandled 'error' event
^

Error: spawn eye ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19)
at onErrorNT (internal/child_process.js:407:16)
at process.internalTickCallback (internal/process/next_tick.js:72:19)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:238:12)
at onErrorNT (internal/child_process.js:407:16)
at process.internalTickCallback (internal/process/next_tick.js:72:19)

wnm3MacBook:bin wnm3$ /opt/eye/bin/eye.sh --version
eye --version
EYE v18.1105.2012 josd
SWI-Prolog 7.6.4 (x86_64-darwin15.6.0): Jan 12 2018, 14:07:02
starting 26 [msec cputime] 46 [msec walltime]
wnm3MacBook:bin wnm3$ swipl --version
SWI-Prolog version 7.6.4 for x86_64-darwin15.6.0
wnm3MacBook:bin wnm3$ carl --version
carl version 1.0.3

Usage: carl [-b=base-uri] [-o=output-file] [input-files]
wnm3MacBook:bin wnm3$ cturtle --version
cturtle version 1.0.6-SNAPSHOT

Usage: cturtle [-b=base-uri] [-o=output-file] [-f=(nt|n3p|n3p-rdiv)] [input-files]

wnm3MacBook:bin wnm3$ node -v
v11.0.0
wnm3MacBook:bin wnm3$ npm -v
6.4.1

I am running XQuartz.app v2.7.11 and logged out/in before attempting to run the eyeserver.

Running as sudo doesn't have any effect to resolve the problem.

ERROR: Could not start EyeServer

Hi
I downloaded eveserver through a npm.
eye command works, but eyeserver 8000 make error.

issue

I considered #10 but could not find the problem.
How can I solve the error?

Move eye.js to a separate repo

What do you think about moving eye.js to separate repo/library? I made something similar for one of my projects, but it would be nice to have a single one that can be easily reused.

Allow localhost files behind a flag

Hola!

I am sure it is something really simple I am missing. I want to use the api but cannot get it to work as designed with local web server files (port 80). Here are some images that depict what I am experiencing. I'm on an M1 Mac Mini (Monterey) if that makes any difference.

First, I try the sample post provided on the github repo home page in postman (which works!):
image

Then I create a local web server (on port 80), files are accessible by a browser without specifying port:
image
image

Then I try the same post, except this time I point to the files on the local web server:
image

Then I tried the same post in a Notebook in Visual Studio with Python requests object:
image

Lastly, (what did work!!!) I gave the eye CLI the same arguments (local web server addresses) to the files and it worked!!

image

Any guidance on how to get this working as intended would be greatly appreciated!

Thanks!

Error: spawn eye ENOENT

Hi,

I'm getting the following error when I try to run EyeServer with 'eye server 8000' on Mac.

Thanks.

captura de pantalla 2015-09-25 a las 12 50 41

what is the "_:e_Man_1"

Working on RDF visualisation from several years, i'd like to put a reasoner in my javascript webapps, so I've tried the command from my Linux as mentioned in the README.md like this :

curl "http://eye.restdesc.org/?data=http://eulersharp.sourceforge.net/2003/03swap/socrates.n3&query=http://eulersharp.sourceforge.net/2003/03swap/socratesF.n3"

The result is :

PREFIX : <http://www.agfa.com/w3c/euler/socrates#>

:Socrates a _:e_Man_1.
:Socrates a :Mortal.

Could you explain me what is the "_:e_Man_1"
thxs

License

I couldn't find the license. Pleas add one.

Doesn't provide an answer to some requests when stressed a little

Hi Ruben,
When I stress EyeServer using the following script, there is some errors (some empty results). Any idea?
Thanks,
Olivier

!/bin/bash

mkdir download
cd ./download
rm *.test

t[12]="reference_AGFA_1|http://eulersharp.sourceforge.net/2003/03swap/socratesF.n3"

t[13]="reference_AGFA_2|http://eulersharp.sourceforge.net/2003/03swap/socrates.n3"

t[14]="eye_ruben_1|http://eye.restdesc.org/?data=http://eulersharp.sourceforge.net/2003/03swap/socrates.n3&query=http://eulersharp.sourceforge.net/2003/03swap/socratesF.n3"

for i in {0..500}
do
for j in "${t[@]}"
do
tname=echo $j | cut -d "|" -f 1
turl=echo $j | cut -d "|" -f 2
filename=${tname}_o${i}.test
echo "ERROR" > $filename
wget -O $filename $turl &
done
done

echo "Sleeping 120s"
sleep 120
wgetrunning=ps -aux |grep wget

echo -e "\n\nTesting the downloaded N3 files...\n"
error=false

for i in ls -c
do
err=eye $i 2>&1 >/dev/null | grep 'ERROR'
nbwords=cat $i | wc -w
if [ "$err" == "" -a $nbwords -gt 0 ]
then
echo $i': OK'
else
echo $i': ERROR'
error=true
fi
done

echo "Test failed? "$error
echo "WGET still running after sleep?"
echo $wgetrunning

Refactor to depend on EyeJs?

A while ago, I splitted off the eye wrapper to modernize it and use it in some other project: https://github.com/mielvds/EyeJs
Back then, the logical follow-up was to create a PR that would remove this logic and import the EyeJs package (not sure that's the best name either), but I never got to it.

I'm opening this issue to not forget about it and also to check whether this is actually desired.

Requirements in README

Hi Ruben,

I am starting to use EyeServer today. Quite excited :). Just a minor remark upfront, I was somehow (don't know why, really) expecting the module to handle the installation of eye. Although I fully understand it is better to have it as a requirement, it could be useful to indicate this in the README as I spent quite some time realising that was my issue...

In case it can help anyone go faster, here is a small script to install the latest (to date) version of EYE.

#!/bin/bash                                                                                                                        
cd ~/
wget http://sourceforge.net/projects/eulersharp/files/eulersharp/EYE-2014-09/eye.zip
unzip eye.zip -d eye
sudo add-apt-repository -y ppa:swi-prolog/stable
sudo apt-get update
sudo apt-get install -y swi-prolog
cd eye
sudo ./install.sh
sudo ln -s /opt/eye/bin/eye.sh /usr/bin/eye
cd ..
rm -rf eye/
rm eye.zip
echo "Should print EYE version below..."
eye --version

Mixed Content , but requested an insecure XMLHttpRequest endpoint

I want to use EyeServer from my webApp https://spoggy0.firebaseapp.com/ ( clic the "cat" icon to toggle to the chat/graph page, then clic on "..." icon to open "Eye reasoner" panel)

Then clicking on "Execute Eye" , the app send this data :

data=@prefix : <ppl#>.
 
:Spoggy :type :WebApp.
:Spoggy :developpeur :David.
:David :connait :Bob.
:Spoggy :hasPart :Graph.

&data=@prefix : <ppl#>.
         { ?a :connait ?b }
 =>
         { ?b :connait ?a .
           ?a :type :Personne.
           ?b :type :Personne}.

          {?c :developpeur ?d}
          =>
          {?d :type :Developpeur}.

          &query={ ?a ?b ?c. } => { ?a ?b ?c. }.

to the eye endpoint : http://eye.restdesc.org/

but i got this error message :

iron-request.html:331 Mixed Content: The page at 'https://spoggy0.firebaseapp.com/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://eye.restdesc.org/'. This request has been blocked; the content must be served over HTTPS.

It seems that the problem could be resolve, if the endpoint server could provide "https" instead that "http" as describe here https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content/How_to_fix_website_with_mixed_content.

Could you migrate to https or do I have to find another solution. ?
NB :
(my code works correctly on localhost)
(don't be afraid with the error : "GET https://spoggy0.firebaseapp.com/socket.io/?EIO=3&transport=polling&t=L-TLMwH 404 ()" , this is another problem (firebase don't accept socket.io ;-\ )

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.