opener-kaf-naf-parser 1.0.3 → 1.0.4

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: d8d97a1642facbc49c045fcc915a879f2bd4d608
4
- data.tar.gz: 1f5ab1fa8a0d5677cf760f83df919d8f09c77816
3
+ metadata.gz: f44e54b9c4fafdcabf0bb33f802e78a1491be7c9
4
+ data.tar.gz: ae47e49eaf9e8a816552a3e82914000603387e54
5
5
  SHA512:
6
- metadata.gz: 88f811aeeeb7348b6da8f2d48f79d5274e9efdecfbfe378f8f2de021adb936a123a9bba104fdf9bc68fc3fe53120e620a6225600ed8e4470f63b2251c250824e
7
- data.tar.gz: ee4a8e7f3b0034aeab003745e08928e9883414b4cbbbaac411f1b3767c12c05ffc40b1f9a7e18e9347c92b9d5b04db09e2a1710062cb304698b6cd9dd0515e13
6
+ metadata.gz: b47683a2bef2fe261093ced03054370868386cb6bb39ebbd9fccc2f0a3d7355ba498aa183a9ba2803fa218e4882fa2cb3e84e4693ea010790254116fda867344
7
+ data.tar.gz: a5acaa179cdbe18da26ed59bf5d613570307f17ee4630081a0f438b05005a0d46eaea74ad2a9492f18ce716c30c05215b1fc2068afa06e5cbea14c46396b9af0
data/README.md CHANGED
@@ -1,22 +1,18 @@
1
- replace:
2
- kaf-naf-parser
3
- kaf-naf-parser
4
-
5
1
  Introduction
6
2
  ------------
7
3
 
8
4
  This library converts KAF to NAF and NAF to KAF. It also contains a webservice
9
5
  for doing exactly this.
10
6
 
11
- It uses slightly altered
12
- distributions of the VUA_pylib and KafNafParserPy but it keeps the external
13
- libraries contained, so that shouldn't influence anything on your system.
7
+ It uses slightly altered distributions of the VUA_pylib and KafNafParserPy but
8
+ it keeps the external libraries contained, so that shouldn't influence anything
9
+ on your system.
14
10
 
15
11
  ### Confused by some terminology?
16
12
 
17
13
  This software is part of a larger collection of natural language processing
18
14
  tools known as "the OpeNER project". You can find more information about the
