Computer science student analyses PM Lee's Facebook comments on public feud and this is what he got

Computer science student analyses PM Lee's Facebook comments on public feud and this is what he got

Many Singaporeans have something to say about the recent public feud involving Prime Minister Lee Hsien Loong and his siblings, Lee Wei Ling and Lee Hsien Yang.

While some netizens have posted words of encouragement and support on PM Lee's Facebook page, there has also been a fair share of detractors. But what is the overall sentiment of Singaporeans in the wake of this family matter that has been made very public recently?

A computer science and business student has attempted to gauge public response based on the comments left on PM Lee's Facebook post, which mentions that he was 'very disappointed' with his siblings.

Yi Jiayu, a third-year undergraduate of the Singapore University of Technology and Design-Singapore Management University dual-degree programme, carried out a sentiment analysis on the comments using Python 3 (programming language), Facebook Graph API and Google Cloud Natural Language API.

The 24-year-old posted the findings, instructions and source code on a blog post on Medium.com.

After extracting all 781 comments from the Facebook post on Wednesday (June 14), Yi's main project was accomplished using a script from the Google Cloud platform to categorise the comments into "positive", "neutral" or "negative".

Photo: Screengrab of Yi's blog post

A total of 530 (67.86%) comments were positive, 109 (13.96%) comments were negative and 142 (18.18%) comments were neutral.

However, Yi did note that Facebook is "by no means a source of objective views". Comments are most likely to contain a certain degree of bias and there could be moderation too, which further reduces the objectivity of his findings.

[[nid:389260]]

"This blog post should be taken as purely an exercise in using the Facebook Graph API and Google Cloud Natural Language API, and not to draw any conclusions about Singapore’s political situation," wrote Yi.

[[nid:389216]]

Of course, having almost 70% of the comments being positive reveals the presence of strong public support for PM Lee. However, Yi did caution that visitors to a Facebook page may be biased towards that page.

Do you think the overall positivity in the comments is justified and fair? Let us know in the comments below.

ongymm@sph.com.sg

This website is best viewed using the latest versions of web browsers.