Aigents® Sentiment Detection for Personalised News Feeds

Sifting through a sea of information to bring you only relevant topics of interest.

Aigents with Anton Kolonin
SingularityNET

--

In our last publication, we described how Aigents® can be used to generate, extracted, and aggregated content from random raw news sources such as arbitrary web pages, social media channels on Reddit, Telegram, and forums like Discourse as well as discussion groups on Telegram and Slack.

What’s new?

In the latest Aigents 2.7.0 release, we have made programmatic sentiment assessment available for news topics. Positive or negative sentiment is identified per news item based on dictionaries of context-less sentiment-specific N-grams, where positive and negative sentiment values are inferred for every topic corresponding to specific news items.

Aigents® sentiment analysis for news items and topics evaluating positive, negative and overall sentiment while monitoring online media and social networks — presented by Anton Kolonin

The positive or negative sentiment assessment is based on dictionaries of words and phrases ‘N-grams’ that correspond to defined sentiment values. N-grams with higher N (i.e. greater number of words in a phrase) is considered with higher priority. That is, given a sentence “that is not bad”, if the phrase “not bad” is considered to identify positive sentiment, the single word “bad” can not be used to identify positive sentiment.

Currently, dictionaries are created for English and Russian languages. English ones are based on SentiWordNet and Bing Liu’s method, while Russian dictionaries are based on РуСентиЛекс and Linis Crowd’s method.

Both positive and negative dictionaries are merged across sources and cleaned so the words and phrases are unique across every language. Moreover, the dictionaries are adjusted based on a preliminary one month testing of the sentiment assessment for worldwide political and business news as well as local news.

Example of the https://aigents.com/ news feed in “News” view showing “positive sentiment” as green bars and “negative sentiment” as red bars (blue bars are rendering “personal relevance”, beige bars — “social relevance”).

Sentiment Assessment occurs when a news item is published by the Aigents crawler in the “News” view of Aigents Web Demo site. If the crawler delays in publishing an item, one may force assessment of sentiment by typing “you think!” in the chat view of the demo site.

Positive sentiment is represented as horizontal green bars and negative sentiment as horizontal red bars. Sentiment evaluation can be conducted by a single user for personalised results but can also be conducted by a wider number of users in a group to produce social results. As such there are also blue bars that represent personal relevance, and beige bars to measure overall social relevance.

Example of the https://aigents.com/ topics sentiment assessment in “Topics” view showing “positive sentiment” as green bars and “negative sentiment” as red bars (blue bars are rendering “personal relevance”).

The overall sentiment assessment for all topics is done on the basis of aggregated positive and negative sentiments across the items relevant to the topic, given that some topics may have multiple news items with either positive or negative sentiment. Similarly to the ‘News view’, positive sentiment is rendered as green bars and negative as red bars. Each of the topics may have positive and negative components.

What is described above applies to the standard process of news mining executed by the Aigents Core. Also, it is possible to get all sentiment details about any piece of text by calling the Aigents® engine using a chat session or over HTTP.

It is possible to make changes to the dictionary, you may, for example, want to change the term ‘clear sky and shining sun’ to ‘thunderstorm’, this can be requested using the Aigents Language (AL) and respond in either AL text or JSON format. For this example, the request would be stated as “Classify sentiment text ‘inset text you want to reclassify’”.

Aigents would then respond with both individual assessments of positive and negative sentiment estimations as well as the overall sentiment (which can be either positive or negative). A list of words and phrases contributing to the assessments is also created under the titles of ‘positives’ and ‘negatives’, respectively.

Additionally, any third-party service can use the Aigents Server installation as an API for sentiment analysis. The details of sentiment evaluation can be found in the code of LangPack component of the Aigents Platform.

Example of requesting text sentiment analysis in “Chat” view on https://aigents.com/ site with response returned in Aigents Language (AL) or JSON representation.

It should be made clear that the Aigents® platform is implementing an explainable language processing approach, so no matter which AI/ML technology has been used to create a linguistic model, the inferred model used in production should be transparent for human understanding and validation. Respectively, the results of using a model such as sentiment assessment in our case should always be interpretable by a human user.

What’s next?

We are taking a continuous improvement approach to the development of the Aigents® platform and following the initial test phase, our results identified many areas that require attention to further enhance the platform.

The following is a breakdown of the improvements we are actively working on and which you will find in the subsequent releases of the Aigents® platform.

  • The features (words and phrases or N-grams) contributing positive/negative sentiment should be weighted with the account to both A) statistical evidence of connectivity between them and respective sentiment perceptions and B) emotional and semantic relevance of the actual sentiment. We have not done this at the current stage, because only the SentiWordNet has been found to contain weights and the other lexicons used to bootstrap our work had no weights provided at all.
  • The weightings above should be context-aware so that different topics may have different associations of features with the sentiment, like ‘cold’, may be associated with positive sentiment in drinks advertisement and negative sentiment in the medical domain.
  • The context of the weightings above could be temporal and depending on current news agenda and trending topics, while the words ‘virus’ and ‘pandemic’ have a negative connotation in broad and eternal contexts, during the current pandemic of COVID19 these would become rather a neutral part of the context itself.
  • Users should be able to provide custom user-specific lexicons (dictionaries of features), optionally extending or overriding default lexicons (like the only one in the current version) or even building hierarchies of custom lexicons inheriting/extending each other (based on user-specific “knowledge subgraphs”).
  • Users should be able to configure which of the sentiment features (like “positive”, “negative” and “overall sentiment” available now) they want to involve for the assessment of the news items and topics and the rules that affect the assessment.
  • The assessment of the sentiment in regard to particular topics should be context-specific sentiment based on topic location and its surroundings within a sentence. That is, the sentiment of “a lot of tasty and nutritious food can lead to obesity symptoms” could be positive from the perspective of the topic ‘food’ but negative from the perspective of the topic ‘symptom’.
  • Maximization of the sentiment assessment accuracy would require not only the account of spatial proximity between the words identifying topics and sentiment in a sentence but rather complete semantics understanding of the sentence structure, concepts identified by the words and phrases as well as entire hierarchy of semantic relationships between these concepts.
  • Sentiment analysis can be applied not only to the news items and topics but to the search and personal social reports as well — this will be the focus of our works in the next couple of months.
  • The dictionaries of features should be extendable by means of incremental machine learning based on interactions with Aigents users — their explicit (and maybe implicit) feedback in the course of interactive reinforcement learning, involving the latest advances in deep neural networks joined with explainable/interpretable AI/ML techniques.

What to do?

For the time being, please help us by using the Aigents® platform and its brand new sentiment analysis, registering at https://aigents.com/. It would also help us tremendously to hear your feedback which can be directed to our channels on Facebook and Telegram. Also, feel free to leave us comments on Medium, Youtube and Steemit.

Join Aigents now

We encourage you to try to use and extend our current positive and negative lexicon files for English and Russian on Aigents GitHub — pull requests are welcome in respect to the following:

Thank you for your continued interest and support, stay tuned for further developments on the Aigents® Heternet!

Join Us

SingularityNET plans to reinforce and expand its collaborations to shape the coming AI Singularity into a positive one, for all. To read more about our other partners, click here.

SingularityNET has a passionate and talented community which you can connect with by visiting our Community Forum. For any additional information, please refer to our roadmaps and subscribe to our newsletter to stay informed about all of our developments.

--

--

Creating personal artificial intelligence and agents of collective intelligence for individuals and small businesses.