samuraraujo / SERIMI-RDF-Interlinking

SERIMI approach for RDF Interlinking
9 stars 5 forks source link

Some problems when running this package #1

Open iluoyi opened 11 years ago

iluoyi commented 11 years ago

Hello my friend, 1.When running this package with the example command, I got the following error:

$ jruby serimi.rb -s http://www4.wiwiss.fu-berlin.de/sider/sparql -t http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org -c http://www4.wiwiss.fu-berlin.de/sider/resource/sider/drugs

SyntaxError: /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:63: syntax error, unexpected ':'

when RDFS::Resource: resource.uri
                   ^

require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1 require at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/resource.rb:5 (root) at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1 require at org/jruby/RubyKernel.java:1027 require at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36 (root) at /home/royal/SERIMI/./active_rdf/lib/active_rdf.rb:29 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1 require at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/initializer.rb:5 (root) at serimi.rb:124

2.Then I adapted the corresponding code in namespace.rb as follows:

uri = case resource
when RDFS::Resource
resource.uri
else
resource.to_s
end

However, I then got this error:

NameError: undefined method 'type' for class '#Class:0x741b3967' private at org/jruby/RubyModule.java:2188 singleton at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:40 each at org/jruby/RubyArray.java:1613 singleton at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:40 register at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:29 (root) at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:104 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1 require at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/resource.rb:5 (root) at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1 require at org/jruby/RubyKernel.java:1027 require at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36 (root) at /home/royal/SERIMI/./active_rdf/lib/active_rdf.rb:29 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1 require at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/initializer.rb:5 (root) at serimi.rb:124

Why did not the method "type" exist? Please help me with this problem. Thank you very much.

--Yi

samuraraujo commented 11 years ago

Dear Yi, you need to install the exactly versions mention in the documentation.

Please send me the output of the following commands so I can check what is going on:

ruby -v gem list

On Mon, Apr 1, 2013 at 12:09 AM, Yi notifications@github.com wrote:

Hello my friend, 1.When running this package with the example command, I got the following error:

$ jruby serimi.rb -s http://www4.wiwiss.fu-berlin.de/sider/sparql -t http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org -c http://www4.wiwiss.fu-berlin.de/sider/resource/sider/drugs

SyntaxError: /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:63: syntax error, unexpected ':'

when RDFS::Resource: resource.uri ^

require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1 require at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/resource.rb:5 (root) at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1 require at org/jruby/RubyKernel.java:1027 require at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36 (root) at /home/royal/SERIMI/./active_rdf/lib/active_rdf.rb:29 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1 require at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/initializer.rb:5 (root) at serimi.rb:124

2.Then I adapted the corresponding code in namespace.rb as follows:

uri = case resource when RDFS::Resource resource.uri else resource.to_s end

However, I then got this error:

NameError: undefined method 'type' for class '#Class:0x741b3967' private at org/jruby/RubyModule.java:2188 singleton at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:40 each at org/jruby/RubyArray.java:1613 singleton at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:40 register at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:29 (root) at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:104 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1 require at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/resource.rb:5 (root) at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1 require at org/jruby/RubyKernel.java:1027 require at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36 (root) at /home/royal/SERIMI/./active_rdf/lib/active_rdf.rb:29 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1 require at /home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36 require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/initializer.rb:5 (root) at serimi.rb:124

Why did not the method "type" exist? Please help me with this problem. Thank you very much.

--Yi

— Reply to this email directly or view it on GitHubhttps://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1 .

iluoyi commented 11 years ago

Hi Samuraraujo,

Thanks you very much for your reply.

  1. Actually, in your document, you mentioned the version of gems but no suggestions for Ruby.
  2. You recommended JRuby at section 2. However, your example command starts with "ruby". I'm just a little bit confused. At last, I installed the latest JRuby (1.7.3) and tested the package under the latest Ubuntu (12.10).

The following was the output:

~$ jruby -v jruby 1.7.3 (1.9.3p385) 2013-02-21 dac429b on OpenJDK 64-Bit Server VM 1.6.0_27-b27 [linux-amd64]

~$ gem list

* LOCAL GEMS *

actionmailer (2.3.2) actionpack (2.3.2) activerecord (2.3.2) activeresource (2.3.2) activesupport (2.3.2) amatch (0.2.5) bouncy-castle-java (1.5.0147, 1.5.0146.1) elasticsearch (0.0.0) jruby-launcher (1.0.15 java) jruby-openssl (0.7.4) json (1.5.1 java) OptionParser (0.5.1) patron (0.4.9) rails (2.3.2) rake (10.0.3, 0.8.7) sources (0.0.1) Text (1.1.2) text (0.2.0) uuidtools (1.0.7) xml-object (0.9.93) yajl-ruby (0.8.2)

~$ jruby -S gem list

* LOCAL GEMS *

