sentiments 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +46 -0
- data/Rakefile +1 -0
- data/lib/sentiments/data/ignore.json +580 -0
- data/lib/sentiments/data/neg.json +5139 -0
- data/lib/sentiments/data/neu.json +375 -0
- data/lib/sentiments/data/pos.json +3104 -0
- data/lib/sentiments/data/prefix.json +6 -0
- data/lib/sentiments/version.rb +3 -0
- data/lib/sentiments.rb +109 -0
- data/sentiments.gemspec +24 -0
- data/test/sentiments.rb +4 -0
- metadata +102 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: dd443e620d73a3b57ce8cd68fe521031c52afb98
|
4
|
+
data.tar.gz: ae9c785f31df14f149245cf94c5da979d66e28c2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 76c96348f15b688865af180749ad19ed979b90461d8abe60e535a119b4145064cda0d2f210791b31dabee96c99776e87d343b96320fb3c2f3553faea43e3f4b4
|
7
|
+
data.tar.gz: 54e800145bfd9c3d93b7b6fe6c5ab31018b96a43a34e444742d41083b7a18d313d3e71485dcfc9e889575dad0d5d0c44448b849c9019a8217595d3509353b753
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 TODO: Write your name
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# Sentiments
|
2
|
+
|
3
|
+
Simple and Faster Sentiment Classifier categorizes sentence into positive & negative.
|
4
|
+
Tries to handle negation
|
5
|
+
|
6
|
+
## Demos
|
7
|
+
|
8
|
+
- [Online Demo Sentiment Classifier]
|
9
|
+
- [Online Demo Sentiment Classifier Live Tweets Analysis]
|
10
|
+
|
11
|
+
[Online Demo Sentiment Classifier]: http://www8355ue.sakura.ne.jp/?action_classifiers_sentiment=true
|
12
|
+
|
13
|
+
[Online Demo Sentiment Classifier Live Tweets Analysis]: http://www8355ue.sakura.ne.jp/?action_classifiers_twitter=true
|
14
|
+
|
15
|
+
## Installation
|
16
|
+
|
17
|
+
Add this line to your application's Gemfile:
|
18
|
+
|
19
|
+
gem 'sentiments'
|
20
|
+
|
21
|
+
And then execute:
|
22
|
+
|
23
|
+
$ bundle
|
24
|
+
|
25
|
+
Or install it yourself as:
|
26
|
+
|
27
|
+
$ gem install sentiments
|
28
|
+
|
29
|
+
## Usage
|
30
|
+
|
31
|
+
```
|
32
|
+
require 'sentiments'
|
33
|
+
puts sentiments.score("nice movie")
|
34
|
+
```
|
35
|
+
|
36
|
+
## To Do
|
37
|
+
|
38
|
+
Complete data word list
|
39
|
+
|
40
|
+
## Contributing
|
41
|
+
|
42
|
+
1. Fork it
|
43
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
44
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
45
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
46
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,580 @@
|
|
1
|
+
[
|
2
|
+
"ccedil",
|
3
|
+
"aelig",
|
4
|
+
"much",
|
5
|
+
"mostly",
|
6
|
+
"most",
|
7
|
+
"moreover",
|
8
|
+
"more",
|
9
|
+
"might",
|
10
|
+
"merely",
|
11
|
+
"meanwhile",
|
12
|
+
"mean",
|
13
|
+
"me",
|
14
|
+
"maybe",
|
15
|
+
"may",
|
16
|
+
"many",
|
17
|
+
"mainly",
|
18
|
+
"ltd",
|
19
|
+
"looks",
|
20
|
+
"looking",
|
21
|
+
"look",
|
22
|
+
"little",
|
23
|
+
"likely",
|
24
|
+
"liked",
|
25
|
+
"let's",
|
26
|
+
"let",
|
27
|
+
"lest",
|
28
|
+
"less",
|
29
|
+
"least",
|
30
|
+
"latterly",
|
31
|
+
"latter",
|
32
|
+
"later",
|
33
|
+
"lately",
|
34
|
+
"last",
|
35
|
+
"knows",
|
36
|
+
"known",
|
37
|
+
"know",
|
38
|
+
"kept",
|
39
|
+
"keeps",
|
40
|
+
"keep",
|
41
|
+
"just",
|
42
|
+
"itself",
|
43
|
+
"its",
|
44
|
+
"it's",
|
45
|
+
"it'll",
|
46
|
+
"it'd",
|
47
|
+
"it",
|
48
|
+
"is",
|
49
|
+
"inward",
|
50
|
+
"into",
|
51
|
+
"instead",
|
52
|
+
"insofar",
|
53
|
+
"inner",
|
54
|
+
"indicates",
|
55
|
+
"indicated",
|
56
|
+
"indicate",
|
57
|
+
"indeed",
|
58
|
+
"inc",
|
59
|
+
"inasmuch",
|
60
|
+
"in",
|
61
|
+
"immediate",
|
62
|
+
"ignored",
|
63
|
+
"if",
|
64
|
+
"ie",
|
65
|
+
"i've",
|
66
|
+
"i'm",
|
67
|
+
"i'll",
|
68
|
+
"i'd",
|
69
|
+
"however",
|
70
|
+
"howbeit",
|
71
|
+
"how",
|
72
|
+
"hopefully",
|
73
|
+
"hither",
|
74
|
+
"his",
|
75
|
+
"himself",
|
76
|
+
"him",
|
77
|
+
"hi",
|
78
|
+
"herself",
|
79
|
+
"hers",
|
80
|
+
"hereupon",
|
81
|
+
"herein",
|
82
|
+
"hereby",
|
83
|
+
"hereafter",
|
84
|
+
"here's",
|
85
|
+
"here",
|
86
|
+
"her",
|
87
|
+
"hence",
|
88
|
+
"help",
|
89
|
+
"hello",
|
90
|
+
"he's",
|
91
|
+
"he",
|
92
|
+
"having",
|
93
|
+
"haven't",
|
94
|
+
"have",
|
95
|
+
"hasn't",
|
96
|
+
"has",
|
97
|
+
"hardly",
|
98
|
+
"happens",
|
99
|
+
"hadn't",
|
100
|
+
"had",
|
101
|
+
"greetings",
|
102
|
+
"gotten",
|
103
|
+
"got",
|
104
|
+
"gone",
|
105
|
+
"going",
|
106
|
+
"goes",
|
107
|
+
"go",
|
108
|
+
"gives",
|
109
|
+
"given",
|
110
|
+
"getting",
|
111
|
+
"gets",
|
112
|
+
"get",
|
113
|
+
"furthermore",
|
114
|
+
"further",
|
115
|
+
"from",
|
116
|
+
"four",
|
117
|
+
"forth",
|
118
|
+
"formerly",
|
119
|
+
"former",
|
120
|
+
"for",
|
121
|
+
"follows",
|
122
|
+
"following",
|
123
|
+
"followed",
|
124
|
+
"five",
|
125
|
+
"first",
|
126
|
+
"fifth",
|
127
|
+
"few",
|
128
|
+
"far",
|
129
|
+
"except",
|
130
|
+
"example",
|
131
|
+
"exactly",
|
132
|
+
"ex",
|
133
|
+
"everywhere",
|
134
|
+
"everything",
|
135
|
+
"everyone",
|
136
|
+
"everybody",
|
137
|
+
"every",
|
138
|
+
"ever",
|
139
|
+
"even",
|
140
|
+
"etc",
|
141
|
+
"et",
|
142
|
+
"especially",
|
143
|
+
"entirely",
|
144
|
+
"enough",
|
145
|
+
"elsewhere",
|
146
|
+
"else",
|
147
|
+
"either",
|
148
|
+
"eight",
|
149
|
+
"eg",
|
150
|
+
"edu",
|
151
|
+
"each",
|
152
|
+
"during",
|
153
|
+
"downwards",
|
154
|
+
"down",
|
155
|
+
"done",
|
156
|
+
"don't",
|
157
|
+
"doing",
|
158
|
+
"doesn't",
|
159
|
+
"does",
|
160
|
+
"do",
|
161
|
+
"different",
|
162
|
+
"didn't",
|
163
|
+
"did",
|
164
|
+
"despite",
|
165
|
+
"described",
|
166
|
+
"definitely",
|
167
|
+
"currently",
|
168
|
+
"course",
|
169
|
+
"couldn't",
|
170
|
+
"could",
|
171
|
+
"corresponding",
|
172
|
+
"contains",
|
173
|
+
"containing",
|
174
|
+
"contain",
|
175
|
+
"considering",
|
176
|
+
"consider",
|
177
|
+
"consequently",
|
178
|
+
"concerning",
|
179
|
+
"comes",
|
180
|
+
"come",
|
181
|
+
"com",
|
182
|
+
"co",
|
183
|
+
"clearly",
|
184
|
+
"changes",
|
185
|
+
"certainly",
|
186
|
+
"certain",
|
187
|
+
"causes",
|
188
|
+
"cause",
|
189
|
+
"cant",
|
190
|
+
"cannot",
|
191
|
+
"can't",
|
192
|
+
"can",
|
193
|
+
"came",
|
194
|
+
"c's",
|
195
|
+
"c'mon",
|
196
|
+
"by",
|
197
|
+
"but",
|
198
|
+
"brief",
|
199
|
+
"both",
|
200
|
+
"beyond",
|
201
|
+
"between",
|
202
|
+
"better",
|
203
|
+
"best",
|
204
|
+
"besides",
|
205
|
+
"beside",
|
206
|
+
"below",
|
207
|
+
"believe",
|
208
|
+
"being",
|
209
|
+
"behind",
|
210
|
+
"beforehand",
|
211
|
+
"before",
|
212
|
+
"been",
|
213
|
+
"becoming",
|
214
|
+
"becomes",
|
215
|
+
"become",
|
216
|
+
"because",
|
217
|
+
"became",
|
218
|
+
"be",
|
219
|
+
"awfully",
|
220
|
+
"away",
|
221
|
+
"available",
|
222
|
+
"at",
|
223
|
+
"associated",
|
224
|
+
"asking",
|
225
|
+
"ask",
|
226
|
+
"aside",
|
227
|
+
"as",
|
228
|
+
"around",
|
229
|
+
"are",
|
230
|
+
"appropriate",
|
231
|
+
"appreciate",
|
232
|
+
"appear",
|
233
|
+
"apart",
|
234
|
+
"anywhere",
|
235
|
+
"anyways",
|
236
|
+
"anyway",
|
237
|
+
"anything",
|
238
|
+
"anyone",
|
239
|
+
"anyhow",
|
240
|
+
"anybody",
|
241
|
+
"any",
|
242
|
+
"another",
|
243
|
+
"and",
|
244
|
+
"an",
|
245
|
+
"amongst",
|
246
|
+
"among",
|
247
|
+
"am",
|
248
|
+
"always",
|
249
|
+
"although",
|
250
|
+
"also",
|
251
|
+
"already",
|
252
|
+
"along",
|
253
|
+
"alone",
|
254
|
+
"almost",
|
255
|
+
"allows",
|
256
|
+
"allow",
|
257
|
+
"all",
|
258
|
+
"against",
|
259
|
+
"again",
|
260
|
+
"afterwards",
|
261
|
+
"after",
|
262
|
+
"actually",
|
263
|
+
"across",
|
264
|
+
"accordingly",
|
265
|
+
"according",
|
266
|
+
"above",
|
267
|
+
"about",
|
268
|
+
"able",
|
269
|
+
"ain't",
|
270
|
+
"bit",
|
271
|
+
"para",
|
272
|
+
"cedil",
|
273
|
+
"https",
|
274
|
+
"zynga",
|
275
|
+
"must",
|
276
|
+
"my",
|
277
|
+
"myself",
|
278
|
+
"name",
|
279
|
+
"namely",
|
280
|
+
"nd",
|
281
|
+
"near",
|
282
|
+
"nearly",
|
283
|
+
"necessary",
|
284
|
+
"need",
|
285
|
+
"needs",
|
286
|
+
"neither",
|
287
|
+
"never",
|
288
|
+
"nevertheless",
|
289
|
+
"new",
|
290
|
+
"next",
|
291
|
+
"nine",
|
292
|
+
"no",
|
293
|
+
"nobody",
|
294
|
+
"non",
|
295
|
+
"none",
|
296
|
+
"noone",
|
297
|
+
"nor",
|
298
|
+
"normally",
|
299
|
+
"nothing",
|
300
|
+
"novel",
|
301
|
+
"now",
|
302
|
+
"nowhere",
|
303
|
+
"obviously",
|
304
|
+
"of",
|
305
|
+
"off",
|
306
|
+
"often",
|
307
|
+
"oh",
|
308
|
+
"ok",
|
309
|
+
"okay",
|
310
|
+
"old",
|
311
|
+
"on",
|
312
|
+
"once",
|
313
|
+
"one",
|
314
|
+
"ones",
|
315
|
+
"only",
|
316
|
+
"onto",
|
317
|
+
"or",
|
318
|
+
"other",
|
319
|
+
"others",
|
320
|
+
"otherwise",
|
321
|
+
"ought",
|
322
|
+
"our",
|
323
|
+
"ours",
|
324
|
+
"ourselves",
|
325
|
+
"out",
|
326
|
+
"outside",
|
327
|
+
"over",
|
328
|
+
"overall",
|
329
|
+
"own",
|
330
|
+
"particular",
|
331
|
+
"particularly",
|
332
|
+
"per",
|
333
|
+
"perhaps",
|
334
|
+
"placed",
|
335
|
+
"please",
|
336
|
+
"plus",
|
337
|
+
"possible",
|
338
|
+
"presumably",
|
339
|
+
"probably",
|
340
|
+
"provides",
|
341
|
+
"que",
|
342
|
+
"quite",
|
343
|
+
"qv",
|
344
|
+
"rather",
|
345
|
+
"rd",
|
346
|
+
"re",
|
347
|
+
"really",
|
348
|
+
"regarding",
|
349
|
+
"regardless",
|
350
|
+
"regards",
|
351
|
+
"relatively",
|
352
|
+
"respectively",
|
353
|
+
"right",
|
354
|
+
"said",
|
355
|
+
"same",
|
356
|
+
"saw",
|
357
|
+
"say",
|
358
|
+
"saying",
|
359
|
+
"says",
|
360
|
+
"second",
|
361
|
+
"secondly",
|
362
|
+
"see",
|
363
|
+
"seeing",
|
364
|
+
"seem",
|
365
|
+
"seemed",
|
366
|
+
"seeming",
|
367
|
+
"seems",
|
368
|
+
"seen",
|
369
|
+
"self",
|
370
|
+
"selves",
|
371
|
+
"sensible",
|
372
|
+
"sent",
|
373
|
+
"serious",
|
374
|
+
"seriously",
|
375
|
+
"seven",
|
376
|
+
"several",
|
377
|
+
"shall",
|
378
|
+
"she",
|
379
|
+
"should",
|
380
|
+
"shouldn't",
|
381
|
+
"since",
|
382
|
+
"six",
|
383
|
+
"so",
|
384
|
+
"some",
|
385
|
+
"somebody",
|
386
|
+
"somehow",
|
387
|
+
"someone",
|
388
|
+
"something",
|
389
|
+
"sometime",
|
390
|
+
"sometimes",
|
391
|
+
"somewhat",
|
392
|
+
"somewhere",
|
393
|
+
"soon",
|
394
|
+
"sorry",
|
395
|
+
"specified",
|
396
|
+
"specify",
|
397
|
+
"specifying",
|
398
|
+
"still",
|
399
|
+
"sub",
|
400
|
+
"such",
|
401
|
+
"sup",
|
402
|
+
"sure",
|
403
|
+
"take",
|
404
|
+
"taken",
|
405
|
+
"tell",
|
406
|
+
"tends",
|
407
|
+
"th",
|
408
|
+
"than",
|
409
|
+
"thank",
|
410
|
+
"thanks",
|
411
|
+
"thanx",
|
412
|
+
"that",
|
413
|
+
"that's",
|
414
|
+
"thats",
|
415
|
+
"the",
|
416
|
+
"their",
|
417
|
+
"theirs",
|
418
|
+
"them",
|
419
|
+
"themselves",
|
420
|
+
"then",
|
421
|
+
"thence",
|
422
|
+
"there",
|
423
|
+
"there's",
|
424
|
+
"thereafter",
|
425
|
+
"thereby",
|
426
|
+
"therefore",
|
427
|
+
"therein",
|
428
|
+
"theres",
|
429
|
+
"thereupon",
|
430
|
+
"these",
|
431
|
+
"they",
|
432
|
+
"they'd",
|
433
|
+
"they'll",
|
434
|
+
"they're",
|
435
|
+
"they've",
|
436
|
+
"think",
|
437
|
+
"third",
|
438
|
+
"this",
|
439
|
+
"thorough",
|
440
|
+
"thoroughly",
|
441
|
+
"those",
|
442
|
+
"though",
|
443
|
+
"three",
|
444
|
+
"through",
|
445
|
+
"throughout",
|
446
|
+
"thru",
|
447
|
+
"thus",
|
448
|
+
"to",
|
449
|
+
"together",
|
450
|
+
"too",
|
451
|
+
"took",
|
452
|
+
"toward",
|
453
|
+
"towards",
|
454
|
+
"tried",
|
455
|
+
"tries",
|
456
|
+
"truly",
|
457
|
+
"try",
|
458
|
+
"trying",
|
459
|
+
"twice",
|
460
|
+
"two",
|
461
|
+
"un",
|
462
|
+
"under",
|
463
|
+
"unfortunately",
|
464
|
+
"unless",
|
465
|
+
"unlikely",
|
466
|
+
"until",
|
467
|
+
"unto",
|
468
|
+
"up",
|
469
|
+
"upon",
|
470
|
+
"us",
|
471
|
+
"use",
|
472
|
+
"used",
|
473
|
+
"uses",
|
474
|
+
"using",
|
475
|
+
"usually",
|
476
|
+
"value",
|
477
|
+
"various",
|
478
|
+
"very",
|
479
|
+
"via",
|
480
|
+
"viz",
|
481
|
+
"vs",
|
482
|
+
"want",
|
483
|
+
"wants",
|
484
|
+
"was",
|
485
|
+
"wasn't",
|
486
|
+
"way",
|
487
|
+
"we",
|
488
|
+
"we'd",
|
489
|
+
"we'll",
|
490
|
+
"we're",
|
491
|
+
"we've",
|
492
|
+
"welcome",
|
493
|
+
"well",
|
494
|
+
"went",
|
495
|
+
"were",
|
496
|
+
"weren't",
|
497
|
+
"what",
|
498
|
+
"what's",
|
499
|
+
"whatever",
|
500
|
+
"when",
|
501
|
+
"whence",
|
502
|
+
"whenever",
|
503
|
+
"where",
|
504
|
+
"where's",
|
505
|
+
"whereafter",
|
506
|
+
"whereas",
|
507
|
+
"whereby",
|
508
|
+
"wherein",
|
509
|
+
"whereupon",
|
510
|
+
"wherever",
|
511
|
+
"whether",
|
512
|
+
"which",
|
513
|
+
"while",
|
514
|
+
"whither",
|
515
|
+
"who",
|
516
|
+
"who's",
|
517
|
+
"whoever",
|
518
|
+
"whole",
|
519
|
+
"whom",
|
520
|
+
"whose",
|
521
|
+
"why",
|
522
|
+
"will",
|
523
|
+
"willing",
|
524
|
+
"wish",
|
525
|
+
"with",
|
526
|
+
"within",
|
527
|
+
"without",
|
528
|
+
"won't",
|
529
|
+
"wonder",
|
530
|
+
"would",
|
531
|
+
"wouldn't",
|
532
|
+
"yes",
|
533
|
+
"yet",
|
534
|
+
"you",
|
535
|
+
"you'd",
|
536
|
+
"you'll",
|
537
|
+
"you're",
|
538
|
+
"you've",
|
539
|
+
"your",
|
540
|
+
"yours",
|
541
|
+
"yourself",
|
542
|
+
"yourselves",
|
543
|
+
"zero",
|
544
|
+
"agrave",
|
545
|
+
"atilde",
|
546
|
+
"http",
|
547
|
+
"acirc",
|
548
|
+
"aring",
|
549
|
+
"quot",
|
550
|
+
"ntilde",
|
551
|
+
"amp",
|
552
|
+
"auml",
|
553
|
+
"nbsp",
|
554
|
+
"laquo",
|
555
|
+
"iuml",
|
556
|
+
"egrave",
|
557
|
+
"macr",
|
558
|
+
"brvbar",
|
559
|
+
"ordm",
|
560
|
+
"plusmn",
|
561
|
+
"reg",
|
562
|
+
"www",
|
563
|
+
"acute",
|
564
|
+
"cent",
|
565
|
+
"ordf",
|
566
|
+
"eacute",
|
567
|
+
"frac",
|
568
|
+
"sLZjpNxJtx",
|
569
|
+
"ETH",
|
570
|
+
"Icirc",
|
571
|
+
"sect",
|
572
|
+
"goo",
|
573
|
+
"seu",
|
574
|
+
"como",
|
575
|
+
"ser",
|
576
|
+
"filhos",
|
577
|
+
"dlvr",
|
578
|
+
"iexcl",
|
579
|
+
"Ugrave"
|
580
|
+
]
|