opener-tree-tagger 3.2.7 → 3.3.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: af57505a0a8cffc37de4d77213798764c1c7c74b
4
- data.tar.gz: 1c3d99799aa50e2b011f671fbcba71bb66dc7eff
3
+ metadata.gz: 4856dbf455d4598c83e69c973613c3ebaf29ff10
4
+ data.tar.gz: 12f3b098d50619f459388bcecf967986522035ae
5
5
  SHA512:
6
- metadata.gz: f65103b3524b1b638f993c97add46866dc9a8a977311a1f6c5ae43a1c17b6531a2211165706d49ade8a56c17a8176d26d2acb94d92ebab26c9f57539295e2368
7
- data.tar.gz: 10acad5a338b3ddb82a09f1b776c11859f14ce30a269e66629568d02207a20a5ece7c69f8c5c05146a87d8718373bd15299d08f2493a7cf5aedfb548930be3e2
6
+ metadata.gz: 4f0809d73b7010d0113b1350f6b43660f4baa1d0d79736bbdd2e7995ace7710497e18fea0c86a6e72fcacc1ecd9c62e394139653c669504b1f0b43775ee9ab70
7
+ data.tar.gz: 669c0966558d135693c42c58d8eca25979d56531e05738346d397bc69f57e8ce802c1fdf865cd93eae4aaa139fb366f9382e9e1680c4d3628db46e5c53678034
data/bin/tree-tagger CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  require_relative '../lib/opener/tree_tagger'
4
4
 
5
- cli = Opener::TreeTagger::CLI.new(:args => ARGV)
5
+ cli = Opener::TreeTagger::CLI.new(ARGV)
6
6
 
7
7
  puts cli.run(STDIN.tty? ? nil : STDIN.read)
Binary file
Binary file
@@ -31,13 +31,14 @@ module Opener
31
31
  end
32
32
 
33
33
  def run(input)
34
- begin
35
- stdout, stderr, process = capture(input)
36
- raise stderr unless process.success?
37
- return stdout
38
- rescue Exception => error
39
- return Opener::Core::ErrorLayer.new(input, error.message, self.class).add
40
- end
34
+ stdout, stderr, process = capture(input)
35
+
36
+ raise stderr unless process.success?
37
+
38
+ return stdout
39
+
40
+ rescue Exception => error
41
+ return Opener::Core::ErrorLayer.new(input, error.message, self.class).add
41
42
  end
42
43
 
43
44
  def capture(input)
@@ -45,19 +46,11 @@ module Opener
45
46
  end
46
47
 
47
48
  def command
48
- return "#{adjust_python_path} python -E -OO #{kernel} #{args.join(' ')}"
49
+ return "python -E #{kernel} #{args.join(' ')}"
49
50
  end
50
51
 
51
52
  protected
52
53
 
53
- ##
54
- # @return [String]
55
- #
56
- def adjust_python_path
57
- site_packages = File.join(core_dir, 'site-packages')
58
- "env PYTHONPATH=#{site_packages}:$PYTHONPATH"
59
- end
60
-
61
54
  def core_dir
62
55
  File.expand_path("../../core", File.dirname(__FILE__))
63
56
  end
@@ -1,22 +1,30 @@
1
1
  module Opener
2
2
  class TreeTagger
3
3
  class CLI
4
- attr_reader :options, :option_parser
4
+ attr_reader :argv, :options, :option_parser
5
5
 
6
6
  ##
7
+ # @param [Array] argv
7
8
  # @param [Hash] options
8
9
  #
9
- def initialize(options = {})
10
+ def initialize(argv, options = {})
11
+ @argv = argv
10
12
  @options = DEFAULT_OPTIONS.merge(options)
11
13
 
12
14
  @option_parser = OptionParser.new do |opts|
13
15
  opts.program_name = 'tree-tagger'
14
16
  opts.summary_indent = ' '
15
17
 
18
+ opts.separator "\nOptions:\n\n"
19
+
16
20
  opts.on('-l', '--log', 'Enable logging to STDERR') do
17
21
  @options[:logging] = true
18
22
  end
19
23
 
24
+ opts.on('--no-time', 'Disables adding of timestamps') do
25
+ @options[:args] << '--no-time'
26
+ end
27
+
20
28
  opts.separator <<-EOF
21
29
 
22
30
  Examples:
@@ -31,7 +39,7 @@ Examples:
31
39
  # @param [String] input
32
40
  #
33
41
  def run(input)
34
- option_parser.parse!(options[:args])
42
+ option_parser.parse!(argv)
35
43
 
36
44
  tagger = TreeTagger.new(options)
37
45
 
@@ -1,5 +1,5 @@
1
1
  module Opener
2
2
  class TreeTagger
3
- VERSION = "3.2.7"
3
+ VERSION = "3.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,184 +1,184 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opener-tree-tagger
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.7
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - rubenIzquierdo
8
8
  - sparkboxx
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-19 00:00:00.000000000 Z
12
+ date: 2014-06-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: opener-daemons
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: rake
22
+ prerelease: false
30
23
  version_requirements: !ruby/object:Gem::Requirement
31
24
  requirements:
32
- - - '>='
25
+ - - ">="
33
26
  - !ruby/object:Gem::Version
34
27
  version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rake
35
30
  requirement: !ruby/object:Gem::Requirement
36
31
  requirements:
37
- - - '>='
32
+ - - ">="
38
33
  - !ruby/object:Gem::Version
39
34
  version: '0'
40
- prerelease: false
41
35
  type: :runtime
42
- - !ruby/object:Gem::Dependency
43
- name: sinatra
36
+ prerelease: false
44
37
  version_requirements: !ruby/object:Gem::Requirement
