The is the code for paper "Disaster Damage Assessment Based on Fine-Grained Topics in Social Media ".
OS: Windows 7 Memory: 16G IDE: Spyder
The code is written Python language and IDE is Spyder. When running code in Spyder, the following dependent libraries are required:
Python 2.7 sklearn pandas numpy jieba codecs gensim
- The code is written based on Python27. Python27 is available at: https://www.python.org/downloads/release/2.7/;
- The data (i.e., tweet location, time, text) for the fine-grained topic extraction are avaliable through Data. Following the Sina Developer Agreement Policy, we publish only part of location field. If you want to get full field of geolocation information, please contact us.
- The main code include:
- DataPreprocessing.py, where you can preprocess the collected data, including remove stopwords, feature words extraction, etc.
- Word2Vec_Representation.py, where the texts were encoded into word vectors through word2vec model.
- NetworkConstruction, where the semantic similarity between words were calculated and then convert them into graph format.