opener-ned 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9040d06ad1e01c87c8748947ee3c66f61ea2d083
4
- data.tar.gz: 843fc7ae1a18cf93118a9300bcfce32f4f5ba27d
3
+ metadata.gz: 52feee8c2bb6f1cbc0e13e763564ebcf1d317ea5
4
+ data.tar.gz: 9d3f246df66dd2ed80ea8f88530e8bd9ec5b19d8
5
5
  SHA512:
6
- metadata.gz: 6947de909caf7c8ef1c496e994a18a99190b3b23c83e73528a7491531a6a22c08a3179303517a3c99f7041a3a66dffbb5519c7dd8008296c1bd96f45525423b7
7
- data.tar.gz: cd2c1cdf5386e380cbb09663a2633f793bcb7f61fa83879df5e92cb118911e177b1d9b82daaa35b8bf5ca55de94a0a38ee5278de5a74c08b45683d9b0d0f2b60
6
+ metadata.gz: 5c7af973b5ee38ffed564fb2cde68da63fda96af29153587a0c6780117801b2eba1c0e55d6f1a7c7258033c35dadaec907df304cae5d02d13184f35e635d6a8d
7
+ data.tar.gz: 5bef0f6b3742aba26c61e4a1565075014bdf0d78c5bd7799830073fd31406576fefba4a51a14a3f0e8da0ceef6df0dff4f36ee6bca95212caeb02b8cc480737c
data/README.md CHANGED
@@ -1,57 +1,135 @@
1
- # NED
1
+ Introduction
2
+ ------------
2
3
 
3
4
  This repository contains a Named Entity Disambiguation tool that queries a
4
5
  DBpedia spotlight server. The client takes KAF as input (containing
5
6
  `<entities>` nodes).
6
7
 
7
- ## Requirements
8
+ ### Confused by some terminology?
8
9
 
