opener-chained-daemon 3.3.4 → 3.3.9
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da0886d755e4a2fe666cf4c6c87466390160bf111ea42c647b7a72b2b866cc2f
|
4
|
+
data.tar.gz: b2c9798702c3308420f6beaa971d689434dd57a59af33d6fa0c0e4a5532eba40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8caba6e9f2c67cd3db3b24b81aaa328c7b4c3cadf7e3f5a7746b60bdce47a67ad876f44d58be190e72e72e71f859ec79e40d6e0b5e21b5e2023a824efc686c20
|
7
|
+
data.tar.gz: b39b030b31625b7015694c70b8781aaec1526e171337ee95c3a75845a70067650b920d0e9c59fed472e92045067072592985920e90986b651aa2daf86806d5ae
|
@@ -24,22 +24,12 @@ module Opener
|
|
24
24
|
def cache_update
|
25
25
|
puts "loading supported languages from url #{@url}" if ENV['DEBUG']
|
26
26
|
|
27
|
-
languages = SymMash.new JSON.parse http.get(@url).body
|
27
|
+
languages = SymMash.new JSON.parse ChainedDaemon.http.get(@url).body
|
28
28
|
@last_updated = Time.now
|
29
29
|
@cache = languages.data.each.with_object({}){ |l,h| h[l.code] = l }
|
30
30
|
@cache
|
31
31
|
end
|
32
32
|
|
33
|
-
def http
|
34
|
-
return @http if @http
|
35
|
-
|
36
|
-
@http = HTTPClient.new
|
37
|
-
@http.send_timeout = 120
|
38
|
-
@http.receive_timeout = 120
|
39
|
-
@http.connect_timeout = 120
|
40
|
-
@http
|
41
|
-
end
|
42
|
-
|
43
33
|
end
|
44
34
|
end
|
45
35
|
end
|
@@ -26,11 +26,11 @@ module Opener
|
|
26
26
|
'PRON' => 'Q',
|
27
27
|
'PROPN' => 'R',
|
28
28
|
'PART' => 'P',
|
29
|
-
'NUM' => '
|
29
|
+
'NUM' => 'I',
|
30
30
|
'X' => 'O',
|
31
|
-
'SYM' => '
|
31
|
+
'SYM' => 'I',
|
32
32
|
'SCONJ' => 'P',
|
33
|
-
'INTJ' => '
|
33
|
+
'INTJ' => 'I',
|
34
34
|
}
|
35
35
|
|
36
36
|
POS_OPEN = %w[N R G V A O]
|
@@ -50,7 +50,7 @@ module Opener
|
|
50
50
|
|
51
51
|
input = kaf.raw
|
52
52
|
input = input.gsub(/\,[^\ ]/, ', ')
|
53
|
-
response =
|
53
|
+
response = ChainedDaemon.http.post BASE_URL, {lang: kaf.language, input: input}.to_query
|
54
54
|
raise Core::UnsupportedLanguageError, kaf.language if response.status == 406
|
55
55
|
raise response.body if response.status >= 400
|
56
56
|
sentences = JSON.parse response.body
|
@@ -62,7 +62,8 @@ module Opener
|
|
62
62
|
sentences.each.with_index do |s, i|
|
63
63
|
miscs[i] = {}
|
64
64
|
s.each do |word|
|
65
|
-
|
65
|
+
(word.id.min..word.id.max).each { |id| miscs[i][id] = word.misc }
|
66
|
+
end
|
66
67
|
end
|
67
68
|
end
|
68
69
|
|
@@ -28,15 +28,12 @@ Gem::Specification.new do |spec|
|
|
28
28
|
|
29
29
|
spec.add_dependency 'roda'
|
30
30
|
spec.add_dependency 'rack-timeout'
|
31
|
-
spec.add_dependency 'faraday'
|
32
31
|
spec.add_dependency 'opener-daemons', '~> 2.7.2'
|
33
32
|
spec.add_dependency 'opener-callback-handler', '~> 1.0'
|
34
33
|
|
35
34
|
spec.add_dependency 'opener-language-identifier', '>= 4.4.0'
|
36
|
-
spec.add_dependency 'opener-
|
37
|
-
spec.add_dependency 'opener-
|
38
|
-
spec.add_dependency 'opener-property-tagger', '>= 3.4.0'
|
39
|
-
spec.add_dependency 'opener-polarity-tagger', '>= 3.4.0'
|
35
|
+
spec.add_dependency 'opener-property-tagger', '>= 3.4.1'
|
36
|
+
spec.add_dependency 'opener-polarity-tagger', '>= 3.5.2'
|
40
37
|
spec.add_dependency 'opener-opinion-detector-basic', '>= 3.2.3'
|
41
38
|
|
42
39
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opener-chained-daemon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.9
|
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: 2021-
|
11
|
+
date: 2021-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -94,20 +94,6 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: faraday
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :runtime
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
97
|
- !ruby/object:Gem::Dependency
|
112
98
|
name: opener-daemons
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,62 +136,34 @@ dependencies:
|
|
150
136
|
- - ">="
|
151
137
|
- !ruby/object:Gem::Version
|
152
138
|
version: 4.4.0
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: opener-tokenizer
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - ">="
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: 2.2.0
|
160
|
-
type: :runtime
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - ">="
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: 2.2.0
|
167
|
-
- !ruby/object:Gem::Dependency
|
168
|
-
name: opener-pos-tagger
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - ">="
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: 3.2.0
|
174
|
-
type: :runtime
|
175
|
-
prerelease: false
|
176
|
-
version_requirements: !ruby/object:Gem::Requirement
|
177
|
-
requirements:
|
178
|
-
- - ">="
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
version: 3.2.0
|
181
139
|
- !ruby/object:Gem::Dependency
|
182
140
|
name: opener-property-tagger
|
183
141
|
requirement: !ruby/object:Gem::Requirement
|
184
142
|
requirements:
|
185
143
|
- - ">="
|
186
144
|
- !ruby/object:Gem::Version
|
187
|
-
version: 3.4.
|
145
|
+
version: 3.4.1
|
188
146
|
type: :runtime
|
189
147
|
prerelease: false
|
190
148
|
version_requirements: !ruby/object:Gem::Requirement
|
191
149
|
requirements:
|
192
150
|
- - ">="
|
193
151
|
- !ruby/object:Gem::Version
|
194
|
-
version: 3.4.
|
152
|
+
version: 3.4.1
|
195
153
|
- !ruby/object:Gem::Dependency
|
196
154
|
name: opener-polarity-tagger
|
197
155
|
requirement: !ruby/object:Gem::Requirement
|
198
156
|
requirements:
|
199
157
|
- - ">="
|
200
158
|
- !ruby/object:Gem::Version
|
201
|
-
version: 3.
|
159
|
+
version: 3.5.2
|
202
160
|
type: :runtime
|
203
161
|
prerelease: false
|
204
162
|
version_requirements: !ruby/object:Gem::Requirement
|
205
163
|
requirements:
|
206
164
|
- - ">="
|
207
165
|
- !ruby/object:Gem::Version
|
208
|
-
version: 3.
|
166
|
+
version: 3.5.2
|
209
167
|
- !ruby/object:Gem::Dependency
|
210
168
|
name: opener-opinion-detector-basic
|
211
169
|
requirement: !ruby/object:Gem::Requirement
|