actionmailer (2.3.2) actionpack (2.3.2) activerecord (2.3.2) activeresource (2.3.2) activesupport (2.3.2) amatch (0.2.5) bouncy-castle-java (1.5.0147, 1.5.0146.1) elasticsearch (0.0.0) jruby-launcher (1.0.15 java) jruby-openssl (0.7.4) json (1.5.1 java) OptionParser (0.5.1) patron (0.4.9) rails (2.3.2) rake (10.0.3, 0.8.7) sources (0.0.1) Text (1.1.2) text (0.2.0) uuidtools (1.0.7) xml-object (0.9.93) yajl-ruby (0.8.2)

As you can see, only one gem is not the same as your suggestion, which is "jruby-launcher (1.0.15 java)" The reason is that I cannot correctly install version 1.0.7 for JRuby (1.7.3). If possible, could you please also tell me:

  1. Which ruby implementation do you recommend, Ruby or JRuby? And Which version should I select?
  2. Which OS do you recommend?

Thanks, --Yi

On Mon, Apr 1, 2013 at 7:15 AM, samuraraujo notifications@github.comwrote:

Dear Yi, you need to install the exactly versions mention in the documentation.

Please send me the output of the following commands so I can check what is going on:

ruby -v gem list

On Mon, Apr 1, 2013 at 12:09 AM, Yi notifications@github.com wrote:

Hello my friend, 1.When running this package with the example command, I got the following error:

$ jruby serimi.rb -s http://www4.wiwiss.fu-berlin.de/sider/sparql -t http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org -c http://www4.wiwiss.fu-berlin.de/sider/resource/sider/drugs

SyntaxError:

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:63: syntax error, unexpected ':'

when RDFS::Resource: resource.uri ^

require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/resource.rb:5 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at org/jruby/RubyKernel.java:1027 require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

(root) at /home/royal/SERIMI/./active_rdf/lib/active_rdf.rb:29 require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/initializer.rb:5 (root) at serimi.rb:124

2.Then I adapted the corresponding code in namespace.rb as follows:

uri = case resource when RDFS::Resource resource.uri else resource.to_s end

However, I then got this error:

NameError: undefined method 'type' for class '#Class:0x741b3967' private at org/jruby/RubyModule.java:2188 singleton at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:40 each at org/jruby/RubyArray.java:1613 singleton at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:40 register at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:29 (root) at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:104 require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/resource.rb:5 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at org/jruby/RubyKernel.java:1027 require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

(root) at /home/royal/SERIMI/./active_rdf/lib/active_rdf.rb:29 require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/initializer.rb:5 (root) at serimi.rb:124

Why did not the method "type" exist? Please help me with this problem. Thank you very much.

--Yi

— Reply to this email directly or view it on GitHub< https://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1> .

— Reply to this email directly or view it on GitHubhttps://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1#issuecomment-15712127 .

samuraraujo commented 11 years ago

Dear Yi, you can use jruby 1.7 but with ruby 1.8.7. Currently, you use ruby 1.9.3. You should install ruby 1.8.7 on Jruby to make it work.

It should work both on mac and linux.

Tell me if it works for you. You have to install the gems again for ruby1.8.7 Samur

On Tue, Apr 2, 2013 at 8:15 PM, Yi notifications@github.com wrote:

Hi Samuraraujo,

Thanks you very much for your reply.

  1. Actually, in your document, you mentioned the version of gems but no suggestions for Ruby.
  2. You recommended JRuby at section 2. However, your example command starts with "ruby". I'm just a little bit confused. At last, I installed the latest JRuby (1.7.3) and tested the package under the latest Ubuntu (12.10).

The following was the output:

~$ jruby -v jruby 1.7.3 (1.9.3p385) 2013-02-21 dac429b on OpenJDK 64-Bit Server VM 1.6.0_27-b27 [linux-amd64]

~$ gem list

* LOCAL GEMS *

actionmailer (2.3.2) actionpack (2.3.2) activerecord (2.3.2) activeresource (2.3.2) activesupport (2.3.2) amatch (0.2.5) bouncy-castle-java (1.5.0147, 1.5.0146.1) elasticsearch (0.0.0) jruby-launcher (1.0.15 java) jruby-openssl (0.7.4) json (1.5.1 java) OptionParser (0.5.1) patron (0.4.9) rails (2.3.2) rake (10.0.3, 0.8.7) sources (0.0.1) Text (1.1.2) text (0.2.0) uuidtools (1.0.7) xml-object (0.9.93) yajl-ruby (0.8.2)

~$ jruby -S gem list

* LOCAL GEMS *

actionmailer (2.3.2) actionpack (2.3.2) activerecord (2.3.2) activeresource (2.3.2) activesupport (2.3.2) amatch (0.2.5) bouncy-castle-java (1.5.0147, 1.5.0146.1) elasticsearch (0.0.0) jruby-launcher (1.0.15 java) jruby-openssl (0.7.4) json (1.5.1 java) OptionParser (0.5.1) patron (0.4.9) rails (2.3.2) rake (10.0.3, 0.8.7) sources (0.0.1) Text (1.1.2) text (0.2.0) uuidtools (1.0.7) xml-object (0.9.93) yajl-ruby (0.8.2)

