|
Algorithm 2. Transportation Events Alignment and Fusion
|
|
Input:,,,
|
|
Output: AlignedTopicsList, FusionEventMatrix
|
|
//Step 1: aligning the topic clusters inand, return AlignedTopicsList
|
| For each in
|
| WeiboIndex = i
|
| For each in
|
| If
|
|
|
| NewsAlignedIndex = j
|
| End for // Find the closest topic cluster
|
| Append (WeiboIndex, NewsAlignedIndex) to AlignedTopicsList |
| End for // couple closet the topic clusters into pairs
|
| //Step 2: fusing the words in the cross-paired topics, return FusionEventMatrix
|
| For each index pair in AlignedTopicsList |
| i = WeiboIndex; |
| j = NewsAlignedIndex |
| LBn =
|
| UBw = + // calculate the low boundary and up boundary for news words
|
| LBw = −
|
| UBw = + // calculate the low boundary and up boundary for weibo words
|
| For each in
|
| For each in
|
| If
|
| minWordDis =
|
| minWordIndex = n
|
| End for // Find the shortest word embedding distance in coupled clusters
|
| If LBw < minWordDis < UBw // remove anomaly word in Weibo cluster
|
| If LBn < minWordDis < UBn
|
| Append to FusionEventList // append words in News cluster
|
| Else |
| Append to FusionEventList // append words in Weibo cluster
|
| End for |
| Append FusionEventList to FusionEventMatrix |
| End for |