artemo 3.2.0 → 3.2.1

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.
Files changed (251) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +4 -1
  3. data/Gemfile.lock +1 -1
  4. data/README.md +2 -0
  5. data/artemo.gemspec +0 -1
  6. data/examples/10001.pdf +506 -0
  7. data/examples/10004.pdf +506 -0
  8. data/examples/10005.pdf +506 -0
  9. data/examples/10006.pdf +506 -0
  10. data/examples/10009.pdf +506 -0
  11. data/examples/1001.pdf +506 -0
  12. data/examples/10010.pdf +506 -0
  13. data/examples/10011.pdf +506 -0
  14. data/examples/10012.pdf +506 -0
  15. data/examples/10013.pdf +506 -0
  16. data/examples/10014.pdf +506 -0
  17. data/examples/10015.pdf +506 -0
  18. data/examples/10016.pdf +506 -0
  19. data/examples/10017.pdf +506 -0
  20. data/examples/10018.pdf +506 -0
  21. data/examples/10019.pdf +506 -0
  22. data/examples/10020.pdf +506 -0
  23. data/examples/10021.pdf +506 -0
  24. data/examples/10022.pdf +506 -0
  25. data/examples/10023.pdf +506 -0
  26. data/examples/10024.pdf +506 -0
  27. data/examples/10025.pdf +506 -0
  28. data/examples/10026.pdf +506 -0
  29. data/examples/10027.pdf +506 -0
  30. data/examples/10028.pdf +506 -0
  31. data/examples/10031.pdf +506 -0
  32. data/examples/10032.pdf +506 -0
  33. data/examples/10033.pdf +506 -0
  34. data/examples/10034.pdf +506 -0
  35. data/examples/10035.pdf +506 -0
  36. data/examples/10036.pdf +506 -0
  37. data/examples/10037.pdf +506 -0
  38. data/examples/10038.pdf +506 -0
  39. data/examples/10039.pdf +506 -0
  40. data/examples/10040.pdf +506 -0
  41. data/examples/10041.pdf +506 -0
  42. data/examples/10042.pdf +506 -0
  43. data/examples/10043.pdf +506 -0
  44. data/examples/10044.pdf +506 -0
  45. data/examples/10045.pdf +506 -0
  46. data/examples/10046.pdf +506 -0
  47. data/examples/10047.pdf +506 -0
  48. data/examples/10048.pdf +506 -0
  49. data/examples/10049.pdf +506 -0
  50. data/examples/1005.pdf +506 -0
  51. data/examples/10050.pdf +506 -0
  52. data/examples/10051.pdf +506 -0
  53. data/examples/10052.pdf +506 -0
  54. data/examples/10054.pdf +506 -0
  55. data/examples/10055.pdf +506 -0
  56. data/examples/1006.pdf +506 -0
  57. data/examples/10060.pdf +506 -0
  58. data/examples/10061.pdf +506 -0
  59. data/examples/10062.pdf +506 -0
  60. data/examples/10064.pdf +506 -0
  61. data/examples/10065.pdf +506 -0
  62. data/examples/10066.pdf +506 -0
  63. data/examples/10068.pdf +506 -0
  64. data/examples/10069.pdf +506 -0
  65. data/examples/1007.pdf +506 -0
  66. data/examples/10070.pdf +506 -0
  67. data/examples/10071.pdf +506 -0
  68. data/examples/10072.pdf +506 -0
  69. data/examples/10073.pdf +506 -0
  70. data/examples/10074.pdf +506 -0
  71. data/examples/10075.pdf +506 -0
  72. data/examples/10076.pdf +506 -0
  73. data/examples/10077.pdf +506 -0
  74. data/examples/10080.pdf +506 -0
  75. data/examples/10081.pdf +506 -0
  76. data/examples/10083.pdf +506 -0
  77. data/examples/10084.pdf +506 -0
  78. data/examples/10085.pdf +506 -0
  79. data/examples/10086.pdf +506 -0
  80. data/examples/10087.pdf +506 -0
  81. data/examples/10088.pdf +506 -0
  82. data/examples/10089.pdf +506 -0
  83. data/examples/10090.pdf +506 -0
  84. data/examples/10091.pdf +506 -0
  85. data/examples/10092.pdf +506 -0
  86. data/examples/10093.pdf +506 -0
  87. data/examples/10094.pdf +506 -0
  88. data/examples/10096.pdf +506 -0
  89. data/examples/10097.pdf +506 -0
  90. data/examples/10098.pdf +506 -0
  91. data/examples/10099.pdf +506 -0
  92. data/examples/101.pdf +506 -0
  93. data/examples/10100.pdf +506 -0
  94. data/examples/10101.pdf +506 -0
  95. data/examples/10102.pdf +506 -0
  96. data/examples/10103.pdf +506 -0
  97. data/examples/10104.pdf +506 -0
  98. data/examples/10105.pdf +506 -0
  99. data/examples/10106.pdf +506 -0
  100. data/examples/10107.pdf +506 -0
  101. data/examples/10108.pdf +506 -0
  102. data/examples/10109.pdf +506 -0
  103. data/examples/10110.pdf +506 -0
  104. data/examples/10111.pdf +506 -0
  105. data/examples/10112.pdf +506 -0
  106. data/examples/10113.pdf +506 -0
  107. data/examples/10114.pdf +506 -0
  108. data/examples/10118.pdf +506 -0
  109. data/examples/10119.pdf +506 -0
  110. data/examples/10120.pdf +506 -0
  111. data/examples/10121.pdf +506 -0
  112. data/examples/10122.pdf +506 -0
  113. data/examples/10123.pdf +506 -0
  114. data/examples/10124.pdf +506 -0
  115. data/examples/10125.pdf +506 -0
  116. data/examples/10126.pdf +506 -0
  117. data/examples/10127.pdf +506 -0
  118. data/examples/10128.pdf +506 -0
  119. data/examples/10129.pdf +506 -0
  120. data/examples/1013.pdf +506 -0
  121. data/examples/10130.pdf +506 -0
  122. data/examples/10131.pdf +506 -0
  123. data/examples/10132.pdf +506 -0
  124. data/examples/10133.pdf +506 -0
  125. data/examples/10134.pdf +506 -0
  126. data/examples/10135.pdf +506 -0
  127. data/examples/10139.pdf +506 -0
  128. data/examples/1014.pdf +506 -0
  129. data/examples/10140-0.pdf +506 -0
  130. data/examples/10141.pdf +506 -0
  131. data/examples/10142.pdf +506 -0
  132. data/examples/10143.pdf +506 -0
  133. data/examples/10144.pdf +506 -0
  134. data/examples/10145.pdf +506 -0
  135. data/examples/10146.pdf +506 -0
  136. data/examples/10147.pdf +506 -0
  137. data/examples/10148.pdf +506 -0
  138. data/examples/10149.pdf +506 -0
  139. data/examples/1015.pdf +506 -0
  140. data/examples/10151.pdf +506 -0
  141. data/examples/10159.pdf +506 -0
  142. data/examples/10160.pdf +506 -0
  143. data/examples/10161.pdf +506 -0
  144. data/examples/10162.pdf +506 -0
  145. data/examples/10163.pdf +506 -0
  146. data/examples/10164.pdf +506 -0
  147. data/examples/10166.pdf +506 -0
  148. data/examples/1019.pdf +506 -0
  149. data/examples/102.pdf +506 -0
  150. data/examples/10201.pdf +506 -0
  151. data/examples/10202.pdf +506 -0
  152. data/examples/1021.pdf +506 -0
  153. data/examples/10210.pdf +506 -0
  154. data/examples/10211.pdf +506 -0
  155. data/examples/10212.pdf +506 -0
  156. data/examples/10213.pdf +506 -0
  157. data/examples/10214-8.pdf +506 -0
  158. data/examples/10214.pdf +506 -0
  159. data/examples/10216.pdf +506 -0
  160. data/examples/10217.pdf +506 -0
  161. data/examples/10218.pdf +506 -0
  162. data/examples/10219.pdf +506 -0
  163. data/examples/1022.pdf +506 -0
  164. data/examples/10220.pdf +506 -0
  165. data/examples/10221.pdf +506 -0
  166. data/examples/10222.pdf +506 -0
  167. data/examples/10223-0.pdf +506 -0
  168. data/examples/10224.pdf +506 -0
  169. data/examples/10225.pdf +506 -0
  170. data/examples/10226.pdf +506 -0
  171. data/examples/10234.pdf +506 -0
  172. data/examples/1024.pdf +506 -0
  173. data/examples/10251.pdf +506 -0
  174. data/examples/10266.pdf +506 -0
  175. data/examples/10267.pdf +506 -0
  176. data/examples/10268.pdf +506 -0
  177. data/examples/1027.pdf +506 -0
  178. data/examples/10274.pdf +506 -0
  179. data/examples/1028.pdf +506 -0
  180. data/examples/10289.pdf +506 -0
  181. data/examples/1029.pdf +506 -0
  182. data/examples/10290.pdf +506 -0
  183. data/examples/10291.pdf +506 -0
  184. data/examples/10292.pdf +506 -0
  185. data/examples/10293.pdf +506 -0
  186. data/examples/10294.pdf +506 -0
  187. data/examples/103.pdf +506 -0
  188. data/examples/10310.pdf +506 -0
  189. data/examples/10314.pdf +506 -0
  190. data/examples/10315.pdf +506 -0
  191. data/examples/10316.pdf +506 -0
  192. data/examples/10317.pdf +506 -0
  193. data/examples/10319.pdf +506 -0
  194. data/examples/1032.pdf +506 -0
  195. data/examples/10320.pdf +506 -0
  196. data/examples/10321.pdf +506 -0
  197. data/examples/10322.pdf +506 -0
  198. data/examples/10325.pdf +506 -0
  199. data/examples/10326.pdf +506 -0
  200. data/examples/10327.pdf +506 -0
  201. data/examples/10328.pdf +506 -0
  202. data/examples/10329.pdf +506 -0
  203. data/examples/1033.pdf +506 -0
  204. data/examples/10330.pdf +506 -0
  205. data/examples/10331.pdf +506 -0
  206. data/examples/10332.pdf +506 -0
  207. data/examples/10334.pdf +506 -0
  208. data/examples/10335.pdf +506 -0
  209. data/examples/10336.pdf +506 -0
  210. data/examples/10337.pdf +506 -0
  211. data/examples/10338.pdf +506 -0
  212. data/examples/10339-0.pdf +506 -0
  213. data/examples/1034.pdf +506 -0
  214. data/examples/10340.pdf +506 -0
  215. data/examples/10341.pdf +506 -0
  216. data/examples/10342.pdf +506 -0
  217. data/examples/10345.pdf +506 -0
  218. data/examples/10346.pdf +506 -0
  219. data/examples/10348-m-readme.pdf +506 -0
  220. data/examples/10348.pdf +506 -0
  221. data/examples/10349.pdf +506 -0
  222. data/examples/1035.pdf +506 -0
  223. data/examples/10350.pdf +506 -0
  224. data/examples/10351.pdf +506 -0
  225. data/examples/10352.pdf +506 -0
  226. data/examples/10353.pdf +506 -0
  227. data/examples/10354.pdf +506 -0
  228. data/examples/10355.pdf +506 -0
  229. data/examples/10356.pdf +506 -0
  230. data/examples/10357.pdf +506 -0
  231. data/examples/10358.pdf +506 -0
  232. data/examples/10359.pdf +506 -0
  233. data/examples/1036.pdf +506 -0
  234. data/examples/10360.pdf +506 -0
  235. data/examples/10361.pdf +506 -0
  236. data/examples/10362.pdf +506 -0
  237. data/examples/Pgdvd042010.jpg +0 -0
  238. data/lib/artemo/basic_emotions.rb +4 -63
  239. data/lib/artemo/common.rb +44 -0
  240. data/lib/artemo/complex_emotions.rb +72 -34
  241. data/lib/artemo/plot.rb +1 -0
  242. data/lib/artemo/result.rb +11 -6
  243. data/lib/artemo/version.rb +1 -1
  244. metadata +233 -13
  245. data/Dockerfile +0 -17
  246. data/Rakefile +0 -7
  247. data/spec/test_artemo_common_spec.rb +0 -10
  248. data/spec/test_artemo_complex_emotions_spec.rb +0 -10
  249. data/spec/test_artemo_keywords_spec.rb +0 -27
  250. data/spec/test_artemo_loader_spec.rb +0 -63
  251. data/spec/test_artemo_result_spec.rb +0 -24
