artemo 3.0.9 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.DS_Store +0 -0
- data/CHANGELOG +4 -1
- data/Gemfile.lock +1 -1
- data/README.md +5 -0
- data/bin/artemo +1 -1
- data/lib/artemo/version.rb +1 -1
- data/lib/artemo.rb +9 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a686dd76c1e61363a848ae50eefa557ce1d4502
|
4
|
+
data.tar.gz: 014dcdff4c77ed8f1a2c9852f551bdb4f6930332
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09d2687bfdb76b96f11480ad916cdf1e99e5980ed5a689785e7d4691de868d883e52ed8387fbf3a5456665d1c2f7f4812e8725de0d76ddb1b93fa860daec3265'
|
7
|
+
data.tar.gz: 31e1170ec5c9c88240b0866261ab90f8b8a30584d30e0bd1e7c537785456a505ec457dbffac3db9ac118799ea811e9b7273b424f1458cff6667db1d5988a502d
|
data/.DS_Store
CHANGED
Binary file
|
data/CHANGELOG
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/bin/artemo
CHANGED
data/lib/artemo/version.rb
CHANGED
data/lib/artemo.rb
CHANGED
@@ -15,10 +15,14 @@ class ArtEmo
|
|
15
15
|
def self.call(text_file)
|
16
16
|
keywords = Keywords.call
|
17
17
|
text = Loader.call(text_file)
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
unless text.nil?
|
19
|
+
begin
|
20
|
+
basic = BasicEmotions.call(keywords, text)
|
21
|
+
complex = ComplexEmotions.call(basic)
|
22
|
+
Result.call(complex)
|
23
|
+
rescue
|
24
|
+
{"aggressiveness"=>0, "anxiety"=>0, "awe"=>0, "contempt"=>0, "curiosity"=>0, "cynicism"=>0, "delight"=>0, "despair"=>0, "disappointment"=>0, "dominance"=>0, "envy"=>0, "fatalism"=>0, "guilt"=>0, "love"=>0, "morbidness"=>0, "optimism"=>0, "outrage"=>0, "pessimism"=>0, "pride"=>0, "remorse"=>0, "revulsion"=>0, "sentimentality"=>0, "shame"=>0, "submission"=>0}
|
25
|
+
end
|
22
26
|
end
|
23
27
|
end
|
24
28
|
end
|
@@ -26,5 +30,5 @@ end
|
|
26
30
|
if ARGV.first.nil?
|
27
31
|
puts "artemo [your text file]"
|
28
32
|
else
|
29
|
-
ArtEmo.call(ARGV.first)
|
33
|
+
puts ArtEmo.call(ARGV.first)
|
30
34
|
end
|