opener-chained-daemon 3.1.4 → 3.1.5

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: 8f4ae996f2569fd72fbb224a89aa6f1bd6335419a514db0714858e9c60e51511
4
- data.tar.gz: ce58d5715abd85083f70e2b6bb7789581f7007a3be4583050af0c401c61a224e
3
+ metadata.gz: 1a3d261875bffe0427ec49e37eb23a13dc8ddddb6a0677681f7a21a550961da5
4
+ data.tar.gz: eaf306aa0f178899dde39b6995efa08985cb00020636a3bcaa81061b2d5bc1c2
5
5
  SHA512:
6
- metadata.gz: 9cfb8fc04839f942f05d182bbac523764502a8f204679bf81515272839763572d72707ec9156f662f1538149a7f20b79741e3ad941b7da98bdb1ab0a7dcfd82b
7
- data.tar.gz: 6d03594f42b21240fc2210747884cd0de4296c469b581561b9c3845a86cb2696265052cae19002c7e1308cc28ab118927c2978ff67e88e6ea7e57dba2eceefaf
6
+ metadata.gz: 98a9a18b0130a61f41697c38deb88fe48769be4c5263a05aad4bd91b472db3d47b3e1cd36e69a6f6c6a5860a7413a4322cf8853837e7155d0e0adf0087c492cf
7
+ data.tar.gz: 2783a9005454540407af1a2fd07f748db06ee02716720abc9695f532448e367322fe09e6c28df59e8b690435aa1958c7ae10cc773a23418a1ff6993480984fc2
@@ -11,8 +11,8 @@ module Opener
11
11
  'stanza-tokenizer-pos': Stanza::TokenizerPos.new, # replace this tokenizer-pos with both below with you dont have a stanza server
12
12
  #'opener-tokenizer': Opener::Tokenizer.new,
13
13
  #'opener-pos-tagger': Opener::POSTagger.new,
14
- 'opener-polarity-tagger': Opener::PolarityTagger.new,
15
14
  'opener-property-tagger': Opener::PropertyTagger.new,
15
+ 'opener-polarity-tagger': Opener::PolarityTagger.new,
16
16
  'opener-opinion-detector-basic': Opener::OpinionDetectorBasic.new,
17
17
  }
18
18
  end
@@ -1,7 +1,7 @@
1
1
  module Opener
2
2
  class ChainedDaemon
3
3
 
4
- VERSION = '3.1.4'
4
+ VERSION = '3.1.5'
5
5
 
6
6
  end
7
7
  end
@@ -52,17 +52,25 @@ module Opener
52
52
 
53
53
  w_index = 0
54
54
 
55
+ miscs = {}
56
+ tokens.each_with_index do |t, i|
57
+ miscs[i] ||= {}
58
+ t.each do |word|
59
+ word['id'].is_a?(Array) && word['id'].each do |id|
60
+ puts id
61
+ miscs[i][id] = word['misc']
62
+ end
63
+ end
64
+ end
65
+
55
66
  tokens.map{ |t| t.reverse! } if RTL_LANGUAGES.include? kaf.language
56
67
  tokens.each_with_index do |sentence, s_index|
57
- miscs = {}
58
68
  sentence.each_with_index do |word|
59
69
  w_index += 1
60
70
  # save misc for later usase in a MWT case
61
- if word['id'].is_a? Array
62
- word['id'].each { |id| miscs[id] = word['misc'] }
63
- next
64
- end
65
- misc = word['misc'] || miscs[word['id']]
71
+ next if word['id'].is_a? Array
72
+
73
+ misc = word['misc'] || miscs[s_index][word['id']]
66
74
 
67
75
  Rollbar.scoped({ input: input, params: params, tokens: tokens, word: word }) do
68
76
  raise 'Missing misc'
@@ -35,8 +35,8 @@ Gem::Specification.new do |spec|
35
35
  spec.add_dependency 'opener-language-identifier', '>= 4.4.0'
36
36
  spec.add_dependency 'opener-tokenizer', '>= 2.2.0'
37
37
  spec.add_dependency 'opener-pos-tagger', '>= 3.2.0'
38
- spec.add_dependency 'opener-polarity-tagger', '>= 3.2.7'
39
- spec.add_dependency 'opener-property-tagger', '>= 3.3.5'
38
+ spec.add_dependency 'opener-property-tagger', '>= 3.3.6'
39
+ spec.add_dependency 'opener-polarity-tagger', '>= 3.3.0'
40
40
  spec.add_dependency 'opener-opinion-detector-basic', '>= 3.2.3'
41
41
 
42
42
  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.1.4
4
+ version: 3.1.5
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: 2020-11-23 00:00:00.000000000 Z
11
+ date: 2020-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -179,33 +179,33 @@ dependencies:
179
179
  - !ruby/object:Gem::Version
180
180
  version: 3.2.0
181
181
  - !ruby/object:Gem::Dependency
182
- name: opener-polarity-tagger
182
+ name: opener-property-tagger
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
185
  - - ">="
186
186
  - !ruby/object:Gem::Version
187
- version: 3.2.7
187
+ version: 3.3.6
188
188
  type: :runtime
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - ">="
193
193
  - !ruby/object:Gem::Version
194
- version: 3.2.7
194
+ version: 3.3.6
195
195
  - !ruby/object:Gem::Dependency
196
- name: opener-property-tagger
196
+ name: opener-polarity-tagger
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
199
  - - ">="
200
200
  - !ruby/object:Gem::Version
201
- version: 3.3.5
201
+ version: 3.3.0
202
202
  type: :runtime
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - ">="
207
207
  - !ruby/object:Gem::Version
208
- version: 3.3.5
208
+ version: 3.3.0
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: opener-opinion-detector-basic
211
211
  requirement: !ruby/object:Gem::Requirement