opener-polarity-tagger 3.1.1 → 3.1.2

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: aa2718e0e65c4b22466c7d7341e5dc1963e1a98ed093c545888ed1fa859c6e14
4
- data.tar.gz: b09f3e6a1360f5cedcaa2402c078b8d57f15dcdee993916f872865154f2d174a
3
+ metadata.gz: ee937e14a2da85b39cc76765d221ac23f9df4d713953482cd58bee4acebd1f0d
4
+ data.tar.gz: d86cd682deb902951b93a3c217a9ccfff677956c39adc4b21a29597483f4b28b
5
5
  SHA512:
6
- metadata.gz: 190115afbdbc6e2a1e9535ac80a482f9e011570161f71bc06a9770f63d3f20b1ac710ccc982ffbe5246cb5e5737103ae04ae64437f3dcba3077548d46d3dea93
7
- data.tar.gz: d7c9754e2feaa9d152d7d19ee24eb713e61df8ce0821f79651e68f74fa6f2ef15b8ec307a16ab385eb7f71e3c7c315f2f2a9ee5c69768d30fd2e06260980588d
6
+ metadata.gz: d400f873a98d0426b4090f4155339ab2e2bb6743218d65dde59ed40d3ae61a5f66c836fb2f4bd197058e12c1646f473bbc7fc460ba83c1accfc6b27778d2259d
7
+ data.tar.gz: 5957d89cce03e50eb7d554aac1c39cd06c80d9f9381142ec7e0fc40931e3910b06a7298a9c9a3f1fcac58332edca175afe7fd2e26271f60b2c672471c05f2ebd
@@ -10,15 +10,15 @@ module Opener
10
10
  LAST_EDITED = '21may2014'
11
11
  VERSION = '1.2'
12
12
 
13
- def initialize ignore_pos: false, **params
14
- @cache = LexiconsCache.new
13
+ CACHE = LexiconsCache.new
15
14
 
15
+ def initialize ignore_pos: false, **params
16
16
  @ignore_pos = ignore_pos
17
17
  end
18
18
 
19
19
  def run input
20
20
  @kaf = KAF::Document.from_xml input
21
- @map = @kaf.map = @cache[@kaf.language]
21
+ @map = @kaf.map = CACHE[@kaf.language]
22
22
 
23
23
  negators = 0
24
24
  @kaf.terms.each do |t|
@@ -33,11 +33,11 @@ module Opener
33
33
  end
34
34
  if l = @map.by_negator(lemma)
35
35
  negators += 1
36
- lexicon, polarity = l, nil
36
+ lexicon, polarity_pos = l, nil
37
37
  attrs.sentiment_modifier = 'shifter'
38
38
  end
39
39
  if l = @map.by_intensifier(lemma)
40
- lexicon, polarity = l, nil
40
+ lexicon, polarity_pos = l, nil
41
41
  attrs.sentiment_modifier = 'intensifier'
42
42
  end
43
43
 
@@ -2,8 +2,9 @@ module Opener
2
2
  class PolarityTagger
3
3
  class LexiconsCache
4
4
 
5
+ include MonitorMixin
6
+
5
7
  def initialize
6
- extend MonitorMixin
7
8
  super #MonitorMixin
8
9
 
9
10
  @url = ENV['POLARITY_LEXICON_URL']
@@ -1,7 +1,7 @@
1
1
  module Opener
2
2
  class PolarityTagger
3
3
 
4
- VERSION = '3.1.1'
4
+ VERSION = '3.1.2'
5
5
 
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opener-polarity-tagger
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - development@olery.com