This repo is hosting a simple tweet-fetching (in C++ with OpenMP) and sentiment analysis (in Python) program, which can fetch a large number of tweets in parallel using multiple threads spawned by OpenMP, and achieve a huge performance improvement compared to fetching such a large number of tweets in serial.
Now Cython has been used to bridge C++ and Python codes.
Developed, tested and run on Ubuntu 16.04.4 LTS.
Check out the example.cpp for simple use case.
- Python-dev 2.7 if you would like analyze the sentiments of fetched tweets.
- UPDATED: Cython 0.28.3 (no ganrantee that newer version will work). Just use
pip install cythonto install it. - OpenSSL - should be already in the Ubuntu system. However, you also need OpenSSL library to enable SSL support for installation. Simply run
sudo apt-get install libssl-devon terminal. - CURL & libcurl - make sure to install with SSL enabled and have HTTPS protocol available after installation. Check out the official installation guide.
- OpenMP - already available: should be already with GCC on Linux.
- rapidjson - already available: included in the project. Check out the original Github repo for rapidjson for more information.
- SHA1 - already available: included in the project. Provides some HMAC-SHA1 encode/decode algorithms.
- Compilation - Cython 0.28.3 documentation - How to Cythonize python modules.
- Interfacing with external C code - How to create C functions accessible from other C/C++ codes.
- Cython reference guide