opener-opinion-detector-basic 2.0.3 → 2.0.6

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: cda3ea002522fd4a4894a43e4f6afec229106f59
4
- data.tar.gz: c699bc22b64097d82f62fa341ba212b9fe2febbb
3
+ metadata.gz: 623f2b6acc84b09adb6ca6bcf33d3f3d21454ff2
4
+ data.tar.gz: 0a6b9f331ed8daa3e4d3d4dbce06b44bd6ece5fb
5
5
  SHA512:
6
- metadata.gz: 5526a04d8349a9b3b0b4f06a7b14412ae3a0204cc6ea36e5d3c53178089d7133ff7f5f6eb0c6702abb189c6c0ec5d4652b9a65ed9b60942c6043b327a0342879
7
- data.tar.gz: c800e71953621313a98171baf7a4f550fd48fbfd2efcfbcf288fb2190d18d5f1530e3b5e7bcef3fcc0d706d7f29708016d9272ef4b3222953a2cb7bf5fec3f33
6
+ metadata.gz: 54d2e768d2a8db9a9ee4e610808496181f499347cccb962a29af5047b97e5ac603b28931e723299ae88b6993604b8596bd3b4e2f1b660bd2f5751422f555bbdf
7
+ data.tar.gz: 50cd0843da192aac3d20bcfbc60b9855d5d9b2cde92bae131a6fcb091f69c4f4d8603b40de10d0bd6fb20d2af0cabab451e98f9d46d7d773e456f149ad8470fb
@@ -110,12 +110,18 @@ def obtain_opinion_expressions(tokens,lang='nl'):
110
110
  while t < len(my_tokens):
111
111
  if my_tokens[t].isNegator() or my_tokens[t].isIntensifier():
112
112
  if t+1 < len(my_tokens) and ( my_tokens[t+1].isNegator() or my_tokens[t+1].isIntensifier()):
113
- ## There are 2 negators/intensifiers next to each other
114
- ## The first one is deactivated and the second one is modified
115
- my_tokens[t].use_it = False
116
- my_tokens[t+1].value += my_tokens[t].value
117
- my_tokens[t+1].list_ids += my_tokens[t].list_ids
113
+ if my_tokens[t+1].isNegator():
114
+ my_tokens[t+1].value *= my_tokens[t].value
118
115
  logging.debug(' Accumulating '+'-'.join(my_tokens[t+1].list_ids))
116
+ if my_tokens[t+1].isIntensifier():
117
+ my_tokens[t+1].value += my_tokens[t].value
118
+
119
+ ## There are 2 negators/intensifiers next to each other
120
+ ## The first one is deactivated and the second one is modified
121
+ my_tokens[t].use_it = False
122
+ my_tokens[t+1].list_ids += my_tokens[t].list_ids
123
+ logging.debug(' Accumulating '+'-'.join(my_tokens[t+1].list_ids))
124
+
119
125
  t+=1
120
126
  ###########################################
121
127
 
@@ -1,5 +1,5 @@
1
1
  module Opener
2
2
  class OpinionDetectorBasic
3
- VERSION = '2.0.3'
3
+ VERSION = '2.0.6'
4
4
  end
5
5
  end
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: 2.0.3
4
+ version: 2.0.6
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: 2015-04-16 00:00:00.000000000 Z
11
+ date: 2015-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opener-daemons