Distributed Supervised Sentiment Analysis of Tweets : Integrating Machine Learning and Streaming Analytics for Big Data Challenges in Communication and Audience Research

the large-scale analysis of tweets in real-time using supervised sentiment analysis depicts a unique opportunity for communication and audience research. Bringing together machine learning and streaming analytics approaches in a distributed environment might help scholars to obtain valuable data from twitter in order to immediately classify messages depending on the context with no restrictions of time or storage, empowering cross-sectional, longitudinal and experimental designs with new inputs. even when communication and audience researchers begin to use computational methods, most of them remain unfamiliar with distributed technologies to face big data challenges. this paper describes the implementation of parallelized machine learning methods in Apache Spark to predict sentiments in real-time tweets and explains how this process can be scaled up using academic or commercial distributed computing when personal computers do not support computations and storage. We discuss the limitation of these methods and their implications in communication, audience and media studies. C.ArCilA, F.OrtegA, M.ÁlvArez y M. viCente Análisis distribuido... 115 EMPIRIA. Revista de Metodología de Ciencias Sociales. N.o 42 enero-abril, 2019, pp. 113-136. ISSN: 1139-5737, DOI/empiria.42.2019.23254 KEy WoRdS Sentiment Analysis, twitter, Big Data, Streaming, Machine learning, Communication and Audience research, Apache Spark.


AbSTRAcT
the large-scale analysis of tweets in real-time using supervised sentiment analysis depicts a unique opportunity for communication and audience research.Bringing together machine learning and streaming analytics approaches in a distributed environment might help scholars to obtain valuable data from twitter in order to immediately classify messages depending on the context with no restrictions of time or storage, empowering cross-sectional, longitudinal and experimental designs with new inputs.even when communication and audience researchers begin to use computational methods, most of them remain unfamiliar with distributed technologies to face big data challenges.this paper describes the implementation of parallelized machine learning methods in Apache Spark to predict sentiments in real-time tweets and explains how this process can be scaled up using academic or commercial distributed computing when personal computers do not support computations and storage.We discuss the limitation of these methods and their implications in communication, audience and media studies.