9
- * Ruby 1.9.2 or newer
10
- * Java 1.7 or newer
10
+ This software is part of a larger collection of natural language processing
11
+ tools known as "the OpeNER project". You can find more information about the
12
+ project at (the OpeNER portal)[http://opener-project.github.io]. There you can
13
+ also find references to terms like KAF (an XML standard to represent linguistic
14
+ annotations in texts), component, cores, scenario's and pipelines.
11
15
 
12
- ## Installation
16
+ Quick Use Example
17
+ -----------------
13
18
 
14
- Installing as a regular Gem:
19
+ Installing the ned can be done by executing:
15
20
 
16
21
  gem install opener-ned
17
22
 
18
- Using Bundler:
23
+ Please bare in mind that all components in OpeNER take KAF as an input and
24
+ output KAF by default.
19
25
 
20
- gem 'opener-ned',
21
- :git => 'git@github.com:opener-project/constituent-parser-base.git',
22
- :branch => 'master'
23
26
 
24
- Using specific install:
27
+ ### Command line interface
25
28
 
26
- gem install specific_install
27
- gem specific_install opener-ned \
28
- -l https://github.com/opener-project/constituent-parser-base.git
29
+ The NED client connects to the (DBPedia spotlight demo servers)[http://dbpedia-spotlight.github.io/demo/].
29
30
 
30
- ## Usage
31
+ A simple example:
31
32
 
32
- The NED client requires a working DBpedia Spotlight server to be available. By
33
- default it tries to connect to http://localhost:2020 (English language) but you
34
- can change this using the `--host` and `--port` options in the CLI.
33
+ cat some_input_file.kaf | ned
35
34
 
36
- A simple example:
35
+ An example output (excerpt) could look like this:
36
+
37
+ ```xml
38
+ <entity eid="e3" type="organization">
39
+ <references>
40
+ <!--North Yorkshire Police-->
41
+ <span>
42
+ <target id="t17" />
43
+ <target id="t18" />
44
+ <target id="t19" />
45
+ </span>
46
+ </references>
47
+ <externalReferences>
48
+ <externalRef resource="spotlight_v1" reference="http://dbpedia.org/resource/North_Yorkshire_Police" />
49
+ </externalReferences>
50
+ </entity>
51
+ ```
52
+
53
+ ### Webservices
54
+
55
+ You can launch a language identification webservice by executing:
56
+
57
+ ned-server
58
+
59
+ This will launch a mini webserver with the webservice. It defaults to port 9292,
60
+ so you can access it at <http://localhost:9292>.
61
+
62
+ To launch it on a different port provide the `-p [port-number]` option like
63
+ this:
64
+
65
+ ned-server -p 1234
66
+
67
+ It then launches at <http://localhost:1234>
68
+
69
+ Documentation on the Webservice is provided by surfing to the urls provided
70
+ above. For more information on how to launch a webservice run the command with
71
+ the ```-h``` option.
72
+
73
+
74
+ ### Daemon
37
75
 
38
- cat some_input_file.kaf | ned --host=http://example.com/ --port=1234
76
+ Last but not least the NED comes shipped with a daemon that
77
+ can read jobs (and write) jobs to and from Amazon SQS queues. For more
78
+ information type:
39
79
 
40
- ## Contributing
80
+ ned-daemon -h
41
81
 
42
- First make sure all the required dependencies are installed:
43
82
 
44
- bundle install
83
+ Description of dependencies
84
+ ---------------------------
45
85
 
46
- Then compile the required Java code:
86
+ This component runs best if you run it in an environment suited for OpeNER
87
+ components. You can find an installation guide and helper tools in the (OpeNER
88
+ installer)[https://github.com/opener-project/opener-installer] and (an
89
+ installation guide on the Opener
90
+ Website)[http://opener-project.github.io/getting-started/how-to/local-installation.html]
47
91
 
48
- bundle exec rake compile
92
+ At least you need the following system setup:
49
93
 
50
- For this you'll need to have Java 1.7 and Maven installed. These requirements
51
- are verified for you before the Rake task calls Maven.
94
+ ### Depenencies for normal use:
52
95
 
53
- ## Structure
96
+ * Jruby (1.7.9 or newer)
97
+ * Java 1.7 or newer (There are problems with encoding in older versions).
98
+
99
+ ### Dependencies if you want to modify the component:
100
+
101
+ * Maven (for building the Gem)
102
+
103
+ ### Structure
54
104
 
55
105
  This repository comes in two parts: a collection of Java source files and Ruby
56
106
  source files. The Java code can be found in the `core/` directory, everything
57
107
  else will be Ruby source code.
108
+
109
+ Language Extension
110
+ ------------------
111
+
112
+ TODO
113
+
114
+ Where to go from here
115
+ ---------------------
116
+
117
+ * Check (the project websitere)[http://opener-project.github.io]
118
+ * (Checkout the webservice)[http://opener.olery.com/ned]
119
+
120
+ Report problem/Get help
121
+ -----------------------
122
+
123
+ If you encounter problems, please email support@opener-project.eu or leave an
124
+ issue in the (issue tracker)[https://github.com/opener-project/ned/issues].
125
+
126
+
127
+ Contributing
128
+ ------------
129
+
130
+ 1. Fork it ( http://github.com/opener-project/ned/fork )
131
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
132
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
133
+ 4. Push to the branch (`git push origin my-new-feature`)
134
+ 5. Create new Pull Request
135
+
data/bin/ned-server CHANGED
@@ -1,10 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require_relative '../lib/opener/ned/server'
3
+ require 'puma/cli'
4
4
 
5
- # Without calling `Rack::Server#options` manually the CLI arguments will never
6
- # be passed, thus the application can't be specified as a constructor argument.
7
- server = Rack::Server.new
8
- server.options[:config] = File.expand_path('../../config.ru', __FILE__)
5
+ rack_config = File.expand_path('../../config.ru', __FILE__)
9
6
 
10
- server.start
7
+ cli = Puma::CLI.new([rack_config] + ARGV)
8
+ cli.run
Binary file
@@ -29,34 +29,12 @@ module Opener
29
29
  show_version
30
30
  end
31
31
 
32
- opts.on('-p', '--port [VALUE]', 'Use a custom port') do |value|
33
- @options[:port] = value
34
- end
35
-
36
- opts.on('-H', '--host [VALUE]', 'Use a custom hostname') do |value|
37
- @options[:host] = value
38
- end
39
-
40
32
  opts.separator <<-EOF
41
33
 
42
34
  Examples:
43
35
 
44
36
  cat input_file.kaf | #{opts.program_name}
45
- cat input_file.kaf | #{opts.program_name} --host=http://some-host.com/
46
-
47
- Port Numbers:
48
-
49
- Port numbers are required. Each language has its own port number (unless
50
- specified otherwise):
51
-
52
- * German: 2010
53
- * English: 2020
54
- * Spanish: 2030
55
- * French: 2040
56
- * Italian: 2050
57
- * Dutch: 2060
58
37
 
59
- By default port 2020 (English) is used.
60
38
  EOF
61
39
  end
62
40
  end
@@ -1,5 +1,5 @@
1
1
  module Opener
2
2
  class Ned
3
- VERSION = '2.0.0'
3
+ VERSION = '2.0.1'
4
4
  end # Ned
5
5
  end # Opener
data/opener-ned.gemspec CHANGED
@@ -24,6 +24,7 @@ Gem::Specification.new do |gem|
24
24
  gem.add_dependency 'httpclient'
25
25
  gem.add_dependency 'opener-webservice'
26
26
  gem.add_dependency 'nokogiri'
27
+ gem.add_dependency 'puma'
27
28
 
28
29
  gem.add_development_dependency 'opener-build-tools'
29
30
  gem.add_development_dependency 'rake'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opener-ned
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - development@olery.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-19 00:00:00.000000000 Z
11
+ date: 2014-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra
@@ -66,6 +66,20 @@ dependencies:
66
66
  version: '0'
67
67
  prerelease: false
68
68
  type: :runtime
69
+ - !ruby/object:Gem::Dependency
70
+ name: puma
71
+ version_requirements: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ requirement: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - '>='
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ prerelease: false
82
+ type: :runtime
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: opener-build-tools
71
85
  version_requirements: !ruby/object:Gem::Requirement