As you can see, only one gem is not the same as your suggestion, which is "jruby-launcher (1.0.15 java)" The reason is that I cannot correctly install version 1.0.7 for JRuby (1.7.3). If possible, could you please also tell me:

  1. Which ruby implementation do you recommend, Ruby or JRuby? And Which version should I select?
  2. Which OS do you recommend?

Thanks, --Yi

On Mon, Apr 1, 2013 at 7:15 AM, samuraraujo notifications@github.comwrote:

Dear Yi, you need to install the exactly versions mention in the documentation.

Please send me the output of the following commands so I can check what is going on:

ruby -v gem list

On Mon, Apr 1, 2013 at 12:09 AM, Yi notifications@github.com wrote:

Hello my friend, 1.When running this package with the example command, I got the following error:

$ jruby serimi.rb -s http://www4.wiwiss.fu-berlin.de/sider/sparql -t http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org -c http://www4.wiwiss.fu-berlin.de/sider/resource/sider/drugs

SyntaxError:

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:63:

syntax error, unexpected ':'

when RDFS::Resource: resource.uri ^

require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/resource.rb:5 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at org/jruby/RubyKernel.java:1027 require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

(root) at /home/royal/SERIMI/./active_rdf/lib/active_rdf.rb:29 require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/initializer.rb:5 (root) at serimi.rb:124

2.Then I adapted the corresponding code in namespace.rb as follows:

uri = case resource when RDFS::Resource resource.uri else resource.to_s end

However, I then got this error:

NameError: undefined method 'type' for class '#Class:0x741b3967' private at org/jruby/RubyModule.java:2188 singleton at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:40

each at org/jruby/RubyArray.java:1613 singleton at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:40

register at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:29

(root) at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:104

require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/resource.rb:5 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at org/jruby/RubyKernel.java:1027 require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

(root) at /home/royal/SERIMI/./active_rdf/lib/active_rdf.rb:29 require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/initializer.rb:5 (root) at serimi.rb:124

Why did not the method "type" exist? Please help me with this problem. Thank you very much.

--Yi

— Reply to this email directly or view it on GitHub< https://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1> .

— Reply to this email directly or view it on GitHub< https://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1#issuecomment-15712127>

.

Yi Luo The Semantic Web and Agent Technologies (SWAT) lab Lehigh University

— Reply to this email directly or view it on GitHubhttps://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1#issuecomment-15792615 .

iluoyi commented 11 years ago

Dear Samur,

I appreciate your information! My JRuby works:D

However, I'm a beginner in both SERIMI and Ruby, I just cannot clearly understand the following output after directly running your example. I am wondering if it is due to the lack of proper data repository. Could you please give me some hints on what should I do next so that I can get the proper "X :sameAs Y" result?

user$ ruby serimi.rb -s http://www4.wiwiss.fu-berlin.de/sider/sparql -t http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org -c http://www4.wiwiss.fu-berlin.de/sider/resource/sider/drugs -f nt

./search_module.rb:175 warning: don't put space before argument parentheses Querying ...http://www4.wiwiss.fu-berlin.de/sider/sparql SELECT ?o WHERE { ?s http://xmlns.com/foaf/0.1/homepage ?o . ?s < http://www.w3.org/1999/02/22-rdf-syntax-ns#type> < http://rdfs.org/ns/void#Dataset> . } Via POST Querying ...http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org SELECT ?o WHERE { ?s http://xmlns.com/foaf/0.1/homepage ?o . ?s < http://www.w3.org/1999/02/22-rdf-syntax-ns#type> < http://rdfs.org/ns/void#Dataset> . } Via POST PROCESSING CLASSES http://www4.wiwiss.fu-berlin.de/sider/resource/sider/drugs LAST CLASS nil get_entity_labels Executing. .. Using ... http://www4.wiwiss.fu-berlin.de/sider/sparql Querying ...http://www4.wiwiss.fu-berlin.de/sider/sparql select distinct ?s ?x ?o where {?s ?x ?o . ?s ?p < http://www4.wiwiss.fu-berlin.de/sider/resource/sider/drugs> .} limit 4000 Via POST REXML::ParseException: Missing end tag for 'hr' (got "body") Line: Position: Last 80 unconsumed characters: pull at /home/royal/.rvm/rubies/jruby-1.7.3/lib/ruby/1.8/rexml/parsers/baseparser.rb:329 parse at /home/royal/.rvm/rubies/jruby-1.7.3/lib/ruby/1.8/rexml/parsers/streamparser.rb:16 parse_stream at /home/royal/.rvm/rubies/jruby-1.7.3/lib/ruby/1.8/rexml/document.rb:201 parse_xml at /home/royal/swat/SERIMI/activerdf_sparql-1.3.6/lib/activerdf_sparql/sparql.rb:243 execute_sparql_query at /home/royal/swat/SERIMI/activerdf_sparql-1.3.6/lib/activerdf_sparql/sparql.rb:165 query at /home/royal/swat/SERIMI/activerdf_sparql-1.3.6/lib/activerdf_sparql/sparql.rb:88 query at /home/royal/swat/SERIMI/active_rdf/lib/active_rdf/federation/federation_manager.rb:57 each at org/jruby/RubyArray.java:1613 query at /home/royal/swat/SERIMI/active_rdf/lib/active_rdf/federation/federation_manager.rb:54 execute at /home/royal/swat/SERIMI/active_rdf/lib/active_rdf/queryengine/query.rb:234 get_entity_labels at ./serimi_module.rb:235 initialize at ./initializer.rb:70 each at org/jruby/RubyArray.java:1613 initialize at ./initializer.rb:52 (root) at serimi.rb:126

