This is the source code repo for my personal research on leveraging IBM Watson Natural Language Understanding (NLU) for analysing developer's emotion of question posts in Stack Overflow targeting the-state-of-art cross-platform mobile development technologies: Flutter, React-native, angularjs, Cordova, Xamarin, ionic-framework and vue.js. (Ideally, you can use the code to exploring any technical topic in Stack Overflow)
- Sadness and Anger are the most common emotions involved in developer experience on cross-platform mobile technologies from Stack Overflow.
- As shown in the figure, the predominant emotion is sadness for all seven technical development frameworks. This implies that most developers use Stack Overflow Q&A forum to look for technical solutions when they feel frustrated or encounter an obstacle. The second prevalent emotion of anger can also reflect this phenomenon. This is not surprising to predict, however, it is still interesting to see that negative emotions are very common between developers when posting a question. In addition, React Native has the highest sadness score, while Xamarin is the lowest against other frameworks. For emotion of anger, all technical frameworks and tools share very close results. This indicates that developers tend to ask questions in a way that express limited sentiment context
- Python (version 3.7 is recommended)
- An IBM Cloud account with NLU service: https://cloud.ibm.com/catalog/services/natural-language-understanding
- IBM Watson services Python library (https://github.com/watson-developer-cloud/python-sdk
), to install:
pip install --upgrade ibm-watson
- Run get_posts.sql on StackExchange data explorer: https://data.stackexchange.com/stackoverflow/query/new , Change the tag name when needed. Alternatively, check https://drive.google.com/drive/folders/1Mc1vDUfF4UVdqSFLjfI8oynRg60aAzGH?usp=sharing for downloaded raw data and pre-processed data.
- Run pre_processing.py on downloaded csv file, change the file name for storing the results (e.g. 'flutter.txt')
- Run analysis_emotion.py on pre-processed file (e.g. 'flutter.txt'), replace the api and url with your own credential.
- download 'flutter full.csv' from https://drive.google.com/drive/folders/1Mc1vDUfF4UVdqSFLjfI8oynRg60aAzGH?usp=sharing
- run sendRandomPosts.py on 'flutter full.csv', remember to change file path and replace the api and url with your own credential
- check the printed results on the screen, you should get something like this one sample results
- Refer to following papers to learn more about cross-platform mobile app development tools:
Taxonomy of Cross-Platform Mobile Applications Development Approaches
Analysis of Cross-Platform Mobile App Development Tools
- learn more about IBM Watson's Deep Learning Semantic Approach:
the project is taken as the main assignment in Research Methods in Software Engineering & Computer Science course during my Master of Software Engineering program at University of Adelaide.