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 +4 -4
- data/README.md +106 -28
- data/bin/ned-server +4 -6
- data/core/target/ehu-ned-1.0.jar +0 -0
- data/lib/opener/ned/cli.rb +0 -22
- data/lib/opener/ned/version.rb +1 -1
- data/opener-ned.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52feee8c2bb6f1cbc0e13e763564ebcf1d317ea5
|
4
|
+
data.tar.gz: 9d3f246df66dd2ed80ea8f88530e8bd9ec5b19d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c7af973b5ee38ffed564fb2cde68da63fda96af29153587a0c6780117801b2eba1c0e55d6f1a7c7258033c35dadaec907df304cae5d02d13184f35e635d6a8d
|
7
|
+
data.tar.gz: 5bef0f6b3742aba26c61e4a1565075014bdf0d78c5bd7799830073fd31406576fefba4a51a14a3f0e8da0ceef6df0dff4f36ee6bca95212caeb02b8cc480737c
|
data/README.md
CHANGED
@@ -1,57 +1,135 @@
|
|
1
|
-
|
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
|
-
|
8
|
+
### Confused by some terminology?
|
8
9
|
|
9
|
-
|
10
|
-
|
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
|
-
|
16
|
+
Quick Use Example
|
17
|
+
-----------------
|
13
18
|
|
14
|
-
Installing
|
19
|
+
Installing the ned can be done by executing:
|
15
20
|
|
16
21
|
gem install opener-ned
|
17
22
|
|
18
|
-
|
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
|
-
|
27
|
+
### Command line interface
|
25
28
|
|
26
|
-
|
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
|
-
|
31
|
+
A simple example:
|
31
32
|
|
32
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
80
|
+
ned-daemon -h
|
41
81
|
|
42
|
-
First make sure all the required dependencies are installed:
|
43
82
|
|
44
|
-
|
83
|
+
Description of dependencies
|
84
|
+
---------------------------
|
45
85
|
|
46
|
-
|
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
|
-
|
92
|
+
At least you need the following system setup:
|
49
93
|
|
50
|
-
|
51
|
-
are verified for you before the Rake task calls Maven.
|
94
|
+
### Depenencies for normal use:
|
52
95
|
|
53
|
-
|
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
|
-
|
3
|
+
require 'puma/cli'
|
4
4
|
|
5
|
-
|
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
|
-
|
7
|
+
cli = Puma::CLI.new([rack_config] + ARGV)
|
8
|
+
cli.run
|
data/core/target/ehu-ned-1.0.jar
CHANGED
Binary file
|
data/lib/opener/ned/cli.rb
CHANGED
@@ -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
|
data/lib/opener/ned/version.rb
CHANGED
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.
|
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-
|
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
|