Thanks a lot and have a good day.

--Yi

On Tue, Apr 2, 2013 at 2:40 PM, samuraraujo notifications@github.comwrote:

Dear Yi, you can use jruby 1.7 but with ruby 1.8.7. Currently, you use ruby 1.9.3. You should install ruby 1.8.7 on Jruby to make it work.

It should work both on mac and linux.

Tell me if it works for you. You have to install the gems again for ruby1.8.7 Samur

On Tue, Apr 2, 2013 at 8:15 PM, Yi notifications@github.com wrote:

Hi Samuraraujo,

Thanks you very much for your reply.

  1. Actually, in your document, you mentioned the version of gems but no suggestions for Ruby.
  2. You recommended JRuby at section 2. However, your example command starts with "ruby". I'm just a little bit confused. At last, I installed the latest JRuby (1.7.3) and tested the package under the latest Ubuntu (12.10).

The following was the output:

~$ jruby -v jruby 1.7.3 (1.9.3p385) 2013-02-21 dac429b on OpenJDK 64-Bit Server VM 1.6.0_27-b27 [linux-amd64]

~$ gem list

* LOCAL GEMS *

actionmailer (2.3.2) actionpack (2.3.2) activerecord (2.3.2) activeresource (2.3.2) activesupport (2.3.2) amatch (0.2.5) bouncy-castle-java (1.5.0147, 1.5.0146.1) elasticsearch (0.0.0) jruby-launcher (1.0.15 java) jruby-openssl (0.7.4) json (1.5.1 java) OptionParser (0.5.1) patron (0.4.9) rails (2.3.2) rake (10.0.3, 0.8.7) sources (0.0.1) Text (1.1.2) text (0.2.0) uuidtools (1.0.7) xml-object (0.9.93) yajl-ruby (0.8.2)

~$ jruby -S gem list

* LOCAL GEMS *

actionmailer (2.3.2) actionpack (2.3.2) activerecord (2.3.2) activeresource (2.3.2) activesupport (2.3.2) amatch (0.2.5) bouncy-castle-java (1.5.0147, 1.5.0146.1) elasticsearch (0.0.0) jruby-launcher (1.0.15 java) jruby-openssl (0.7.4) json (1.5.1 java) OptionParser (0.5.1) patron (0.4.9) rails (2.3.2) rake (10.0.3, 0.8.7) sources (0.0.1) Text (1.1.2) text (0.2.0) uuidtools (1.0.7) xml-object (0.9.93) yajl-ruby (0.8.2)

As you can see, only one gem is not the same as your suggestion, which is "jruby-launcher (1.0.15 java)" The reason is that I cannot correctly install version 1.0.7 for JRuby (1.7.3). If possible, could you please also tell me:

  1. Which ruby implementation do you recommend, Ruby or JRuby? And Which version should I select?
  2. Which OS do you recommend?

Thanks, --Yi

On Mon, Apr 1, 2013 at 7:15 AM, samuraraujo notifications@github.comwrote:

Dear Yi, you need to install the exactly versions mention in the documentation.

Please send me the output of the following commands so I can check what is going on:

ruby -v gem list

On Mon, Apr 1, 2013 at 12:09 AM, Yi notifications@github.com wrote:

Hello my friend, 1.When running this package with the example command, I got the following error:

$ jruby serimi.rb -s http://www4.wiwiss.fu-berlin.de/sider/sparql-t http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org -c http://www4.wiwiss.fu-berlin.de/sider/resource/sider/drugs

SyntaxError:

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:63:

syntax error, unexpected ':'

when RDFS::Resource: resource.uri ^

require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/resource.rb:5 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at org/jruby/RubyKernel.java:1027 require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

