opener-constituent-parser-de 1.1.0 → 1.1.1

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: d3391570680837ef3f97d5150190615750054651
4
- data.tar.gz: 091444ff5955beaabe117868fe65444d5fdc084a
3
+ metadata.gz: 33bef3cf33d7b63920af3f1d424adaa62eb88c4c
4
+ data.tar.gz: a34c9a36ec621f87d9d9dec01123ad20d0a0c746
5
5
  SHA512:
6
- metadata.gz: 9d52129f3a3eaf9f3b645d0242a46304d87be25018ea8b8713ba56c63c339fcd3f240ca7f456bab3818a8b497b7beee42ac171e0cfe4a73e79a8700d41710c2d
7
- data.tar.gz: d0fa9a3906ead6edeebefbf4ed9c924e5f6cf1891d74a294f510f9db62f46336d8c82c603f77fc981611798d8ecbf954b8c93fbea1b20ba282a8f3b9b3d05b87
6
+ metadata.gz: 0305b6278b704cac63d168f2d7b964dd2b4dc3b9368561500013e5dbe2e5039ae22cfaf784878b916e307575d1606ed9645cdf72336b64907bc1eeffecfc6ecc
7
+ data.tar.gz: 68b3d8d29adb8d51ebace1a256b9b95717244acc6e4ee8335eb6214d3a9e3e7320f82f5bbd23ad3f42617d228ebbb1a5520410e463e012e7775b64329f2803cd
@@ -47,26 +47,33 @@ module Opener
47
47
  return "python -E -O #{kernel} #{args.join(' ')}"
48
48
  end
49
49
 
50
- ##
51
50
  # Runs the command and returns the output of STDOUT, STDERR and the
52
51
  # process information.
53
52
  #
54
- # @param [String] input The input to process.
55
- # @return [String]
53
+ # @param [String] input The input to tag.
54
+ # @return [Array]
56
55
  #
57
56
  def run(input)
58
- unless File.file?(kernel)
59
- raise "The Python kernel (#{kernel}) does not exist"
60
- end
61
-
62
- stdout, stderr, process = Open3.capture3(command, :stdin_data => input)
63
-
57
+ stdout, stderr, process = capture(input)
64
58
  raise stderr unless process.success?
65
-
66
- return stdout
59
+ return stdout, stderr, process
67
60
  end
68
61
 
69
62
  protected
63
+
64
+ ##
65
+ # capture3 method doesn't work properly with Jruby, so
66
+ # this is a workaround
67
+ #
68
+ def capture(input)
69
+ Open3.popen3(*command.split(" ")) {|i, o, e, t|
70
+ out_reader = Thread.new { o.read }
71
+ err_reader = Thread.new { e.read }
72
+ i.write input
73
+ i.close
74
+ [out_reader.value, err_reader.value, t.value]
75
+ }
76
+ end
70
77
 
71
78
  ##
72
79
  # @return [String]
@@ -1,7 +1,7 @@
1
1
  module Opener
2
2
  module ConstituentParsers
3
3
  class DE
4
- VERSION = '1.1.0'
4
+ VERSION = '1.1.1'
5
5
  end # DE
6
6
  end # ConstituentParsers
7
7
  end # Opener
data/task/stanford.rake CHANGED
@@ -1,5 +1,5 @@
1
1
  file 'tmp/stanford.zip' do |task|
2
- sh "wget #{STANFORD_ARCHIVE_URL} -O #{task.name}"
2
+ sh "wget #{STANFORD_ARCHIVE_URL} -O #{task.name} --no-check-certificate"
3
3
  end
4
4
 
5
5
  directory 'tmp/stanford' => ['tmp/stanford.zip'] do |task|
metadata CHANGED
@@ -1,73 +1,73 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opener-constituent-parser-de
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - development@olery.com
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-23 00:00:00.000000000 Z
11
+ date: 2014-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cliver
15
- requirement: !ruby/object:Gem::Requirement
15
+ version_requirements: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
20
+ requirement: !ruby/object:Gem::Requirement
23
21
  requirements:
24
- - - ">="
22
+ - - '>='
25
23
  - !ruby/object:Gem::Version
26
24
  version: '0'
25
+ prerelease: false
26
+ type: :runtime
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
- requirement: !ruby/object:Gem::Requirement
29
+ version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
34
+ requirement: !ruby/object:Gem::Requirement
37
35
  requirements:
38
- - - ">="
36
+ - - '>='
39
37
  - !ruby/object:Gem::Version
40
38
  version: '0'
39
+ prerelease: false
40
+ type: :runtime
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
- requirement: !ruby/object:Gem::Requirement
43
+ version_requirements: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '3.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
51
49
  requirements:
52
- - - "~>"
50
+ - - ~>
53
51
  - !ruby/object:Gem::Version
54
52
  version: '3.0'
53
+ prerelease: false
54
+ type: :development
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: cucumber
57
- requirement: !ruby/object:Gem::Requirement
57
+ version_requirements: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
62
+ requirement: !ruby/object:Gem::Requirement
65
63
  requirements:
66
- - - ">="
64
+ - - '>='
67
65
  - !ruby/object:Gem::Version
68
66
  version: '0'
67
+ prerelease: false
68
+ type: :development
69
69
  description: Constituent parser for the German language
70
- email:
70
+ email:
71
71
  executables:
72
72
  - constituent-parser-de
73
73
  extensions:
@@ -91,28 +91,27 @@ files:
91
91
  - task/requirements.rake
92
92
  - task/stanford.rake
93
93
  - task/test.rake
94
- homepage:
94
+ homepage:
95
95
  licenses: []
96
96
  metadata: {}
97
- post_install_message:
97
+ post_install_message:
98
98
  rdoc_options: []
99
99
  require_paths:
100
100
  - lib
101
101
  required_ruby_version: !ruby/object:Gem::Requirement
102
102
  requirements:
103
- - - ">="
103
+ - - '>='
104
104
  - !ruby/object:Gem::Version
105
105
  version: 1.9.2
106
106
  required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - '>='
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  requirements: []
112
- rubyforge_project:
112
+ rubyforge_project:
113
113
  rubygems_version: 2.2.2
114
- signing_key:
114
+ signing_key:
115
115
  specification_version: 4
116
116
  summary: Constituent parser for the German language
117
117
  test_files: []
118
- has_rdoc: yard