## 3 Work-Flow
### Semantic Flows  
SNAP's final step is to create semantic flows by tracking and connecting the semantic concepts in temporally adjacent documents. In addition to the creation of the integrated text-mining SNAP framework, the notion of semantic concept flows is our main, novel contribution (in addition to the design and implementation of SNAP as an OSS framework). The semantic concept flows refer to the dynamics of how the semantic concepts behave in space and time by being split, merged, annihilated or originated. A semantic flow is created between two documents if the documents are adjacent to each other in time; implemented as a difference between two document time-stamps being less then a user defined threshold. A semantic flow \(F_{d_{p},d_{q}}\) between two adjacent documents \(d_{p}\) and \(d_{q}\) is defined as a relationship between any two concepts \(C\) that share nodes \(n\)  
\[F_{d_{p},d_{q}}=\{\exists n_{i}\mid n_{i}\in C_{d_{p},k_{p}}\wedge n_{i}\in C_{ d_{q},l_{q}},\ \forall\ k_{p}=1\ldots Q_{p},\ l_{q}=1\ldots Q_{q}\}. \tag{2}\]  
A semantic concept flow is implemented as a 3D mesh that connects two semantic communities. The algorithmic implementation of a semantic flow detection is by a simple token identity search in two consecutive document layers. If a token in a document \(d_{p}\) is found in the subsequent document \(d_{q}\), a semantic flow is added as an edge connecting the two communities \(C_{d_{p},k_{p}}\) and \(C_{d_{q},k_{q}}\) that the node \(n_{i}\) belongs to. The dynamics of a semantic flow is not explicitly quantified; it is left for a user to explore using the framework's interactive 3D visualization. Figure 1, step 6, shows two sets of identical tokens that appear in both temporally adjacent documents and belong to the same blue semantic concept, thus defining a perimeter of a new 3D mesh that connects these nodes and propagates this semantic concept through time. On the other hand, the yellow semantic concept has the same tokens in two temporally adjacent documents 1 and 2, but not all tokens in the document 2 belong to the same community. The original semantic concept is therefore mapped to two semantic concepts in the subsequent document by generating two 3D meshes that track tokens that belong to a yellow community in document 1 but are assigned to two different semantic concepts in document 2. This mechanism of one-to-many mapping allows for semantic concept splitting. Formally, we define the semantic concept splitting as  
\[ \begin{split} F^{+}_{d_{p},d_{q}}=\{\exists n_{i},\ n_{j}\ |\ n_{i},\ n_{j}\ \epsilon\ C_{d_{p},k_{p}}\wedge n_{i}\ \epsilon\ C_{d_{p},l_{q}}\wedge n_{j}\ \epsilon\ C_{d_{q},m_{q}}\wedge l_{q}\
eq m_{q},\\ \forall\ k_{p}=1\ldots Q_{p},\ m_{q}\,\ l_{q}=1\ldots Q_{q}\}, \end{split}  \tag{3}\]  
which requires two nodes from the same semantic concept \(C_{d_{p},k_{p}}\) to belong to two different semantic concepts \(C_{d_{p},l_{q}}\) and \(C_{d_{q},m_{q}}\) in the subsequent document \(d_{q}\). The semantic concept flow merge is defined symmetrically as  
\[ \begin{split} F^{-}_{d_{p},d_{q}}=\{\exists n_{i},\ n_{j}\ |\ n_{i}\epsilon\ C_{d_{p},k_{p}}\wedge\ n_{j}\epsilon\ C_{d_{p},o_{p}}\wedge n _{i},\ n_{j}\ \epsilon\ C_{d_{q},l_{q}}\wedge k_{p}\
eq o_{p},\\ \forall\ k_{p},\ o_{p}=1\ldots Q_{p},\ l_{q}=1\ldots Q_{q}\}, \end{split}  \tag{4}\]  
where two nodes within the proceeding document \(d_{p}\) that belong to two different semantic concepts will belong to the same concept flow \(C_{d_{p},l_{q}}\) in the document \(d_{q}\). Visualization of the merging of two semantic flows can be seen when two or more distinct 3D meshes that track two or more semantic concepts tokens from the previous document are combined to one semantic concept flow in the current document (many-to-one mapping of semantic concepts). A semantic flow is originated if tokens exist in the current document and the subsequent document(s) but do not appear in the previous document (formal definition is identical to Equation (2)).