(root) at /home/royal/SERIMI/./active_rdf/lib/active_rdf.rb:29 require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/initializer.rb:5 (root) at serimi.rb:124

2.Then I adapted the corresponding code in namespace.rb as follows:

uri = case resource when RDFS::Resource resource.uri else resource.to_s end

However, I then got this error:

NameError: undefined method 'type' for class '#Class:0x741b3967' private at org/jruby/RubyModule.java:2188 singleton at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:40

each at org/jruby/RubyArray.java:1613 singleton at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:40

register at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:29

(root) at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:104

require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/resource.rb:5 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at org/jruby/RubyKernel.java:1027 require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

(root) at /home/royal/SERIMI/./active_rdf/lib/active_rdf.rb:29 require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/initializer.rb:5 (root) at serimi.rb:124

Why did not the method "type" exist? Please help me with this problem. Thank you very much.

--Yi

— Reply to this email directly or view it on GitHub< https://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1> .

— Reply to this email directly or view it on GitHub<

https://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1#issuecomment-15712127>

.

— Reply to this email directly or view it on GitHub< https://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1#issuecomment-15792615>

.

— Reply to this email directly or view it on GitHubhttps://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1#issuecomment-15794141 .

Yi Luo

samuraraujo commented 11 years ago

Hi Yi, great that it works for you.

This error happens because you are connecting to a public endpoint and it may disconnect you.

Try to run this example:

ruby serimi.rb -s http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org -t http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org -c http://dbpedia.org/class/yago/StatesAndTerritoriesOfIndia

For what purpose do you want to use SERIMI?

Samur

On Wed, Apr 3, 2013 at 6:16 PM, Yi notifications@github.com wrote:

Dear Samur,

I appreciate your information! My JRuby works:D

However, I'm a beginner in both SERIMI and Ruby, I just cannot clearly understand the following output after directly running your example. I am wondering if it is due to the lack of proper data repository. Could you please give me some hints on what should I do next so that I can get the proper "X :sameAs Y" result?

user$ ruby serimi.rb -s http://www4.wiwiss.fu-berlin.de/sider/sparql -t http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org -c http://www4.wiwiss.fu-berlin.de/sider/resource/sider/drugs -f nt

./search_module.rb:175 warning: don't put space before argument parentheses Querying ...http://www4.wiwiss.fu-berlin.de/sider/sparql SELECT ?o WHERE { ?s http://xmlns.com/foaf/0.1/homepage ?o . ?s < http://www.w3.org/1999/02/22-rdf-syntax-ns#type> < http://rdfs.org/ns/void#Dataset> . } Via POST Querying ...http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org SELECT ?o WHERE { ?s http://xmlns.com/foaf/0.1/homepage ?o . ?s < http://www.w3.org/1999/02/22-rdf-syntax-ns#type> < http://rdfs.org/ns/void#Dataset> . } Via POST PROCESSING CLASSES http://www4.wiwiss.fu-berlin.de/sider/resource/sider/drugs LAST CLASS nil get_entity_labels Executing. .. Using ... http://www4.wiwiss.fu-berlin.de/sider/sparql Querying ...http://www4.wiwiss.fu-berlin.de/sider/sparql select distinct ?s ?x ?o where {?s ?x ?o . ?s ?p < http://www4.wiwiss.fu-berlin.de/sider/resource/sider/drugs> .} limit 4000 Via POST REXML::ParseException: Missing end tag for 'hr' (got "body") Line: Position: Last 80 unconsumed characters: pull at /home/royal/.rvm/rubies/jruby-1.7.3/lib/ruby/1.8/rexml/parsers/baseparser.rb:329

parse at /home/royal/.rvm/rubies/jruby-1.7.3/lib/ruby/1.8/rexml/parsers/streamparser.rb:16

parse_stream at /home/royal/.rvm/rubies/jruby-1.7.3/lib/ruby/1.8/rexml/document.rb:201 parse_xml at /home/royal/swat/SERIMI/activerdf_sparql-1.3.6/lib/activerdf_sparql/sparql.rb:243

execute_sparql_query at /home/royal/swat/SERIMI/activerdf_sparql-1.3.6/lib/activerdf_sparql/sparql.rb:165

query at /home/royal/swat/SERIMI/activerdf_sparql-1.3.6/lib/activerdf_sparql/sparql.rb:88

query at /home/royal/swat/SERIMI/active_rdf/lib/active_rdf/federation/federation_manager.rb:57

each at org/jruby/RubyArray.java:1613 query at /home/royal/swat/SERIMI/active_rdf/lib/active_rdf/federation/federation_manager.rb:54

execute at /home/royal/swat/SERIMI/active_rdf/lib/active_rdf/queryengine/query.rb:234 get_entity_labels at ./serimi_module.rb:235 initialize at ./initializer.rb:70 each at org/jruby/RubyArray.java:1613 initialize at ./initializer.rb:52 (root) at serimi.rb:126

