## 3 Methods and Modeling
### Data Collection with Word2 vec-Based Social Sensors  
In this paper, we built a micro-blogging-based traffic incident dataset that contains the influence factor of adverse weather from a particular location within a certain period of time. We use the principle of the \"3W\" dimensions (i.e., \"When, Where and What\" attributes). Specifically, we regarded time, location, and incidents as the three elements from social media that could also be inferred from a physical event. To begin collecting data from Weibo, we needed a keyword list for the crawler to detect related tweets. In terms of keywords in the traffic domain, to the best of our knowledge, few systemic or widely accepted keyword lists describe traffic incidents (or \"event categories\"). Therefore, we constructed a keyword list in the traffic domain by using a statistical method. Word2 vec model ([[https://code.google.com/archive/p/word2](https://code.google.com/archive/p/word2) vec/]([https://code.google.com/archive/p/word2](https://code.google.com/archive/p/word2) vec/)) creates a vector space (word embedding) by using artificial neutral networks to retain the words' original linguistic meaning. The word embedding models make it possible to measure the semantic similarity between words, and predict which words with similar semantic meaning will be close to each other in the vector space [48,49]. Assuming \(X\) and \(Y\) are two vectors with \(n\) dimensions and we let \(x_{i}\in X\) and \(y_{i}\in Y\), the cosine similarity can be calculated as follows:  
\[Sim(X,Y)=\frac{\sum_{i=1}^{n}x_{i}y_{i}}{\sqrt{\sum_{i=1}^{n}{x_{i}}^{2}}\cdot \sqrt{\sum_{i=1}^{n}{y_{i}}^{2}}} \tag{1}\]  
Unlike English sentences, Chinese sentences are separated semantically rather than by spaces, so all Chinese text needs to be segmented before using Word2 vec. In this paper, we conducted word segmentation using Python packages from Jieba ([[https://github.com/fksjy/jieba](https://github.com/fksjy/jieba)]([https://github.com/fksjy/jieba](https://github.com/fksjy/jieba))), and then trained a Word2 vec model with 200 dimensions using 1,049,823 traffic-related tweets and 324,130 traffic-related news records from June 2016 to June 2017. By combining news and tweets data into a training corpus, the wording styles of casual expression in tweets and formal expression in news can both be learned by word2 vec, which provides more precise word embedding results for message filtering and keyword extension. An example of word embedding for traffic is given in Table 1, which shows the closest words for the traffic keywords \"traffic congestion\" in our trained Word2 vec model. Figure 2: Architecture of city-level traffic situation awareness and alerting model. Here, a threshold of 0.5 is set in the word2 vec model to find synonyms (extended keywords), and all the synonyms were manually double checked by the authors and domain experts. Finally, we built the traffic keywords list with traffic seed keywords and extended keywords from traffic word embedding. The complete keyword list is given in Table 2 in Chinese; note that we translate all keywords into English for better comprehension. In terms of keywords for adverse weather, we applied Chinese National Standard GB/T 27962-2011 into our categories for 14 types of adverse weather. Based on these 14 kinds of adverse weather, we first used word2 vec to find similar words, as done for the traffic keyword list, and then had domain experts double check them to select key words. Table 3 gives a brief introduction as well as the final weather-related keyword list we used in our experiment; note that some different Chinese words correspond to the same English translations.