19
- project at the [OpeNER portal](http://opener-project.github.io). There you can
15
+ project at [the OpeNER portal](http://opener-project.github.io). There you can
20
16
  also find references to terms like KAF (an XML standard to represent linguistic
21
17
  annotations in texts), component, cores, scenario's and pipelines.
22
18
 
@@ -32,45 +28,42 @@ output KAF by default.
32
28
 
33
29
  It ships with 3 command line tools and a webservice:
34
30
 
35
- ```
36
- kaf-to-naf
37
- naf-to-kaf
38
- kaf-naf-parser
39
- kaf-naf-parser-server
40
- ```
31
+ kaf-to-naf
32
+ naf-to-kaf
33
+ kaf-naf-parser
34
+ kaf-naf-parser-server
41
35
 
42
36
  It works like this:
43
37
 
44
- ```
45
- cat some_kaf.kaf | kaf-to-naf > output.naf
46
- cat some_naf.naf | naf-to-kaf > output.kaf
38
+ cat some_kaf.kaf | kaf-to-naf > output.naf
39
+ cat some_naf.naf | naf-to-kaf > output.kaf
47
40
 
48
- cat some_kaf.kaf | kaf-naf-parser --tonaf > output.naf
49
- ```
41
+ cat some_kaf.kaf | kaf-naf-parser --tonaf > output.naf
50
42
 
51
43
  The webservice can be started like this:
52
44
 
53
- ```
54
- naf-to-kaf-parser-server
55
- ```
45
+ naf-to-kaf-parser-server
46
+
56
47
  And can then be accessed at: <http://localhost:9292>
57
48
 
58
49
  Easiest way to install the gem:
59
50
 
51
+ gem install opener-kaf-naf-parser
52
+
60
53
  ### Daemon
61
54
 
62
- Last but not least the kaf-naf-parser comes shipped with a daemon that
63
- can read jobs (and write) jobs to and from Amazon SQS queues. For more
64
- information type:
55
+ Last but not least the kaf-naf-parser comes shipped with a daemon that can read
56
+ jobs (and write) jobs to and from Amazon SQS queues. For more information type:
65
57
 
66
58
  kaf-naf-parser-daemon -h
67
59
 
68
-
69
60
  Description of dependencies
70
61
  ---------------------------
71
62
 
72
63
  This component runs best if you run it in an environment suited for OpeNER
73
- components. You can find an installation guide and helper tools in the [OpeNER installer](https://github.com/opener-project/opener-installer) and an [installation guide on the Opener Website](http://opener-project.github.io/getting-started/how-to/local-installation.html)
64
+ components. You can find an installation guide and helper tools in the
65
+ [OpeNER installer](https://github.com/opener-project/opener-installer) and an
66
+ [installation guide on the Opener Website](http://opener-project.github.io/getting-started/how-to/local-installation.html).
74
67
 
75
68
  At least you need the following system setup:
76
69
 
@@ -82,15 +75,15 @@ At least you need the following system setup:
82
75
  Where to go from here
83
76
  ---------------------
84
77
 
85
- * [Check the project websitere](http://opener-project.github.io)
78
+ * [Check the project website](http://opener-project.github.io)
86
79
  * [Checkout the webservice](http://opener.olery.com/kaf-naf-parser)
87
80
 
88
81
  Report problem/Get help
89
82
  -----------------------
90
83
 
91
84
  If you encounter problems, please email support@opener-project.eu or leave an
92
- issue in the [issue tracker](https://github.com/opener-project/kaf-naf-parser/issues).
93
-
85
+ issue in the
86
+ [issue tracker](https://github.com/opener-project/kaf-naf-parser/issues).
94
87
 
95
88
  Contributing
96
89
  ------------
data/ext/hack/Rakefile CHANGED
@@ -1,13 +1,8 @@
1
- require 'rake'
2
- require_relative 'support'
3
-
4
- desc 'Verifies the requirements'
5
- task :requirements do
6
- verify_requirements
7
- end
1
+ import File.expand_path('../../../task/requirements.rake', __FILE__)
2
+ import File.expand_path('../../../task/python.rake', __FILE__)
8
3
 
9
4
  task :default => :requirements do
10
- path = File.join(PYTHON_SITE_PACKAGES, 'pre_install')
11
-
12
- pip_install(PRE_INSTALL_REQUIREMENTS, path)
5
+ Dir.chdir(File.expand_path('../../../', __FILE__)) do
6
+ Rake::Task['core/site-packages/pre_install'].invoke
7
+ end
13
8
  end
@@ -1,5 +1,5 @@
1
1
  module Opener
2
2
  class KafNafParser
3
- VERSION = '1.0.3'
3
+ VERSION = '1.0.4'
4
4
  end # KafNafVersion
5
5
  end # Opener
@@ -8,10 +8,9 @@ Gem::Specification.new do |gem|
8
8
  gem.description = gem.summary
9
9
  gem.homepage = "http://github.com/cltl/KafNafParserPy"
10
10
  gem.required_ruby_version = '>= 1.9.2'
11
- gem.extensions = ['ext/hack/Rakefile']
11
+ gem.extensions = ['ext/hack/Rakefile']
12
12
 
13
13
  gem.files = Dir.glob([
14
- 'core/packages/**/*',
15
14
  'core/*',
16
15
  'ext/**/*',
17
16
  'lib/**/*',
@@ -20,7 +19,8 @@ Gem::Specification.new do |gem|
20
19
  'LICENSE',
21
20
  '*_requirements.txt',
22
21
  'README.md',
23
- 'exec/**/*'
22
+ 'exec/**/*',
23
+ 'task/*'
24
24
  ]).select { |file| File.file?(file) }
25
25
 
26
26
  gem.executables = Dir.glob('bin/*').map { |file| File.basename(file) }
@@ -28,14 +28,13 @@ Gem::Specification.new do |gem|
28
28
  gem.add_dependency 'builder'
29
29
  gem.add_dependency 'sinatra', '~>1.4.3'
30
30
  gem.add_dependency 'httpclient'
31
- gem.add_dependency 'opener-build-tools'
32
31
  gem.add_dependency 'uuidtools'
33
32
  gem.add_dependency 'opener-webservice'
34
33
  gem.add_dependency 'puma'
35
34
  gem.add_dependency 'opener-daemons'
36
35
  gem.add_dependency 'opener-core', ['>= 0.1.2']
37
36
 
38
- gem.add_development_dependency 'rspec'
37
+ gem.add_development_dependency 'rspec', '~> 3.0'
39
38
  gem.add_development_dependency 'cucumber'
40
39
  gem.add_development_dependency 'pry'
41
40
  gem.add_development_dependency 'rake'
data/task/compile.rake ADDED
@@ -0,0 +1,2 @@
1
+ desc 'Verifies requirements and compiles the core'
2
+ task :compile => ['requirements', 'python:compile']
data/task/python.rake ADDED
@@ -0,0 +1,11 @@
1
+ # NOTE: pre_build/pre_install directories are created by pip.
2
+
3
+ directory 'core/site-packages/pre_install' do |task|
4
+ sh "pip install --requirement=pre_install_requirements.txt " \
5
+ "--target=#{task.name} --ignore-installed"
6
+ end
7
+
8
+ namespace :python do
9
+ desc 'Installs Python packages in a local directory'
10
+ task :compile => ['core/site-packages/pre_install']
11
+ end
@@ -0,0 +1,7 @@
1
+ desc 'Verifies the requirements'
2
+ task :requirements do
3
+ require 'cliver'
4
+
5
+ Cliver.detect!('python', '~> 2.6')
6
+ Cliver.detect!('pip', '~> 1.3')
7
+ end
data/task/test.rake ADDED
@@ -0,0 +1,4 @@
1
+ desc 'Runs the tests'
2
+ task :test => :compile do
3
+ sh('cucumber features')
4
+ end
metadata CHANGED
@@ -1,206 +1,192 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opener-kaf-naf-parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - ruben.izquierdobevia@vu.nl
8
8
  - development@olery.com
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-23 00:00:00.000000000 Z
12
+ date: 2014-06-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: builder
16
- version_requirements: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - '>='
19
- - !ruby/object:Gem::Version
20
- version: '0'
21
16
  requirement: !ruby/object:Gem::Requirement
22
17
  requirements:
23
- - - '>='
18
+ - - ">="
24
19
  - !ruby/object:Gem::Version
25
20
  version: '0'
26
- prerelease: false
27
21
  type: :runtime
28
- - !ruby/object:Gem::Dependency
29
- name: sinatra
22
+ prerelease: false
30
23
  version_requirements: !ruby/object:Gem::Requirement
31
24
  requirements:
32
- - - ~>
25
+ - - ">="
33
26
  - !ruby/object:Gem::Version
34
- version: 1.4.3
27
+ version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: sinatra
35
30
  requirement: !ruby/object:Gem::Requirement
36
31
  requirements:
37
- - - ~>
32
+ - - "~>"
38
33
  - !ruby/object:Gem::Version
39
34
  version: 1.4.3
40
- prerelease: false
41
35
  type: :runtime
42
- - !ruby/object:Gem::Dependency
43
- name: httpclient
36
+ prerelease: false
44
37
  version_requirements: !ruby/object:Gem::Requirement
45
38
  requirements:
46
- - - '>='
39
+ - - "~>"
47
40
  - !ruby/object:Gem::Version
48
- version: '0'
41
+ version: 1.4.3
42
+ - !ruby/object:Gem::Dependency
43
+ name: httpclient
49
44
  requirement: !ruby/object:Gem::Requirement
50
45
  requirements:
51
- - - '>='
46
+ - - ">="
52
47
  - !ruby/object:Gem::Version
53
48
  version: '0'
54
- prerelease: false
55
49
  type: :runtime
56
- - !ruby/object:Gem::Dependency
57
- name: opener-build-tools
50
+ prerelease: false
58
51
  version_requirements: !ruby/object:Gem::Requirement
59
52
  requirements:
60
- - - '>='
53
+ - - ">="
61
54
  - !ruby/object:Gem::Version
62
55
  version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: uuidtools
63
58
  requirement: !ruby/object:Gem::Requirement
64
59
  requirements:
65
- - - '>='
60
+ - - ">="
66
61
  - !ruby/object:Gem::Version
67
62
  version: '0'
68
- prerelease: false
69
63
  type: :runtime
70
- - !ruby/object:Gem::Dependency
71
- name: uuidtools
64
+ prerelease: false
72
65
  version_requirements: !ruby/object:Gem::Requirement
73
66
  requirements:
74
- - - '>='
67
+ - - ">="
75
68
  - !ruby/object:Gem::Version
76
69
  version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: opener-webservice
77
72
  requirement: !ruby/object:Gem::Requirement
78
73
  requirements:
79
- - - '>='
74
+ - - ">="
80
75
  - !ruby/object:Gem::Version
81
76
  version: '0'
82
- prerelease: false
83
77
  type: :runtime
84
- - !ruby/object:Gem::Dependency
85
- name: opener-webservice
78
+ prerelease: false
86
79
  version_requirements: !ruby/object:Gem::Requirement
87
80
  requirements:
88
- - - '>='
81
+ - - ">="
89
82
  - !ruby/object:Gem::Version
90
83
  version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: puma
91
86
  requirement: !ruby/object:Gem::Requirement
92
87
  requirements:
93
- - - '>='
88
+ - - ">="
94
89
  - !ruby/object:Gem::Version
95
90
  version: '0'
96
- prerelease: false
97
91
  type: :runtime
98
- - !ruby/object:Gem::Dependency
99
- name: puma
92
+ prerelease: false
100
93
  version_requirements: !ruby/object:Gem::Requirement
101
94
  requirements:
102
- - - '>='
95
+ - - ">="
103
96
  - !ruby/object:Gem::Version
104
97
  version: '0'
98
+ - !ruby/object:Gem::Dependency
99
+ name: opener-daemons
105
100
  requirement: !ruby/object:Gem::Requirement
106
101
  requirements:
107
- - - '>='
102
+ - - ">="
108
103
  - !ruby/object:Gem::Version
109
104
  version: '0'
110
- prerelease: false
111
105
  type: :runtime
112
- - !ruby/object:Gem::Dependency
113
- name: opener-daemons
106
+ prerelease: false
114
107
  version_requirements: !ruby/object:Gem::Requirement
115
108
  requirements:
116
- - - '>='
109
+ - - ">="
117
110
  - !ruby/object:Gem::Version
118
111
  version: '0'
112
+ - !ruby/object:Gem::Dependency
113
+ name: opener-core
119
114
  requirement: !ruby/object:Gem::Requirement
120
115
  requirements:
121
- - - '>='
116
+ - - ">="
122
117
  - !ruby/object:Gem::Version
123
- version: '0'
124
- prerelease: false
118
+ version: 0.1.2
125
119
  type: :runtime
126
- - !ruby/object:Gem::Dependency
127
- name: opener-core
120
+ prerelease: false
128
121
  version_requirements: !ruby/object:Gem::Requirement
129
122
  requirements:
130
- - - '>='
123
+ - - ">="
131
124
  - !ruby/object:Gem::Version
132
125
  version: 0.1.2
126
+ - !ruby/object:Gem::Dependency
127
+ name: rspec
133
128
  requirement: !ruby/object:Gem::Requirement
134
129
  requirements:
135
- - - '>='
130
+ - - "~>"
136
131
  - !ruby/object:Gem::Version
137
- version: 0.1.2
132
+ version: '3.0'
133
+ type: :development
138
134
  prerelease: false
139
- type: :runtime
140
- - !ruby/object:Gem::Dependency
141
- name: rspec
142
135
  version_requirements: !ruby/object:Gem::Requirement
143
136
  requirements:
144
- - - '>='
137
+ - - "~>"
145
138
  - !ruby/object:Gem::Version
146
- version: '0'
139
+ version: '3.0'
140
+ - !ruby/object:Gem::Dependency
141
+ name: cucumber
147
142
  requirement: !ruby/object:Gem::Requirement
148
143
  requirements:
149
- - - '>='
144
+ - - ">="
150
145
  - !ruby/object:Gem::Version
151
146
  version: '0'
152
- prerelease: false
153
147
  type: :development
154
- - !ruby/object:Gem::Dependency
155
- name: cucumber
148
+ prerelease: false
156
149
  version_requirements: !ruby/object:Gem::Requirement
157
150
  requirements:
158
- - - '>='
151
+ - - ">="
159
152
  - !ruby/object:Gem::Version
160
153
  version: '0'
154
+ - !ruby/object:Gem::Dependency
155
+ name: pry
161
156
  requirement: !ruby/object:Gem::Requirement
162
157
  requirements:
163
- - - '>='
158
+ - - ">="
164
159
  - !ruby/object:Gem::Version
165
160
  version: '0'
166
- prerelease: false
167
161
  type: :development
168
- - !ruby/object:Gem::Dependency
169
- name: pry
162
+ prerelease: false
170
163
  version_requirements: !ruby/object:Gem::Requirement
171
164
  requirements:
172
- - - '>='
165
+ - - ">="
173
166
  - !ruby/object:Gem::Version
174
167
  version: '0'
168
+ - !ruby/object:Gem::Dependency
169
+ name: rake
175
170
  requirement: !ruby/object:Gem::Requirement
176
171
  requirements:
177
- - - '>='
172
+ - - ">="
178
173
  - !ruby/object:Gem::Version
179
174
  version: '0'
180
- prerelease: false
181
175
  type: :development
182
- - !ruby/object:Gem::Dependency
183
- name: rake
176
+ prerelease: false
184
177
  version_requirements: !ruby/object:Gem::Requirement
185
178
  requirements:
186
- - - '>='
179
+ - - ">="
187
180
  - !ruby/object:Gem::Version
188
181
  version: '0'
189
- requirement: !ruby/object:Gem::Requirement
190
- requirements:
191
- - - '>='
192
- - !ruby/object:Gem::Version
193
- version: '0'
194
- prerelease: false
195
- type: :development
196
182
  description: Parser to translate KAF to NAF and back.
197
- email:
183
+ email:
198
184
  executables:
199
- - kaf-naf-parser
200
185
  - kaf-naf-parser-daemon
201
- - kaf-naf-parser-server
202
- - kaf-to-naf
203
186
  - naf-to-kaf
187
+ - kaf-naf-parser
188
+ - kaf-to-naf
189
+ - kaf-naf-parser-server
204
190
  extensions:
205
191
  - ext/hack/Rakefile
206
192
  extra_rdoc_files: []
@@ -216,7 +202,6 @@ files:
216
202
  - core/kaf-naf-parser.py
217
203
  - exec/kaf-naf-parser.rb
218
204
  - ext/hack/Rakefile
219
- - ext/hack/support.rb
220
205
  - lib/opener/kaf_naf_parser.rb
221
206
  - lib/opener/kaf_naf_parser/cli.rb
222
207
  - lib/opener/kaf_naf_parser/public/markdown.css
@@ -226,27 +211,32 @@ files:
226
211
  - lib/opener/kaf_naf_parser/views/result.erb
227
212
  - opener-kaf-naf-parser.gemspec
228
213
  - pre_install_requirements.txt
214
+ - task/compile.rake
215
+ - task/python.rake
216
+ - task/requirements.rake
217
+ - task/test.rake
229
218
  homepage: http://github.com/cltl/KafNafParserPy
230
219
  licenses: []
231
220
  metadata: {}
232
- post_install_message:
221
+ post_install_message:
233
222
  rdoc_options: []
234
223
  require_paths:
235
224
  - lib
236
225
  required_ruby_version: !ruby/object:Gem::Requirement
237
226
  requirements:
238
- - - '>='
227
+ - - ">="
239
228
  - !ruby/object:Gem::Version
240
229
  version: 1.9.2
241
230
  required_rubygems_version: !ruby/object:Gem::Requirement
242
231
  requirements:
243
- - - '>='
232
+ - - ">="
244
233
  - !ruby/object:Gem::Version
245
234
  version: '0'
246
235
  requirements: []
247
- rubyforge_project:
236
+ rubyforge_project:
248
237
  rubygems_version: 2.2.2
249
- signing_key:
238
+ signing_key:
250
239
  specification_version: 4
251
240
  summary: Parser to translate KAF to NAF and back.
252
241
  test_files: []
242
+ has_rdoc:
data/ext/hack/support.rb DELETED
@@ -1,38 +0,0 @@
1
- require 'opener/build-tools'
2
-
3
- include Opener::BuildTools::Requirements
4
- include Opener::BuildTools::Python
5
- include Opener::BuildTools::Files
6
-
7
- # Directory where packages will be installed to.
8
- PYTHON_SITE_PACKAGES = File.expand_path(
9
- '../../../core/site-packages',
10
- __FILE__
11
- )
12
-
13
- # Directory containing the temporary files.
14
- TMP_DIRECTORY = File.expand_path('../../../tmp', __FILE__)
15
-
16
- # Path to the pip requirements file used to install requirements before
17
- # packaging the Gem.
18
- PRE_BUILD_REQUIREMENTS = File.expand_path(
19
- '../../../pre_build_requirements.txt',
20
- __FILE__
21
- )
22
-
23
- # Path to the pip requirements file used to install requirements upon Gem
24
- # installation.
25
- PRE_INSTALL_REQUIREMENTS = File.expand_path(
26
- '../../../pre_install_requirements.txt',
27
- __FILE__
28
- )
29
-
30
- ##
31
- # Verifies the requirements to install thi Gem.
32
- #
33
- def verify_requirements
34
- require_executable('python')
35
- require_version('python', python_version, '2.6.0')
36
- require_executable('pip')
37
- require_version('pip', pip_version, '1.3.1')
38
- end