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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7d99cc90032fe712bac6fa6952d1dc482d7ea5a86d9db9544f17e52d75d68f6
|
4
|
+
data.tar.gz: 8c8a5126f8a63a55bea7062c06d078bc87b0ff9286201956524755fb163e1172
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
-
|
74
|
-
|
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
|
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.
|
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:
|
11
|
+
date: 2021-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opener-daemons
|