Thanks a lot and have a good day.

--Yi

On Tue, Apr 2, 2013 at 2:40 PM, samuraraujo notifications@github.comwrote:

Dear Yi, you can use jruby 1.7 but with ruby 1.8.7. Currently, you use ruby 1.9.3. You should install ruby 1.8.7 on Jruby to make it work.

It should work both on mac and linux.

Tell me if it works for you. You have to install the gems again for ruby1.8.7 Samur

On Tue, Apr 2, 2013 at 8:15 PM, Yi notifications@github.com wrote:

Hi Samuraraujo,

Thanks you very much for your reply.

  1. Actually, in your document, you mentioned the version of gems but no suggestions for Ruby.
  2. You recommended JRuby at section 2. However, your example command starts with "ruby". I'm just a little bit confused. At last, I installed the latest JRuby (1.7.3) and tested the package under the latest Ubuntu (12.10).

The following was the output:

~$ jruby -v jruby 1.7.3 (1.9.3p385) 2013-02-21 dac429b on OpenJDK 64-Bit Server VM 1.6.0_27-b27 [linux-amd64]

~$ gem list

* LOCAL GEMS *

actionmailer (2.3.2) actionpack (2.3.2) activerecord (2.3.2) activeresource (2.3.2) activesupport (2.3.2) amatch (0.2.5) bouncy-castle-java (1.5.0147, 1.5.0146.1) elasticsearch (0.0.0) jruby-launcher (1.0.15 java) jruby-openssl (0.7.4) json (1.5.1 java) OptionParser (0.5.1) patron (0.4.9) rails (2.3.2) rake (10.0.3, 0.8.7) sources (0.0.1) Text (1.1.2) text (0.2.0) uuidtools (1.0.7) xml-object (0.9.93) yajl-ruby (0.8.2)

~$ jruby -S gem list

* LOCAL GEMS *

actionmailer (2.3.2) actionpack (2.3.2) activerecord (2.3.2) activeresource (2.3.2) activesupport (2.3.2) amatch (0.2.5) bouncy-castle-java (1.5.0147, 1.5.0146.1) elasticsearch (0.0.0) jruby-launcher (1.0.15 java) jruby-openssl (0.7.4) json (1.5.1 java) OptionParser (0.5.1) patron (0.4.9) rails (2.3.2) rake (10.0.3, 0.8.7) sources (0.0.1) Text (1.1.2) text (0.2.0) uuidtools (1.0.7) xml-object (0.9.93) yajl-ruby (0.8.2)

As you can see, only one gem is not the same as your suggestion, which is "jruby-launcher (1.0.15 java)" The reason is that I cannot correctly install version 1.0.7 for JRuby (1.7.3). If possible, could you please also tell me:

  1. Which ruby implementation do you recommend, Ruby or JRuby? And Which version should I select?
  2. Which OS do you recommend?

Thanks, --Yi

On Mon, Apr 1, 2013 at 7:15 AM, samuraraujo notifications@github.comwrote:

Dear Yi, you need to install the exactly versions mention in the documentation.

Please send me the output of the following commands so I can check what is going on:

ruby -v gem list

On Mon, Apr 1, 2013 at 12:09 AM, Yi notifications@github.com wrote:

Hello my friend, 1.When running this package with the example command, I got the following error:

$ jruby serimi.rb -s http://www4.wiwiss.fu-berlin.de/sider/sparql-t http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org -c http://www4.wiwiss.fu-berlin.de/sider/resource/sider/drugs

SyntaxError:

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:63:

syntax error, unexpected ':'

when RDFS::Resource: resource.uri ^

require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/resource.rb:5

