Tag Archives: php

Posts related to PHP

#ILovePolitics: Political discourse analysis in social media

We continue with the #ILovePolitics series of tutorials! We will show how to use MeaningCloud for extracting interesting insights to build your own Political Intel Reports and, at the same price, turning you into a Data Scientist giant in the field of Social Media Analytics.

political issues

Political issues

Politics and Social Media Analytics

Our research objective is to study and compare the discourse of different politicians during the electoral campaign, using their messages in Twitter. We are going to compare tweets by the four most popular (mentioned) politicians in our previous tutorial: Barack Obama (@barackobama), Hillary Clinton (@HillaryClinton), Donald Trump (@realDonaldTrump) and Jeb Bush (@JebBush).

  • What are their key messages?
  • What do they focus on?
  • Are really there different ways of doing politics?

Before we start, three remarks: 1) we will focus on U.S. Politics, in English language, but the same analysis can be adapted for your own country or language as long as it is supported in MeaningCloud, 2) this is a technical tutorial: we will develop some coding, but in general, everyone can understand the purpose of this tutorial, and 3) although this tutorial will use PHP, any non-rookie programmer can translate the programs to any language.

Continue reading


#ILovePolitics: Popularity analysis in the news

If you love politics, regardless of your party or political orientation, you may know that election periods are exciting moments and having good information is a must to increase the fun. This is why you follow the news, watch or listen to political analysis programs on TV or radio, read surveys or compare different points of view from one or the other side.

American politics in a nutshell

American politics

Starting with this, we are publishing a series of tutorials where we will show how to use MeaningCloud for extracting interesting political insights to build your own political intel reports. MeaningCloud provides useful capabilities for extracting meaning from multilingual content in a simple and efficient way. Combining API calls with open source libraries in your favorite programming language is so easy and powerful at the same time that will awaken for sure the Political Data Scientist hidden inside of you. Be warned!

Our research objective is to analyze mentions to people, places, or entities in general in the Politics section of different news media. We will try to carry out an analysis that can answer the following questions:

  • Which are the most popular names?
  • Does their popularity depend on the political orientation of the newspaper?
  • Is it correlated somehow to the popularity surveys or voting intentions polls?
  • Do these trends change over time?

Before we begin

This is a technical tutorial in which we will develop some coding. However, we will try to guide you through the whole process, so everyone can follow the explanations and understand the purpose of the tutorial.

For the sake of generality and better understanding, we will focus on U.S. Politics in English, but obviously you can easily adapt the same analysis for your own country or (MeaningCloud supported) language.

And last but not least, this tutorial will use PHP as programming language for the code examples. However, any non-rookie programmer should be able to translate the scripts into any language of their choice.

Continue reading


Feature-level sentiment analysis

Back when we were called Textalytics, we published a tutorial that showed how to carry out feature-level sentiment analysis for a specific domain: comic book reviews.

Cover for Marvel's Black Widow #1

Marvel’s Black Widow #1

Since then, besides changing our name, we have improved our Sentiment Analysis API and how to customize the different analyses through our customization engine. In this post we are going to show you how to do a feature-level sentiment analysis using MeaningCloud.

One of the main changes in the latest release of our API is the possibility of using custom dictionaries in the detailed sentiment analysis provided by the Sentiment Analysis API. We are going to use comic book reviews to illustrate how to work, but the same process applies to any other fields where sentiment comes into play, such as hotel reviews, Foursquare tips, Facebook status updates or tweets about a specific event.

Continue reading


Tutorial for feature-level sentiment analysis

Heads up!

This tutorial was made for Textalytics and as such, it has become obsolete. You can read the updated version for MeaningCloud in this post.

MeaningCloud provides an API to carry out advanced opinion mining, Sentiment Analysis, which extracts both a global aggregated polarity of the text and a more in-depth analysis, giving a sentence-level breakdown of the polarity, extracting entities and concepts and the sentiment associated to each one of them.

Cover for Marvel's Black Widow #1

Marvel’s Black Widow #1

What makes MeaningCloud Sentiment Analysis API different is the possibility of defining entities and concepts for each call of the API, allowing you to obtain the same detailed sentiment analysis for entities or concepts specific to the domain of your application.

We are going to use comic book reviews to learn how to use this feature, as it’s a very rich domain in which it’s easy to illustrate how useful user-defined concepts and entities can be. This applies either to this field or to others where sentiment comes into play, such as hotel reviews, Foursquare tips, Facebook status updates or tweets about a specific event.

Continue reading