opener-polarity-tagger 3.3.0 → 3.4.0

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: dcce63ff8ce9916a2387c5d0f48209b203eacbc3834eedcf3b5b4990084ac1ad
4
- data.tar.gz: 495e79bfdec921d459ff78e50bdae28a2c6a0a8bc2aed150de27f49a7f99c423
3
+ metadata.gz: e7d99cc90032fe712bac6fa6952d1dc482d7ea5a86d9db9544f17e52d75d68f6
4
+ data.tar.gz: 8c8a5126f8a63a55bea7062c06d078bc87b0ff9286201956524755fb163e1172
5
5
  SHA512:
6
- metadata.gz: e51288c630084ce9be780b022ae23012337622b6df30de91962f5c73fd2ef32054435247bf850924a40ca723c3fe1a71fc9f688455b1ea5141acf80959fbe37a
7
- data.tar.gz: e8f00bd36a27aab5242d91e3f350d4da94d2661ef5565590e1793e02eb65075cf7dd789682b2cd0e06cf4b84bb21a5d5671d51f7e9d94ec1748cd1c8012f33ac
6
+ metadata.gz: 185160b82b01008ed03ce4a26e0d93ca18b1aab91e20c57acfe7425fa103c557606e0151e161ad7d36dc7380b2f26c9daae9e9649e4b1f7b65ce29c98f270ccc
7
+ data.tar.gz: 73f6b42eba61db2004fff08f54a1636767e8e77e93ec817717530accfa9fcd3001097e630c043fea0d3afd462c42b755a03f274c4d74e427c1753cf70fb30648
@@ -47,7 +47,8 @@ module Opener
47
47
  end
48
48
 
49
49
  if attrs.size > 0
50
- attrs.resource = lexicon.resource if lexicon.resource
50
+ attrs['lexicon-id'] = lexicon.id.to_s if lexicon.id
51
+ attrs.resource = lexicon.resource if lexicon.resource
51
52
  t.setPolarity attrs, polarity_pos
52
53
  end
53
54
  end
@@ -59,6 +59,14 @@ module Opener
59
59
 
60
60
  protected
61
61
 
62
+ def map_one_polarity l
63
+ poses = if l.poses.present? then l.poses else [l.pos] end
64
+ poses.each do |pos|
65
+ short_pos = POS_SHORT_MAP[pos&.to_sym] || DEFAULT_POS
66
+ @with_polarity[l.lemma+short_pos] = l
67
+ end
68
+ end
69
+
62
70
  def map lexicons
63
71
  return if blank?
64
72
 
@@ -70,8 +78,10 @@ module Opener
70
78
  when 'intensifier' then @intensifiers[l.lemma] = l
71
79
  else
72
80
  if l.polarity
73
- short_pos = POS_SHORT_MAP[l.pos&.to_sym] || DEFAULT_POS
74
- @with_polarity[l.lemma+short_pos] = l
81
+ map_one_polarity l
82
+ l.variants&.each do |v|
83
+ map_one_polarity v
84
+ end
75
85
  end
76
86
  end
77
87
  end
@@ -1,7 +1,7 @@
1
1
  module Opener
2
2
  class PolarityTagger
3
3
 
4
- VERSION = '3.3.0'
4
+ VERSION = '3.4.0'
5
5
 
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opener-polarity-tagger
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.4.0
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-12-10 00:00:00.000000000 Z
11
+ date: 2021-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opener-daemons