opener-ned 2.3.2 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f455dcd18c5c9af58539968e2488a4227146164f
4
- data.tar.gz: edbd9185e2293a6ef4636e0d259269c6e7201604
3
+ metadata.gz: 09f9b6ffd9cc7898e271c3c7c3a555798e261107
4
+ data.tar.gz: ae16fc7df8452b5585aa20f73eda8c5cfca3174f
5
5
  SHA512:
6
- metadata.gz: 3fb57fb253068c1f0f899cf0b4b73944497f4ffac8a9a00bde1230259fec980e39853c15425b50da2fb65d2266efc6279ee622738cecb7107e1d11d32261c6af
7
- data.tar.gz: 4afc7fa154aa074c4f408853a3647be5494dea933375ab78b9cf52196c31d0bcf1c211f9a77d3bc491c0888d5296e15140a24bda77312633c2caaf0e0053859c
6
+ metadata.gz: 4a4f028aa1f9b75c78f8aa5414d5322fdac50452c192f6dffcd22a31a89827eb0bd6c51cb2cc42a7addacbe7f94701f6005c3fee8fdf7c6293c5210e562d0b2a
7
+ data.tar.gz: 1671a9ef77c20f1a8dea11e0ef4c1c03ecac70648abb3b34e180b4a62b7dc1624b1b18fd1bced94d0e1c7bd6a842387c93bcfaa791acbdfcde383acfae9e52b1
Binary file
@@ -41,7 +41,8 @@ module Opener
41
41
  # @return [Hash]
42
42
  #
43
43
  DEFAULT_OPTIONS = {
44
- :args => [],
44
+ :args => [],
45
+ :logging => false
45
46
  }.freeze
46
47
 
47
48
  ##
@@ -49,10 +50,9 @@ module Opener
49
50
  #
50
51
  # @option options [Array] :args Arbitrary arguments to pass to the
51
52
  # underlying kernel.
52
- # @option options [String|Numeric] :port The port number to connect to.
53
- # @option options [String] :host The hostname of the DBpedia server.
54
- # @option options [String] :language When set the port number will be based
55
- # on this value.
53
+ #
54
+ # @option options [TrueClass|FalseClass] :logging When set to `true`
55
+ # logging is enabled. This is disabled by default.
56
56
  #
57
57
  def initialize(options = {})
58
58
  @options = DEFAULT_OPTIONS.merge(options)
@@ -71,7 +71,9 @@ module Opener
71
71
  document = KAFDocument.create_from_stream(reader)
72
72
  annotator = Java::ehu.ned.Annotate.new
73
73
 
74
- endpoint = @options.fetch(:endpoint, uri_for_language(language))
74
+ annotator.disableLogging unless options[:logging]
75
+
76
+ endpoint = options.fetch(:endpoint, uri_for_language(language))
75
77
 
76
78
  annotator.disambiguateNEsToKAF(
77
79
  document,
@@ -29,6 +29,10 @@ module Opener
29
29
  show_version
30
30
  end
31
31
 
32
+ opts.on('-l', '--logging', 'Enables logging output') do
33
+ @options[:logging] = true
34
+ end
35
+
32
36
  opts.separator <<-EOF
33
37
 
34
38
  Examples:
@@ -1,5 +1,5 @@
1
1
  module Opener
2
2
  class Ned
3
- VERSION = '2.3.2'
3
+ VERSION = '2.4.0'
4
4
  end # Ned
5
5
  end # Opener
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opener-ned
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.2
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - development@olery.com