(root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at org/jruby/RubyKernel.java:1027 require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

(root) at /home/royal/SERIMI/./active_rdf/lib/active_rdf.rb:29 require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/initializer.rb:5 (root) at serimi.rb:124

2.Then I adapted the corresponding code in namespace.rb as follows:

uri = case resource when RDFS::Resource resource.uri else resource.to_s end

However, I then got this error:

NameError: undefined method 'type' for class '#Class:0x741b3967' private at org/jruby/RubyModule.java:2188 singleton at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:40

each at org/jruby/RubyArray.java:1613 singleton at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:40

register at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:29

(root) at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:104

require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/resource.rb:5

(root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at org/jruby/RubyKernel.java:1027 require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

(root) at /home/royal/SERIMI/./active_rdf/lib/active_rdf.rb:29 require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/initializer.rb:5 (root) at serimi.rb:124

Why did not the method "type" exist? Please help me with this problem. Thank you very much.

--Yi

— Reply to this email directly or view it on GitHub< https://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1> .

— Reply to this email directly or view it on GitHub<

https://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1#issuecomment-15712127>

.

— Reply to this email directly or view it on GitHub<

https://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1#issuecomment-15792615>

.

— Reply to this email directly or view it on GitHub< https://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1#issuecomment-15794141>

.

Yi Luo

— Reply to this email directly or view it on GitHubhttps://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1#issuecomment-15846562 .

iluoyi commented 11 years ago

Hi Samur, I'm a beginner in the Semantic Web field and feel interested in the instance matching topic recently. I noticed your SERIMI project from OAEI2011 and I really want to have a try of it.

I would like to do some experiments on it so that I can better understand this topic~ Thank you very much for your preceding help, let's keep on our discussion in later problem:D

Best wishes, Yi

On Wed, Apr 3, 2013 at 12:31 PM, samuraraujo notifications@github.comwrote:

Hi Yi, great that it works for you.

This error happens because you are connecting to a public endpoint and it may disconnect you.

Try to run this example:

ruby serimi.rb -s http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org -t http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org -c http://dbpedia.org/class/yago/StatesAndTerritoriesOfIndia

For what purpose do you want to use SERIMI?

Samur

On Wed, Apr 3, 2013 at 6:16 PM, Yi notifications@github.com wrote:

Dear Samur,

I appreciate your information! My JRuby works:D

However, I'm a beginner in both SERIMI and Ruby, I just cannot clearly understand the following output after directly running your example. I am wondering if it is due to the lack of proper data repository. Could you please give me some hints on what should I do next so that I can get the proper "X :sameAs Y" result?

user$ ruby serimi.rb -s http://www4.wiwiss.fu-berlin.de/sider/sparql -t http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org -c http://www4.wiwiss.fu-berlin.de/sider/resource/sider/drugs -f nt

./search_module.rb:175 warning: don't put space before argument parentheses Querying ...http://www4.wiwiss.fu-berlin.de/sider/sparql SELECT ?o WHERE { ?s http://xmlns.com/foaf/0.1/homepage ?o . ?s < http://www.w3.org/1999/02/22-rdf-syntax-ns#type> < http://rdfs.org/ns/void#Dataset> . } Via POST Querying ... http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org SELECT ?o WHERE { ?s http://xmlns.com/foaf/0.1/homepage ?o . ?s < http://www.w3.org/1999/02/22-rdf-syntax-ns#type> < http://rdfs.org/ns/void#Dataset> . } Via POST PROCESSING CLASSES http://www4.wiwiss.fu-berlin.de/sider/resource/sider/drugs LAST CLASS nil get_entity_labels Executing. .. Using ... http://www4.wiwiss.fu-berlin.de/sider/sparql Querying ...http://www4.wiwiss.fu-berlin.de/sider/sparql select distinct ?s ?x ?o where {?s ?x ?o . ?s ?p < http://www4.wiwiss.fu-berlin.de/sider/resource/sider/drugs> .} limit 4000 Via POST REXML::ParseException: Missing end tag for 'hr' (got "body") Line: Position: Last 80 unconsumed characters: pull at

/home/royal/.rvm/rubies/jruby-1.7.3/lib/ruby/1.8/rexml/parsers/baseparser.rb:329

parse at

/home/royal/.rvm/rubies/jruby-1.7.3/lib/ruby/1.8/rexml/parsers/streamparser.rb:16

parse_stream at /home/royal/.rvm/rubies/jruby-1.7.3/lib/ruby/1.8/rexml/document.rb:201 parse_xml at

/home/royal/swat/SERIMI/activerdf_sparql-1.3.6/lib/activerdf_sparql/sparql.rb:243

execute_sparql_query at

/home/royal/swat/SERIMI/activerdf_sparql-1.3.6/lib/activerdf_sparql/sparql.rb:165

query at

/home/royal/swat/SERIMI/activerdf_sparql-1.3.6/lib/activerdf_sparql/sparql.rb:88

query at

/home/royal/swat/SERIMI/active_rdf/lib/active_rdf/federation/federation_manager.rb:57

each at org/jruby/RubyArray.java:1613 query at

/home/royal/swat/SERIMI/active_rdf/lib/active_rdf/federation/federation_manager.rb:54

execute at

/home/royal/swat/SERIMI/active_rdf/lib/active_rdf/queryengine/query.rb:234 get_entity_labels at ./serimi_module.rb:235 initialize at ./initializer.rb:70 each at org/jruby/RubyArray.java:1613 initialize at ./initializer.rb:52 (root) at serimi.rb:126

Thanks a lot and have a good day.

--Yi

On Tue, Apr 2, 2013 at 2:40 PM, samuraraujo notifications@github.comwrote:

Dear Yi, you can use jruby 1.7 but with ruby 1.8.7. Currently, you use ruby 1.9.3. You should install ruby 1.8.7 on Jruby to make it work.

It should work both on mac and linux.

Tell me if it works for you. You have to install the gems again for ruby1.8.7 Samur

On Tue, Apr 2, 2013 at 8:15 PM, Yi notifications@github.com wrote:

Hi Samuraraujo,

Thanks you very much for your reply.

  1. Actually, in your document, you mentioned the version of gems but no suggestions for Ruby.
  2. You recommended JRuby at section 2. However, your example command starts with "ruby". I'm just a little bit confused. At last, I installed the latest JRuby (1.7.3) and tested the package under the latest Ubuntu (12.10).

The following was the output:

~$ jruby -v jruby 1.7.3 (1.9.3p385) 2013-02-21 dac429b on OpenJDK 64-Bit Server VM 1.6.0_27-b27 [linux-amd64]

~$ gem list

* LOCAL GEMS *

actionmailer (2.3.2) actionpack (2.3.2) activerecord (2.3.2) activeresource (2.3.2) activesupport (2.3.2) amatch (0.2.5) bouncy-castle-java (1.5.0147, 1.5.0146.1) elasticsearch (0.0.0) jruby-launcher (1.0.15 java) jruby-openssl (0.7.4) json (1.5.1 java) OptionParser (0.5.1) patron (0.4.9) rails (2.3.2) rake (10.0.3, 0.8.7) sources (0.0.1) Text (1.1.2) text (0.2.0) uuidtools (1.0.7) xml-object (0.9.93) yajl-ruby (0.8.2)

~$ jruby -S gem list

* LOCAL GEMS *

actionmailer (2.3.2) actionpack (2.3.2) activerecord (2.3.2) activeresource (2.3.2) activesupport (2.3.2) amatch (0.2.5) bouncy-castle-java (1.5.0147, 1.5.0146.1) elasticsearch (0.0.0) jruby-launcher (1.0.15 java) jruby-openssl (0.7.4) json (1.5.1 java) OptionParser (0.5.1) patron (0.4.9) rails (2.3.2) rake (10.0.3, 0.8.7) sources (0.0.1) Text (1.1.2) text (0.2.0) uuidtools (1.0.7) xml-object (0.9.93) yajl-ruby (0.8.2)

As you can see, only one gem is not the same as your suggestion, which is "jruby-launcher (1.0.15 java)" The reason is that I cannot correctly install version 1.0.7 for JRuby (1.7.3). If possible, could you please also tell me:

  1. Which ruby implementation do you recommend, Ruby or JRuby? And Which version should I select?
  2. Which OS do you recommend?

Thanks, --Yi

On Mon, Apr 1, 2013 at 7:15 AM, samuraraujo < notifications@github.com>wrote:

Dear Yi, you need to install the exactly versions mention in the documentation.

Please send me the output of the following commands so I can check what is going on:

ruby -v gem list

On Mon, Apr 1, 2013 at 12:09 AM, Yi notifications@github.com wrote:

Hello my friend, 1.When running this package with the example command, I got the following error:

$ jruby serimi.rb -s http://www4.wiwiss.fu-berlin.de/sider/sparql-t http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org-c http://www4.wiwiss.fu-berlin.de/sider/resource/sider/drugs

SyntaxError:

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:63:

syntax error, unexpected ':'

when RDFS::Resource: resource.uri ^

require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/resource.rb:5

(root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at org/jruby/RubyKernel.java:1027 require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

(root) at /home/royal/SERIMI/./active_rdf/lib/active_rdf.rb:29 require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/initializer.rb:5 (root) at serimi.rb:124

2.Then I adapted the corresponding code in namespace.rb as follows:

uri = case resource when RDFS::Resource resource.uri else resource.to_s end

However, I then got this error:

NameError: undefined method 'type' for class '#Class:0x741b3967' private at org/jruby/RubyModule.java:2188 singleton at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:40

each at org/jruby/RubyArray.java:1613 singleton at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:40

register at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:29

(root) at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/namespace.rb:104

require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/SERIMI/active_rdf/lib/active_rdf/objectmanager/resource.rb:5

(root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at org/jruby/RubyKernel.java:1027 require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

(root) at /home/royal/SERIMI/./active_rdf/lib/active_rdf.rb:29 require at org/jruby/RubyKernel.java:1027 (root) at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1

require at

/home/royal/Applications/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36

require at org/jruby/RubyKernel.java:1027 (root) at /home/royal/SERIMI/initializer.rb:5 (root) at serimi.rb:124

Why did not the method "type" exist? Please help me with this problem. Thank you very much.

--Yi

— Reply to this email directly or view it on GitHub< https://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1> .

— Reply to this email directly or view it on GitHub<

https://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1#issuecomment-15712127>

.

— Reply to this email directly or view it on GitHub<

https://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1#issuecomment-15792615>

.

— Reply to this email directly or view it on GitHub<

https://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1#issuecomment-15794141>

.

Yi Luo

— Reply to this email directly or view it on GitHub< https://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1#issuecomment-15846562>

.

— Reply to this email directly or view it on GitHubhttps://github.com/samuraraujo/SERIMI-RDF-Interlinking/issues/1#issuecomment-15847494 .