data/Dockerfile DELETED
@@ -1,17 +0,0 @@
1
- FROM ruby:2.3.1
2
-
3
- MAINTAINER Łukasz Fuszara
4
-
5
- RUN mkdir /artemo
6
- WORKDIR /artemo
7
-
8
- RUN git clone https://gitlab.com/opalizoid/ArtEmo_v3.git
9
- WORKDIR /artemo/ArtEmo_v3
10
-
11
- RUN gem build artemo.gemspec
12
- RUN gem install artemo-*
13
- RUN echo "Wherefore, O judges, be of good cheer about death, and know of a certainty, that no evil can happen to a good man, either in life or after death. He and his are not neglected by the gods; nor has my own approaching end happened by mere chance. But I see clearly that the time had arrived when it was better for me to die and be released from trouble; wherefore the oracle gave no sign. For which reason, also, I am not angry with my condemners, or with my accusers; they have done me no harm, although they did not mean to do me any good; and for this I may gently blame them." > test.txt
14
-
15
- ENTRYPOINT ["artemo", "test.txt"]
16
-
17
- CMD ["bash"]
data/Rakefile DELETED
@@ -1,7 +0,0 @@
1
- require 'bundler'
2
- require 'rspec/core/rake_task'
3
-
4
- Bundler::GemHelper.install_tasks
5
- RSpec::Core::RakeTask.new(:spec)
6
-
7
- task default: :spec
@@ -1,10 +0,0 @@
1
- require 'artemo'
2
-
3
- describe Common do
4
- context 'Common method ' do
5
- it 'scale' do
6
- s = Common.scale([500, 250, 100, 50, 25, 0, 15, 1])
7
- expect(s).to eq [100, 50, 20, 10, 5, 0, 3, 0]
8
- end
9
- end
10
- end
@@ -1,10 +0,0 @@
1
- require 'artemo'
2
-
3
- describe ComplexEmotions do
4
- context 'Complex emotions: ' do
5
- it 'call to first method' do
6
- ce = ComplexEmotions.call [33, 33, 0, 0, 0, 0, 0, 0, 34, 34, 0, 0, 0, 0, 0, 0, 33, 33, 0, 0, 0, 0, 0, 0]
7
- expect(ce).to eq [97, 97, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
8
- end
9
- end
10
- end
@@ -1,27 +0,0 @@
1
- require 'artemo'
2
-
3
- describe Keywords do
4
- context 'Created database of keywords from file' do
5
- it 'should class be Array' do
6
- k = Keywords.call
7
- expect(k).to be_instance_of Array
8
- end
9
-
10
- it 'should size be 8' do
11
- k = Keywords.call.size
12
- s = 8
13
- expect(k).to eq s
14
- end
15
-
16
- it 'should first element of array be > 500' do
17
- k = Keywords.call.first.size
18
- expect(k).to be > 500
19
- end
20
-
21
- it 'should last element of array be > 500' do
22
- k = Keywords.call.last.size
23
- expect(k).to be > 500
24
- end
25
- end
26
- end
27
-
@@ -1,63 +0,0 @@
1
- require 'tempfile'
2
-
3
- require 'artemo'
4
-
5
- str = %q{
6
- "Zarathustra" is my brother's most personal work; it is the history of
7
- his most individual experiences, of his friendships, ideals, raptures,
8
- bitterest disappointments and sorrows. Above it all, however, there
9
- soars, transfiguring it, the image of his greatest hopes and remotest
10
- aims. My brother had the figure of Zarathustra in his mind from his very
11
- earliest youth: he once told me that even as a child he had dreamt of
12
- him. At different periods in his life, he would call this haunter of his
13
- dreams by different names; "but in the end," he declares in a note on
14
- the subject, "I had to do a PERSIAN the honour of identifying him with
15
- this creature of my fancy. Persians were the first to take a broad and
16
- comprehensive view of history. Every series of evolutions, according
17
- to them, was presided over by a prophet; and every prophet had his
18
- 'Hazar,'--his dynasty of a thousand years."
19
-
20
- All Zarathustra's views, as also his personality, were early conceptions
21
- of my brother's mind. Whoever reads his posthumously published writings
22
- for the years 1869-82 with care, will constantly meet with passages
23
- suggestive of Zarathustra's thoughts and doctrines. For instance, the
24
- ideal of the Superman is put forth quite clearly in all his writings
25
- during the years 1873-75; and in "We Philologists", the following
26
- remarkable observations occur:--
27
-
28
- "How can one praise and glorify a nation as a whole?--Even among the
29
- Greeks, it was the INDIVIDUALS that counted."
30
-
31
- "The Greeks are interesting and extremely important because they reared
32
- such a vast number of great individuals. How was this possible? The
33
- question is one which ought to be studied.
34
-
35
- "I am interested only in the relations of a people to the rearing of
36
- the individual man, and among the Greeks the conditions were unusually
37
- favourable for the development of the individual; not by any means owing
38
- to the goodness of the people, but because of the struggles of their
39
- evil instincts.
40
- }
41
-
42
- describe Loader do
43
- context 'Created words from text' do
44
- it 'should class be Array' do
45
- Tempfile.open("test.txt") do |f|
46
- f.write(str)
47
- f.close
48
- k = Loader.call(f)
49
- expect(k).to be_instance_of Array
50
- end
51
- end
52
-
53
- it 'should class be Array' do
54
- Tempfile.open("test.txt") do |f|
55
- f.write(str)
56
- f.close
57
- k = Loader.call(f)
58
- expect(k).to be_instance_of Array
59
- end
60
- end
61
- end
62
- end
63
-
@@ -1,24 +0,0 @@
1
- require 'artemo'
2
-
3
- describe Result do
4
- context 'Results ' do
5
- it 'show love' do
6
- s = Result.call([100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
7
- sh = s.keys.last
8
- expect(sh).to eq "love"
9
- end
10
-
11
- it 'show despair' do
12
- s = Result.call([0, 0, 0, 0, 0, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
13
- sh = s.keys.last
14
- expect(sh).to eq "despair"
15
- end
16
-
17
- it 'min, max' do
18
- s = Result.call([100, 30, 30, 30, 30, 30, 30, 5, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 700, 30])
19
- min, max = s.values.minmax
20
- expect(min).to eq 3
21
- expect(max).to eq 100
22
- end
23
- end
24
- end