opener-opinion-detector-basic 3.0.2 → 3.2.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
- SHA1:
3
- metadata.gz: fa83717460841775dcf28e9f640208bd16e2cc5d
4
- data.tar.gz: 8c8f56b11a38b57c07945bffd666b646ef041f80
2
+ SHA256:
3
+ metadata.gz: 6f7a562496546cf0e5fd8f4d506b8d0d0dda91e48f252c189f23eff5e3df7e6b
4
+ data.tar.gz: f97435237464279c9ca2ff30dcaebb93e89ffe2040fbe8078f4dd9f7ceef6428
5
5
  SHA512:
6
- metadata.gz: 957e43027ccae0ab98becec3641eb82c10a9531d74f278d3557e3f1f8aa19e8ec59260bebd31a105e5e283e55bc2a04d67b70f9a582c00b93b771210e491fbe8
7
- data.tar.gz: 02a6df21160370204fb1a72084d36663f974ff816a615028567e701370bd0a6cfabe96b16f7281f0576d7f656bbd21de010f129a05d1f2d3126e71ed4b1706ff
6
+ metadata.gz: ae07678330cbc48f42fbcd4e3532f064280eb200b689750c6a87111d6980188424460441db97dad337a0c2f61299aec2081eb375fe3a9953113bc6cd473ec86d
7
+ data.tar.gz: 9cd7f7af2869ae4e63623d029e084caa8363884fd758c364a8475b1ed26b468b01d3fcf2da0e90cd88bde6bb6d49631b9e1be4e4c0d62521619c87434882fc46
@@ -20,12 +20,11 @@ Oga::XPath::Parser.class_eval do
20
20
  end
21
21
  end
22
22
 
23
- Oga::XPath::Evaluator.class_eval do
23
+ Oga::XPath::Compiler.class_eval do
24
24
  include NewRelic::Agent::Instrumentation::ControllerInstrumentation
25
25
  include NewRelic::Agent::MethodTracer
26
26
 
27
- add_method_tracer(:evaluate)
28
- add_method_tracer(:evaluate_ast)
27
+ add_method_tracer(:compile)
29
28
  end
30
29
 
31
30
  Opener::OpinionDetectorBasic::Processor.class_eval do
@@ -42,6 +41,22 @@ Opener::OpinionDetectorBasic::Processor.class_eval do
42
41
  add_method_tracer(:apply_conjunctions)
43
42
  end
44
43
 
44
+ Opener::OpinionDetectorBasic::Term.class_eval do
45
+ include NewRelic::Agent::Instrumentation::ControllerInstrumentation
46
+ include NewRelic::Agent::MethodTracer
47
+
48
+ add_method_tracer(:initialize)
49
+ add_method_tracer(:sentiment_modifier)
50
+ add_method_tracer(:polarity)
51
+ add_method_tracer(:target_ids)
52
+ add_method_tracer(:strength)
53
+ add_method_tracer(:get_sentence)
54
+ add_method_tracer(:is_intensifier?)
55
+ add_method_tracer(:is_shifter?)
56
+ add_method_tracer(:is_expression?)
57
+ add_method_tracer(:is_conjunction?)
58
+ end
59
+
45
60
  daemon = Opener::Daemons::Daemon.new(Opener::OpinionDetectorBasic)
46
61
 
47
62
  daemon.start
@@ -40,10 +40,11 @@ module Opener
40
40
  # @param [String] input
41
41
  # @return [String]
42
42
  #
43
- def run(input)
43
+ def run input, params = {}
44
44
  return Processor.new(input, options).process
45
45
  end
46
- end # OpinionDetectorBasic
47
- end # Opener
46
+
47
+ end
48
+ end
48
49
 
49
50
 
@@ -145,7 +145,7 @@ module Opener
145
145
  # @return [TrueClass|FalseClass]
146
146
  #
147
147
  def is_conjunction?(language)
148
- CONJUNCTIONS[language].include?(lemma)
148
+ pos == 'J' || CONJUNCTIONS[language]&.include?(lemma)
149
149
  end
150
150
 
151
151
  private
@@ -1,5 +1,7 @@
1
1
  module Opener
2
2
  class OpinionDetectorBasic
3
- VERSION = '3.0.2'
3
+
4
+ VERSION = '3.2.1'
5
+
4
6
  end
5
7
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
10
10
  gem.license = 'Apache 2.0'
11
11
 
12
12
  gem.required_ruby_version = '>= 1.9.2'
13
-
13
+
14
14
  gem.files = Dir.glob([
15
15
  'lib/**/*',
16
16
  'config.ru',
@@ -26,8 +26,8 @@ Gem::Specification.new do |gem|
26
26
  gem.add_dependency 'opener-daemons', '~> 2.2'
27
27
  gem.add_dependency 'opener-webservice', '~> 2.1'
28
28
  gem.add_dependency 'opener-core', '~> 2.2'
29
-
30
- gem.add_dependency 'oga'
29
+
30
+ gem.add_dependency 'oga', ['~> 1.0', '>= 1.3.1']
31
31
 
32
32
  gem.add_development_dependency 'rspec', '~> 3.0'
33
33
  gem.add_development_dependency 'cucumber'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opener-opinion-detector-basic
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.2.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: 2015-08-18 00:00:00.000000000 Z
11
+ date: 2020-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opener-daemons
@@ -56,16 +56,22 @@ dependencies:
56
56
  name: oga
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.0'
59
62
  - - ">="
60
63
  - !ruby/object:Gem::Version
61
- version: '0'
64
+ version: 1.3.1
62
65
  type: :runtime
63
66
  prerelease: false
64
67
  version_requirements: !ruby/object:Gem::Requirement
65
68
  requirements:
69
+ - - "~>"
70
+ - !ruby/object:Gem::Version
71
+ version: '1.0'
66
72
  - - ">="
67
73
  - !ruby/object:Gem::Version
68
- version: '0'
74
+ version: 1.3.1
69
75
  - !ruby/object:Gem::Dependency
70
76
  name: rspec
71
77
  requirement: !ruby/object:Gem::Requirement
@@ -123,11 +129,11 @@ dependencies:
123
129
  - !ruby/object:Gem::Version
124
130
  version: '2.0'
125
131
  description: Basic Opinion Detector.
126
- email:
132
+ email:
127
133
  executables:
128
- - opinion-detector-basic-server
129
134
  - opinion-detector-basic
130
135
  - opinion-detector-basic-daemon
136
+ - opinion-detector-basic-server
131
137
  extensions: []
132
138
  extra_rdoc_files: []
133
139
  files:
@@ -153,7 +159,7 @@ homepage: http://opener-project.github.com/
153
159
  licenses:
154
160
  - Apache 2.0
155
161
  metadata: {}
156
- post_install_message:
162
+ post_install_message:
157
163
  rdoc_options: []
158
164
  require_paths:
159
165
  - lib
@@ -168,10 +174,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
174
  - !ruby/object:Gem::Version
169
175
  version: '0'
170
176
  requirements: []
171
- rubyforge_project:
172
- rubygems_version: 2.4.8
173
- signing_key:
177
+ rubyforge_project:
178
+ rubygems_version: 2.7.8
179
+ signing_key:
174
180
  specification_version: 4
175
181
  summary: Basic Opinion Detector.
176
182
  test_files: []
177
- has_rdoc: