arXiv:1709.06990v1 [] 20 Sep 2017

Text Compression for Sentiment Analysis via
Evolutionary Algorithms
Emmanuel Dufourq

Bruce A. Bassett

University of Cape Town
African Institute for Mathematical Sciences
Email: edufourq@gmail.com

University of Cape Town
African Institute for Mathematical Sciences
South African Astronomical Observatory
Email: bruce.a.bassett@gmail.com

Abstract—Can textual data be compressed intelligently without
losing accuracy in evaluating sentiment? In this study, we propose
a novel evolutionary compression algorithm, PARSEC (PARts-ofSpeech for sEntiment Compression), which makes use of Partsof-Speech tags to compress text in a way that sacrifices minimal
classification accuracy when used in conjunction with sentiment
analysis algorithms. An analysis of PARSEC with eight commercial and non-commercial sentiment analysis algorithms on twelve
English sentiment data sets reveals that accurate compression is
possible with (0%, 1.3%, 3.3%) loss in sentiment classification
accuracy for (20%, 50%, 75%) data compression with PARSEC
using LingPipe, the most accurate of the sentiment algorithms.
Other sentiment analysis algorithms are more severely affected
by compression. We conclude that significant compression of text
data is possible for sentiment analysis depending on the accuracy
demands of the specific application and the specific sentiment
analysis algorithm used.
Index Terms—sentiment analysis, evolutionary algorithm, compression

I. I NTRODUCTION AND R ATIONALE
Sentiment analysis is the automated detection of emotions
and attitudes towards a particular subject, event or entity,
and has received an increasing amount of interest since the
year 2000 [1], [2]. Sentiment analysis has been applied to
many problem domains; for instance, determining sentiments
of consumers towards products, or mining social media to gain
an understanding of the public’s opinion on matters such as
corruption [1]–[3].
In this study, we propose a novel evolutionary algorithm
(EA) which is tasked with compressing text, whereby the
objective is to retain the correct sentiment classification of the
compressed text. To achieve this, the EA makes use of POS
(Parts of Speech) to determine which POS can be removed
from the text without hindering the classification performance.
EAs [4], [5] – inspired by nature – make use of a population of
individuals which are evolved over several iterations to solve
optimisation problems.
To illustrate the idea, consider the sentence “I went home
yesterday, opened the door and was immediately faced with a
terrible shock”. The key sentiment-encoding phrase is “terrible
shock”. We thus want to propose an algorithm that can learn
to evolve rules that can effectively do this compression. The
remaining words in the sentence do not contain any useful
information in determining the sentiment expressed, and thus
the rules can discard those words.

Feng et al. [6] proposed a Chinese text compression method
with the objective of preserving the opinions expressed in
the text to retain the sentiment, and to ensure that the
compressed sentence is grammatically correct. The authors
propose a score function which takes into consideration three
primary functions; namely a word significance, a linguistic and
an opinion scoring function. The word significance function
makes use of the word frequency properties to allocate a
score to each word. The scores were obtained by processing a
corpus containing 30,000 documents. The linguistic score was
obtained using a n-gram probabilistic function which made
use of Google search results. The opinion score made use of
an opinion lexicon to allocate a value to each word based
on the frequency of the word. The authors created the lexicon
from three different sources and the resulting lexicon contained
32,051 words for which the sentiment (positive, neutral or
negative) was known. A dynamic programming algorithm was
used in order to determine how many words should be present
in a compressed sentence by evaluating several candidate
compressed sentences. The score function was applied to each
candidate sentence and the result was divided by the number of
words in the compressed sentence. The compressed sentence
with the highest value after this operator was deemed to
be the final compressed sentence for a given uncompressed
sentence. One Chinese data set of compressed sentences was
manually created to evaluate their proposed approach. The
study revealed that their proposed approach was able to
outperform a traditional sentence compression method when
the sentences were evaluated - in terms of the opinion and
grammar - by a human.
Che et al. [7] also proposed a text compression method
for sentiment analysis. In their study, they make use of 10
features (which are determined for every word) to perform the
compression. The features are grouped into basic, sentiment
related, semantic and syntactic features. The basic features
include the words before and after the word for which the
features are being constructed for; they also include the POS
tags for those words. There are two sentiment features, namely
a binary field denoting if the word is a perception word and
if it is a polarity word. These words were obtained from
an existing lexicon. The semantic features include prefix and
suffix characters and also Brown word features which helps
identify that words which are written differently represent the

same thing. They also include word embedding which makes
use of Word2Vec [8] to determine if two words have a similar
meaning. The syntactic feature makes use of a single feature
which indicates the relationship between the words in the
sentence. The sentence compression is conducted prior to the
sentiment analysis.
With the limited amount of existing work in this field, we
propose and investigate PARSEC (PARts-of-Speech for sEntiment Compression), which makes use of an EA to achieve
text compression with minimal loss in sentiment accuracy.
II. PARTS - OF -S PEECH
POS, in languages, are defined as the primary groups of
words that are grammatically similar. Common POS include,
but are not limited to: adjective, verb and noun. For example,
the words “dog”, “house” and “student” are examples of
nouns.
In this study, the Stanford Log-linear Part-Of-Speech Tagger
[9] was used to convert the original data sets into their
corresponding POS tags. Thus, each word in a dataset was
converted into a POS tag, and the length of each sentence in
the original dataset was identical to that of the POS tagged
dataset. For example, if the following sentence was found
in the original dataset: “this is a great product”, it would be
converted into “DT VBZ DT JJ NN” (which corresponds to
the POS equivalent) in the POS tagged dataset.
We used the Penn Treebank tag set [10], [11]. This set
contains 36 tags and an additional 12 tags to denote certain
characters such as comma, semi-colon and other characters.
III. P ROPOSED C OMPRESSION M ETHOD
A. Compressor
This study proposes a new type of individual for EAs –
referred to as a compressor – which reduces the length of
sentences when applied to a dataset. The compressor is made
up of several rules, and in turn, each rule is made up of a
sequence of POS tags and a decision. The decision is applied
whenever it’s sequence of POS tags matches the POS tags
in the data. The decisions represent the indices of the words
which will be removed in the matched sequence. Figure 1
illustrates an example of a compressor.

the equivalent POS dataset. Furthermore, let Xi,j denote
sentence i and word j in X, and Yi,j denote sentence i and
word j in Y .
The compressor in the figure has 10 rules denoted as R1 ,
R2 , R3 , ..., R10 . The first rule, R1 , has 2 tags which are
represented by the sequence “JJ, NN”. This rule has one
decision, and that is, to delete the word at index 0. This implies
that when this particular compressor is applied, rule R1 will
find POS tags in Y corresponding to the sequence “JJ NN”.
Let Yl,m and Yl,m+1 denote two consecutive words in Y which
have the sequence “JJ NN”. The decision in R1 is to delete
index 0, thus R1 will delete Yl,m and consequently it will
delete Xl,m . Thus, the size of X and Y has been reduced by
one. Each time R1 finds the exact sequence “JJ NN”, the POS
tag and word corresponding to “JJ” (index 0) in Y and X are
deleted.
Similarly for R10 , Let Yl,m , Yl,m+1 and Yl,m+2 denote three
consecutive words in Y which have the sequence “NN VB
RB”. The decision in R10 is to delete index 0 and 2, thus
R10 will delete Yl,m , Yl,m+2 , Xl,m and Xl,m+2 from Y and
X respectively for each occurrence of the POS tags “NN VB
RB”.
When a rule is being processed, if a punctuation mark
occurs, then the rule evaluation immediately stops. This mechanism was incorporated so that the sequence of tags – which
is encapsulated by a rule – is applied to a single sentence and
is not applied across two separate sentences. For example,
consider the two following sentences “This book was really
funny. Great, tomorrow is Friday.” which corresponds to: “DT
NN VBD RB JJ. JJ, NN VBZ NNP.” Assume that some
rule has the following tags “JJ JJ” and the decision is to
delete both indices. If the punctuation marks are not taken
into consideration, then the rule will match with the words
“funny” and “great”. This will result in “This book was really
. , tomorrow is Friday.” Consequently, the sentiments in these
two sentences are no longer positive. However, if punctuation
is taken into consideration, then the rule will not delete any
words since the full stop separates the two sentences.
In this study, we define the term ‘wildcard’, which represents the notion of ‘any POS’ tag and is denoted with a ‘*’
symbol. Thus, when a rule is being evaluated, the wildcard
POS can match with any POS in the POS dataset. For example,
if a rule has the following tags: “JJ * NNP”, then any POS
sequence that has ‘JJ’, followed by any POS, followed by
‘NNP’ will cause the rule to match with that POS sequence.
Algorithm 1 presents the generalized pseudocode to match
the tags in a rule with the POS tags in the POS dataset. The
algorithm also presents how to delete words from the original
and POS dataset once a rule matches with a sequence.
B. PARSEC initial population generation

Fig. 1. An example of a PARSEC compressor with 10 rules.

In the following explanation, let X denote some original
dataset for which PARSEC is being applied to, and let Y denote

The pseudocode for creating an initial population of compressors is presented in algorithm 2. Several individuals are
created based on a predefined user parameter, namely the
population size. Several rules have to be created for each
compressor. There must be at least one rule, and a user-defined

Algorithm 1: Pseudocode to apply a compressor to a
sentence and compress the text.
input: compressor the compressor to evaluate
input: original sentence the original sentence
input: POS sentence the POS sentence
input: length sentence the length of the sentence to
evaluate
1 begin
2
for each rule in compressor do
3
tag in rule ← the tags inside rule
4
rule decisions ← the decisions inside rule
5
for i ← 0 to length sentence do
6
match ← true
7
for j ← 0 to length(tag in rule) do
8
if tag in rule [j] not equal
POS sentence [i + j] then
9
match ← false
10
break loop and go to line 5

Algorithm 2: Pseudocode to create the initial population
of compressors.
input: population size the number of compressors to
create
1 begin
2
for i ← 0 to population size do
3
CreateCompressor()
4
Evaluate compressor.
5
Add compressor to the initial population.
6
7
8
9
10

11
12

11
12
13

if match equal true then
for k ← 0 to length(rule decisions) do
flag original sentence
[i + rule decisions[k]]

13
14
15

14

15

compressed sentence ← delete all words in
original sentence that have been flagged.
return compressed sentence

16

17

18

parameter, namely maxrules , is implemented to restrict the total
number of rules. When creating the rules, the algorithm iterates
until it has reached maxrules , and a probability value of 0.5
was set to determine if a rule was to be created or not, as
can be seen on line 9 in algorithm 2. Each rule consists
of two primary parts, namely the tags and the decisions,
the pseudocode for the creation of those respective parts are
presented in algorithms 3 and 4.
C. PARSEC fitness function
The pseudocode for the fitness evaluation of a compressor
is presented in algorithm 6. Each instance in the dataset
is considered in turn. The sentiment for each instance in
the original dataset is computed using algorithm 5. When
a compressor is evaluated, it is applied to each instance
and a compressed sentence is created. The sentiment of
each compressed sentence is computed using algorithm 5.
The compressed sentiment is then compared to the original
sentiment. If these are the same then the compressed sentence
has had no effect on the sentiment when compared to the
original. Conversely, if the values are different, then there are
two possibilities. Either the compressed sentiment is equal to
the correct sentiment as labelled in the training data (in which
case the compressor is rewarded) or it is not (in which case
the compressor is penalised). Thus, the fitness function takes

Function CreateCompressor ()
new compressor ← create a blank compressor
for j ← 0 to max tags do
if rand() < 0.5 then
CreateRule() and add rule to
new compressor
if Compressor has no rule then
CreateRule() and add rule to
new compressor
return new compressor
Function CreateRule ()
new rule ← create a blank rule
Create the tags using algorithm 3 and add the
rules to new rule.
Create the decisions using algorithm 4 and add
the rules to new rule.
return The initial population.

Algorithm 3: Pseudocode to create POS tags.
input: minimum tags the minimum number of allowed
pos tags
input: maximum tags the maximum number of allowed
pos tags
1 begin
2
pos list ← { }
3
number tags ← random[minimum tags,
maximum tags ]
4
for i ← 0 to number tags do
5
if i = 0 then
6
Create a tag (excluding wildcard) and add it
to pos list
7
else if i = number tags-1 then
8
Create a tag (excluding wildcard) and add it
to pos list
9
else
10
Create a tag (including wildcard) and add it
to pos list
11

return pos list

Algorithm 4: Pseudocode to create decisions.
input: number tags the number of tags
1 begin
2
for i ← 0 to number tags do
3
if random[0,1] < 0.5 then
4
Add i to decision list
5

return decision list.

Algorithm 5: Pseudocode for baseline evaluation.
input : sentence the sentence to be evaluated
input : dictionary the dictionary of sentiment words
input : negation words the list of negation words
output: The sentiment for the evaluated sentence
1 begin
2
sentiment score ← 0
3
negation ← false
4
for each word in the sentence do
5
if word is in dictionary and negation is true
then
6
sentiment score ← sentiment score + (-1
× word’s sentiment value)
7
if word is in dictionary and negation is false
then
8
sentiment score ← sentiment score +
word’s sentiment value
9
if word is in negation words then
10
negation ← swap polarity
12

else
negation ← false

13

return sentiment score

11

Algorithm 6: Pseudocode to compute fitness of a compressor.
input : compressor the compressor to evaluated
input : sentence a list of sentences for which
compressor will be evaluated on
input : original lengths a list of lengths for each
sentence in the original data set
input : original sentiments a list of sententiment
values determined by applying algorithm 5 on
the original data set
input : correct sentiments a list of correct
sententiment values for the original data set
input : number rules the number of rules that
compressor has
output: The sentiment for the evaluated sentence
1 begin
2
for i ← 1 to number of sentences do
3
compressed sentence ← apply compression to
sentences [i].
4
compressed sentiment ← apply algorithm 5.
5
if compressed sentiment is not equal to
original sentiments [i] then
6
if compressed sentiment is equal to
correct sentiments [i] then
7
raw fitness ← raw fitness + 1
8
9
10

11

12

into consideration the number of new instances for which the
compressor produces the correct result.
A multi-objective fitness function was created to combine
the fitness, the average reduction in terms of the length of
the sentences before and after compression, and the size of
the compressor in terms of the number of rules. Thus, the
objective was to maximize the fitness and average reduction
in sentences, and to minimize the size of the compressor.
IV. E XPERIMENTAL S ETUP
A. Datasets and Setup
Twelve data sets were created by randomly selecting reviews
from corresponding Amazon review datasets [12]. For each
created data set, 1000 positive and 1000 negative reviews were
randomly selected from the larger corresponding Amazon data
set. The larger Amazon data sets were obtained from [12],
[13]. The data sets were: Amazon Instant Video (AIV), Apps
for Android, Automotive, Baby, Beauty, Digital Music, Health
and Personal Care, Musical Instruments (MI), Patio Lawn and

else
raw fitness ← raw fitness- 1
average change ← average change +
(Length(sentences [i]) Length(compressed sentence))
raw fitness ← raw fitness + [0.5 ×
(average change/ number of sentences)] - (0.1
× number rules)
return raw fitness

Garden, Pet Supplies, Tools and Home Improvement, and Toys
and Games.
We propose a set of experiments whereby the compression
rate is a user parameter and PARSEC must generate compressors that can compress the original datasets to reach the
specified compression rate.
To achieve this, a lower and upper user-defined compression
bound were defined. The lower compression bound (LCB) was
implemented to ensure that the compressors did not result in a
compression ratio less than the specified value. Similarly, the
upper compression bound (UCB) ensured that the compressors
did not result in a compression ratio greater than the specified
value. Thus, every compressor in the EA population had to
have a compression rate between the LCB and UCB.
Furthermore, two additional user-defined parameters were
implemented to ensure that the total number of rules within
each compressor remained within a certain bound. The
two parameters were named compressionRulesmin and

TABLE I
T HE LOWER (LCB) AND UPPER (UCB) COMPRESSION BOUND CONSTRAIN
THE ALGORITHM BY ENSURING THAT THE COMPRESSION RATE FOR EACH
COMPRESSOR IS BETWEEN THE TWO VALUES RESPECTIVELY. T HE TABLE
PRESENTS THE LCB AND UCB VALUES (%) ALONG WITH THE MINIMUM
AND MAXIMUM NUMBER OF RULES USED IN THE EXPERIMENTS . T HESE
SET COMPRESSION RATES WERE ENFORCED AND THE PERFORMANCE OF
PARSEC WAS MEASURED ON SEVERAL DATASETS . T HE VALUES FOR THE
MINIMUM AND MAXIMUM NUMBER OF RULES WERE DETERMINED BY
ADDITIONAL TRIAL RUNS . I T WAS OBSERVED THAT A GREATER NUMBER
OF RULES WERE NEEDED TO ACHIEVE HIGHER COMPRESSION RATES .

LCB

UCB

10
15
20
25
30
50

13
18
13
28
33
53

compression
Rulesmin
5
10
20
40
90
350

compression
Rulesmax
50
70
90
120
150
500

compression rates of 10% and 15% respectively. When experimenting with PARSEC we posed the following question. For
a predetermined drop in accuracy, how much compression is
achievable by PARSEC? For a threshold of -1% compression,
Vivek and LingPipe were able to achieve up to 30% compression. For this same threshold five methods could achieve up
to 20% compression rate. Regardless of the compression rate
used, both Stanford and Sentiment140 did not obtain any result
less than -1%. These two algorithms produced the weakest
performance with PARSEC.

0

−1

−2

B. Sentiment analysis algorithms
Several sentiment analysis algorithms were applied to the
original and compressed datasets to determine the difference
in accuracy and to investigate the performance of PARSEC.
The following algorithms were used: SentiStrength [14], [15],
MeaningCloud [16], Vivek [17], Stanford [18], uClassify [19],
Sentiment140 [20], Intellexer [21] and LingPipe [22].
C. Execution of experiments
We first applied the sentiment analysis algorithms described
in section IV-B to the original datasets and record the test
accuracy. Then, we ran PARSEC using the baseline evaluation to create compressor rules. Once the compressors were
created, we applied the compressors to the original datasets
to generate the compressed data. We applied the sentiment
analysis algorithms on the compressed data and recorded
the test accuracy. In the following section we report on the
change in accuracy between the compressed and original data.
PARSEC evolved a population of 250 compressors over 100
generations, the crossover rate was 60% and mutation rate was
40%.
V. R ESULTS AND C ONCLUSION
Figure 2 shows the average change in test accuracy across
the different methods based on the compression rates. The
general trend is a decrease in performance with the largest
decrease in performance observed by Sentiment140. LingPipe
and SentiStrength were the only two methods that achieved
a positive change in performance (on certain datasets) on

−3

−4

Change in Test Accuracy (%)

compressionRulesmax . The compressionRulesmax parameter prevents compressors from having an extremely large
number of rules. Both parameters aid in restricting the search
space in terms of the number of rules to create and maintain for
each compressor during the evolutionary process. The initial
population generation had to respect the LCB and UCB, and
respect the minimum and maximum number of rules. The
mutation operator also had to respect these constraints.

−5
Method

IN
LP
MC
S140
SS
ST
uC
V

−6

−7

−8

−9

−10

−11

−12

−13

−14

−15

20

40

60

Compression Rate (%)

Fig. 2. Change in average test accuracy across the different sentiment analysis
algorithms for different text compression rates enforced by PARSEC, averaged
across all the data sets. A higher positive value indicates a better result.
The various sentiment analysis technologies are denoted as follows: IN, LP,
MC, S140, SS, ST, uC and V refer to Intellexer, LingPipe, MeaningCloud,
Sentiment140, SentiStrength, Stanford, uClassify and Vivek respectively.
The accuracy obtained by LingPipe outperformed all the other methods.
Furthermore, LingPipe obtained an average positive change in accuracy of
0.1% for 10% compression. At a compression rate of 50%, LingPipe obtained
an change in accuracy of -1.2% averaged over all the datasets, illustrating that
it works well with PARSEC.

For a threshold of -2%, five algorithms could achieve up to
30% compression rate and LingPipe was able to achieve up
to 50% compression. When the threshold is set to -3% four
methods could achieve up to 50% compression.
We additionally wanted to determine the change in test
accuracy when a much larger compression rate was used. Table
II presents the results when a compression rate of 75% was
used. Only certain algorithms were tested due to our limited
access to the sentiment analysis algorithms. These results
reveal that a large compression rate is achievable without a

great loss in test accuracy: LingPipe obtained a loss of -3.3%
accuracy.
An example of PARSEC compression is as follows. The
original sentence (which contains 56 words and is already
stemmed): “this be a wonderful movie involve fascinating
people who be such great actor and actress. the event be
interesting and I never get tire of watch the episode. I be so sad
to see that they be not go to keep go with the life of all these
inhabitant of Lark rise and candleford. Mrs. Hamlin”. The
compressed sentence (22 words): “this be wonderful movie
involve fascinating people who actress. get tire. so sad to see
not keep go rise candleford. Mrs. Hamlin”.
TABLE II
AVERAGE CHANGE IN TEST ACCURACY (%) ACROSS ALL THE DATA SETS
WHEN PARSEC MODELS WERE CREATED FOR 75% COMPRESSION RATE .
Algorithm
LingPipe
MeaningCloud
SentiStrength
uClassify

Change in
Test Accuracy
-3.2
-4.2
-6.9
-6.4

Original
Accuracy
79.7
62.5
67.8
80.7

Compressed
Accuracy
76.4
58.2
60.8
74.3

Below are four rules which were randomly selected from a
PARSEC model to illustrate some of the evolved rules. This
model had a total of 38 rules. The POS tags are presented in
order of appearance between square brackets. The indices start
from zero. Rule 1 denotes that if the POS “NNP” is followed
by “JJ”, then delete both words. Rule 4 denotes that if “IN” is
followed by any POS and then followed by “VB”, then delete
the word at index 1.
• Rule 1: [NNP, JJ]. Number of decisions: 2.
Decisions: [0, 1]
• Rule 2: [VBG, NNP]. Number of decisions: 2.
Decisions: [0, 1]
• Rule 3: [IN, CC]. Number of decisions: 2.
Decisions: [0, 1]
• Rule 4: [IN, *, VB]. Number of decisions: 1.
Decisions: [1]
This study empirically demonstrates that machine learning
can reduce the amount of data needed to determine the
sentiments within sentences with little loss in accuracy. To
achieve this, we proposed an evolutionary algorithm, PARSEC,
which evolves a population of chromosomes which encode
rules for compression based on the removal of POS.
We studied the test accuracies achieved by the eight algorithms when set compression rate thresholds were enforced.
Two algorithms showed marginal improvements in accuracy
on several data sets for a compression rate of 15%. Additionally, there were 9 data sets whereby some of the algorithms were able to yield an improvement in accuracy for a
compression rate of 30%. At a threshold of -1% sentiment
accuracy loss, two methods were able to achieve up to 30%
compression, five methods up to 20% compression, and six
methods up to 10% compression. The best performing algorithm, LingPipe, showed only modest losses in accuracy even
at high compression: 3.3% for a four-fold data compression.

It would be of interest to incorporate the PARSEC algorithm directly into a sentiment analysis algorithm instead of
via a simple dictionary approach. One could achieve this
by replacing the fitness function used in the evolutionary
phase with a more sophisticated sentiment analysis algorithm.
This would allow the emergence of an algorithm where the
compression and sentiment analysis are mutually optimised
for best performance.
ACKNOWLEDGMENT
The financial assistance of the National Research Foundation (NRF) towards this research is hereby acknowledged.
Opinions expressed and conclusions arrived at, are those of the
authors and are not necessarily to be attributed to the NRF.
R EFERENCES
[1] B. Pang and L. Lee, “Opinion mining and sentiment analysis,” Found.
Trends Inf. Retr., vol. 2, no. 1-2, pp. 1–135, Jan. 2008.
[2] B. Liu, Sentiment Analysis: Mining Opinions, Sentiments, and Emotions.
Cambridge University Press, 2015.
[3] K. Ravi and V. Ravi, “A survey on opinion mining and sentiment
analysis,” Know.-Based Syst., vol. 89, no. C, pp. 14–46, Nov. 2015.
[4] A. E. Eiben and J. E. Smith, Introduction to Evolutionary Computing.
SpringerVerlag, 2003.
[5] X. Yu and M. Gen, Introduction to Evolutionary Algorithms. Springer
Publishing Company, Incorporated, 2012.
[6] S. Feng, D. Wang, G. Yu, B. Li, and K.-F. Wong, A Chinese Sentence
Compression Method for Opinion Mining. Berlin, Heidelberg: Springer
Berlin Heidelberg, 2010, pp. 320–329.
[7] W. Che, Y. Zhao, H. Guo, Z. Su, and T. Liu, “Sentence compression for
aspect-based sentiment analysis,” IEEE/ACM Trans. Audio, Speech and
Lang. Proc., vol. 23, no. 12, pp. 2111–2124, Dec. 2015.
[8] T. Mikolov, K. Chen, G. Corrado, and J. Dean, “Efficient estimation of
word representations in vector space,” arXiv preprint arXiv:1301.3781,
2013.
[9] K. Toutanova, D. Klein, C. D. Manning, and Y. Singer, “Featurerich part-of-speech tagging with a cyclic dependency network,” in
Proceedings of the 2003 Conference of the North American Chapter
of the Association for Computational Linguistics on Human Language
Technology - Volume 1, ser. NAACL ’03.
Stroudsburg, PA, USA:
Association for Computational Linguistics, 2003, pp. 173–180.
[10] M. P. Marcus, M. A. Marcinkiewicz, and B. Santorini, “Building a large
annotated corpus of english: The penn treebank,” Comput. Linguist.,
vol. 19, no. 2, pp. 313–330, Jun. 1993.
[11] A. Taylor, M. Marcus, and B. Santorini, Treebanks: Building and Using
Parsed Corpora. Dordrecht: Springer Netherlands, 2003, ch. The Penn
Treebank: An Overview, pp. 5–22.
[12] J. Leskovec and A. Krevl, “SNAP Datasets: Stanford large network
dataset collection,” http://snap.stanford.edu/data, Jun. 2014.
[13] J. McAuley, R. Pandey, and J. Leskovec, “Inferring networks of substitutable and complementary products,” in Proceedings of the 21th ACM
SIGKDD International Conference on Knowledge Discovery and Data
Mining, ser. KDD ’15. New York, NY, USA: ACM, 2015, pp. 785–794.
[14] M. Thelwall, K. Buckley, G. Paltoglou, D. Cai, and A. Kappas, “Sentiment in short strength detection informal text,” J. Am. Soc. Inf. Sci.
Technol., vol. 61, no. 12, pp. 2544–2558, Dec. 2010.
[15] M. Thelwall, K. Buckley, and G. Paltoglou, “Sentiment strength detection for the social web,” J. Am. Soc. Inf. Sci. Technol., vol. 63, no. 1,
pp. 163–173, Jan. 2012.
[16] MeaningCloud, “Meaningcloud is a brand by meaningcloud llc, a
s—ngular company.” https://www.meaningcloud.com/, 2015.
[17] V. Narayanan, I. Arora, and A. Bhatia, “Fast and accurate sentiment
classification using an enhanced naive bayes model,” in Proceedings
of the 14th International Conference on Intelligent Data Engineering
and Automated Learning — IDEAL 2013 - Volume 8206, ser. IDEAL
2013. New York, NY, USA: Springer-Verlag New York, Inc., 2013,
pp. 194–201.

[18] R. Socher, A. Perelygin, J. Y. Wu, J. Chuang, C. D. Manning, A. Y. Ng,
and C. Potts, “Recursive deep models for semantic compositionality over
a sentiment treebank,” in Proceedings of the conference on empirical
methods in natural language processing (EMNLP), 2013, pp. 1631–
1642.
[19] uClassify, “uclassify,” https://www.uclassify.com/, 2008.
[20] A. Go, R. Bhayani, and L. Huang, “Twitter sentiment classification using
distant supervision,” Technical report, Stanford, 2009.
[21] EffectiveSoft, “Intellexer,” http://www.intellexer.com/, 2000.
[22] Alias-i., “Lingpipe 4.1.0,” http://alias-i.com/lingpipe, 2008.

A PPENDIX
Tables III to VIII present the difference in test accuracy results for the various compression rates. The various sentiment
analysis algorithms are abbreviated as follows: IN, LP, MC,
S140, SS, ST, uC and V refer to Intellexer, LingPipe, MeainingCloud, Sentiment140, SentiStrength, Stanford, uClassify and
Vivek respectively. For a compression rate of 10%, the best
and worst change in accuracy were obtained by LingPipe and
Sentiment140 respectively. Based on all the findings for 10 per
cent compression, there were 21 cases across all the methods
and data sets whereby the change in accuracy was greater
than zero. For a compression rate of 15% the number of cases
was 17 whereby LingPipe obtained the best average change
in accuracy with a value of 0.0%.
The best change in accuracy for 20% compression rate was
obtained by uClassify with a value of 0.7 on two data sets.
There were six data sets for which uClassify reduced the data
up to 20% and for which the test accuracy on the compressed
data was better than on the original data. Additionally, there
were 14 cases in total across all the algorithms whereby the
change in accuracy was greater than zero for 20% compression.
The findings revealed that a for the compression rate of 25%
there were 14 cases for which the change was greater than
zero, and the best change in average accuracy was obtained
once again by LingPipe with a value of -0.3%. There was a
reduction performance in terms of the number of cases having
a change greater than zero when a compression of 30% was
used; notably 9 cases. uClassify however, on 5 datasets, had
a test accuracy greater than zero. Finally, only two algorithms
were able to obtain improvements in terms of the changes for
a compression rate of 50%, namely uClassify and LingPipe,
with changes in 3 and 2 data sets respectively.

AIV
MI
Digital
Music
Baby
Patio &
Garden
Automotive
Pet
Supplies
Apps for
Android
Beauty
Tools &
Home
Toys &
Games
Health &
Personal
Average

IN
-0.9
0.1
-1.0

LP
-0.0
0.3
0.2

MC
0.4
-0.7
-0.3

S140
-2.1
-1.9
-2.5

SS
-0.3
-0.4
-0.1

ST
-3.0
0.5
-1.9

uC
-1.9
-0.4
-0.4

V
-0.9
-1.4
-2.0

0.0
-0.1

0.4
0.4

-0.2
-0.2

-2.7
-2.1

0.0
-0.2

-1.2
-0.7

0.3
0.9

0.2
-0.9

-1.1
-1.2

0.4
0.3

-0.5
-0.4

-2.1
-2.9

0.0
-0.4

-1.1
0.3

0.7
0.0

-0.9
-1.6

-1.4

0.0

-0.5

-2.5

-0.3

-3.5

0.0

-1.6

-0.5
0.8

0.0
-0.1

0.2
-1.0

-1.2
-2.3

0.0
-0.6

-0.5
-1.7

-0.7
0.5

-0.4
0.0

-0.5

0.0

-1.5

-1.8

0.2

-3.1

-0.1

-1.4

0.4

0.1

-0.4

-1.6

-0.3

-1.4

0.5

-0.4

-0.4

0.1

-0.4
-2.1
TABLE III

-0.2

-1.4

0.0

-0.9

D IFFERENCE BETWEEN THE COMPRESSED AND ORIGINAL TEST
ACCURACY WHEN A COMPRESSION RATE BETWEEN 10% AND 13% WAS
IMPOSED .

AIV
MI
Digital
Music
Baby
Patio &
Garden
Automotive
Pet
Supplies
Apps for
Android
Beauty
Tools &
Home
Toys &
Games
Health &
Personal
Average

IN
-1.1
1.1
-1.6

LP
-1.1
0.5
0.4

MC
-0.2
-0.8
-0.7

S140
-2.7
-2.9
-3.6

SS
0.1
-0.8
-0.5

ST
-3.2
0.0
-2.3

uC
-2.0
-1.3
-1.2

V
-0.6
-0.8
-2.1

0.0
-0.3

-0.9
-0.4

-0.5
-0.3

-2.4
-3.5

0.2
-0.6

-2.0
-1.2

0.6
0.5

-0.1
-1.0

-1.4
-1.1

0.6
0.6

-1.0
-0.2

-2.8
-3.8

-0.3
-0.6

-2.2
-1.3

0.9
0.2

-0.8
-2.9

-1.7

-0.3

-0.9

-4.2

-0.5

-3.4

-1.0

-3.2

-0.9
-0.2

-0.3
0.0

-0.7
0.0

-3.5
-3.0

-0.2
-0.3

-1.3
-1.7

-1.8
1.2

-1.2
0.7

-1.3

-0.2

-1.2

-1.6

-0.1

-1.1

-0.8

-1.8

0.1

0.0

-0.6

-2.8

-0.5

-2.6

0.2

-0.4

-0.7

0.0

-0.6
-3.0
TABLE IV

-0.3

-1.8

-0.3

-1.2

D IFFERENCE BETWEEN THE COMPRESSED AND ORIGINAL TEST
ACCURACY WHEN A COMPRESSION RATE BETWEEN 15% AND 18% WAS
IMPOSED .

AIV
MI
Digital Music
Baby
Patio & Garden
Automotive
Pet Supplies
Apps for Android
Beauty
Tools & Home
Toys & Games
Health & Personal
Average

IN
-1.7
0.2
-2.2
-0.7
-0.9
-1.6
-1.0
-1.7
-1.1
0.6
-1.5
0.0
-0.9

LP
-1.2
1.1
-0.4
-0.4
-1.1
0.2
0.4
-0.1
0.2
-0.1
0.0
-0.4
-0.1

MC
S140
0.3
-4.0
-1.1
-2.5
-0.2
-3.5
-0.4
-2.7
-1.2
-3.7
-0.3
-3.5
-1.3
-3.5
-1.6
-4.8
-0.6
-4.0
-1.2
-4.4
-0.4
-3.3
-1.0
-4.2
-0.7
-3.7
TABLE V

SS
-0.4
-0.6
-1.2
-0.8
-0.5
-0.9
-0.4
-0.4
-1.0
-0.7
-0.2
-1.2
-0.7

ST
-3.1
0.4
-3.1
-2.2
-2.2
-2.8
-2.1
-4.5
-1.1
-1.9
-2.8
-1.7
-2.2

uC
-1.8
-1.2
-1.7
0.5
0.5
0.3
0.7
-1.7
-1.2
0.0
-1.5
0.7
-0.5

V
-1.8
-1.4
-2.0
-1.1
-0.9
-1.7
-2.2
-3.3
-1.2
-1.5
-1.9
-0.9
-1.6

D IFFERENCE BETWEEN THE COMPRESSED AND ORIGINAL TEST ACCURACY WHEN A COMPRESSION RATE BETWEEN 20% AND 23% WAS IMPOSED .

AIV
MI
Digital Music
Baby
Patio & Garden
Automotive
Pet Supplies
Apps for Android
Beauty
Tools & Home
Toys & Games
Health & Personal
Average

IN
-2.4
-0.6
-1.9
0.1
-0.9
-2.0
-0.8
-2.4
-1.1
-0.8
-1.2
0.3
-1.1

LP
-1.6
1.0
-0.1
-0.9
-1.4
0.1
0.0
-0.4
0.2
-1.0
-0.5
0.9
-0.3

MC
S140
-0.6
-3.7
-0.1
-4.8
-0.5
25.1
0.5
-4.4
0.1
-4.7
0.1
-3.3
-0.7
-5.3
-1.4
-6.7
-0.7
-5.5
-1.6
-5.2
-1.1
-5.7
0.0
-3.9
-0.5
-2.3
TABLE VI

SS
-0.2
-1.0
-0.5
-0.5
-0.9
-1.5
-0.6
-0.9
-0.6
-1.1
-0.2
-0.3
-0.7

ST
-6.0
-1.6
-2.4
-2.6
-1.5
-4.2
-1.7
-3.4
-2.1
-3.6
-2.7
-2.8
-2.9

uC
-2.5
-0.1
-2.9
-0.4
0.6
0.5
0.1
-0.9
-1.8
0.0
-1.0
-0.9
-0.7

V
-2.0
-1.8
-3.5
-0.6
-1.6
-0.4
-2.9
-3.4
-2.4
-0.3
-3.6
-1.1
-1.9

D IFFERENCE BETWEEN THE COMPRESSED AND ORIGINAL TEST ACCURACY WHEN A COMPRESSION RATE BETWEEN 25% AND 28% WAS IMPOSED .

AIV
MI
Digital Music
Baby
Patio & Garden
Automotive
Pet Supplies
Apps for Android
Beauty
Tools & Home
Toys & Games
Health & Personal
Average

IN
-2.3
-0.5
-3.3
-0.8
-1.8
-1.2
-2.2
-3.0
-2.4
-0.9
-2.2
-0.6
-1.8

LP
-2.1
0.6
-1.1
-0.7
-1.2
-0.4
-0.9
0.0
-0.2
0.0
0.0
-0.3
-0.5

MC
-0.1
-1.1
-1.0
0.2
-1.7
-0.9
-1.1
-2.1
-1.1
-1.3
-1.6
-0.60
-1.0
TABLE

S140
-8.2
-6.9
-6.2
-6.1
-6.6
-4.8
-5.8
-7.7
-7.7
-5.9
-6.0
-6.10
-6.5
VII

SS
-1.3
-1.6
-1.7
-1.1
-1.5
-1.5
-1.0
-1.1
-1.2
-1.5
-0.2
-0.70
-1.2

ST
-7.0
-2.4
-3.6
-5.3
-4.3
-4.7
-4.4
-6.4
-4.6
-5.0
-5.0
-5.30
-4.8

uC
-2.3
-1.9
-2.8
0.7
-0.3
0.8
1.6
-2.1
-1.9
0.4
-0.7
0.70
-0.6

V
-2.5
-2.8
-4.9
-1.3
-2.2
-2.6
-2.8
-5.3
-3.2
-1.1
-3.0
-2.00
-2.8

D IFFERENCE BETWEEN THE COMPRESSED AND ORIGINAL TEST ACCURACY WHEN A COMPRESSION RATE BETWEEN 30% AND 33% WAS IMPOSED .

AIV
MI
Digital Music
Baby
Patio & Garden
Automotive
Pet Supplies
Apps for Android
Beauty
Tools & Home
Toys & Games
Health & Personal
Average

IN
-5.8
-1.9
-5.5
-1.4
-3.8
-3.7
-1.8
-6.2
-3.0
-2.2
-4.8
-2.2
-3.5

LP
-4.2
0.8
-1.3
-1.4
-1.8
-2.4
-1.6
-1.6
-0.1
0.1
-1.2
-0.2
-1.2

MC
-1.8
-0.9
-1.9
-1.7
-2.1
-1.9
-2.2
-4.8
-1.8
-2.2
-2.0
-2.0
-2.1
TABLE

S140
-15.6
-15.1
-15.3
-12.4
-13.9
-12.6
-14.9
-17.1
-15.3
-14.3
-12.7
-12.1
-14.3
VIII

SS
-3.4
-2.6
-3.5
-2.4
-2.5
-2.8
-2.5
-4.4
-3.0
-3.6
-1.8
-2.2
-2.9

ST
-13.2
-6.9
-9.9
-11.2
-10.1
-7.9
-8.0
-12.4
-8.7
-9.5
-10.1
-10.1
-9.8

uC
-7.8
-3.9
-5.5
-1.5
-0.5
0.1
0.6
-4.3
-4.1
1.0
-4.3
-1.1
-2.6

V
-8.2
-7.6
-9.0
-5.6
-4.7
-4.6
-6.2
-11.0
-7.8
-4.9
-7.2
-5.0
-6.8

D IFFERENCE BETWEEN THE COMPRESSED AND ORIGINAL TEST ACCURACY WHEN A COMPRESSION RATE BETWEEN 50% AND 53% WAS IMPOSED .