INTRodUccIÓN
there is a growing interest in surveying sentiments and opinions using largescale data produced by social media (Cobb, 2015;O'Connor, 2010;Bollen, Mao & Pepe, 2011).However, most of these studies are based either on manual classification or automated content analysis using dictionaries that score words among others (e.g.giving an a priori negative or positive value to each word) (leetaru, 2012;Feldman, 2013) and other approaches such as supervised machine learning (vinodhini & Chandrasekaran, 2012) are scarce in communication and audience research (van zoonen & toni 2016) even when scholars in this field are aware of the advantages of computational methods to deal with largescale textual analysis (Shahin, 2016).Moreover, the efforts to bring together automated sentiment analysis based on machine learning (supervised sentiment analyses) and streaming technologies that produce important amount of data in real time, are relatively new developments that private companies are adopting for several purposes but most social science scholars remain still unfamiliar.this paper intends to fulfill this methodological gap by describing and assessing the creation of machine learning models to predict sentiments in real-time tweets and explaining how this process can be scaled in communication and audience research using academic or commercial distributed computing when personal computers do not support computations and storage.
We explain what is supervised sentiment analysis and how useful are streaming analytics or real-time research in communication and audience studies.to joint these two approaches, this paper describes how communication scholars and social scientists can analyze the tone of big amount of tweets in real time using freely available resources such as Apache Spark, Python and the Application Program interface (APi) of twitter. in a personal computer and based on nltK and Scikit-learn libraries, there is previous literature in communication and information sciences that show how to train a supervised machine learning model with different algorithms for classification and predict the sentiment of tweets in real time (Arcila et al., 2017).However, we state that local computing has serious limitations if communication scholars plan to scale this analysis with significantly higher amount of data, which requires scalable storage and distributed computing like the approach for twitter detailed in nodarakis et al. (2016). in fact, running streaming data analysis in distributed platforms has been a challenge in the complex and changing big data landscape (turck & Hao, 2016).the incorporation of tools such as Apache Kafka has allowed the current most extended open software for distributed computing Apache Spark to achieve this goal with Spark Streaming (Spark Kafka integration, 2016), which can read code in Scala or also in Python (with the module PySpark).
in this paper, we show how communication scholars and social scientists can extend supervised sentiment analysis for big data and streaming challenges.this method is scalable using academic networks or commercial tools, such as the most popular infrastructure as a Service (iaaS) Amazon Web Services (AWS), that offers Amazon S3 for massive storage and Amazon elastic Computing Cloud (eC2) to create a flexible set of connected instances in the cloud in order to compute the analysis (reading and writing data directly from/to S3). the computational methods for big data problems in communication and audience research explained in this paper might help scholars to study large amounts of tweets in any language running sentiment analysis in real-time with few limitations.All these methods require programming skills, but exiting models allows short-time efforts and easy adaptations.they also require some discussion about an open-minded approach regarding the transition from conventional to computational research methods.
We provide scholars with all the commented code for Spark (written in Python and using PySpark) in an inoteBook (ipynb)1 .no mathematical background is needed to run the machine learning models, but a theoretical understanding of the algorithms will increase the quality of the research.Working with interdisciplinary teams (computer scientists, statisticians, computational linguistics, etc.) can also improve the results and save resources.the described procedure to monitor tweets in streaming might help testing traditional and emerging theoretical approaches in communication and audience research that require longitudinal data and might also contribute to experimental studies, which need real-time inputs to create or adapt stimuli.Additionally, this method brings social sciences closer to artificial intelligence, which is a field that is transforming many disciplines given its enormous potential to use mathematics and computers to model complexity and identify patterns and predict behaviors.
Predicting real time sentiment in twitter during a long period also allows longitudinal analysis to detect changes over the time and compare these changes with day-to-day events, which in turn allow better interventions based on communication and audience research.in any case, we are also aware of the weaknesses of twitter when it comes to reach depth of argumentation and the flaws that sometimes arise from this public opinion building-up processes.

SUPERvISEd SENTIMENT ANAlySIS (SSA)
Sentiment analysis (hereinafter, also referred to as SA) is one of the main techniques used to study textual data at a small and large scale in social sciences and communication research.the main purpose of this methodology is to recognize and evaluate the underlying emotions provided in the textual sources analyzed through their syntactic structure.these texts are subsequently classified, for example, into positive, negative or neutral. in the last years, this methodology has been mainly applied to the interpretation and analysis of social media texts, such as a given textual corpus from twitter.these researches are usually achieved by examining the vocabulary of a text with a computer using a lexicon-based "dictionary", which processes, recognizes and evaluates the emotional tone behind the message.Sentiment analysis is often confused with opinion mining.indeed, the latter is applied to detect polarity, and the identification of emotions is often used for the same purpose (Cambria, Schuller, liu, Wang & Havasi, 2013); both techniques are different but complementary.identifying the prevailing sentiment in a written text is a complex task, even for a well-trained human brain.therefore, automated sentiment analysis requires a constant and sharpened development that has been tackled from two main standpoints: semantic approaches (turney, 2002), and machine learning techniques (Pang, lee & vaithyanathan, 2002).Semantic approaches are characterized by the use of sentiment dictionaries (lexicons) oriented towards polarity or opinion.these systems pre-process the text and divide it into words, subsequently verifying the presence of lexicon terms, in order to assign the text's polarity by adding the weighted polarity values of the terms ("sad" = -3; "happy" = +3).Additionally, these systems also include a fairly advanced treatment of modifiers (such as very, little or extremely), which increase or reduce polarity of the terms they are related to, and they include inverters or negators (such as not or neither), which invert the polarity of the word they are associated with.this was the method used by turney (2002), who pioneered the application of automated sentiment analysis, which in this case focused on analyzing reviews on services and products.
As opposed to manual SA using human codifiers, or to computer-assisted automated analysis using dictionaries, supervised sentiment Analysis (ssA) applies supervised machine learning processes to generate models based on preannotated data.the aim is to predict, with a significant degree of reliability, the underlying sentiment in messages.this procedure uses classification algorithms, and their implementation in communicational processes allows for a fast analysis of communicational texts, thus avoiding any bias stemming from codifiers or lexicons with categories, which on an a priori basis are incapable of detecting subjects or topics, the context, or irony-sarcasm for example.SSA allows for transforming the classification model throughout the predictive process if such model is fed with additional and enriching annotated texts enhancing the adjustment process.One of the first approaches to this methodology was shown in the work of Pang et al. (2002), where supervised machine learning was applied to sentiment analysis of polarized reviews of movies, rating such reviews as positive or negative.Bermingham and Smeaton (2010) carried out a study on how short-length documents suggest that the sentiment they contain is more compact and explicit.Other researchers, such as Bakliwal, Arora, Madhappan, Kapre, Singh and varma (2012)  in any case, even when SSA has not been completely accurate, nor has provided relevant or influential findings in twitter analysis (Madlberger & Almansour, 2014), this technique has been recently applied to predict events in various domains (Kranjc et al, 2015;Preethi & Uma, 2015) such as finance (Smailović et al., 2013), social networks (Sluban et al., 2015) and election results (Smailović et al., 2015), with a more than promising prediction accuracy.in fact, in the last decade there has been an ever-increasing growth of SSA, particularly in the social and political science domain.increasingly more experiments are based on this methodology-technique due to its comparative robustness. it is relevant to note that within communication and audience studies, there are early applications related to communicational analysis in social media.One of the few proven models is that of Bakliwal, Foster, van der Puil, O'Brien, tounsi and Hughes (2013), who put forward a sentiment analysis model with a political orientation based on supervised machine learning.the transition from and the dialogue with conventional Media Studies and Communication research are still pending, as progress in these research approaches is not being leaded by Communication scholars yet.Our scientific discipline would benefit from this dialogue with other scientific and technical fields, as a way to increase our impact and efficacy.
A very good example of this dialogue is the work by Smailović et al. ( 2015) who monitored the sentiments in twitter during the Bulgarian parliamentary elections in May 2013. the authors initially collected examples of general Bulgarian tweets (n=29,433) and political Bulgarian tweets (n=10,300), and manually classified the sentiment of these messages to build the training corpus and generate the machine learning models.Using real-time analysis during the elections, they found that negative sentiments about political parties prevailed before and after the elections.Moreover, they use sentiment analysis to determine how social media data can help to predict electoral results and found that the difference between the negative and positive tweets for political parties closely match the final of voting.the study clearly shows how this technique can be used to anticipate social phenomena and is indeed compatible with social, political and behavioral analysis.

REAl-TIME ANAlyTIcS IN coMMUNIcATIoN ANd AUdIENcE RESEARch
As computational methods related to data mining evolve, and as automated and supervised sentiment analysis techniques focused on social media become more challenging, communication science and audience research are increasingly becoming more interested in applying these methods and techniques.their huge potential lies in their ability to calibrate and build advanced real-time indicators of communicational content.Under this approach, researchers can imple- ment streaming analytics by observing sentiment in sites like twitter regarding specific users, current topics or hashtags, which allows for making predictions associated to social, political, economic, cultural processes related to relevant events.Previous studies have used historical twitter data to make predictions, such as that of Choy, Cheong, laik and Shung (2011) who applied dictionarybased sentiment analysis to predict the vote percentage that an individual candidate would receive in the Singapore presidential election of 2011.Bermingham and Smeaton (2011) also attempted to use twitter to predict election results; they tried to predict the electoral outcome of the 2011 irish general election using a supervised sentiment classifier.However, there are other attempts to make predictions using streaming analytics in twitter.Whereas the historical sentiment analysis takes days, or even weeks, to be completed, real-time sentiment analysis in twitter data delivers or returns results almost continuously and immediately.One of the pioneering works in this area was fostered by Wang, Can, Kazemzadeh, Bar and narayanan ( 2012), who came up with a system for real-time twitter sentiment analysis of the 2012 US presidential election cycle.their model instantly interprets results of how certain events can affect public opinion.reducing the time gap between data collection and analysis is one of the pending challenges for Social Sciences, as one of the traditional critiques to our research points to a decalage between the point in time when things occur and the point in time when we, scholars, present our findings and concussions.
As we previously discussed, ssA is a central tool in order to shape positive and negative messages throughout their communication value chain.this method of analysis can also allow predicting sentiment in real-time communicational events, like political debates, or crisis communication management on various topics.However, there is a telling lack of real-time research and methodological applications in communication and audience studies, and even more so regarding sentiment analysis with streaming technologies based on supervised machine learning.Streaming analytics can be highly useful for audience and communication researchers (Pond, 2016;Bastos, Mercea & Charpentier, 2015;Driscoll, & Walker, 2014;li & Xu, 2016;Kanejo & tanai, 2016;Coletto et al., 2016), consulting firms and private enterprises in the fields of public opinion, marketing and political and governmental studies.Moreover, combined to SSA they can be helpful to study large amounts of tweets, by performing real-time sentiment analyses overcoming the limitations inherent to lexicon-based approaches.the aforementioned process to monitor tweets in streaming can improve communicational processes forecasts, and it can help in testing both the traditional and emerging approaches in public communicational opinion research requiring longitudinal data analysis in time series.this technique can also help in testing hypotheses in experimental studies requiring real-time entries to create or adapt stimuli, and thus validating exploratory theoretical models.these systems can bring comparative advantages for socio-political and communicational research.they can enable communication analysis teams to go a step ahead in terms of early detection and interpretation of the effectiveness of their communication strategies almost in real time.

dISTRIbUTEd SSA foR bIg dATA PRoblEMS
Bringing together large-scale supervised sentiment analysis and streaming analytics is a powerful approach to face big data challenges in communication research because it allows scholars to content analyze sentiments based on context with no restrictions of space (number of messages) and time (real-time and long periods with no interruption).in this section, we explain in detail how to overtake local computing limitations and use this computational method to face big data challenges using open source software with the data available from the Application Program interface (APi) of twitter that nowadays provides freely access to an important amount of semi-structured social data (Makice, 2009).We show how scholars can: (i) train machine learning models with parallelized algorithms using previously labeled tweets; (ii) connect to the streaming of twitter and filter relevant messages; (iii) predict sentiments in real-time in a distributed context; and (iv) store the results in a flexible database and visualize the outcomes.this method requires a set of tools such as Python 3.5, Apache Spark 2.1, Apache Kafka 2.11, Apache zookeeper 3.4.10and MongoDB 3.4, and can be used in a local computer but is already prepared to scale up in the cloud in any academic or commercial service (such Amazon Web Services, AWS).A summary of the algorithms and tools to run supervised sentiment analysis in real time over big amount of tweets is shown in figure 1.Firstly, the most important step in supervised sentiment analysis is to obtain a good training dataset to train the models.Communication and audience researchers have a great experience in content analysis, which implies that labeling the initial dataset will be easy and labels will be reliable.to download raw tweets, scholars can use the twitter APi reSt that allows the collection of recent messages in JSOn format, filtering the search by any of the unstructured fields of the tweet (i.e."text", "language", "location", etc.).later, trained and independent coders must classify the messages (the "text" field) into negative or positive (or more specific labels such as "neutral", "strongly negative", etc.) according to traditional content analysis approach (Krippendorf, 2004;neuendorf, 2016) to obtain adequate levels of reliability (>0,7 Krippendorf's Alpha or similar measures) 2 .there is not a minimum or maximum number of messages for the training dataset, but the algorithms will learn better if they have good  , 2015), so the approach in supervised sentiment analysis is to use the one that is more predictive.in a local computer, scholars can use the library Scikit-learn in Python to train Ml models (raschka, 2015) using well known algorithms such as Original naïve Bayes, naïve Bayes for multimodal models, naïve Bayes for multivariate Bernoulli models, logistic regression, linear Support vector Classification or linear classifiers with stochastic gradient descent -SgD-training.However, if they have a huge training dataset that requires a lot of computational memory, they can train the Ml models in a distributed context with Apache Spark (Pentreath, 2015) using the packages Mllib and PySpark.not all algorithms are available in a parallelized format, but researchers can still implement logistic regression, naïve Bayes and Support vector Machines (SvM), and evaluated which gives the best accuracy.When working with unstructured data (like the text of a tweet) researchers must previously use natural language processing (nlP) techniques to tokenize words and convert messages into features vectors (Bird, Klein & loper, 2009), which is the data that the algorithms will work with.
nlP includes extracting informative words based on a tag-of-speech approach, so researchers can decide which kind of word (verbs, adjectives, adverbs, etc.) will train the models.Once these words are selected, they must be grouped into an array, resulting in a sequence of words of the selected type, for example, if adjectives are selected, each tweet will be converted into an array of the adjectives of the tweet.this approach is more complex than the usual positive-or-negative word classification, as it considers sequences of words, which is useful, for example to identify degrees of positiveness and negativeness and more complex constructions such as the irony, that is impossible to identify with just the classification of words in negative or positive, as it usually has for example positive adjectives but in a specific sequence which really signifies a negative comment.this technique allows to not only considering the word but also the other ones that appears in the same tweet.the disadvantage is that much bigger training dataset is required.going more into the detail of what is happening in the inside of the algorithm, every unique adjective present in every tweet must be registered in a dictionary of words.With this dictionary of unique words, each tweet can be transformed into an instance, an array of 1s and 0s, 1 when the word is present on the tweet and 0 otherwise.the result is a disperse array (an array with large amount of 0s and few 1s), and with as many independent variables as words in the dictionary.the next code shows how communica- Secondly, the twitter APi StreAMing allows instant access to 1% of the whole stream.this percentage might seem a small and an insignificant amount of tweets, but the true is that when we filter the tweets (i.e.only containing a specific hashtag, such as #trump or #ClimateChange) we will not exceed this 1% limit in most of the cases.to locally connect to the stream, scholars can obtain the necessary code access (APi key, APi secret, Access toke and Access token secret) by registering to the twitter APi and use the library tweepy for Pyhton (roesslein, 2009)  ter.if communication and audience researchers are dealing with a huge amount of messages for a long period of time and decide to implement large-scale and real-time collection, this library still works but needs to be implemented in a remote machine in order to continuously produce the messages that will be analyzed afterwards.this process requires the execution of Apache Kafka (together with zookeeper), so the researcher can remotely connect to the twitter APi and send the stream to a kafka producer in order to make data available from a kafka broker.this means that large-scale supervised sentiment analysis in real-time needs a virtual computer with Apache Kafka dedicated to be connected to the twitter stream in order to continuously produce a new flux of parsed and filtered messages that can later be accessed from different nodes to execute the tone evaluation. in this stage, communication and audience researchers can monitor or even save the parsed tweets, which are a potential advantage if they decide to run any kind of exploratory, qualitative or on-the-way analysis for quick interventions.this code summarizes the distributed implementation of this producer in Spark for real-time tweets about #trump: >>> import json, tweepy, configparser >>> from kafka import SimpleProducer, KafkaClient >>> twitter_credentials = {"consumer_key": "", "consumer_secret": "", "access_key": "", "access_secret": ""} twitter_parameters = {"hashtag": ["#trump"]} >>> kafka_producer_parameters = {"batch_send_freq_t": 1000,"batch_send_freq_n": 10,"topic": twitter_parameters the third step for large-scale supervised sentiment analysis in real time is to predict the sentiments of the ongoing flux of messages we are producing; using the models we already trained with the parallelized algorithms.the models are kept as special files to save time, but they can be updated any time repeating step two and replacing the files.in this stage, researchers must run a set of virtual machines and implement an Apache Spark context if they really want to face big data challenges and keep the analysis fast and steady.Specifically, at this point the method consists in starting a streaming context in Spark to connect to the Kafka producer described above with a Kafka consumer to predict the score of tweet with the Mllib algorithms.to be able to classify the new tweets, these messages have to pass through the same process the training instances passed (tokenize words and select them based on tag of speech).to work in real time, all the tweets must also be gotten from the Kafka stream and save the texts to a DStream, a sequence of resilient distributed datasets (rDDs) for each period of time, which is the primary data structure of Apache Spark.All these phases allow executing the sentiment prediction in parallel instances, using the model and the word list produced with the Ml algorithms during the training stage, and printing each prediction with standard output.Parallel computing and elastic computing capacities (most of academic and commercial services can be configured to add/remove virtual machines automatically based on demand) give communication and audience scholars a unique opportunity to overtake space and time limitations that traditional and "small data" computational methods have when dealing with sentiment analysis.this is a simplified code for the consumer with a call to three Ml algorithms (logistic regression, Support vector Machines and naïve Bayes) and an order to choose which is the best to classify the tweets: features.append(0)return features >>> rdd_input = directKafkaStream.map(lambdaoutput: output[1]) >>> classification = convert_tweet_to_instance(rdd_input).map(lambdainstance: 1 if (lr_model.predict(instance)+ int(nB_model.predict(instance)) + SvM_model.predict(instance))>=1else -1) >>> classification_each = convert_tweet_to_instance(rdd_input).map(lambda instance: [lr_model.predict(instance),nB_model.predict(instance), SvM_model.predict(instance)])>>> def save_to_db(rdd, collection): df = rdd.zipWithUniqueid().toDF().withColumn('timestamp',lit(datetime.datetime.utcnow())).toDF('label','in_batch_id','timestamp') df.write.format("com.mongodb.spark.sql.DefaultSource").mode("append").option("database","twitter").option("collection",collection).save()>>> classification.foreachrDD(lambdardd: save_to_db(rdd,"labels")) >>> rdd_input.foreachrDD(lambdardd: save_to_db(rdd, "tweets")) >>> ssc.start()Finally, the results of distributed supervised sentiment analysis must be stored and visualized.When working with streaming analytics, all results are stored by periods of time, printing each batch separately.the first way to store the tweets and their predicted value (and any other extra data scholars wish to keep for further research) is to save the results in plain text files (tab/comma and line separated).However, even when social scientists might be still unfamiliar with non-relational databases, the best way to store twitter messages and their predicted sentiments is through a noSQl database, either SQl or noSQl, depending on the data, such as PostgreSQl or MongoDB, for example. in contrast with relational databases, these noSQl databases are more flexible and less restrictive, which allows scholars to scale up their analysis when dealing with big data.the above code described for the consumer includes commands for distributed storage and the flow of all this process is described in figure 2. On the other hand, scholars can use different Pyhton libraries such as Matplotlib or Bokeh, to visualize the ongoing sentiments. in particular, Bokeh is a powerful tool to visualize the trends if we have stored the results in MongoDB.All scripts will visualize batches of tweets, but scholars can control parameters such as the update frequency (time to wait to poll the database for the next batch) or the number of points that can be simultaneously shown on the screen (to produce averages of minutes, hours, days, months, etc.).Control of parameters and flexible visualization of large-scale sentiments on twitter can enhance social research designs especially when scholars need to monitor big amounts of tweets as fast as they are produced.Figure 3

dIScUSSIoN ANd coNclUSIoNS
in this paper we have explained the relevance of supervised sentiment analysis and streaming analytics in communication and audience research, and have described the implementation of distributed supervised sentiment analysis, a computational method that allow communication scholars and social scientists to face the big data challenge of twitter contents.this method overtakes the disadvantages of other approaches orientated to computationally manage small data in social media and gives communication and audience researchers a fair overview of how cutting-edge technologies can be adapted to computational social science.
the described method and its implementation is an open source free of charge solution (except for the financial costs of the cloud computing service such as AWS), giving the scholars the absolute power to adapt and modify all parameters.However, there are some commercial products of companies such as Microsoft Azure or iBM Bluemix, that might also help scholars to scale their distributed supervised sentiment analysis of tweets with more friendly interfaces.Microsoft Azure nowadays offers a sentiment analysis service built on the MPQA Subjectivity lexicon (Wilson, Wiebe & Hoffmann, 2005), but can also run scalable sentiment analysis with a machine learning algorithm (two-Class Support vector Machine) written in r to predict opinion polarity in tweets.However, the approach we present on this paper is to create a custom environment that can be deployed on an academic cloud computing service or in-house cluster, as well as in any other commercial provider such as Amazon Web Services, Microsoft Azure or iBM Blue Mix, using just the virtual machines they provide.the main advantage of this approach is that the scholars can deploy their own code and algorithms, and also scale and control the amount of resources they need, which will have an impact on the cost of the study.nevertheless, some knowledge on how to deploy the virtual machines, and configure them in order to use the whole system is required, which can be a difficult task for beginners in deployment operations.
regarding the limitations of this paper, we stress that only three algorithms were used for the distributed supervised sentiment analysis in Apache Spark, and there was no probability classification, which, compared to the local mode classification with Scikit-learn, is a disadvantage, as the user cannot control the minimum degree of certainty to classify each tweet.Some future development can solve some of the previously explained limitation.For example, it is necessary to introduce more degrees for classification or probabilistic results on predictions.On the other hand, a major challenge is to simplify the deployment of the whole system for the distributed analysis, which is another main limitation of the present study.Other interesting points to consider can be the deployment of the prediction models as microservices, as the data amount does not usually require a Spark Streaming system and can be solved with a reSt APi in which the tweet stream will be classified.this approach is interesting as it can simplify the deployment and reduce the amount of resources used for the analysis.However, distributed supervised sentiment analysis represents an innovative computational method in communication science that can be adopted by different actors such as: Communication and audience researchers: scholars can use this technique to carry out descriptive, cross-sectional, longitudinal and experimental studies.
Firms engaged in public opinion studies: these companies may use the classifier to monitor opinion trends on communicational topics. in addition, they can use this methodology to come up with advanced indicators of socioeconomic and political state of the art within the digital society, notoriety of brands´, messa-ges´, candidates' "popularity and acceptance", among others.
Communication consulting firms: these firms can use the classifier to supplement their supervision and study of communicational facts that take place in the country, in order to plan communication and political persuasion strategies (brand, corporate or political marketing), particularly when sentiment analysis and sentiment interpretation arising from communicational campaigns associated to investment opportunities, political actions, social campaigns and initiatives associated may require proactive real-time analysis and conclusions for increased effectiveness.
Political parties: political parties can use this technique to plan their actions according to the existing sentiment on certain public topics on investment opportunities and political candidates suitability.
the challenges and opportunities seized by big data solutions, and particularly by distributed supervised sentiment analysis in Audience or Communication research, using the abovementioned techniques, leads to the conclusion that we are witnessing a Data-Analysis-revolution (DAr) regarding the analysis, interpretation and management of communication initiatives run by stakeholders in the digital communication value chain of fully connected society.the weaknesses and threats, and more importantly the strengths and opportunities, provided by these methodologies and techniques to communication and audience researchers anticipate a deeper revolution in the scientific analysis of communication processes with the establishing of a computational communication science, similar to other fields such as computational biology, where computational methods have transformed the whole discipline.Under this idea, it is highly relevant that computational communication scholars incorporate to their routines the conceptual and technical skills explained in this article.
distributed supervised sentiment analysis of twitter messages is a supplementary but necessary computational method to test and predict communication patterns.in a context where the quality of communication, election or branding research is subject to constant scrutiny and re-assessment by experts and public opinion based on their "inaccuracy," this approach may appears as a "3D scanner in real time" that can complement traditional analyses of representative samples to predict communicational patterns.Additionally, real time supervised sentiment analysis of messages for long time periods in twitter and other digital social networks will enable longitudinal analyses to detect changes in topics such as "communicational incidences" and the various variables examined throughout the relevant time period for a given subject-topic.Accordingly, one could test the relationship between these changes and specific events, which would also allow implementing policies based on research and data analysis on a more proactive basis and with greater time reactivity.large-scale algorithm patterns and the understanding of their internal operation is a key issue for the development and implementation of these methodologies within the big data landscape.the interpretation and grasping of the computational method workflow by the researcher may be of vital importance for the further understanding of the complex decision taken process which may arise.distributed supervised sentiment analysis may provide for the time being that extra luminescence for the understanding of complex communicational processes which in our today technological scenario require still the ability and expertise of human-brained supervision.

AcKNoWlEdgEMENTS
the authors wish to express their gratitude to Fundación universidad de salamanca and Plan tCuE [2015-2017 Fase 2] for funding the project "Clasificador en tiempo real de opiniones políticas en español con técnicas de aprendizaje automático (Auto-cop)", in which we the developed all the methods and codes explained in this paper.We also thank Javier ramírez, Javier Jiménez Amores and Sofía trullenque for their valuable support.

Figure 1 .
Figure 1.tools and Ml algorithms used in distributed supervised sentiment analysis of twitter Figure 3. Streaming visualization of supervised sentiment analysis to tweets containing "#trump" have focused on developing a function that allows for EMPIRIA.Revista de Metodología de Ciencias Sociales.N. o 42 enero-abril, 2019, pp.113-136.
ISSN: 1139-5737, DOI/empiria.42.2019.23254 (go, Bhayani & Huang, 2009)ime sentiment analysis of tweets with Azure Stream Analytics, but uses Sentiment140, an external classification method using machine learning algorithms(go, Bhayani & Huang, 2009).On the other hand, iBM Bluemix can run distributed sentiment analysis based on Spark (and Kafka), and can as well connect to their own machine learning algorithm Watson tone Analyzer, built on neural networks to predict emotions (i.e.anger, fear, joy, sadness, disgust), social tendencies (i.e.openness, conscientiousness, extraversion, agreeableness, emotional range) and writing style (i.e.confident, analytical, tentative) on the texts.these services on Microsoft Azure and iBM Bluemix are mostly available for tweets written only in english.All these services are great for unexperienced users that want to use already implemented solutions with the restrictions each solution provides, the algorithms available and assuming the cost of them.even more friendly, they are still away from most of Audience and Communication scholars research tooolkits, pointing out the need to combine conventional research methods with the innovations being developed in the computational social sciences and digital humanities.this window is open and a wider instruction of social scientists in these fields of knowledge is still required, as a way to increase our research effectiveness.Analyzing tweets is an open door to explore what a given audience daily expresses, so getting closer to these messages is a way to reduce the distance between what people think and do in the public domain.