opener-opinion-detector-basic 2.0.3 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/core/opinion_detector_basic_multi.py +11 -5
- data/lib/opener/opinion_detector_basic/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 623f2b6acc84b09adb6ca6bcf33d3f3d21454ff2
|
4
|
+
data.tar.gz: 0a6b9f331ed8daa3e4d3d4dbce06b44bd6ece5fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
114
|
-
|
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
|
|
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.
|
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-
|
11
|
+
date: 2015-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opener-daemons
|