45
38
  requirements:
46
- - - '>='
39
+ - - ">="
47
40
  - !ruby/object:Gem::Version
48
41
  version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: sinatra
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: httpclient
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: httpclient
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: puma
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: puma
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: opener-webservice
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
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: opener-core
100
- version_requirements: !ruby/object:Gem::Requirement
100
+ requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - '>='
102
+ - - ">="
103
103
  - !ruby/object:Gem::Version
104
104
  version: 1.0.2
105
- - - ~>
105
+ - - "~>"
106
106
  - !ruby/object:Gem::Version
107
107
  version: '1.0'
108
- requirement: !ruby/object:Gem::Requirement
108
+ type: :runtime
109
+ prerelease: false
110
+ version_requirements: !ruby/object:Gem::Requirement
109
111
  requirements:
110
- - - '>='
112
+ - - ">="
111
113
  - !ruby/object:Gem::Version
112
114
  version: 1.0.2
113
- - - ~>
115
+ - - "~>"
114
116
  - !ruby/object:Gem::Version
115
117
  version: '1.0'
116
- prerelease: false
117
- type: :runtime
118
118
  - !ruby/object:Gem::Dependency
119
119
  name: nokogiri
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - '>='
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
120
  requirement: !ruby/object:Gem::Requirement
126
121
  requirements:
127
- - - '>='
122
+ - - ">="
128
123
  - !ruby/object:Gem::Version
129
124
  version: '0'
130
- prerelease: false
131
125
  type: :runtime
132
- - !ruby/object:Gem::Dependency
133
- name: cliver
126
+ prerelease: false
134
127
  version_requirements: !ruby/object:Gem::Requirement
135
128
  requirements:
136
- - - '>='
129
+ - - ">="
137
130
  - !ruby/object:Gem::Version
138
131
  version: '0'
132
+ - !ruby/object:Gem::Dependency
133
+ name: cliver
139
134
  requirement: !ruby/object:Gem::Requirement
140
135
  requirements:
141
- - - '>='
136
+ - - ">="
142
137
  - !ruby/object:Gem::Version
143
138
  version: '0'
144
- prerelease: false
145
139
  type: :runtime
146
- - !ruby/object:Gem::Dependency
147
- name: rspec
140
+ prerelease: false
148
141
  version_requirements: !ruby/object:Gem::Requirement
149
142
  requirements:
150
- - - ~>
143
+ - - ">="
151
144
  - !ruby/object:Gem::Version
152
- version: '3.0'
145
+ version: '0'
146
+ - !ruby/object:Gem::Dependency
147
+ name: rspec
153
148
  requirement: !ruby/object:Gem::Requirement
154
149
  requirements:
155
- - - ~>
150
+ - - "~>"
156
151
  - !ruby/object:Gem::Version
157
152
  version: '3.0'
158
- prerelease: false
159
153
  type: :development
160
- - !ruby/object:Gem::Dependency
161
- name: cucumber
154
+ prerelease: false
162
155
  version_requirements: !ruby/object:Gem::Requirement
163
156
  requirements:
164
- - - '>='
157
+ - - "~>"
165
158
  - !ruby/object:Gem::Version
166
- version: '0'
159
+ version: '3.0'
160
+ - !ruby/object:Gem::Dependency
161
+ name: cucumber
167
162
  requirement: !ruby/object:Gem::Requirement
168
163
  requirements:
169
- - - '>='
164
+ - - ">="
170
165
  - !ruby/object:Gem::Version
171
166
  version: '0'
172
- prerelease: false
173
167
  type: :development
168
+ prerelease: false
169
+ version_requirements: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
174
  description: 'Ruby wrapped KAF based Tree Tagger for 6 languages '
175
175
  email:
176
176
  - ruben.izquierdobevia@vu.nl
177
177
  - wilco@olery.com
178
178
  executables:
179
+ - tree-tagger-server
179
180
  - tree-tagger
180
181
  - tree-tagger-daemon
181
- - tree-tagger-server
182
182
  extensions:
183
183
  - ext/hack/Rakefile
184
184
  extra_rdoc_files: []
@@ -195,6 +195,7 @@ files:
195
195
  - core/italian.map.treetagger.kaf.csv
196
196
  - core/spanish.map.treetagger.kaf.csv
197
197
  - core/token_matcher.py
198
+ - core/token_matcher.pyc
198
199
  - core/token_matcher.pyo
199
200
  - core/tt_from_kaf_to_kaf.py
200
201
  - exec/tree-tagger.rb
@@ -215,24 +216,25 @@ files:
215
216
  homepage: http://opener-project.github.com/
216
217
  licenses: []
217
218
  metadata: {}
218
- post_install_message:
219
+ post_install_message:
219
220
  rdoc_options: []
220
221
  require_paths:
221
222
  - lib
222
223
  required_ruby_version: !ruby/object:Gem::Requirement
223
224
  requirements:
224
- - - '>='
225
+ - - ">="
225
226
  - !ruby/object:Gem::Version
226
227
  version: '0'
227
228
  required_rubygems_version: !ruby/object:Gem::Requirement
228
229
  requirements:
229
- - - '>='
230
+ - - ">="
230
231
  - !ruby/object:Gem::Version
231
232
  version: '0'
232
233
  requirements: []
233
- rubyforge_project:
234
+ rubyforge_project:
234
235
  rubygems_version: 2.2.2
235
- signing_key:
236
+ signing_key:
236
237
  specification_version: 4
237
238
  summary: Ruby wrapped KAF based Tree Tagger for 6 languages
238
239
  test_files: []
240
+ has_rdoc: